customize-failure-domain has no effect when ceph-mon is deployed in a container

Bug #1684325 reported by Nobuto Murata
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Dmitrii Shcherbakov
2.2
Fix Released
High
Dmitrii Shcherbakov
Ceph Monitor Charm
Invalid
Undecided
Unassigned

Bug Description

Let's say I have 3 machines among 3 racks.

node01 - rack01
node02 - rack02
node03 - rack03

And MAAS zones are configured as zone-rack01, 02, 03. In this case, it's quite common to deploy ceph-mon as containers on top of physical nodes and ceph-osd to the hosts. JUJU_AVAILABILITY_ZONE is correctly set as rack-01, 02, 03 for the hosts, but it's empty in containers. Therefore, customize-failure-domain block never be executed:
https://github.com/openstack/charm-ceph-mon/blob/master/hooks/ceph_hooks.py#L283-L308

As a result, no "step chooseleaf firstn 0 type rack" line in the crush map.

[container]
$ juju run --unit ceph-mon/0 'env | grep JUJU_AVAILABILITY_ZONE'
JUJU_AVAILABILITY_ZONE=

[physical host]
$ juju run --unit ceph-osd/0 'env | grep JUJU_AVAILABILITY_ZONE'
JUJU_AVAILABILITY_ZONE=zone-rack01

[juju debug-log -i unit-ceph-mon-2 --replay]
unit-ceph-mon-2: 15:33:28 INFO unit.ceph-mon/2.juju-log mon:1: Your Juju environment doesn'thave support for Availability Zones

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

This is a new version of a recurring Juju bug where the JUJU_AVAILABILITY_ZONE is not set on a specific machine type, it happened in general on all machines, and then again in MAAS when we were developing this feature.

affects: charm-ceph-mon → juju
Revision history for this message
Tim Penhey (thumper) wrote :

It looks as if the host machine availability zone is not propogated to the containers running on that host. This *should* be a simplish fix.

Changed in juju:
status: New → Triaged
importance: Undecided → High
tags: added: availability-zones bitesize containers
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :
Revision history for this message
Ante Karamatić (ivoks) wrote :

For us this is somewhat urgent/critical...

tags: added: cpec
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

merged for 2.3: https://github.com/juju/juju/pull/7795

hopefully will get merged for 2.2.3 https://github.com/juju/juju/pull/7796

Changed in juju:
assignee: nobody → Dmitrii Shcherbakov (dmitriis)
status: Triaged → Fix Committed
Changed in juju:
milestone: none → 2.3-alpha1
Revision history for this message
Nobuto Murata (nobuto) wrote :

Fixed in Juju stable release. Marking the charm target as Invalid.

Changed in charm-ceph-mon:
status: New → Invalid
Ante Karamatić (ivoks)
tags: added: cpe-onsite
removed: cpec
Changed in juju:
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.