Bug 1935796 - In 3.11.394 upgrade_nodes.yml fail if openshift_upgrade_nodes_label is used
Summary: In 3.11.394 upgrade_nodes.yml fail if openshift_upgrade_nodes_label is used
Keywords:
Status: CLOSED DUPLICATE of bug 1933090
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: aos-install
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-05 15:22 UTC by Jonas Nordell
Modified: 2024-06-14 00:39 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-05 21:21:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jonas Nordell 2021-03-05 15:22:37 UTC
Version:

$ openshift-install version
3.11.394

Platform:

vSphere

What happened?

When trying to upgrade nodes in OCP 3.11.380 to 3.11.394 using the command:

$ ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_11/upgrade_nodes.yml -e openshift_upgrade_nodes_label="anylabel=true"

It fails with the error message:

Failure summary:


  1. Hosts:    ocpmaster.example.com
     Play:     Filter list of nodes to be upgraded if necessary
     Task:     Map labelled nodes to inventory hosts
     Message:  The conditional check 'hostvars[item].l_kubelet_node_name | lower in nodes_to_upgrade.module_results.results[0]['items'] | map(attribute='metadata.name') | list' failed. The error was: error while evaluating conditional (hostvars[item].l_kubelet_node_name | lower in nodes_to_upgrade.module_results.results[0]['items'] | map(attribute='metadata.name') | list): 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'l_kubelet_node_name'

               The error appears to be in '/usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/upgrades/initialize_nodes_to_upgrade.yml': line 25, column 7, but may
               be elsewhere in the file depending on the exact syntax problem.

               The offending line appears to be:

                   # using their openshift.common.hostname fact.
                   - name: Map labelled nodes to inventory hosts
                     ^ here

What did you expect to happen?

Upgrade should complete on the nodes selected by the labels

How to reproduce it (as minimally and precisely as possible)?

Fails
$ ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_11/upgrade_nodes.yml -e openshift_upgrade_nodes_label="anylabel=true"

Works
$ ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_11/upgrade_nodes.yml

Anything else we need to know?

$ ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_11/upgrade_control_plane.yml was executed successfully before the upgrade_nodes.yml playbook was executed.

Comment 3 Russell Teague 2021-03-05 21:21:58 UTC

*** This bug has been marked as a duplicate of bug 1933090 ***


Note You need to log in before you can comment on or make changes to this bug.