Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ansible 在尝试添加新节点时,无法部署okd群集_Ansible_Okd - Fatal编程技术网

Ansible 在尝试添加新节点时,无法部署okd群集

Ansible 在尝试添加新节点时,无法部署okd群集,ansible,okd,Ansible,Okd,这就是我目前的情况。我现在有一个独立的OKD集群正在运行 [jay@okd-master-oel:~ ]$ oc cluster status Web console URL: https://10.176.5.2.nip.io:8443/console/ Config is at host directory Volumes are at host directory Persistent volumes are at host directory /home/jay/openshift.l

这就是我目前的情况。我现在有一个独立的OKD集群正在运行

[jay@okd-master-oel:~ ]$ oc cluster status
Web console URL: https://10.176.5.2.nip.io:8443/console/

Config is at host directory
Volumes are at host directory
Persistent volumes are at host directory /home/jay/openshift.local.clusterup/openshift.local.pv
Data will be discarded when cluster is destroyed

[jay@okd-master-oel:~ ]$ oc version
oc v3.11.0+0cbc58b
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://127.0.0.1:8443
kubernetes v1.11.0+d4cacc0

[jay@okd-master-oel:~ ]$ docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-103.git7f2769b.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      7f2769b/1.13.1
 Built:           Sun Sep 15 14:06:47 2019
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-103.git7f2769b.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      7f2769b/1.13.1
 Built:           Sun Sep 15 14:06:47 2019
 OS/Arch:         linux/amd64
 Experimental:    false

[jay@okd-master-oel:~ ]$ ansible --version
    ansible 2.6.5
      config file = /etc/ansible/ansible.cfg
      configured module search path = [u'/home/jay/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
      ansible python module location = /usr/lib/python2.7/site-packages/ansible
      executable location = /usr/bin/ansible
      python version = 2.7.5 (default, Aug  7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
我遵循了doc和git克隆以及cd openshift ansible和git checkout版本3.11

我通过了ansible剧本的先决条件;但是,当我尝试运行“ansible playbook deploy\u cluster.yml”时,似乎希望在主节点上安装源节点。请检查ansible playbook deploy-cluster.yml-vvv中的详细错误:

任务[openshift\u node\u组:将sysconfig更新为组“node config master”]***************************************************************************************************************************************************************

task path: /home/jay/new_playbooks/openshift-ansible/roles/openshift_node_group/tasks/bootstrap_config.yml:12
<okd-master-oel> ESTABLISH SSH CONNECTION FOR USER: jay
<okd-master-oel> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=jay -o ConnectTimeout=10 -o ControlPath=/home/jay/.ansible/cp/8ba586f32f okd-master-oel '/bin/sh -c '"'"'echo ~jay && sleep 0'"'"''
<okd-master-oel> (0, '/home/jay\n', '')
<okd-master-oel> ESTABLISH SSH CONNECTION FOR USER: jay
<okd-master-oel> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=jay -o ConnectTimeout=10 -o ControlPath=/home/jay/.ansible/cp/8ba586f32f okd-master-oel '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/jay/.ansible/tmp/ansible-tmp-1576750542.05-272544100349860 `" && echo ansible-tmp-1576750542.05-272544100349860="` echo /home/jay/.ansible/tmp/ansible-tmp-1576750542.05-272544100349860 `" ) && sleep 0'"'"''
<okd-master-oel> (0, 'ansible-tmp-1576750542.05-272544100349860=/home/jay/.ansible/tmp/ansible-tmp-1576750542.05-272544100349860\n', '')
Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/lineinfile.py
<okd-master-oel> PUT /home/jay/.ansible/tmp/ansible-local-113140c5lfJr/tmpIR985a TO /home/jay/.ansible/tmp/ansible-tmp-1576750542.05-272544100349860/lineinfile.py
<okd-master-oel> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=jay -o ConnectTimeout=10 -o ControlPath=/home/jay/.ansible/cp/8ba586f32f '[okd-master-oel]'
<okd-master-oel> (0, 'sftp> put /home/jay/.ansible/tmp/ansible-local-113140c5lfJr/tmpIR985a /home/jay/.ansible/tmp/ansible-tmp-1576750542.05-272544100349860/lineinfile.py\n', '')
<okd-master-oel> ESTABLISH SSH CONNECTION FOR USER: jay
<okd-master-oel> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=jay -o ConnectTimeout=10 -o ControlPath=/home/jay/.ansible/cp/8ba586f32f okd-master-oel '/bin/sh -c '"'"'chmod u+x /home/jay/.ansible/tmp/ansible-tmp-1576750542.05-272544100349860/ /home/jay/.ansible/tmp/ansible-tmp-1576750542.05-272544100349860/lineinfile.py && sleep 0'"'"''
<okd-master-oel> (0, '', '')
<okd-master-oel> ESTABLISH SSH CONNECTION FOR USER: jay
<okd-master-oel> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=jay -o ConnectTimeout=10 -o ControlPath=/home/jay/.ansible/cp/8ba586f32f -tt okd-master-oel '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-ycuntzeethnrnvfamqnsasscycnnazwz; /usr/bin/python /home/jay/.ansible/tmp/ansible-tmp-1576750542.05-272544100349860/lineinfile.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<okd-master-oel> (1, '\r\n\r\n{"msg": "Destination /etc/sysconfig/origin-node does not exist !", "failed": true, "rc": 257, "invocation": {"module_args": {"directory_mode": null, "force": null, "remote_src": null, "backrefs": false, "insertafter": null, "path": "/etc/sysconfig/origin-node", "owner": null, "follow": false, "line": "BOOTSTRAP_CONFIG_NAME=node-config-master", "group": null, "insertbefore": null, "unsafe_writes": null, "create": false, "state": "present", "content": null, "serole": null, "setype": null, "dest": "/etc/sysconfig/origin-node", "selevel": null, "regexp": "^BOOTSTRAP_CONFIG_NAME=.*", "validate": null, "src": null, "seuser": null, "delimiter": null, "mode": null, "firstmatch": false, "attributes": null, "backup": false}}}\r\n', 'Shared connection to okd-master-oel closed.\r\n')
<okd-master-oel> ESTABLISH SSH CONNECTION FOR USER: jay
<okd-master-oel> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=jay -o ConnectTimeout=10 -o ControlPath=/home/jay/.ansible/cp/8ba586f32f okd-master`enter code here`-oel '/bin/sh -c '"'"'rm -f -r /home/jay/.ansible/tmp/ansible-tmp-1576750542.05-272544100349860/ > /dev/null 2>&1 && sleep 0'"'"''
<okd-master-oel> (0, '', '')
fatal: [okd-master-oel]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "attributes": null,
            "backrefs": false,
            "backup": false,
            "content": null,
            "create": false,
            "delimiter": null,
            "dest": "/etc/sysconfig/origin-node",
            "directory_mode": null,
            "firstmatch": false,
            "follow": false,
            "force": null,
            "group": null,
            "insertafter": null,
            "insertbefore": null,
            "line": "BOOTSTRAP_CONFIG_NAME=node-config-master",
            "mode": null,
            "owner": null,
            "path": "/etc/sysconfig/origin-node",
            "regexp": "^BOOTSTRAP_CONFIG_NAME=.*",
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "state": "present",
            "unsafe_writes": null,
            "validate": null
        }
    },
    "msg": "Destination /etc/sysconfig/origin-node does not exist !",
    "rc": 257
}
你能提供建议吗

[OSEv3:children]
masters
etcd
nodes
new_nodes

[OSEv3:vars]
ansible_ssh_user=jay
ansible_become=true
openshift_deployment_type=origin

openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}]

[masters]
okd-master-oel

[etcd]
okd-master-oel

[nodes]
okd-master-oel openshift_node_group_name='node-config-master'

# add definition for new node (add Infra node feature on this example below)
[new_nodes]
okd-centos-2 openshift_node_group_name='node-config-infra'