Create action to return AZ name

Bug #1911006 reported by Alvaro Uria
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph OSD Charm
Fix Released
Wishlist
Robert Gildein
OpenStack Charm Guide
Fix Released
Undecided
Robert Gildein

Bug Description

In order to script a verification of safe removal of ceph-osd units, a new action would be required.

* Action name: get-availability-zone
- If "customize-failure-domain" config parameter is enabled, use the Juju env var "JUJU_AVAILABILITY_ZONE"
- Otherwise, use “availability_zone” config parameter value (can different ceph-osd applications be part of the same Ceph cluster; because the same application would share the "availability_zone" value, if set)?
- Otherwise, use “per-host” value as default replication per host

Changed in charm-ceph-osd:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Billy Olsen (billy-olsen) wrote :

Does the safe removal use the `ceph osd safe-to-destroy` command under the hood?

Revision history for this message
Billy Olsen (billy-olsen) wrote :

oh, I see - you're referencing the removal of the ceph-osd units, not an osd itself. ignore me

Changed in charm-ceph-osd:
assignee: nobody → Robert Gildein (rgildein)
status: Triaged → In Progress
Revision history for this message
Robert Gildein (rgildein) wrote :

After a deeper examination of the code, I found that "ceph-osd" uses a CRUSH map with "rack" and "row". The "rack" is set by the environment variable "JUJU_AVAILABILITY_ZONE" and the "row" with the configuration "availability_zone" option. Both of these values are used only if the "customize-failure-domain" value is true. For this reason, I believed that the best approach would be for the "get-availability-zone" action to return the dictionary using the "rack" and "row" keys. If the values for both keys are None, it will represent replication per host.

Revision history for this message
Robert Gildein (rgildein) wrote :
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

Added charm-guide as affected project so we don't forget about the release notes.

Changed in charm-guide:
assignee: nobody → Robert Gildein (rgildein)
status: New → In Progress
Revision history for this message
Robert Gildein (rgildein) wrote :

Thanks, I added the release note. [1]
---
[1]: https://review.opendev.org/c/openstack/charm-guide/+/807170

Changed in charm-ceph-osd:
milestone: none → 21.10
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-osd (master)

Reviewed: https://review.opendev.org/c/openstack/charm-ceph-osd/+/778159
Committed: https://opendev.org/openstack/charm-ceph-osd/commit/d0d3d3edf513f95d4ae0f5c6f58b3c02acd000db
Submitter: "Zuul (22348)"
Branch: master

commit d0d3d3edf513f95d4ae0f5c6f58b3c02acd000db
Author: Robert Gildein <email address hidden>
Date: Tue Mar 2 11:14:37 2021 +0100

    Add an action to provide information about AZ

    The 'get-availability-zone' action will get information about an
    availability zone that will contain information about the CRUSH
    structure. Specifically 'rack' and 'row'.

    Closes-Bug: #1911006
    Change-Id: I99ebbef5f23d6efe3c848b089c7f2b0d26ad0077

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

Reviewed: https://review.opendev.org/c/openstack/charm-guide/+/807170
Committed: https://opendev.org/openstack/charm-guide/commit/7dc88337690a5e403b95f1a9d6105099b0967de2
Submitter: "Zuul (22348)"
Branch: master

commit 7dc88337690a5e403b95f1a9d6105099b0967de2
Author: Robert Gildein <email address hidden>
Date: Thu Sep 2 17:30:00 2021 +0200

    ceph-osd charm: new action to display availability zones information

    The ceph-osd charm has a new action: ``get-availability-zone``.

    This action returns availability zone information that contains CRUSH structure
    information. Specifically 'rack', 'row', etc.

    Closes-Bug: #1911006
    Change-Id: Ib9cb089c9c3ea6b2abcf9ba6ca28fa9cf96b6470

Changed in charm-guide:
status: In Progress → Fix Released
Changed in charm-guide:
milestone: none → 21.10
Changed in charm-ceph-osd:
status: Fix Committed → Fix Released
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.