Openshift 3 安装问题
Openshift 3 installation issue
我正在我的 Centos 7.8 VMS 上安装 Openshift 3.11 版本集群。配置是有三个Centos VM(一个主节点+两个工作节点)。我还配置了我的库存文件,'prerequisites.yml' 剧本也 运行 成功。但是当我 运行 剧本 'deploy_cluster.yml' 时,它会产生如下错误 ----
TASK [openshift_version : fail] ***********************************************************************************************************
fatal: [kubernetus]: FAILED! => {"msg": "The conditional check 'not rpm_results.results.package_found' failed. The error was: error while e
valuating conditional (not rpm_results.results.package_found): 'dict object' has no attribute 'results'\n\nThe error appears to be in '/usr
/share/ansible/openshift-ansible/roles/openshift_version/tasks/check_available_rpms.yml': line 8, column 3, but may\nbe elsewhere in the fi
le depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- fail:\n ^ here\n"}
Failure summary:
1. Hosts: kubernetus
Play: Determine openshift_version to configure on first master
Task: openshift_version : fail
Message: The conditional check 'not rpm_results.results.package_found' failed. The error was: error while evaluating conditional (no$ rpm_results.results.package_found): 'dict object' has no attribute 'results'
The error appears to be in '/usr/share/ansible/openshift-ansible/roles/openshift_version/tasks/check_available_rpms.yml': li
ne 8, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- fail:
^ here
For this, I even checked the corresponding file mentioned above (/usr/share/ansible/openshift-ansible/roles/openshift_version/tasks/check_available_rpms.yml) but could not find anything. Its contents are as follows ---
---
- name: Get available RPM version
repoquery:
name: "{{ openshift_service_type }}{% if openshift_version is defined %}-{{ openshift_version }}*{% elif openshift_release is defined %}-{{ openshift_release }}*{% endif %}"
ignore_excluders: true
register: rpm_results
- fail:
msg: "Package '{{ rpm_results.results.package_name }}' not found"
when: not rpm_results.results.package_found
谁能帮我解决这个问题,因为我找不到任何解决方案?
The output of - debug: var=rpm_results is as follows ----
TASK [openshift_version : debug]
**********************************************************************************************************
ok: [kubernetus] => {
"rpm_results": {
"ansible_module_results": {
"cmd": "/usr/bin/repoquery --plugins --quiet --pkgnarrow=repos --queryformat=%{version}|%{release}|%{arch}|%{repo}|%{version}-%
{release} --config=/tmp/tmpWCj7Cy origin-3.11.0*",
"package_found": true,
"package_name": "origin-3.11.0*",
"returncode": 0,
"versions": {
"available_versions": [
"3.11.0"
],
"available_versions_full": [
"3.11.0-1.el7.git.0.62803d0"
],
"latest": "3.11.0",
"latest_full": "3.11.0-1.el7.git.0.62803d0"
}
},
"changed": false,
"check_mode": false,
"failed": false,
"state": "list"
}
}
The output of yum search openshift is as follows ----
[root@kubernetus playbooks]# yum search openshift
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* base: mirror.xeonbd.com
* extras: mirror.xeonbd.com
* remi-php73: mirror.veriteknik.net.tr
* remi-safe: mirror.veriteknik.net.tr
* updates: mirror.xeonbd.com
========================================================= N/S matched: openshift ==========================================================
atomic-openshift-utils.noarch : Atomic OpenShift Utilities
centos-release-openshift-origin13.noarch : Yum configuration for OpenShift Origin 1.3 packages
centos-release-openshift-origin14.noarch : Yum configuration for OpenShift Origin 1.4 packages
centos-release-openshift-origin15.noarch : Yum configuration for OpenShift Origin 1.5 packages
centos-release-openshift-origin310.noarch : Yum configuration for OpenShift Origin 3.10 packages
centos-release-openshift-origin311.noarch : Yum configuration for OpenShift Origin 3.11 packages
centos-release-openshift-origin36.noarch : Yum configuration for OpenShift Origin 3.6 packages
centos-release-openshift-origin37.noarch : Yum configuration for OpenShift Origin 3.7 packages
centos-release-openshift-origin39.noarch : Yum configuration for OpenShift Origin 3.9 packages
openshift-ansible.noarch : Openshift and Atomic Enterprise Ansible
openshift-ansible-callback-plugins.noarch : Openshift and Atomic Enterprise Ansible callback plugins
openshift-ansible-docs.noarch : Openshift and Atomic Enterprise Ansible documents
openshift-ansible-filter-plugins.noarch : Openshift and Atomic Enterprise Ansible filter plugins
openshift-ansible-lookup-plugins.noarch : Openshift and Atomic Enterprise Ansible lookup plugins
openshift-ansible-playbooks.noarch : Openshift and Atomic Enterprise Ansible Playbooks
openshift-ansible-roles.noarch : Openshift and Atomic Enterprise Ansible roles
openshift-ansible-test.noarch : Openshift and Atomic Enterprise Ansible Test Playbooks
openshift-excluder.noarch : Exclude openshift packages from updates
centos-release-openshift-origin.noarch : Common release file to establish shared metadata for CentOS PaaS SIG
origin-excluder.noarch : Exclude openshift packages from updates
Name and summary matches only, use "search all" for everything.
Output of 'yum search origin-3.11.0*' is as follows ----
[root@kubernetus playbooks]# yum search origin-3.11.0*
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* base: mirror.xeonbd.com
* extras: mirror.xeonbd.com
* remi-php73: mirror.veriteknik.net.tr
* remi-safe: mirror.veriteknik.net.tr
* updates: mirror.xeonbd.com
Warning: No matches found for: origin-3.11.0*
No matches found
从评论中复制(因为这似乎是问题所在):
所以似乎 repoquery 正在寻找“origin-3.11.0*”。 运行 yum search origin-3.11.0* 的输出是什么?我猜这不会找到任何东西,请检查是否附加了正确的 YUM 存储库。
您似乎在混合使用 OpenShift 版本,您附加了 3.9 存储库,但正在尝试安装 3.11。您需要附加 3.11 存储库。推荐参考官方文档安装:https://docs.okd.io/3.11/install/index.html
我正在我的 Centos 7.8 VMS 上安装 Openshift 3.11 版本集群。配置是有三个Centos VM(一个主节点+两个工作节点)。我还配置了我的库存文件,'prerequisites.yml' 剧本也 运行 成功。但是当我 运行 剧本 'deploy_cluster.yml' 时,它会产生如下错误 ----
TASK [openshift_version : fail] ***********************************************************************************************************
fatal: [kubernetus]: FAILED! => {"msg": "The conditional check 'not rpm_results.results.package_found' failed. The error was: error while e
valuating conditional (not rpm_results.results.package_found): 'dict object' has no attribute 'results'\n\nThe error appears to be in '/usr
/share/ansible/openshift-ansible/roles/openshift_version/tasks/check_available_rpms.yml': line 8, column 3, but may\nbe elsewhere in the fi
le depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- fail:\n ^ here\n"}
Failure summary:
1. Hosts: kubernetus
Play: Determine openshift_version to configure on first master
Task: openshift_version : fail
Message: The conditional check 'not rpm_results.results.package_found' failed. The error was: error while evaluating conditional (no$ rpm_results.results.package_found): 'dict object' has no attribute 'results'
The error appears to be in '/usr/share/ansible/openshift-ansible/roles/openshift_version/tasks/check_available_rpms.yml': li
ne 8, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- fail:
^ here
For this, I even checked the corresponding file mentioned above (/usr/share/ansible/openshift-ansible/roles/openshift_version/tasks/check_available_rpms.yml) but could not find anything. Its contents are as follows ---
---
- name: Get available RPM version
repoquery:
name: "{{ openshift_service_type }}{% if openshift_version is defined %}-{{ openshift_version }}*{% elif openshift_release is defined %}-{{ openshift_release }}*{% endif %}"
ignore_excluders: true
register: rpm_results
- fail:
msg: "Package '{{ rpm_results.results.package_name }}' not found"
when: not rpm_results.results.package_found
谁能帮我解决这个问题,因为我找不到任何解决方案?
The output of - debug: var=rpm_results is as follows ----
TASK [openshift_version : debug]
**********************************************************************************************************
ok: [kubernetus] => {
"rpm_results": {
"ansible_module_results": {
"cmd": "/usr/bin/repoquery --plugins --quiet --pkgnarrow=repos --queryformat=%{version}|%{release}|%{arch}|%{repo}|%{version}-%
{release} --config=/tmp/tmpWCj7Cy origin-3.11.0*",
"package_found": true,
"package_name": "origin-3.11.0*",
"returncode": 0,
"versions": {
"available_versions": [
"3.11.0"
],
"available_versions_full": [
"3.11.0-1.el7.git.0.62803d0"
],
"latest": "3.11.0",
"latest_full": "3.11.0-1.el7.git.0.62803d0"
}
},
"changed": false,
"check_mode": false,
"failed": false,
"state": "list"
}
}
The output of yum search openshift is as follows ----
[root@kubernetus playbooks]# yum search openshift
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* base: mirror.xeonbd.com
* extras: mirror.xeonbd.com
* remi-php73: mirror.veriteknik.net.tr
* remi-safe: mirror.veriteknik.net.tr
* updates: mirror.xeonbd.com
========================================================= N/S matched: openshift ==========================================================
atomic-openshift-utils.noarch : Atomic OpenShift Utilities
centos-release-openshift-origin13.noarch : Yum configuration for OpenShift Origin 1.3 packages
centos-release-openshift-origin14.noarch : Yum configuration for OpenShift Origin 1.4 packages
centos-release-openshift-origin15.noarch : Yum configuration for OpenShift Origin 1.5 packages
centos-release-openshift-origin310.noarch : Yum configuration for OpenShift Origin 3.10 packages
centos-release-openshift-origin311.noarch : Yum configuration for OpenShift Origin 3.11 packages
centos-release-openshift-origin36.noarch : Yum configuration for OpenShift Origin 3.6 packages
centos-release-openshift-origin37.noarch : Yum configuration for OpenShift Origin 3.7 packages
centos-release-openshift-origin39.noarch : Yum configuration for OpenShift Origin 3.9 packages
openshift-ansible.noarch : Openshift and Atomic Enterprise Ansible
openshift-ansible-callback-plugins.noarch : Openshift and Atomic Enterprise Ansible callback plugins
openshift-ansible-docs.noarch : Openshift and Atomic Enterprise Ansible documents
openshift-ansible-filter-plugins.noarch : Openshift and Atomic Enterprise Ansible filter plugins
openshift-ansible-lookup-plugins.noarch : Openshift and Atomic Enterprise Ansible lookup plugins
openshift-ansible-playbooks.noarch : Openshift and Atomic Enterprise Ansible Playbooks
openshift-ansible-roles.noarch : Openshift and Atomic Enterprise Ansible roles
openshift-ansible-test.noarch : Openshift and Atomic Enterprise Ansible Test Playbooks
openshift-excluder.noarch : Exclude openshift packages from updates
centos-release-openshift-origin.noarch : Common release file to establish shared metadata for CentOS PaaS SIG
origin-excluder.noarch : Exclude openshift packages from updates
Name and summary matches only, use "search all" for everything.
Output of 'yum search origin-3.11.0*' is as follows ----
[root@kubernetus playbooks]# yum search origin-3.11.0*
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* base: mirror.xeonbd.com
* extras: mirror.xeonbd.com
* remi-php73: mirror.veriteknik.net.tr
* remi-safe: mirror.veriteknik.net.tr
* updates: mirror.xeonbd.com
Warning: No matches found for: origin-3.11.0*
No matches found
从评论中复制(因为这似乎是问题所在):
所以似乎 repoquery 正在寻找“origin-3.11.0*”。 运行 yum search origin-3.11.0* 的输出是什么?我猜这不会找到任何东西,请检查是否附加了正确的 YUM 存储库。
您似乎在混合使用 OpenShift 版本,您附加了 3.9 存储库,但正在尝试安装 3.11。您需要附加 3.11 存储库。推荐参考官方文档安装:https://docs.okd.io/3.11/install/index.html