Bug 1540806 - playbooks/openshift-prometheus/private/uninstall_prometheus.yaml is missing
Summary: playbooks/openshift-prometheus/private/uninstall_prometheus.yaml is missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.9.0
Assignee: Zohar Gal-Or
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-01 04:06 UTC by Junqi Zhao
Modified: 2018-12-13 19:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-13 19:26:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ansible running log (1.76 MB, text/plain)
2018-02-07 09:25 UTC, Junqi Zhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3748 0 None None None 2018-12-13 19:26:58 UTC

Description Junqi Zhao 2018-02-01 04:06:07 UTC
Description of problem:
Undeploy prometheus 3.9, throws out error
playbooks/openshift-prometheus/private/uninstall_prometheus.yaml is missing

TASK [openshift_prometheus : include_tasks] *********************************************************************************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_prometheus/tasks/main.yaml:28
fatal: [ec2-54-158-112-3.compute-1.amazonaws.com]: FAILED! => {
    "reason": "Unable to retrieve file contents\nCould not find or access '/usr/share/ansible/openshift-ansible/playbooks/openshift-prometheus/private/uninstall_prometheus.yaml'"
}


Version-Release number of selected component (if applicable):
$ rpm -qa | grep openshift-ansible
openshift-ansible-docs-3.9.0-0.34.0.git.0.c7d9585.el7.noarch
openshift-ansible-playbooks-3.9.0-0.34.0.git.0.c7d9585.el7.noarch
openshift-ansible-3.9.0-0.34.0.git.0.c7d9585.el7.noarch
openshift-ansible-roles-3.9.0-0.34.0.git.0.c7d9585.el7.noarch


How reproducible:
Always

Steps to Reproduce:
1. Undeploy prometheus 3.9
2.
3.

Actual results:
playbooks/openshift-prometheus/private/uninstall_prometheus.yaml is missing

Expected results:
Could be undeployed successfully

Additional info:

Comment 1 Zohar Gal-Or 2018-02-06 12:07:12 UTC
This was merged to master last week:
https://github.com/openshift/openshift-ansible/pull/6811

Scott, Is master targeted to 3.10, or does it need a special label?

Comment 2 Scott Dodson 2018-02-06 13:53:58 UTC
Master still hasn't forked. I moved this bug's target release to 3.10 because I didn't htink it was critical enough to block 3.9 release, but since you say it's fixed on master moving it back to 3.9.

Comment 3 Junqi Zhao 2018-02-07 04:12:09 UTC
Still the same error

TASK [openshift_prometheus : include_tasks] *********************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_prometheus/tasks/main.yaml:28
fatal: [host-8-245-46.host.centralci.eng.rdu2.redhat.com]: FAILED! => {
    "reason": "Unable to retrieve file contents\nCould not find or access '/usr/share/ansible/openshift-ansible/playbooks/openshift-prometheus/private/uninstall_prometheus.yaml'"
}
	to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/openshift-prometheus/config.retry

ansible version
# rpm -qa | grep openshift-ansible
openshift-ansible-playbooks-3.9.0-0.39.0.git.0.fea6997.el7.noarch
openshift-ansible-roles-3.9.0-0.39.0.git.0.fea6997.el7.noarch
openshift-ansible-3.9.0-0.39.0.git.0.fea6997.el7.noarch
openshift-ansible-docs-3.9.0-0.39.0.git.0.fea6997.el7.noarch

Comment 4 Zohar Gal-Or 2018-02-07 07:40:15 UTC
The name of the uninstall playbook is:
playbooks/openshift-prometheus/private/uninstall.yml

And actually, the one that should be called is: 
playbooks/openshift-prometheus/uninstall.yml 
which calls the private playbook.


The name aligns with config.yml (which is not called config_prometheus.yaml)

I believe this should resolve the issue. Please verify

Comment 5 Junqi Zhao 2018-02-07 07:49:36 UTC
# cat playbooks/openshift-prometheus/private/uninstall.yml
---
- name: Uninstall Prometheus
  hosts: masters[0]
  tasks:
  - name: Run the Prometheus Uninstall Role Tasks
    include_role:
      name: openshift_prometheus
      tasks_from: uninstall
**************************************************
# cat playbooks/openshift-prometheus/uninstall.yml
---
- import_playbook: private/uninstall.yml
**************************************************
# ls -alR playbooks/openshift-prometheus
playbooks/openshift-prometheus:
total 16
drwxr-xr-x.  3 root root   80 Feb  6 23:13 .
drwxr-xr-x. 27 root root 4096 Feb  6 21:22 ..
-rw-r--r--.  1 root root   49 Feb  6 23:07 config.retry
-rw-r--r--.  1 root root   79 Feb  6 17:20 config.yml
drwxr-xr-x.  2 root root   58 Feb  6 23:13 private
-rw-r--r--.  1 root root   45 Feb  6 17:20 uninstall.yml

playbooks/openshift-prometheus/private:
total 8
drwxr-xr-x. 2 root root  58 Feb  6 23:13 .
drwxr-xr-x. 3 root root  80 Feb  6 23:13 ..
-rw-r--r--. 1 root root 714 Feb  6 17:20 config.yml
lrwxrwxrwx. 1 root root  14 Feb  6 21:22 roles -> ../../../roles
-rw-r--r--. 1 root root 191 Feb  6 17:20 uninstall.yml
**************************************************
# cat playbooks/openshift-prometheus/config.yml 
---
- import_playbook: ../init/main.yml

- import_playbook: private/config.yml

Comment 6 Zohar Gal-Or 2018-02-07 08:03:01 UTC
Great.
Can you move to verified?

Comment 7 Junqi Zhao 2018-02-07 08:09:35 UTC
(In reply to Zohar Gal-Or from comment #6)
> Great.
> Can you move to verified?

No, Comment 5 is current playbook files in openshift-ansible-3.9.0-0.39.0, I just show you the fix is in this openshift-ansible version, but it still throw out "Could not find or access '/usr/share/ansible/openshift-ansible/playbooks/openshift-prometheus/private/uninstall_prometheus.yaml" when undeploy prometheus, see Comment 3

Comment 8 Zohar Gal-Or 2018-02-07 08:13:49 UTC
I don't understand.
What exactly are you running that results in the error output?

Comment 10 Junqi Zhao 2018-02-07 09:25:17 UTC
Created attachment 1392565 [details]
ansible running log

Comment 11 Zohar Gal-Or 2018-02-07 12:41:50 UTC
I see the problem now. last PR broke that path. I'll fix it

Comment 12 Zohar Gal-Or 2018-02-07 13:30:41 UTC
PR with fix:
https://github.com/openshift/openshift-ansible/pull/7044

Comment 13 Zohar Gal-Or 2018-02-08 07:31:23 UTC
https://github.com/openshift/openshift-ansible/pull/7044 merged to master

Comment 15 Scott Dodson 2018-02-20 13:28:49 UTC
Fix is in openshift-ansible-3.9.0-0.46.0

Comment 16 Junqi Zhao 2018-02-22 03:03:41 UTC
Tested with openshift-ansible-3.9.0-0.47.0, prometheus can be undeployed successfully now.

# rpm -qa | grep openshift-ansible
openshift-ansible-docs-3.9.0-0.47.0.git.0.f8847bb.el7.noarch
openshift-ansible-roles-3.9.0-0.47.0.git.0.f8847bb.el7.noarch
openshift-ansible-3.9.0-0.47.0.git.0.f8847bb.el7.noarch
openshift-ansible-playbooks-3.9.0-0.47.0.git.0.f8847bb.el7.noarch

Comment 19 errata-xmlrpc 2018-12-13 19:26:51 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:3748


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