Bug 1585967 - Playbooks failed for rhel_subscribe task error
Summary: Playbooks failed for rhel_subscribe task error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.10.0
Assignee: Michael Gugino
QA Contact: Gaoyun Pei
URL:
Whiteboard:
: 1585593 1588091 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-05 08:30 UTC by Gaoyun Pei
Modified: 2018-07-30 19:17 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-30 19:17:19 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 None None None 2018-07-30 19:17:58 UTC

Description Gaoyun Pei 2018-06-05 08:30:55 UTC
Description of problem:
Run etcd redeploy-certificates playbook against an ocp-3.10 cluster.

ansible-playbook -i host/310 -v /usr/share/ansible/openshift-ansible/playbooks/openshift-etcd/redeploy-certificates.yml


It fails on non-etcd host in role rhel_subscribe as below:

PLAY [Setup yum repositories for all hosts] *********************************************************************************************************************************

TASK [rhel_subscribe : fail] ************************************************************************************************************************************************
skipping: [ec2-52-90-247-129.compute-1.amazonaws.com] => {"changed": false, "skip_reason": "Conditional result was False", "skipped": true}
fatal: [ec2-34-207-246-134.compute-1.amazonaws.com]: FAILED! => {"failed": true, "msg": "The conditional check 'ansible_distribution == 'RedHat'' failed. The error was: error while evaluating conditional (ansible_distribution == 'RedHat'): 'ansible_distribution' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/rhel_subscribe/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- fail:\n  ^ here\n"}


Ansible inventory file and full log with "-v" could be found in attachment.



And the same error for some other cert redeployment playbook:

/usr/share/ansible/openshift-ansible/playbooks/openshift-etcd/redeploy-ca.yml
/usr/share/ansible/openshift-ansible/playbooks/openshift-hosted/redeploy-registry-certificates.yml
/usr/share/ansible/openshift-ansible/playbooks/openshift-hosted/redeploy-router-certificates.yml


Version-Release number of the following components:
openshift-ansible-3.10.0-0.58.0.git.0.d8f6377.el7.noarch


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 4 Gaoyun Pei 2018-06-06 07:52:36 UTC
With more standalone playbooks tested, found some more playbooks would fail at this task, so raise the Priority and Severity.

The following two playbooks would fail on non-master hosts.

/usr/share/ansible/openshift-ansible/playbooks/openshift-management/config.yml
/usr/share/ansible/openshift-ansible/playbooks/openshift-provisioners/config.yml


PLAY [Setup yum repositories for all hosts] *********************************************************************************************************************************

TASK [rhel_subscribe : fail] ************************************************************************************************************************************************
fatal: [ec2-52-90-131-235.compute-1.amazonaws.com]: FAILED! => {"failed": true, "msg": "The conditional check 'ansible_distribution == 'RedHat'' failed. The error was: error while evaluating conditional (ansible_distribution == 'RedHat'): 'ansible_distribution' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/rhel_subscribe/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- fail:\n  ^ here\n"}
skipping: [ec2-34-239-183-87.compute-1.amazonaws.com] => {"changed": false, "skip_reason": "Conditional result was False", "skipped": true}
fatal: [ec2-34-230-8-200.compute-1.amazonaws.com]: FAILED! => {"failed": true, "msg": "The conditional check 'ansible_distribution == 'RedHat'' failed. The error was: error while evaluating conditional (ansible_distribution == 'RedHat'): 'ansible_distribution' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/rhel_subscribe/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- fail:\n  ^ here\n"}

Comment 5 Scott Dodson 2018-06-06 15:09:28 UTC
*** Bug 1585593 has been marked as a duplicate of this bug. ***

Comment 6 Michael Gugino 2018-06-06 15:28:22 UTC
PR Created: https://github.com/openshift/openshift-ansible/pull/8655

Comment 7 Scott Dodson 2018-06-06 15:44:41 UTC
*** Bug 1588091 has been marked as a duplicate of this bug. ***

Comment 8 Wei Sun 2018-06-08 01:56:47 UTC
The PR has been merged to openshift-ansible-3.10.0-0.64.0,please check

Comment 9 Gaoyun Pei 2018-06-08 08:34:52 UTC
Tried the above playbooks with openshift-ansible-3.10.0-0.64.0.git.20.48df973.el7.noarch. The step is skipped.

PLAY [Setup yum repositories for all hosts] *********************************************************************************************************************************
skipping: no hosts matched

Comment 12 errata-xmlrpc 2018-07-30 19:17:19 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:1816


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