openshift / openshift-ansible

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

OCP upgrade failed. 3.9 to 3.10. 'dict object' has no attribute 'status' #9508

Closed whitingjr closed 6 years ago

whitingjr commented 6 years ago

Description

Missing status attribute on result object.

Provide a brief description of your issue here. For example:

On a cluster upgrade the Ansible script fails before completion.

Version

Please put the following version information in the code block indicated below.

ansible --version

ansible 2.4.4.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.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, Feb 20 2018, 09:19:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] #

If you're running from playbooks installed via RPM

Place the output between the code block below:

# rpm -q openshift-ansible
openshift-ansible-3.10.21-1.git.0.6446011.el7.noarch
#
Steps To Reproduce
# ansible-playbook -i /etc/ansible/hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_10/upgrade.yml
Expected Results

The upgrade to complete successfully.

Observed Results

Describe what is actually happening.

......
ok: [acme7.machine.earth -> acme7.machine.earth]

TASK [openshift_node : Wait for node to be ready] ****************************************************************************
fatal: [acme7.machine.earth]: FAILED! => {"failed": true, "msg": "The conditional check 'node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True' failed. The error was: error while evaluating conditional (node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True): 'dict object' has no attribute 'status'"}
    to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_10/upgrade.retry

PLAY RECAP *******************************************************************************************************************
acme2.machine.earth : ok=19   changed=0    unreachable=0    failed=0   
acme5.machine.earth : ok=19   changed=0    unreachable=0    failed=0   
acme7.machine.earth : ok=248  changed=51   unreachable=0    failed=1   
localhost                  : ok=15   changed=0    unreachable=0    failed=0   

Failure summary:

  1. Hosts:    acme7.machine.earth
     Play:     Update master nodes
     Task:     Wait for node to be ready
     Message:  The conditional check 'node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True' failed. The error was: error while evaluating conditional (node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True): 'dict object' has no attribute 'status'
Additional Information
# uname -a
Linux benchserver7 3.10.0-862.3.2.el7.x86_64 #1 SMP Tue May 15 18:22:15 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/ansible/hosts

[OSEv3:children]
masters
nodes
etcd

[OSEv3:vars]
containerized=false
openshift_deployment_type=openshift-enterprise
openshift_node_groups=[{'name': 'node-config-master', 'labels': ['node-role.kubernetes.io/master=true']}, {'name': 'node-config-infra', 'labels': ['node-role.kubernetes.io/infra=true',]}, {'name': 'node-config-compute', 'labels': ['node-role.kubernetes.io/compute=true'], 'edits': [{ 'key': 'kubeletArguments.pods-per-core','value': ['20']}]}]

[masters]
acme7.machine.earth openshift_node_group_name='node-config-master'

[etcd]
acme7.machine.earth

[nodes]
acme7.machine.earth openshift_node_group_name='node-config-compute'
acme5.machine.earth openshift_node_group_name='node-config-compute'
acme2.machine.earth openshift_node_group_name='node-config-compute'
whitingjr commented 6 years ago

Thanks for sorting this. Should be a better user experience from now on.