Bug 1615719 - easy-mode-upload.yaml playbook fails for source file not exist
Summary: easy-mode-upload.yaml playbook fails for source file not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.11.z
Assignee: Michael Gugino
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-14 06:27 UTC by Gaoyun Pei
Modified: 2019-02-20 14:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-20 14:11:01 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0326 None None None 2019-02-20 14:11:07 UTC

Description Gaoyun Pei 2018-08-14 06:27:59 UTC
Description of problem:

Run /usr/share/ansible/openshift-ansible/playbooks/openshift-checks/certificate_expiry/easy-mode-upload.yaml playbook:


TASK [openshift_certificate_expiry : Generate expiration report HTML] *******************************************************************************************************
changed: [ec2-52-55-201-235.compute-1.amazonaws.com -> localhost] => {"changed": true, "checksum": "d1b43d7d791b2bae6385ff1680f8aa4308482dfb", "dest": "/root/cert-expiry-report.20180814T021438.html", "gid": 0, "group": "root", "md5sum": "6c15558c9abb50881c0b3de23f554b8f", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:admin_home_t:s0", "size": 20953, "src": "/root/.ansible/tmp/ansible-tmp-1534227285.28-236255148396909/source", "state": "file", "uid": 0}

TASK [openshift_certificate_expiry : Generate results JSON file] ************************************************************************************************************
changed: [ec2-52-55-201-235.compute-1.amazonaws.com -> localhost] => {"changed": true, "checksum": "6ca9dfc8b0e6191e6ba45f72775824dc92cc5e4f", "dest": "/root/cert-expiry-report.20180814T021438.json", "gid": 0, "group": "root", "md5sum": "0d84d7a9dbd205cfdddef99ed60d23f0", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:admin_home_t:s0", "size": 8747, "src": "/root/.ansible/tmp/ansible-tmp-1534227289.55-239350958066161/source", "state": "file", "uid": 0}

TASK [openshift_certificate_expiry : Fail when certs are near or already expired] *******************************************************************************************
skipping: [ec2-52-55-201-235.compute-1.amazonaws.com] => {"changed": false, "skip_reason": "Conditional result was False"}
skipping: [ec2-54-226-148-226.compute-1.amazonaws.com] => {"changed": false, "skip_reason": "Conditional result was False"}
skipping: [ec2-52-55-105-17.compute-1.amazonaws.com] => {"changed": false, "skip_reason": "Conditional result was False"}

PLAY [Upload reports to master] *********************************************************************************************************************************************

TASK [Ensure that the target directory exists] ******************************************************************************************************************************
ok: [ec2-52-55-201-235.compute-1.amazonaws.com] => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/origin/certificate_expiration_report", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 131, "state": "directory", "uid": 0}

TASK [Copy the reports] *****************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
failed: [ec2-52-55-201-235.compute-1.amazonaws.com] (item=cert-expiry-report.html) => {"changed": false, "item": "cert-expiry-report.html", "msg": "Could not find or access '/tmp/cert-expiry-report.html' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
failed: [ec2-52-55-201-235.compute-1.amazonaws.com] (item=cert-expiry-report.json) => {"changed": false, "item": "cert-expiry-report.json", "msg": "Could not find or access '/tmp/cert-expiry-report.json' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
	to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/openshift-checks/certificate_expiry/easy-mode-upload.retry


It's another regression of https://github.com/openshift/openshift-ansible/commit/90c456e9098a2b4a7712c2c262a11d17b0111bef

Default openshift_certificate_expiry_html_report_path and openshift_certificate_expiry_json_results_path changed now, but playbook still try to copy files from previous path

https://github.com/openshift/openshift-ansible/blob/master/playbooks/openshift-checks/certificate_expiry/easy-mode-upload.yaml#L37-L40



Version-Release number of the following components:
openshift-ansible-3.11.0-0.14.0.git.0.7bd4429None.noarch
ansible-2.6.2-1.el7ae.noarch

How reproducible:

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 1 Michael Gugino 2018-11-27 17:58:38 UTC
Pr created in 3.11: https://github.com/openshift/openshift-ansible/pull/10778

Comment 2 Scott Dodson 2019-01-24 17:52:09 UTC
In openshift-ansible-3.11.45-1 and later

Comment 3 Gaoyun Pei 2019-01-25 05:27:57 UTC
Verify this bug with openshift-ansible-3.11.73-1.git.0.89d3763.el7.noarch
easy-mode-upload.yaml playbook is deprecated now.


[root@gpei-preserve-ansible-slave host]# ansible-playbook -i 311 /usr/share/ansible/openshift-ansible/playbooks/openshift-checks/certificate_expiry/easy-mode-upload.yaml 

PLAY [Generate certificate expiration reports] ******************************************************************************************************************************

TASK [Gathering Facts] ******************************************************************************************************************************************************
ok: [localhost]

TASK [fail] *****************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "This play has been removed in favor of easy-mode.yaml or default.yaml."}
	to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/openshift-checks/certificate_expiry/easy-mode-upload.retry

PLAY RECAP ******************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1

Comment 5 errata-xmlrpc 2019-02-20 14:11:01 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:0326


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