openshift / openshift-ansible

Install and config an OpenShift 3.x cluster
https://try.openshift.com
Apache License 2.0
2.16k stars 2.31k forks source link

ansible release-3.7 fails with docker 17.12-0-ce #6574

Closed ghaskins closed 6 years ago

ghaskins commented 6 years ago

Description

Attempting to install Origin v3.7 on Centos 7.4 with docker upgraded to latest stable (17.12-0-ce) fails due to version parsing problem in playbook.

TASK [Gather Cluster facts and set is_containerized if needed] *** task path: /var/lib/awx/projects/_7__upstream_openshift/playbooks/common/openshift-cluster/initialize_facts.yml:130 Sunday 31 December 2017 14:26:50 +0000 (0:00:00.200) 0:00:19.387 * Using module file /var/lib/awx/projects/_7__upstream_openshift/roles/openshift_facts/library/openshift_facts.py

ESTABLISH SSH CONNECTION FOR USER: centos SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=600s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/tmp/awx_315_YjUDS0/cp/%h%p%r vm-1-1.lab.net '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-ichosycjoelzhlzcrlzgcdedgweujjsh; /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"'' Using module file /var/lib/awx/projects/_7__upstream_openshift/roles/openshift_facts/library/openshift_facts.py ESTABLISH SSH CONNECTION FOR USER: centos Using module file /var/lib/awx/projects/_7__upstream_openshift/roles/openshift_facts/library/openshift_facts.py Using module file /var/lib/awx/projects/_7__upstream_openshift/roles/openshift_facts/library/openshift_facts.py ESTABLISH SSH CONNECTION FOR USER: centos SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=600s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/tmp/awx_315_YjUDS0/cp/%h%p%r vm-2-1.lab.net '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-tmxsfhzgwmrkaopsrmsuuclmalpexljg; /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"'' ESTABLISH SSH CONNECTION FOR USER: centos SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=600s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/tmp/awx_315_YjUDS0/cp/%h%p%r vm-1-5.lab.net '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-isybhpxduapxnmtottyamqmvrgghpffc; /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"'' SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=600s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/tmp/awx_315_YjUDS0/cp/%h%p%r vm-1-4.lab.net '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-wuopnlpzavizcizhvlvevtwoekrbwosv; /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"'' Using module file /var/lib/awx/projects/_7__upstream_openshift/roles/openshift_facts/library/openshift_facts.py ESTABLISH SSH CONNECTION FOR USER: centos SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=600s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/tmp/awx_315_YjUDS0/cp/%h%p%r vm-1-3.lab.net '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-bentbpfghhdtdyocbfjkfosxpipkjkle; /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"'' (1, '', 'Traceback (most recent call last):\n File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 2481, in \n main()\n File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 2468, in main\n protected_facts_to_overwrite)\n File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 1827, in __init__\n protected_facts_to_overwrite)\n File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 1864, in generate_facts\n defaults = self.get_defaults(roles, deployment_type, deployment_subtype)\n File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 1958, in get_defaults\n version_info = get_docker_version_info()\n File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 1202, in get_docker_version_info\n version_info = yaml.safe_load(get_version_output(\'/usr/bin/docker\', \'version\'))\n File "/usr/lib64/python2.7/site-packages/yaml/__init__.py", line 93, in safe_load\n return load(stream, SafeLoader)\n File "/usr/lib64/python2.7/site-packages/yaml/__init__.py", line 71, in load\n return loader.get_single_data()\n File "/usr/lib64/python2.7/site-packages/yaml/constructor.py", line 37, in get_single_data\n node = self.get_single_node()\n File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 36, in get_single_node\n document = self.compose_document()\n File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 55, in compose_document\n node = self.compose_node(None, None)\n File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in compose_node\n node = self.compose_mapping_node(anchor)\n File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node\n item_value = self.compose_node(node, item_key)\n File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in compose_node\n node = self.compose_mapping_node(anchor)\n File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node\n item_value = self.compose_node(node, item_key)\n File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 64, in compose_node\n if self.check_event(AliasEvent):\n File "/usr/lib64/python2.7/site-packages/yaml/parser.py", line 98, in check_event\n self.current_event = self.state()\n File "/usr/lib64/python2.7/site-packages/yaml/parser.py", line 449, in parse_block_mapping_value\n if not self.check_token(KeyToken, ValueToken, BlockEndToken):\n File "/usr/lib64/python2.7/site-packages/yaml/scanner.py", line 116, in check_token\n self.fetch_more_tokens()\n File "/usr/lib64/python2.7/site-packages/yaml/scanner.py", line 257, in fetch_more_tokens\n % ch.encode(\'utf-8\'), self.get_mark())\nyaml.scanner.ScannerError: while scanning for the next token\nfound character \'\\t\' that cannot start any token\n in "", line 2, column 10:\n Version:\t17.12.0-ce\n ^\n') The full traceback is: Traceback (most recent call last): File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 2481, in main() File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 2468, in main protected_facts_to_overwrite) File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 1827, in __init__ protected_facts_to_overwrite) File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 1864, in generate_facts defaults = self.get_defaults(roles, deployment_type, deployment_subtype) File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 1958, in get_defaults version_info = get_docker_version_info() File "/tmp/ansible_uPITb1/ansible_module_openshift_facts.py", line 1202, in get_docker_version_info version_info = yaml.safe_load(get_version_output('/usr/bin/docker', 'version')) File "/usr/lib64/python2.7/site-packages/yaml/__init__.py", line 93, in safe_load return load(stream, SafeLoader) File "/usr/lib64/python2.7/site-packages/yaml/__init__.py", line 71, in load return loader.get_single_data() File "/usr/lib64/python2.7/site-packages/yaml/constructor.py", line 37, in get_single_data node = self.get_single_node() File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 64, in compose_node if self.check_event(AliasEvent): File "/usr/lib64/python2.7/site-packages/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/usr/lib64/python2.7/site-packages/yaml/parser.py", line 449, in parse_block_mapping_value if not self.check_token(KeyToken, ValueToken, BlockEndToken): File "/usr/lib64/python2.7/site-packages/yaml/scanner.py", line 116, in check_token self.fetch_more_tokens() File "/usr/lib64/python2.7/site-packages/yaml/scanner.py", line 257, in fetch_more_tokens % ch.encode('utf-8'), self.get_mark()) yaml.scanner.ScannerError: while scanning for the next token found character '\t' that cannot start any token in "", line 2, column 10: Version: 17.12.0-ce
lilithfr commented 6 years ago

I have the same issue, seems that openshift assumes the default output format of "docker version" as YAML but there is nothing in the doc about the default output format. YAML format doesn't support "tab" and the new docker uses tab to be more human readable. But even after fixing this issue, there is a conflict between the docker-ce and docker package. It seems that OpenShift rely only on the default package named docker and is not yet compatible with the new name docker-ce or docker-ee.

DanyC97 commented 6 years ago

where did you get that openshift docker version support is 17.x ? in any docs/ code i've only seen 1.12.x

rhinoceros commented 6 years ago

I have the same issue!

DanyC97 commented 6 years ago

@rhinoceros same question i've asked before applies to you: where have you seen that openshift docker version supported is 17.x ?

rhinoceros commented 6 years ago

@DanyC97 In this document, I didn't see anything about docker version. (so I thought all docker version is supported). it's confused me. https://docs.openshift.org/3.6/install_config/install/prerequisites.html#install-config-install-prerequisites

now I searched 'docker version' and found 'yum install docker-1.12.6' in this document https://docs.openshift.org/3.6/install_config/install/host_preparation.html#installing-docker

ghaskins commented 6 years ago

@DanyC97 I didn't. I have since learned that kubernetes in general has trouble with the non-semver based releases of docker. However, supported/not-supported in openshift or supported/not-supported in upstream kubernetes is not generally the criteria for reporting an issue. It's perhaps the criteria for fixing the issue. But it is hard to fix issues that are not reported/known. Would you agree?

zhxqgithub commented 6 years ago

+1 ,I have the same problems, I hope the latest origin-node rpm package support docker-ce 17.x .

DanyC97 commented 6 years ago

@rhinoceros @ghaskins i understand where you coming from but in RH defense (note i'm not RH employee hence i'm not biased) but is been known (maybe this is because i started with openshift origin 1.3 all the way up to 3.7) that:

For OpenShift to move to latest docker version 17.x , that remain to be seen. I haven't seen any proposal for that big work to happen, maybe a core openshift contributor can comment.

leseb commented 6 years ago

I'm hitting this on the latest docker-ce because I ran into an issue where openshift-ansible was complaining about the current docker version on CentOS. So I decided to take wether is the most recent, but encountered this issue too.

Do we have a clear list somewhere of the supported version of Docker?

vrutkovs commented 6 years ago

Do we have a clear list somewhere of the supported version of Docker?

Yes - https://docs.openshift.com/container-platform/3.7/install_config/install/host_preparation.html#installing-docker. docker-ce is not supported

leseb commented 6 years ago

@vrutkovs thanks.