无法通过 CentOS 7 上 Openshift Origin 安装的先决条件
Unable to pass the pre req for Openshift Origin Installation On CentOS 7
我正在尝试在三节点集群(master、infra 和 compute)上安装 openshift origin。 Ansible prereq 失败了,我想知道为什么。
我使用的命令:-
ansible-playbook
/usr/share/ansible/openshift-ansible/playbooks/prerequisites.yml
--extra-vars "deployment_type=origin ansible_ssh_user=origin ansible_ssh_pass=**********
/etc/ansible/hosts
[OSEv3:children]
masters
infra
compute.openshift.local
[OSEv3:vars]
# admin user created in previous section
ansible_ssh_user=origin
ansible_become=true
openshift_deployment_type=origin
# use HTPasswd for authentication
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}]
# define default sub-domain for Master node
openshift_master_default_subdomain=master.openshift.local
# allow unencrypted connection within cluster
openshift_docker_insecure_registries=172.30.0.0/16
[masters]
master.openshift.local openshift_schedulable=true containerized=false
[etcd]
master.openshift.local
[nodes]
# defined values for [openshift_node_group_name] in the file below
# [/usr/share/ansible/openshift-ansible/roles/openshift_facts/defaults/main.yml]
# ctrl.srv.world openshift_node_group_name='node-config-master-infra'
# node01.srv.world openshift_node_group_name='node-config-compute'
# node02.srv.world openshift_node_group_name='node-config-compute'
# if you'd like to separate Master node feature and Infra node feature, set like follows
master.openshift.local openshift_node_group_name='node-config-master'
infra.openshift.local openshift_node_group_name='node-config-infra'
compute.openshift.local openshift_node_group_name='node-config-compute'
fatal: [master.openshift.local]: FAILED! => {"changed": false, "module_stderr": "Shared connection to master.openshift.local closed.\r\n", "module_stdout": "KeyError('ansible_os_family',)\r\nTraceback (most recent call last):\r\n File \"/home/origin/.ansible/tmp/ansible-tmp-1567193370.23-159849689337768/AnsiballZ_openshift_facts.py\", line 114, in <module>\r\n _ansiballz_main()\r\n File \"/home/origin/.ansible/tmp/ansible-tmp-1567193370.23-159849689337768/AnsiballZ_openshift_facts.py\", line 106, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/origin/.ansible/tmp/ansible-tmp-1567193370.23-159849689337768/AnsiballZ_openshift_facts.py\", line 49, in invoke_module\r\n imp.load_module('__main__', mod, module, MOD_DESC)\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1270, in <module>\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1257, in main\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1010, in __init__\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1026, in generate_facts\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1204, in init_local_facts\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 751, in save_local_facts\r\n__main__.OpenShiftFactsFileWriteError: Could not create fact file: /etc/ansible/facts.d/openshift.fact, error: [Errno 13] Permission denied: '/etc/ansible/facts.d/openshift.fact'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
...
... [Errno 13] Permission denied: '/etc/ansible/facts.d/openshift.fact'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
以上错误消息表示 /etc/ansible/facts.d/openshift.fact
无法使用 origin
用户在节点上创建。
您能否验证 origin
用户是否可以在所有节点上将权限升级为 root
?
例如> 例如,检查您是否可以使用 sudo
.
获得 root
权限
origin@hostname ~$ sudo -i
root@hostname ~#
我正在尝试在三节点集群(master、infra 和 compute)上安装 openshift origin。 Ansible prereq 失败了,我想知道为什么。
我使用的命令:-
ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/prerequisites.yml --extra-vars "deployment_type=origin ansible_ssh_user=origin ansible_ssh_pass=**********
/etc/ansible/hosts
[OSEv3:children]
masters
infra
compute.openshift.local
[OSEv3:vars]
# admin user created in previous section
ansible_ssh_user=origin
ansible_become=true
openshift_deployment_type=origin
# use HTPasswd for authentication
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}]
# define default sub-domain for Master node
openshift_master_default_subdomain=master.openshift.local
# allow unencrypted connection within cluster
openshift_docker_insecure_registries=172.30.0.0/16
[masters]
master.openshift.local openshift_schedulable=true containerized=false
[etcd]
master.openshift.local
[nodes]
# defined values for [openshift_node_group_name] in the file below
# [/usr/share/ansible/openshift-ansible/roles/openshift_facts/defaults/main.yml]
# ctrl.srv.world openshift_node_group_name='node-config-master-infra'
# node01.srv.world openshift_node_group_name='node-config-compute'
# node02.srv.world openshift_node_group_name='node-config-compute'
# if you'd like to separate Master node feature and Infra node feature, set like follows
master.openshift.local openshift_node_group_name='node-config-master'
infra.openshift.local openshift_node_group_name='node-config-infra'
compute.openshift.local openshift_node_group_name='node-config-compute'
fatal: [master.openshift.local]: FAILED! => {"changed": false, "module_stderr": "Shared connection to master.openshift.local closed.\r\n", "module_stdout": "KeyError('ansible_os_family',)\r\nTraceback (most recent call last):\r\n File \"/home/origin/.ansible/tmp/ansible-tmp-1567193370.23-159849689337768/AnsiballZ_openshift_facts.py\", line 114, in <module>\r\n _ansiballz_main()\r\n File \"/home/origin/.ansible/tmp/ansible-tmp-1567193370.23-159849689337768/AnsiballZ_openshift_facts.py\", line 106, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/origin/.ansible/tmp/ansible-tmp-1567193370.23-159849689337768/AnsiballZ_openshift_facts.py\", line 49, in invoke_module\r\n imp.load_module('__main__', mod, module, MOD_DESC)\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1270, in <module>\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1257, in main\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1010, in __init__\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1026, in generate_facts\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 1204, in init_local_facts\r\n File \"/tmp/ansible_openshift_facts_payload_REiGHs/__main__.py\", line 751, in save_local_facts\r\n__main__.OpenShiftFactsFileWriteError: Could not create fact file: /etc/ansible/facts.d/openshift.fact, error: [Errno 13] Permission denied: '/etc/ansible/facts.d/openshift.fact'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
...
... [Errno 13] Permission denied: '/etc/ansible/facts.d/openshift.fact'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
以上错误消息表示 /etc/ansible/facts.d/openshift.fact
无法使用 origin
用户在节点上创建。
您能否验证 origin
用户是否可以在所有节点上将权限升级为 root
?
例如> 例如,检查您是否可以使用 sudo
.
root
权限
origin@hostname ~$ sudo -i
root@hostname ~#