* JUJU_AVAILABILITY_ZONE is set correctly;
* the charm correctly renders the default_availability_zone config in the DEFAULT section of nova.conf.
So it does what it is supposed to do but the intended result is not achieved. We only check this functionality via a unit test that's why we haven't caught it in functional testing.
I was able to reproduce it although:
* JUJU_AVAILABILI TY_ZONE is set correctly; availability_ zone config in the DEFAULT section of nova.conf.
* the charm correctly renders the default_
So it does what it is supposed to do but the intended result is not achieved. We only check this functionality via a unit test that's why we haven't caught it in functional testing.
Based on the Nova code, unless the host aggregate overrides the AZ value, it is taken from nova.conf's default_ availability_ zone: /opendev. org/openstack/ nova/src/ commit/ e91540f96538c7b a568617db7c03cf 3a195b87ff/ nova/availabili ty_zones. py#L93- L100 /opendev. org/openstack/ nova/src/ commit/ e91540f96538c7b a568617db7c03cf 3a195b87ff/ nova/availabili ty_zones. py#L71- L109 /opendev. org/openstack/ nova/src/ commit/ e91540f96538c7b a568617db7c03cf 3a195b87ff/ nova/conf/ availability_ zone.py# L32-L34
(stein)
https:/
https:/
https:/
juju config keystone openstack-origin
cloud:bionic-stein
openstack compute service list ------- ------- ----+-- ------- ------- ------+ ------- ---+--- ------+ ------- +------ ------- ------- ------- -+ ------- ------- ----+-- ------- ------- ------+ ------- ---+--- ------+ ------- +------ ------- ------- ------- -+ 27-lxd- 6 | internal | enabled | up | 2020-07- 24T10:50: 55.000000 | 27-lxd- 6 | internal | enabled | up | 2020-07- 24T10:50: 55.000000 | 27-lxd- 6 | internal | enabled | up | 2020-07- 24T10:50: 57.000000 | 24T10:50: 58.000000 | 24T10:50: 59.000000 | 24T10:50: 55.000000 | 24T10:50: 53.000000 | 24T10:50: 56.000000 | 24T10:50: 54.000000 | 24T10:50: 59.000000 | 24-lxd- 6 | internal | enabled | up | 2020-07- 24T10:50: 56.000000 | 24-lxd- 6 | internal | enabled | up | 2020-07- 24T10:50: 56.000000 | 24-lxd- 6 | internal | enabled | up | 2020-07- 24T10:50: 57.000000 | 31-lxd- 6 | internal | enabled | up | 2020-07- 24T10:50: 57.000000 | 31-lxd- 6 | internal | enabled | up | 2020-07- 24T10:50: 56.000000 | 31-lxd- 6 | internal | enabled | up | 2020-07- 24T10:50: 57.000000 | ------- ------- ----+-- ------- ------- ------+ ------- ---+--- ------+ ------- +------ ------- ------- ------- -+
+-----+
| ID | Binary | Host | Zone | Status | State | Updated At |
+-----+
| 1 | nova-scheduler | juju-554d51-
| 7 | nova-conductor | juju-554d51-
| 19 | nova-consoleauth | juju-554d51-
| 22 | nova-compute | server-maas-6.maas | nova | enabled | up | 2020-07-
| 25 | nova-compute | server-maas-11.maas | nova | enabled | up | 2020-07-
| 28 | nova-compute | server-maas-2.maas | nova | enabled | up | 2020-07-
| 31 | nova-compute | server-maas-8.maas | nova | enabled | up | 2020-07-
| 64 | nova-compute | server-maas-3.maas | nova | enabled | up | 2020-07-
| 67 | nova-compute | server-maas-10.maas | nova | enabled | up | 2020-07-
| 70 | nova-compute | server-maas-4.maas | nova | enabled | up | 2020-07-
| 73 | nova-consoleauth | juju-554d51-
| 76 | nova-conductor | juju-554d51-
| 82 | nova-scheduler | juju-554d51-
| 91 | nova-scheduler | juju-554d51-
| 100 | nova-consoleauth | juju-554d51-
| 103 | nova-conductor | juju-554d51-
+-----+
openstack aggregate list ; echo $?
0
juju config nova-compute-kvm customize- failure- domain
true
juju config nova-compute-kvm default- availability- zone
nova
juju run --application nova-compute-kvm 'printenv JUJU_AVAILABILI TY_ZONE ; sudo grep default_ availability_ zone /etc/nova/ nova.conf' availability_ zone = zone2 availability_ zone = zone1 availability_ zone = zone2 availability_ zone = zone1 availability_ zone = zone1 availability_ zone = zone3 availability_ zone = zone3
- Stdout: |
zone2
default_
UnitId: nova-compute-kvm/1
- Stdout: |
zone1
default_
UnitId: nova-compute-kvm/10
- Stdout: |
zone2
default_
UnitId: nova-compute-kvm/6
- Stdout: |
zone1
default_
UnitId: nova-compute-kvm/9
- Stdout: |
zone1
default_
UnitId: nova-compute-kvm/3
- Stdout: |
zone3
default_
UnitId: nova-compute-kvm/8
- Stdout: |
zone3
default_
UnitId: nova-compute-kvm/4
juju run --application nova-compute-kvm 'hostname -f -A ; printenv JUJU_AVAILABILI TY_ZONE ; sudo grep default_ availability_ zone /etc/nova/ nova.conf' 16.server- maas-6. maas server-maas-6 server-maas-6.maas bond1.13. server- maas-6. maas 12.server- maas-6. maas bond0.17. server- maas-6. maas bond1.14. server- maas-6. maas 15.server- maas-6. maas \nzone2\ ndefault_ availability_ zone = zone2\n" 15.server- maas-4. maas bond0.16. server- maas-4. maas server-maas-4 server-maas-4.maas 13.server- maas-4. maas bond0.12. server- maas-4. maas bond1.14. server- maas-4. maas ndefault_ availability_ zone = zone1\n" 15.server- maas-8. maas bond0.16. server- maas-8. maas server-maas-8 server-maas-8.maas 12.server- maas-8. maas bond1.13. server- maas-8. maas bond1.14. server- maas-8. maas ndefault_ availability_ zone = zone2\n" 12.server- maas-11. maas bond0.16. server- maas-11. maas bond0.15. server- maas-11. maas 13.server- maas-11. maas bond1.14. server- maas-11. maas server-maas-11 server-maas-11.maas ndefault_ availability_ zone = zone3\n" 16.server- maas-10. maas server-maas-10 server-maas-10.maas bond1.14. server- maas-10. maas 13.server- maas-10. maas bond0.12. server- maas-10. maas bond0.15. server- maas-10. maas 17.server- maas-10. maas \nzone3\ ndefault_ availability_ zone = zone3\n" 15.server- maas-3. maas bond0.16. server- maas-3. maas server-maas-3 server-maas-3.maas 13.server- maas-3. maas bond0.12. server- maas-3. maas bond1.14. server- maas-3. maas ndefault_ availability_ zone = zone1\n" server- maas-2. maas bond1.13. server- maas-2. maas 17.server- maas-2. maas bond0.15. server- maas-2. maas bond0.12. server- maas-2. maas 16.server- maas-2. maas server-maas-2 \nzone1\ ndefault_ availability_ zone =
- Stdout: "bond0.
bond0.
bond0.
UnitId: nova-compute-kvm/1
- Stdout: "bond0.
bond1.
\nzone1\
UnitId: nova-compute-kvm/10
- Stdout: "bond0.
bond0.
\nzone2\
UnitId: nova-compute-kvm/6
- Stdout: "bond0.
bond1.
\nzone3\
UnitId: nova-compute-kvm/4
- Stdout: "bond0.
bond1.
bond0.
UnitId: nova-compute-kvm/8
- Stdout: "bond0.
bond1.
\nzone1\
UnitId: nova-compute-kvm/3
- Stdout: "server-maas-2.maas bond1.14.
bond0.
bond0.
zone1\n"
UnitId: nova-compute-kvm/9