Description of problem: While running the /usr/share/ansible/openshift-ansible/playbooks/openshift-master/openshift_node_group.yml playbook as part of the procedure to scale up a new node in an OCP 3.11 as stated in https://docs.openshift.com/container-platform/3.11/install_config/adding_hosts_to_existing_cluster.html#adding-cluster-hosts_adding-hosts-to-cluster the playbook fails with the following error: fatal: [openshift-master-prod01.xyz]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'openshift_is_atomic' is undefined\n\nThe error appears to be in '/usr/share/ansible/openshift-ansible/play books/init/basic_facts.yml': line 102, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - set_fact:\n ^ here\ n" Version-Release number of the following components: $ rpm -q openshift-ansible openshift-ansible-3.11.248-1.git.0.fd212c7.el7.noarch $ rpm -q ansible ansible-2.9.11-1.el7ae.noarch How reproducible: Always Steps to Reproduce: 1. ansible-playbook -i /patht/to/inventory /usr/share/ansible/openshift-ansible/playbooks/openshift-master/openshift_node_group.yml Actual results: fatal: [openshift-master-prod01.xyz]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'openshift_is_atomic' is undefined\n\nThe error appears to be in '/usr/share/ansible/openshift-ansible/play books/init/basic_facts.yml': line 102, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - set_fact:\n ^ here\ n" Expected results: Playbook should finish successfully. Additional info: See attached inventory file with playbook execution log
Masters are not having facts set during initialization and therefore are failing on the 'openshift_is_atomic' var when attempting to set the 'openshift_client_binary' var. Possible fix will be submitted shortly.
Could reproduce this issue with openshift-ansible-3.11.248-1.git.0.fd212c7.el7.noarch.rpm Add new_nodes/new_masters children group in inventory file. [OSEv3:children] masters nodes etcd new_nodes new_masters [new_masters] ec2-54-164-170-200.compute-1.amazonaws.com [new_nodes] ec2-54-164-170-200.compute-1.amazonaws.com openshift_node_group_name='node-config-master-crio' Run playbooks/openshift-master/openshift_node_group.yml playbook, it failed as below: TASK [set_fact] **************************************************************** fatal: [ec2-54-152-77-223.compute-1.amazonaws.com]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'openshift_is_atomic' is undefined\n\nThe error appears to have been in '/home/slave3/workspace/Run-Ansible-Playbooks-Nextge/private-openshift-ansible/playbooks/init/basic_facts.yml': line 102, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - set_fact:\n ^ here\n"} Tried again with openshift-ansible-3.11.284-1.git.0.6025b17.el7.noarch.rpm, passed. PLAY [Initialize special first-master variables] ******************************* TASK [Gathering Facts] ********************************************************* ok: [ec2-54-152-77-223.compute-1.amazonaws.com] TASK [set_fact] **************************************************************** skipping: [ec2-54-152-77-223.compute-1.amazonaws.com] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [set_fact] **************************************************************** ok: [ec2-54-152-77-223.compute-1.amazonaws.com] => {"ansible_facts": {"first_master_client_binary": "oc", "l_osm_default_node_selector": "node-role.kubernetes.io/compute=true", "openshift_client_binary": "oc"}, "changed": false}
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Container Platform 3.11.286 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:3695