charm-nova-cloud-controller:stable/train

Last commit made on 2023-08-18
Get this branch:
git clone -b stable/train https://git.launchpad.net/charm-nova-cloud-controller

Branch merges

Branch information

Name:
stable/train
Repository:
lp:charm-nova-cloud-controller

Recent commits

d281747... by Alex Kavanagh

[train] Ensure get_requests_for_local_unit doesn't fail on incomplete relation

This is a rebuild/make sync for charms to pickup the fix in charmhelpers to fix
any inadvertant accesses of ['ca'] in the relation data before it is available
from vault in the certificates relation. Fix in charmhelpers is in [1].

[1] https://github.com/juju/charm-helpers/pull/832
Closes-Bug: #2028683

Change-Id: Ie7b4b7a4cc8d1c79832a653900ea5d620c54ed9b

6cbc38e... by Felipe Reyes

Update nova relations data on ha-relation-changed

When taking the nova-cloud-controller from single unit to full HA by
increasing the number of units from 1 to 3 and relating it to hacluster,
the data set on the cloud-compute relation is not updated, because the
update_nova_relation() function is only called on
cloud-compute-relation-joined and config-changed, none of these hooks
are executed when scaling out the application.

This patch introduces a call to update_nova_relation() on
ha-relation-changed.

Test case on an environment deployed with a single unit of
nova-cloud-controller:

    export NOVA_CC_VIP=10.0.0.11
    juju config nova-cloud-controller vip=$NOVA_CC_VIP
    juju deploy --series jammy --channel 2.4/stable hacluster \
        nova-cloud-controller-hacluster
    juju add-unit -n 2 nova-cloud-controller
    juju deploy --series jammy memcached
    juju add-relation memcached nova-cloud-controller
    juju add-relation nova-cloud-controller nova-cloud-controller-hacluster

Change-Id: Ib08bf9b6e1ce2b69be4d99ffe0726b59d81f4bc9
Closes-Bug: #2002154
(cherry picked from commit 366df4c07e2cd6b36345051c90585d27916e81a6)

ffc8da9... by Felipe Reyes

Backport fixes

This patch contains the following changes squashed into a single commit,
because each change individually doesn't produce a working build:

- 71bc319 Use unittest.mock instead of mock
- d3f30c4 Fix unittest
- Pin tox to < 4.0.0

Related-Bug: #2012108
Related-Bug: #2002788
Change-Id: I9f6de8ac3781cc11b6720ff4d75603b16a126f31
(cherry picked from commit 5bbe033c0217ff0b5f00602c989604db325be61c)
(cherry picked from commit 90a5410d179510ba94b7ae7d5de11a83cb809fe5)

3e22bce... by Alex Kavanagh

In nova_cc_utils.py:resolve_hosts_for: .append -> .add

The method was refactored (in part) to use sets to enforce uniqueness of
the hosts. Unfortunately, a list method (.append()) slipped through
that should have been converted to .add(). This fixes that error.

Change-Id: I248430cd1a9156efab745fe110a39441b503b3a5
Closes-Bug: #1992789
(cherry picked from commit 007f9e33b0f111bcd22aebfa785bb5066832e802)

1d7cf2a... by Alex Kavanagh

Fix SQLite locking issue on unit tests

stestr runs tests in parallel and this can cause issues with locking
when SQLite is not mocked out properly and gets used in a test. This
patch just switches Storage to use :memory: so that locking does not
occur.

Closes-Bug: #1908282
Change-Id: Iaa1c7b78dee498e0cc6dc6fccf12e74f22225ecd
(cherry picked from commit 36ef217bc620bebe4475dbb1453d3c82ac5b9d73)

dc6b828... by Alex Kavanagh

Fix bug where str is added to cached_hostset list

The original code was appending a str to a list rather than either
appending it or adding it as a list of one element. The code avoids
append to avoid unintentional side-effects.

Change-Id: I1466981f1d68f8dea3bbe32fdde6c4825056c0d0
Closes-Bug: #1927698
(cherry picked from commit e63c68d505ee2eb88a0edef83c4a63a8d827f9f6)

c6bd726... by Alex Kavanagh

Pin importlib-metadata, -resources for py37

importlib-metadata 5.0.0 breaks compatibility with setuptools that is
pinned in the train track for bionic; thus this pins allows the py37
tests to pass.

Change-Id: Ic476c24329d41e82de76eacbaf34ef0cba573b48

9aa285d... by Alex Kavanagh

Charmhub migration for stable/train (bionic-only)

This is the main patch for the migration of the stable/21.10
charm to charmhub for the stable/train branch (train track on
charmhub). This patch initially supports bionic from queens
to train, and does not support ussuri. It supports upgrades
from bionic-queens to bionic-train (with each intermediate
step needed). Crucially it does NOT set a default
openstack-origin, which means installing train/stable
without specifying the openstack-origin will result in a
bionic-queens installation. This is intentional as the branch
covers queens to train.

Change-Id: I5ecbbd75db0ec025c8dece3143a7954bd5e07395

a507992... by Paul Goins

Sharing SSH pubkeys across nova-compute apps

SSH keys from nova-compute are now shared across all
nova-compute charm apps.

Closes-Bug: #1468871
Change-Id: Ia142eceff56bb763fcca8ddf5b74b83f84bf3539
(cherry picked from commit aac2c2a178a86a8b686eb26b553283c0e9ba69f2)

02e1990... by Rodrigo Barbieri

pin pyparsing to fix CI dependencies

Change-Id: I231c18fda9703945538b779eed1128b5f5aa8b2c