Glance plays fails due to error parsing Ceph keyrings in 2023.1/Antelope

Bug #2024339 reported by zrsolis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Critical
Dmitriy Rabotyagov

Bug Description

In 2023.1/Antelope Openstack-Ansible, Glance plays fails while attempting to parse Ceph keyrings with the following error:

TASK [ceph_client : From files | Retrieve keyrings for openstack clients] ***************************************************************
task path: /etc/ansible/roles/ceph_client/tasks/ceph_get_keyrings_from_files.yml:18
File lookup using /etc/openstack_deploy/ceph-keyrings/glance.keyring as file
fatal: [infra-01 -> localhost]: FAILED! => {
    "msg": "Unexpected templating type error occurred on ({% set _keys = {} %}\n{% for client in ceph_client_filtered_clients %}\n{% set _ = _keys.update({\n client: lookup('file', ceph_keyrings_dir ~ '/' ~ client['name'] ~ '.keyring')\n })\n%}\n{% endfor %}\n{{ _keys }}): unhashable type: 'dict'"
}

The keyring files exist and did not have this issue with Zed or any previous deployments. It looks to be related to the changes in: https://opendev.org/openstack/openstack-ansible-ceph_client/commit/fdd2aaa00b3753b393be5768f730f58d0a1e3b04

The value of ceph_keyrings_dir: "/etc/openstack_deploy/ceph-keyrings"

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Hi,

Thanks for reporting this.

Do you have ceph_extra_components (or maybe ceph_components) defined in your user_variables or group_vars? As it looks like mentioned patch indeed changed format of that without covering change by a release note or any backwards compatibility.

Revision history for this message
zrsolis (zrsolis) wrote :

No, I do not have either of those values explicitly defined in any of my configs.

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

Can you kindly check if the proposed above fix works for you?

Revision history for this message
zrsolis (zrsolis) wrote :

Hi Dmitriy,

That seems to have done the trick! Thank you! Looking forward to seeing this fix merged :)

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

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-ceph_client/+/886398
Committed: https://opendev.org/openstack/openstack-ansible-ceph_client/commit/d9c1289b7a88794e75b4e47aa7a54669be4b1dfa
Submitter: "Zuul (22348)"
Branch: master

commit d9c1289b7a88794e75b4e47aa7a54669be4b1dfa
Author: Dmitriy Rabotyagov <email address hidden>
Date: Mon Jun 19 14:43:20 2023 +0200

    Fix retrievement keyrings from files

    With [1] usage of custom owner/group has been introduced. It
    converted client to be a list of mappings but it was missed in 1 place.

    [1] https://opendev.org/openstack/openstack-ansible-ceph_client/commit/fdd2aaa00b3753b393be5768f730f58d0a1e3b04
    Closes-Bug: #2024339

    Change-Id: Icfc16ca25f0b6b45a0de0bcdf4eac71ab302a120

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/2023.1)
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.