Bug 1600859 - redeploy-certificates.yml playbooks fails in containerized envs in 3.7 because openshift_is_containerized variable not being defined
Summary: redeploy-certificates.yml playbooks fails in containerized envs in 3.7 becaus...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.7.0
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
: 3.7.z
Assignee: Vadim Rutkovsky
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-13 08:24 UTC by Joel Rosental R.
Modified: 2019-02-25 06:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-29 11:39:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Joel Rosental R. 2018-07-13 08:24:19 UTC
Description of problem:

While running /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/redeploy-certificates.yml in a containerized OCP 3.7 environment the following error is stops the playbook execution:

TASK [Restart openvswitch service] ***********************************************************************************************************
fatal: [node.example.com]: FAILED! => {"msg": "The conditional check 'openshift_is_containerized | bool' failed. The error was: error while evaluating conditional (openshift_is_containerized | bool): 'openshift_is_containerized' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/playbooks/common/openshift-node/restart.yml': line 24, 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  - name: Restart openvswitch service\n    ^ here\n"}
        to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/redeploy-certificates.retry

It looks like openshift_is_containerized was brought back to 3.7 in this PR but that var does not exist in 3.7.  https://github.com/openshift/openshift-ansible/pull/8228/files

Current workaround is to set this variable in the inventory file
Version-Release number of the following components:
OpenShift 3.7.54

How reproducible:
Always

Steps to Reproduce:
1. Execute /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/redeploy-certificates.yml in an OCP 3.7 containerized environment


Actual results:
The playbook execution stops because this variable is not defined.

Expected results:
Playbook execution should execute without any issues.

Comment 1 Scott Dodson 2018-07-13 12:22:22 UTC
https://github.com/openshift/openshift-ansible/pull/9067 was proposed fix but Vadim had some comments requesting changes. Lets get that cleaned up or another PR proposed.

Comment 2 Scott Dodson 2018-07-13 12:24:27 UTC
Looks like https://github.com/openshift/openshift-ansible/pull/8228/files introduced the problem in many files in addition to those fixed in #9067

Comment 3 Vadim Rutkovsky 2018-07-16 11:35:34 UTC
Created https://github.com/openshift/openshift-ansible/pull/9206

Comment 4 Vadim Rutkovsky 2018-07-18 07:05:05 UTC
Fix is available in openshift-ansible-3.7.59-1

Comment 5 Gaoyun Pei 2018-07-31 07:46:40 UTC
Test with openshift-ansible-3.7.61-1.git.0.36791ef.el7.noarch.rpm.

It still fail as below:

TASK [Restart openvswitch service] *********************************************
fatal: [ec2-54-152-184-65.compute-1.amazonaws.com]: FAILED! => {"failed": true, "msg": "The conditional check 'openshift_use_openshift_sdn | bool' failed. The error was: error while evaluating conditional (openshift_use_openshift_sdn | bool): 'openshift_use_openshift_sdn' is undefined\n\nThe error appears to have been in '/home/slave6/workspace/Run-Ansible-Playbooks-Nextge/private-openshift-ansible/playbooks/common/openshift-node/restart.yml': line 24, 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  - name: Restart openvswitch service\n    ^ here\n"}

Comment 6 Vadim Rutkovsky 2018-08-03 10:04:17 UTC
Created https://github.com/openshift/openshift-ansible/pull/9419 to make sure `openshift_use_openshift_sdn` always has a default value set

Comment 9 Gaoyun Pei 2018-08-22 06:58:29 UTC
Verify this bug with openshift-ansible-3.7.62-1.git.0.48dbebc.el7.noarch

Tried redeploy-certificates.yml on rpm and containerized OCP 3.7 environment, the playbook could run well.

Comment 11 errata-xmlrpc 2018-08-29 11:39:55 UTC
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, 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-2018:2547


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