Bug 1577275

Summary: rolling_upgrade.yml is unable to determine proper location of role files if running not from /usr/share/ceph-ansible directory
Product: Red Hat Ceph Storage Reporter: Matthias Muench <mmuench>
Component: Ceph-AnsibleAssignee: Dimitri Savineau <dsavinea>
Status: CLOSED NOTABUG QA Contact: Vasishta <vashastr>
Severity: low Docs Contact:
Priority: low    
Version: 2.5CC: adeza, aschoen, ceph-eng-bugs, gabrioux, gmeno, mmuench, nthomas
Target Milestone: rc   
Target Release: 4.*   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-14 16:14:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matthias Muench 2018-05-11 15:09:38 UTC
Description of problem:
rolling_update.yml fails if playbook is started not from /usr/share/ceph-ansible

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


How reproducible:
Always if not run from /usr/share/ceph-ansible


Steps to Reproduce:
1. create a custom directory for inventory and all related playbook resources (as consultants usually recommend)
2. update files as required
3. ansible-playbook  /usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml -e jewel_minor_update=true -i /home/ansible/ceph-ansible/hosts

Actual results:
[ansible@ceph-mon1 ceph-ansible]$ ansible-playbook  /usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml -e jewel_minor_update=true -i /home/ansible/ceph-ansible/hosts
ERROR! the role 'ceph-defaults' was not found in /usr/share/ceph-ansible/infrastructure-playbooks/roles:/home/ansible/ceph-ansible/roles:/usr/share/ceph-ansible/infrastructure-playbooks

The error appears to have been in '/usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml': line 118, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  roles:
    - ceph-defaults
      ^ here



Expected results:
Picking up the proper (default) path for installation or requiring a custom location specified.


Additional info:
Usually, consultants recommend to not create *.yml files in the /usr/share/ceph-ansible  paths but to put the site specific information into a private directory.

Comment 3 S├ębastien Han 2018-05-14 11:58:55 UTC
I believe this is expected, if you change directory then you should set ANSIBLE_ROLES_PATH accordingly.
Typically, we recommend copying the content of infrastructure-playbooks into the /usr/share/ceph-ansible.

I personally don't think this is a bug and would like to see this getting closed. But I might be convinced otherwise.

Where are you putting this file?

Comment 4 Giridhar Ramaraju 2019-08-05 13:06:31 UTC
Updating the QA Contact to a Hemant. Hemant will be rerouting them to the appropriate QE Associate. 

Regards,
Giri

Comment 5 Giridhar Ramaraju 2019-08-05 13:09:09 UTC
Updating the QA Contact to a Hemant. Hemant will be rerouting them to the appropriate QE Associate. 

Regards,
Giri

Comment 6 Giridhar Ramaraju 2019-08-20 07:19:52 UTC
Level setting the severity of this defect to "Low" with a bulk update. Pls
refine it to a more closure value, as defined by the severity definition in
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity

Comment 7 Dimitri Savineau 2019-11-14 16:14:48 UTC
As mentioned this is expected.

You need to execute the ansible-playbook from the right directory otherwise the ansible configuration (like roles and library path) won't be set.