Bug 1464025 - pre_upgrade checking failed for upgrades/etcd/noop.yml does not exist
Summary: pre_upgrade checking failed for upgrades/etcd/noop.yml does not exist
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.7.0
Assignee: Russell Teague
QA Contact: liujia
Depends On:
TreeView+ depends on / blocked
Reported: 2017-06-22 10:09 UTC by Anping Li
Modified: 2021-03-11 15:21 UTC (History)
7 users (show)

Fixed In Version: openshift-ansible-3.7.0-0.126.1.git.0.0bb5b0c.el7.noarch
Doc Type: Bug Fix
Doc Text:
When Ansible tags are used for evaluating some of the tasks in a set of playbooks, the conditional for including a task file was not properly evaluated. The logic modification allows the conditional to evaluate properly and skip running the task.
Clone Of:
Last Closed: 2017-11-28 21:58:09 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3209341 0 None None None 2017-10-06 16:56:02 UTC
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Anping Li 2017-06-22 10:09:09 UTC
Description of problem:
When run upgrade with --tags pre_upgrade, it failed for "the file_name '/usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/upgrades/etcd/noop.yml' does not exist, or is not readable"

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

How reproducible:

Steps to Reproduce:
1. install OCP v3.5 with dedicated etcd clusters
2. prechecking upgrade 
   anible-playbook usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade.yml --tags pre_upgrade

Actual results:
PLAY [Upgrade to 2.1] **********************************************************

TASK [setup] *******************************************************************
ok: [openshift-225.lab.eng.nay.redhat.com]

TASK [etcd_common : Include main action task file] *****************************
fatal: [openshift-225.lab.eng.nay.redhat.com]: FAILED! => {
    "failed": true, 
    "reason": "the file_name '/usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/upgrades/etcd/noop.yml' does not exist, or is not readable"
    to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade.retry

PLAY RECAP *********************************************************************
localhost                  : ok=14   changed=0    unreachable=0    failed=0   
openshift-208.lab.eng.nay.redhat.com : ok=92   changed=2    unreachable=0    failed=0   
openshift-225.lab.eng.nay.redhat.com : ok=135  changed=2    unreachable=0    failed=1   

Error: ansible-playbook --private-key /root/configdir/libra.pem -i /root/workdir/hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade.yml --tags pre_upgrade -v. logfile: logs-20170621090802-upgrade

Expected results:

Additional info:

Comment 1 Russell Teague 2017-06-22 19:07:56 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/4547

Comment 2 Scott Dodson 2017-06-26 13:46:52 UTC
Moving this to 3.6.1 as running with tags is not common.

Comment 3 Russell Teague 2017-08-16 20:39:36 UTC
PR updated with proposed fix.

Comment 4 Russell Teague 2017-08-17 11:58:48 UTC
Merged: https://github.com/openshift/openshift-ansible/pull/4547

Comment 5 liujia 2017-09-08 10:46:57 UTC

1. Install 3.6 cluster with dedicated etcd.
2. Pre-check upgrade 
# ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_7/upgrade.yml --tags pre_upgrade

Pre-upgrade still failed.
TASK [etcd_common : Include main action task file] **************************************************************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/etcd_common/tasks/main.yml:7
fatal: [openshift-178.x.x.x]: FAILED! => {
    "failed": true, 
    "reason": "the file_name '/usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/upgrades/etcd/noop.yml' does not exist, or is not readable"

Comment 6 Russell Teague 2017-09-08 19:26:39 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/5338

Side note:
The usage of tags to run `pre_upgrade` does not produce an acceptable user experience due to the many skipped tasks.  The upgrade playbooks will be refactored to allow an entry point to just run upgrade checks if they are desired.  The use of tags as a whole in openshift-ansible will eventually be deprecated.

Comment 7 Russell Teague 2017-09-11 12:44:06 UTC
Merged: https://github.com/openshift/openshift-ansible/pull/5338

Comment 8 liujia 2017-09-14 09:43:20 UTC
Bug verification blocked by bug 1451023.

Comment 9 liujia 2017-09-18 06:56:54 UTC

1. Install 3.6 cluster with dedicated etcd.
2. Pre-check upgrade 
# ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_7/upgrade.yml --tags pre_upgrade

Pre_check succeed.

Comment 10 Ryan Howe 2017-10-06 16:43:05 UTC
If this is not being fixed in 3.6 should to documentation on using the tags be removed


Comment 12 Russell Teague 2017-10-17 14:27:43 UTC
This issue was fixed in the 3.6 branch with this PR: https://github.com/openshift/openshift-ansible/pull/5411

Comment 15 errata-xmlrpc 2017-11-28 21:58:09 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.


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