Bug 1577275 - rolling_upgrade.yml is unable to determine proper location of role files if running not from /usr/share/ceph-ansible directory
Summary: rolling_upgrade.yml is unable to determine proper location of role files if r...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Ansible
Version: 2.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 4.*
Assignee: Dimitri Savineau
QA Contact: Vasishta
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-11 15:09 UTC by Matthias Muench
Modified: 2019-11-14 16:14 UTC (History)
7 users (show)

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


Attachments (Terms of Use)

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.


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