charm-nova-compute/unit_tests
Rodrigo Barbieri 650f3a5d51 [v2] Fix migration across nova-compute apps using ceph
This change reworks previous changes [1] and [2] that had
been respectively reverted and abandoned.

When using the config libvirt-image-backend=rbd, VMs
created from image have their disk data stored in ceph
instead of the compute node itself.

When performing live-migrations, both nodes need to
access the same ceph credentials to access the VM's
disk in ceph, but this is currently not possible
if the nodes involved pertain to different
nova-compute charm apps.

This patch changes app name sent to ceph to
'nova-compute-ceph-auth-c91ce26f', a unique name common to
all nova-compute apps, allowing all nova-compute apps to
use the same ceph auth.

This change also ensures newly deployed nodes install
the old credentials first on ceph-joined hook,
and then supercedes it with the new credentials
on ceph-changed hook, therefore also retaining
the old credentials.

This patch also includes the charmhelpers sync
from PR: #840

[1] https://review.opendev.org/889642
[2] https://review.opendev.org/896155

Closes-bug: #2028559
Related-bug: #2037003

Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1149

Change-Id: I1ae12d787a1f8e7761ca06b5a80049c1c62e9e90
2024-01-05 15:23:50 +00:00
..
__init__.py Improve platform mocking 2023-10-24 12:33:41 +01:00
test_actions_cloud.py Spelling fixes found by codespell. 2021-11-15 21:54:13 +00:00
test_actions_hugepagereport.py Use unittest.mock instead of mock 2021-12-15 14:25:30 +00:00
test_actions_openstack_upgrade.py Refactor unit tests to avoid leaks of mocks. 2023-02-20 11:37:01 -03:00
test_actions_package_upgrade.py Refactor unit tests to avoid leaks of mocks. 2023-02-20 11:37:01 -03:00
test_actions_pause_resume.py Use unittest.mock instead of mock 2021-12-15 14:25:30 +00:00
test_actions_virsh_audit.py Replace deprecated assert_ with assertTrue 2022-07-21 12:46:13 +08:00
test_lib_nova_compute_cloud_utils.py Fix socket.fqdn() not returning full hostname 2022-02-07 16:23:40 +01:00
test_nova_compute_contexts.py [v2] Fix migration across nova-compute apps using ceph 2024-01-05 15:23:50 +00:00
test_nova_compute_hooks.py [v2] Fix migration across nova-compute apps using ceph 2024-01-05 15:23:50 +00:00
test_nova_compute_utils.py Do not manage subordinate service restarts 2023-03-02 13:54:15 +00:00
test_utils.py Use unittest.mock instead of mock 2021-12-15 14:25:30 +00:00