Ceph client configuration should not be exported to /usr/share/

Bug #1981467 reported by John Fulton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
John Fulton

Bug Description

'openstack overcloud export ceph' failed because it could not find
the ceph_client.yml file. The file was instead found in the following:

  /usr/share/ansible/tripleo-playbooks/cephadm/ceph_client.yml

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (master)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/849517

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/849572
Committed: https://opendev.org/openstack/tripleo-ansible/commit/4a1fab391de6cd5e9d92d2e08c3a0d09728421df
Submitter: "Zuul (22348)"
Branch: master

commit 4a1fab391de6cd5e9d92d2e08c3a0d09728421df
Author: John Fulton <email address hidden>
Date: Tue Jul 12 14:03:20 2022 -0400

    Override tripleo_ceph_client_vars in tripleo_run_cephadm role

    During config-download, the tripleo_run_cephadm role sets
    up overrides and creates a script which then calls tasks
    from the tripleo_cephadm role. When this happens it should
    override the tripleo_ceph_client_vars to have the correct
    config-download directory (relative to the current stack).
    The tripleo_cephadm_spec_ansible_host variable follows the
    same pattern.

    Change-Id: I658bc5c2e37ad5af6991937ccec0933b844ddd63
    Closes-Bug: #1981467

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
Giulio Fidente (gfidente) wrote :

Was reverted via https://review.opendev.org/c/openstack/tripleo-ansible/+/849732 - needs a different fix, moving back to Confirmed

Changed in tripleo:
status: Fix Released → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (master)
Changed in tripleo:
status: Confirmed → In Progress
Revision history for this message
John Fulton (jfulton-org) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-ansible (master)

Change abandoned by "John Fulton <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/850037
Reason: https://bugs.launchpad.net/tripleo/+bug/1981634/comments/10

Revision history for this message
John Fulton (jfulton-org) wrote :

https://bugs.launchpad.net/tripleo/+bug/1981634 tracked the gate blocker and is resolved by https://review.opendev.org/c/openstack/tripleo-ansible/+/849732

https://bugs.launchpad.net/tripleo/+bug/1981467 tracks correct exports and a new fix is needed. Future updates on correct exports will be in here.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/850307

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (stable/wallaby)

Related fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/850045

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/python-tripleoclient/+/850046

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-ansible (stable/wallaby)

Change abandoned by "John Fulton <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/849517
Reason: Using this instead https://review.opendev.org/c/openstack/tripleo-ansible/+/850045

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/850307
Committed: https://opendev.org/openstack/tripleo-ansible/commit/99f2fb3f12d32c0185467f0a84dac64ea6209026
Submitter: "Zuul (22348)"
Branch: master

commit 99f2fb3f12d32c0185467f0a84dac64ea6209026
Author: John Fulton <email address hidden>
Date: Tue Jul 19 07:02:09 2022 -0400

    Require tripleo_ceph_client_vars to be overridden

    The roles tripleo_run_cephadm, tripleo_cephadm and
    tripleo_ceph_client all need tripleo_ceph_client_vars
    to be set consistently. However, they cannot be set
    consistently if they contain {{ playbook_dir }} because
    they are run in different contexts (config-download,
    python-tripleoclient and nested ansible executions).
    Thus {{ playbook_dir }} is not always the same. Also,
    the tripleo_ceph_client_vars must also be preserved on
    the system per stack for exports which can be run
    anytime in the future.

    Do not misleadingly default tripleo_ceph_client_vars
    and let roles which need them fail if they are not
    passed. Because the tripleo_ceph_client role supports
    more than just tripleo_ceph_client_vars as a source
    add condition so it can correctly handle when this
    variable is undefined.

    Change-Id: I0346bf1c6a3d8796a0aa70cbaac6e34b2f74fabb
    Related-Bug: #1981467

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-tripleoclient (stable/wallaby)

Change abandoned by "John Fulton <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/python-tripleoclient/+/850046
Reason: removing from ci, will restore shortly

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/850045
Committed: https://opendev.org/openstack/tripleo-ansible/commit/ee9b9e481cf28c8c0754589ee97ec6a10074ceb9
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit ee9b9e481cf28c8c0754589ee97ec6a10074ceb9
Author: John Fulton <email address hidden>
Date: Tue Jul 19 07:02:09 2022 -0400

    Require tripleo_ceph_client_vars to be overridden

    The roles tripleo_run_cephadm, tripleo_cephadm and
    tripleo_ceph_client all need tripleo_ceph_client_vars
    to be set consistently. However, they cannot be set
    consistently if they contain {{ playbook_dir }} because
    they are run in different contexts (config-download,
    python-tripleoclient and nested ansible executions).
    Thus {{ playbook_dir }} is not always the same. Also,
    the tripleo_ceph_client_vars must also be preserved on
    the system per stack for exports which can be run
    anytime in the future.

    Do not misleadingly default tripleo_ceph_client_vars
    and let roles which need them fail if they are not
    passed. Because the tripleo_ceph_client role supports
    more than just tripleo_ceph_client_vars as a source
    add condition so it can correctly handle when this
    variable is undefined.

    Change-Id: I0346bf1c6a3d8796a0aa70cbaac6e34b2f74fabb
    Related-Bug: #1981467
    (cherry picked from commit 99f2fb3f12d32c0185467f0a84dac64ea6209026)

tags: added: in-stable-wallaby
Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-tripleoclient/+/850309
Committed: https://opendev.org/openstack/python-tripleoclient/commit/29fe3996bbe8cdaaa86c73cfb3dda443e789bd96
Submitter: "Zuul (22348)"
Branch: master

commit 29fe3996bbe8cdaaa86c73cfb3dda443e789bd96
Author: John Fulton <email address hidden>
Date: Tue Jul 19 07:21:27 2022 -0400

    Ensure tripleo_ceph_client_vars is set consistently

    python-tripleoclient knows the correct working directory
    after baremetal deployment. Thus, it can correctly override
    the tripleo_ceph_client_vars variable in tripleo-ansible roles.
    Use /home/USER/overcloud-deploy/STACK/ceph_client.yml, where
    everything up to ceph_client.yml comes from the utils.py
    function get_default_working_dir(STACK).

    When tripleo-ansible roles are called directly by the client
    use --extra-vars to pass tripleo_ceph_client_vars. As per the
    deployed_ceph.yaml.j2 template in tripleo-ansible, the Heat
    parameter CephClientConfigVars will then be set to the same
    value. Then when the tripleo-ansible roles are called by
    config-download they will have the same value for
    tripleo_ceph_client_vars. Update export.py to use same path.

    Change-Id: I7717f2ce9f668e9fd77c9b49e2433d729ed3c836
    Depends-On: I0346bf1c6a3d8796a0aa70cbaac6e34b2f74fabb
    Closes-Bug: #1981467

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/python-tripleoclient/+/850046
Committed: https://opendev.org/openstack/python-tripleoclient/commit/c2befc7119d0317f4af994c260e5712eb1b1c99c
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit c2befc7119d0317f4af994c260e5712eb1b1c99c
Author: John Fulton <email address hidden>
Date: Tue Jul 19 07:21:27 2022 -0400

    Ensure tripleo_ceph_client_vars is set consistently

    python-tripleoclient knows the correct working directory
    after baremetal deployment. Thus, it can correctly override
    the tripleo_ceph_client_vars variable in tripleo-ansible roles.
    Use /home/USER/overcloud-deploy/STACK/ceph_client.yml, where
    everything up to ceph_client.yml comes from the utils.py
    function get_default_working_dir(STACK).

    When tripleo-ansible roles are called directly by the client
    use --extra-vars to pass tripleo_ceph_client_vars. As per the
    deployed_ceph.yaml.j2 template in tripleo-ansible, the Heat
    parameter CephClientConfigVars will then be set to the same
    value. Then when the tripleo-ansible roles are called by
    config-download they will have the same value for
    tripleo_ceph_client_vars. Update export.py to use same path.

    Change-Id: I7717f2ce9f668e9fd77c9b49e2433d729ed3c836
    Depends-On: I0346bf1c6a3d8796a0aa70cbaac6e34b2f74fabb
    Closes-Bug: #1981467
    (cherry picked from commit 29fe3996bbe8cdaaa86c73cfb3dda443e789bd96)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 19.0.0

This issue was fixed in the openstack/python-tripleoclient 19.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 5.0.0

This issue was fixed in the openstack/tripleo-ansible 5.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.