Importing ceph keyrings from files fails

Bug #1860572 reported by Graham Lenton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Dmitriy Rabotyagov

Bug Description

When defining `ceph_keyrings_dir` and providing keyring files as described at https://review.opendev.org/#/c/671762/ the task "ceph_client : From files | Retrieve keyrings for openstack clients" fails with "'item' is undefined".

I think there are two problems with this task.

Firstly the loop around `ceph_client_filtered_clients` refers to `item` instead of `client` when updating `_keys`.

Secondly, the _keys object is declared as an array when it should be a dictionary.

There is a further problem which comes to light in the next task "From files | Provision ceph client keyrings" which fails with "ansible.vars.hostvars.HostVarsVars object' has no attribute 'ceph_client_keys'". This is because the first "retrieve" task was delegated to localhost, but `delegate_facts: yes` was not set, so the fact was never set on localhost..

I've attached a patch for roles/ceph_client/tasks/ceph_get_keyrings_from_files.yml

Revision history for this message
Graham Lenton (maharg101) wrote :
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-ceph_client (master)

Fix proposed to branch: master
Review: https://review.opendev.org/703824

Changed in openstack-ansible:
assignee: nobody → Dmitriy Rabotyagov (noonedeadpunk)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-ceph_client (master)

Reviewed: https://review.opendev.org/703824
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-ceph_client/commit/?id=028ec5225d71fa706b1bb4364ee5dc010db64334
Submitter: Zuul
Branch: master

commit 028ec5225d71fa706b1bb4364ee5dc010db64334
Author: Dmitriy Rabotyagov <email address hidden>
Date: Wed Jan 22 17:44:18 2020 +0200

    Fix facts gathering for "from files" scenario

    delegate_facts should be used as futher we're asking these facts from
    localhost, while they will be assigned to original host.
    Also _keys are supposed to be dict, but defined as list and `client`
    is expected instead of `item`

    Change-Id: I719016f454427fcc751d872408c44d665278a0d0
    Closes-Bug: 1860572

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-ceph_client (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/726096

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-ceph_client (stable/train)

Reviewed: https://review.opendev.org/726096
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-ceph_client/commit/?id=3389e7a29c299c490c1eaf9a1c73cbd181526eb5
Submitter: Zuul
Branch: stable/train

commit 3389e7a29c299c490c1eaf9a1c73cbd181526eb5
Author: Dmitriy Rabotyagov <email address hidden>
Date: Wed Jan 22 17:44:18 2020 +0200

    Fix facts gathering for "from files" scenario

    delegate_facts should be used as futher we're asking these facts from
    localhost, while they will be assigned to original host.
    Also _keys are supposed to be dict, but defined as list and `client`
    is expected instead of `item`

    Change-Id: I719016f454427fcc751d872408c44d665278a0d0
    Closes-Bug: 1860572
    (cherry picked from commit 028ec5225d71fa706b1bb4364ee5dc010db64334)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-ceph_client train-eol

This issue was fixed in the openstack/openstack-ansible-ceph_client train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-ceph_client ussuri-eol

This issue was fixed in the openstack/openstack-ansible-ceph_client ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-ceph_client yoga-eom

This issue was fixed in the openstack/openstack-ansible-ceph_client yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-ceph_client victoria-eom

This issue was fixed in the openstack/openstack-ansible-ceph_client victoria-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-ceph_client wallaby-eom

This issue was fixed in the openstack/openstack-ansible-ceph_client wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-ceph_client xena-eom

This issue was fixed in the openstack/openstack-ansible-ceph_client xena-eom 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.