Bug 1662730 - While running playbook to check certificate expiry, it is failing with error- "'openshift_is_atomic' is undefined"
Summary: While running playbook to check certificate expiry, it is failing with error-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.10.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: 3.10.z
Assignee: Scott Dodson
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On: 1655183
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-01 07:23 UTC by Niket Chavan
Modified: 2019-03-14 02:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
An undefined variable error on 'openshift_is_atomic' has been corrected in the certificate expiry check playbooks.
Clone Of:
Environment:
Last Closed: 2019-03-14 02:15:34 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0405 None None None 2019-03-14 02:15:41 UTC

Description Niket Chavan 2019-01-01 07:23:04 UTC
Description of problem:

While running the playbook to check certificate expiry, the ~/playbooks/openshift-checks/certificate_expiry/default.yaml  playbook is failing with error;
"msg": "The conditional check 'not openshift_is_atomic | bool' failed. The error was: error while evaluating conditional (not openshift_is_atomic | bool): 'openshift_is_atomic' is undefined

Below is the verbose output while running the playbook;

~]# ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/openshift-checks/certificate_expiry/default.yaml -vvv
ansible-playbook 2.4.6.0
  config file = /home/nchavan/ocp3.10/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-playbook
  python version = 2.7.5 (default, Sep 12 2018, 05:31:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /home/nchavan/ocp3.10/ansible.cfg as config file
[DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of become which is a generic framework . This feature will be removed in version 2.8. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Parsed /home/nchavan/ocp3.10/inventory inventory source with ini plugin

PLAYBOOK: default.yaml ***************************************************************************************************************************************
1 plays in /usr/share/ansible/openshift-ansible/playbooks/openshift-checks/certificate_expiry/default.yaml

PLAY [Check cert expirys] ************************************************************************************************************************************
META: ran handlers

TASK [openshift_certificate_expiry : Ensure python dateutil library is present] ******************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_certificate_expiry/tasks/main.yml:2
fatal: [master1.example.com]: FAILED! => {
    "failed": true, 
    "msg": "The conditional check 'not openshift_is_atomic | bool' failed. The error was: error while evaluating conditional (not openshift_is_atomic | bool): 'openshift_is_atomic' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_certificate_expiry/tasks/main.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Ensure python dateutil library is present\n  ^ here\n"
}



Version-Release number of selected component (if applicable):

~]# rpm -q openshift-ansible
openshift-ansible-3.10.83-1.git.0.12699eb.el7.noarch
~]# 

~]# oc version
oc v3.10.83
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO
~]#


~]# ansible --version
ansible 2.4.6.0
  config file = /home/nchavan/ocp3.10/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, Sep 12 2018, 05:31:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
~]# 



Steps to Reproduce:
1.  Just run the playbook for checking the certificate expiration - /usr/share/ansible/openshift-ansible/playbooks/openshift-checks/certificate_expiry/default.yaml  , it will fail immediately with above mentioned error. 


Actual results:
The playbook is failing with error;
"msg": "The conditional check 'not openshift_is_atomic | bool' failed. The error was: error while evaluating conditional (not openshift_is_atomic | bool): 'openshift_is_atomic' is undefined


Expected results:
The playbook should run without errors.


Additional info:

Few bugzillas found with same error but while executing different playbooks and/or performing different functions;

https://bugzilla.redhat.com/show_bug.cgi?id=1581388
https://bugzilla.redhat.com/show_bug.cgi?id=1582190
https://bugzilla.redhat.com/show_bug.cgi?id=1624284

Comment 1 Scott Dodson 2019-01-03 14:42:55 UTC

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

Comment 2 Scott Dodson 2019-02-12 20:12:08 UTC
This was fixed in 3.10 via https://github.com/openshift/openshift-ansible/pull/11049/commits which is merged into openshift-ansible-3.10.106-1

Comment 3 Gaoyun Pei 2019-02-13 07:48:39 UTC
QE could reproduce this issue with openshift-ansible-3.10.101-1.git.0.5f32198.el7.noarch.rpm

Fixed on openshift-ansible-3.10.113-1.git.0.7534c41.el7.noarch.rpm, no such error happened.

Comment 5 errata-xmlrpc 2019-03-14 02:15:34 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-2019:0405


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