From 56f9414a3ae953dc43dbe7efe59cf2d1fc9e17c8 Mon Sep 17 00:00:00 2001 From: Gabriel Cocenza Date: Tue, 30 Apr 2024 16:52:20 -0300 Subject: [PATCH] apply suggestions --- cou/apps/base.py | 26 +++--- .../018346c5-f95c-46df-a34e-9a78bdec0018.yaml | 79 +++++++--------- .../9eb9af6a-b919-4cf9-8f2f-9df16a1556be.yaml | 90 +++++++++---------- tests/unit/apps/test_auxiliary.py | 25 +++--- tests/unit/apps/test_base.py | 21 ++--- 5 files changed, 109 insertions(+), 132 deletions(-) diff --git a/cou/apps/base.py b/cou/apps/base.py index e7ef440f..8479f58c 100644 --- a/cou/apps/base.py +++ b/cou/apps/base.py @@ -20,7 +20,7 @@ import os from collections import defaultdict from dataclasses import dataclass, field -from typing import Any, Coroutine, Optional +from typing import Any, Optional import yaml @@ -564,10 +564,9 @@ def _get_refresh_charm_step(self, target: OpenStackRelease) -> PreUpgradeStep: if self.is_from_charm_store: return self._get_charmhub_migration_step(target) if self.channel == LATEST_STABLE: - description, coro = self._get_change_channel_possible_downgrade_step( + return self._get_change_channel_possible_downgrade_step( target, self.expected_current_channel(target) ) - return PreUpgradeStep(description=description, coro=coro) if self._need_current_channel_refresh(target): return self._get_refresh_current_channel_step() @@ -593,15 +592,15 @@ def _get_charmhub_migration_step(self, target: OpenStackRelease) -> PreUpgradeSt def _get_change_channel_possible_downgrade_step( self, target: OpenStackRelease, channel: str - ) -> tuple[str, Coroutine]: + ) -> PreUpgradeStep: """Get the step for changing to a channel that can be a downgrade. :param target: OpenStack release as target to upgrade :type target: OpenStackRelease :param channel: channel to upgrade :type channel: str - :return: tuple containing the message and the coroutine. - :rtype: tuple[str, Coroutine] + :return: Step for possible downgrade. + :rtype: PreUpgradeStep """ logger.warning( "Changing '%s' channel from %s to %s to upgrade to %s. This may be a charm downgrade, " @@ -611,11 +610,13 @@ def _get_change_channel_possible_downgrade_step( channel, target, ) - msg = ( + description = ( f"WARNING: Changing '{self.name}' channel from {self.channel} to " f"{channel}. This may be a charm downgrade, which is generally not supported." ) - return msg, self.model.upgrade_charm(self.name, channel) + return PreUpgradeStep( + description=description, coro=self.model.upgrade_charm(self.name, channel) + ) def _get_refresh_current_channel_step(self) -> PreUpgradeStep: """Get step for refreshing the current channel. @@ -643,6 +644,7 @@ def _get_upgrade_charm_step(self, target: OpenStackRelease) -> UpgradeStep: :param target: OpenStack release as target to upgrade. :type target: OpenStackRelease + :raises ApplicationError: When the current channel is ahead from expected and the target. :return: Step for upgrading the charm. :rtype: UpgradeStep """ @@ -662,10 +664,12 @@ def _get_upgrade_charm_step(self, target: OpenStackRelease) -> UpgradeStep: self.current_channel_os_release > self.current_os_release and channel != self.target_channel(target) ): - description, coro = self._get_change_channel_possible_downgrade_step( - target, self.target_channel(target) + raise ApplicationError( + f"'{self.name}' has the channel ahead from expected. The channel '{self.channel}' " + f"doesn't match with the expected '{self.expected_current_channel(target)}' or " + f"with the target channel '{self.target_channel(target)}'. " + "Manual intervention is required." ) - return UpgradeStep(description=description, coro=coro) logger.debug("%s does not need to upgrade the channel", self.name) return UpgradeStep() diff --git a/tests/mocked_plans/sample_plans/018346c5-f95c-46df-a34e-9a78bdec0018.yaml b/tests/mocked_plans/sample_plans/018346c5-f95c-46df-a34e-9a78bdec0018.yaml index b0c33987..5908fbf5 100644 --- a/tests/mocked_plans/sample_plans/018346c5-f95c-46df-a34e-9a78bdec0018.yaml +++ b/tests/mocked_plans/sample_plans/018346c5-f95c-46df-a34e-9a78bdec0018.yaml @@ -9,7 +9,6 @@ plan: | Ψ Upgrade software packages on unit 'rabbitmq-server/1' Ψ Upgrade software packages on unit 'rabbitmq-server/2' WARNING: Changing 'rabbitmq-server' channel from latest/stable to 3.9/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'rabbitmq-server' to the new channel: '3.9/stable' Change charm config of 'rabbitmq-server' 'source' to 'cloud:focal-victoria' Wait for up to 2400s for model '018346c5-f95c-46df-a34e-9a78bdec0018' to reach the idle state Verify that the workload of 'rabbitmq-server' has been upgraded on units: rabbitmq-server/0, rabbitmq-server/1, rabbitmq-server/2 @@ -20,7 +19,6 @@ plan: | Ψ Upgrade software packages on unit 'ceph-mon/2' WARNING: Changing 'ceph-mon' channel from latest/stable to octopus/stable. This may be a charm downgrade, which is generally not supported. Ensure that the 'require-osd-release' option matches the 'ceph-osd' version - Upgrade 'ceph-mon' to the new channel: 'octopus/stable' Change charm config of 'ceph-mon' 'source' to 'cloud:focal-victoria' Wait for up to 2400s for model '018346c5-f95c-46df-a34e-9a78bdec0018' to reach the idle state Verify that the workload of 'ceph-mon' has been upgraded on units: ceph-mon/0, ceph-mon/1, ceph-mon/2 @@ -30,7 +28,7 @@ plan: | Ψ Upgrade software packages on unit 'keystone/1' Ψ Upgrade software packages on unit 'keystone/2' Refresh 'keystone' to the latest revision of 'ussuri/stable' - Upgrade 'keystone' to the new channel: 'victoria/stable' + Upgrade 'keystone' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'keystone' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 2400s for model '018346c5-f95c-46df-a34e-9a78bdec0018' to reach the idle state Verify that the workload of 'keystone' has been upgraded on units: keystone/0, keystone/1, keystone/2 @@ -40,7 +38,7 @@ plan: | Ψ Upgrade software packages on unit 'aodh/1' Ψ Upgrade software packages on unit 'aodh/2' Refresh 'aodh' to the latest revision of 'ussuri/stable' - Upgrade 'aodh' to the new channel: 'victoria/stable' + Upgrade 'aodh' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'aodh' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'aodh' to reach the idle state Verify that the workload of 'aodh' has been upgraded on units: aodh/0, aodh/1, aodh/2 @@ -50,7 +48,7 @@ plan: | Ψ Upgrade software packages on unit 'ceilometer/1' Ψ Upgrade software packages on unit 'ceilometer/2' Refresh 'ceilometer' to the latest revision of 'ussuri/stable' - Upgrade 'ceilometer' to the new channel: 'victoria/stable' + Upgrade 'ceilometer' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'ceilometer' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'ceilometer' to reach the idle state Verify that the workload of 'ceilometer' has been upgraded on units: ceilometer/0, ceilometer/1, ceilometer/2 @@ -60,7 +58,6 @@ plan: | Ψ Upgrade software packages on unit 'ceph-radosgw/1' Ψ Upgrade software packages on unit 'ceph-radosgw/2' WARNING: Changing 'ceph-radosgw' channel from latest/stable to octopus/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'ceph-radosgw' to the new channel: 'octopus/stable' Change charm config of 'ceph-radosgw' 'source' to 'cloud:focal-victoria' Wait for up to 300s for app 'ceph-radosgw' to reach the idle state Verify that the workload of 'ceph-radosgw' has been upgraded on units: ceph-radosgw/0, ceph-radosgw/1, ceph-radosgw/2 @@ -70,7 +67,7 @@ plan: | Ψ Upgrade software packages on unit 'cinder/1' Ψ Upgrade software packages on unit 'cinder/2' Refresh 'cinder' to the latest revision of 'ussuri/stable' - Upgrade 'cinder' to the new channel: 'victoria/stable' + Upgrade 'cinder' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'cinder' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'cinder' to reach the idle state Verify that the workload of 'cinder' has been upgraded on units: cinder/0, cinder/1, cinder/2 @@ -80,7 +77,7 @@ plan: | Ψ Upgrade software packages on unit 'designate/2' Ψ Upgrade software packages on unit 'designate/3' Refresh 'designate' to the latest revision of 'ussuri/stable' - Upgrade 'designate' to the new channel: 'victoria/stable' + Upgrade 'designate' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'designate' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'designate' to reach the idle state Verify that the workload of 'designate' has been upgraded on units: designate/1, designate/2, designate/3 @@ -89,7 +86,7 @@ plan: | Ψ Upgrade software packages on unit 'designate-bind/0' Ψ Upgrade software packages on unit 'designate-bind/1' Ψ Upgrade software packages on unit 'designate-bind/2' - Upgrade 'designate-bind' to the new channel: 'victoria/stable' + Upgrade 'designate-bind' from 'ussuri/stable' to the new channel: 'victoria/stable' Wait for up to 300s for app 'designate-bind' to reach the idle state Verify that the workload of 'designate-bind' has been upgraded on units: designate-bind/0, designate-bind/1, designate-bind/2 Upgrade plan for 'glance' to 'victoria' @@ -98,7 +95,7 @@ plan: | Ψ Upgrade software packages on unit 'glance/1' Ψ Upgrade software packages on unit 'glance/2' Refresh 'glance' to the latest revision of 'ussuri/stable' - Upgrade 'glance' to the new channel: 'victoria/stable' + Upgrade 'glance' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'glance' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'glance' to reach the idle state Verify that the workload of 'glance' has been upgraded on units: glance/0, glance/1, glance/2 @@ -108,7 +105,7 @@ plan: | Ψ Upgrade software packages on unit 'gnocchi/1' Ψ Upgrade software packages on unit 'gnocchi/2' Refresh 'gnocchi' to the latest revision of 'ussuri/stable' - Upgrade 'gnocchi' to the new channel: 'victoria/stable' + Upgrade 'gnocchi' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'gnocchi' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'gnocchi' to reach the idle state Verify that the workload of 'gnocchi' has been upgraded on units: gnocchi/0, gnocchi/1, gnocchi/2 @@ -118,7 +115,7 @@ plan: | Ψ Upgrade software packages on unit 'heat/1' Ψ Upgrade software packages on unit 'heat/2' Refresh 'heat' to the latest revision of 'ussuri/stable' - Upgrade 'heat' to the new channel: 'victoria/stable' + Upgrade 'heat' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'heat' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'heat' to reach the idle state Verify that the workload of 'heat' has been upgraded on units: heat/0, heat/1, heat/2 @@ -128,7 +125,7 @@ plan: | Ψ Upgrade software packages on unit 'neutron-api/1' Ψ Upgrade software packages on unit 'neutron-api/2' Refresh 'neutron-api' to the latest revision of 'ussuri/stable' - Upgrade 'neutron-api' to the new channel: 'victoria/stable' + Upgrade 'neutron-api' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'neutron-api' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'neutron-api' to reach the idle state Verify that the workload of 'neutron-api' has been upgraded on units: neutron-api/0, neutron-api/1, neutron-api/2 @@ -138,7 +135,7 @@ plan: | Ψ Upgrade software packages on unit 'placement/4' Ψ Upgrade software packages on unit 'placement/5' Refresh 'placement' to the latest revision of 'ussuri/stable' - Upgrade 'placement' to the new channel: 'victoria/stable' + Upgrade 'placement' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'placement' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'placement' to reach the idle state Verify that the workload of 'placement' has been upgraded on units: placement/3, placement/4, placement/5 @@ -148,7 +145,7 @@ plan: | Ψ Upgrade software packages on unit 'nova-cloud-controller/1' Ψ Upgrade software packages on unit 'nova-cloud-controller/2' Refresh 'nova-cloud-controller' to the latest revision of 'ussuri/stable' - Upgrade 'nova-cloud-controller' to the new channel: 'victoria/stable' + Upgrade 'nova-cloud-controller' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'nova-cloud-controller' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'nova-cloud-controller' to reach the idle state Verify that the workload of 'nova-cloud-controller' has been upgraded on units: nova-cloud-controller/0, nova-cloud-controller/1, nova-cloud-controller/2 @@ -158,7 +155,7 @@ plan: | Ψ Upgrade software packages on unit 'openstack-dashboard/1' Ψ Upgrade software packages on unit 'openstack-dashboard/2' Refresh 'openstack-dashboard' to the latest revision of 'ussuri/stable' - Upgrade 'openstack-dashboard' to the new channel: 'victoria/stable' + Upgrade 'openstack-dashboard' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'openstack-dashboard' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'openstack-dashboard' to reach the idle state Verify that the workload of 'openstack-dashboard' has been upgraded on units: openstack-dashboard/0, openstack-dashboard/1, openstack-dashboard/2 @@ -168,14 +165,14 @@ plan: | Ψ Upgrade software packages on unit 'octavia/8' Ψ Upgrade software packages on unit 'octavia/9' Refresh 'octavia' to the latest revision of 'ussuri/stable' - Upgrade 'octavia' to the new channel: 'victoria/stable' + Upgrade 'octavia' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'octavia' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 2400s for app 'octavia' to reach the idle state Verify that the workload of 'octavia' has been upgraded on units: octavia/10, octavia/8, octavia/9 Upgrade plan for 'glance-simplestreams-sync' to 'victoria' Upgrade software packages of 'glance-simplestreams-sync' from the current APT repositories Ψ Upgrade software packages on unit 'glance-simplestreams-sync/0' - Upgrade 'glance-simplestreams-sync' to the new channel: 'victoria/stable' + Upgrade 'glance-simplestreams-sync' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'glance-simplestreams-sync' 'source' to 'cloud:focal-victoria' Upgrade plan for 'mysql-innodb-cluster' to 'victoria' Upgrade software packages of 'mysql-innodb-cluster' from the current APT repositories @@ -190,55 +187,40 @@ plan: | Upgrade plan for 'ceph-dashboard' to 'victoria' Refresh 'ceph-dashboard' to the latest revision of 'octopus/stable' Upgrade plan for 'cinder-ceph' to 'victoria' - Upgrade 'cinder-ceph' to the new channel: 'victoria/stable' + Upgrade 'cinder-ceph' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'hacluster-aodh' to 'victoria' WARNING: Changing 'hacluster-aodh' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-aodh' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-ceilometer' to 'victoria' WARNING: Changing 'hacluster-ceilometer' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-ceilometer' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-cinder' to 'victoria' WARNING: Changing 'hacluster-cinder' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-cinder' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-designate' to 'victoria' WARNING: Changing 'hacluster-designate' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-designate' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-glance' to 'victoria' WARNING: Changing 'hacluster-glance' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-glance' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-gnocchi' to 'victoria' WARNING: Changing 'hacluster-gnocchi' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-gnocchi' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-heat' to 'victoria' WARNING: Changing 'hacluster-heat' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-heat' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-horizon' to 'victoria' WARNING: Changing 'hacluster-horizon' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-horizon' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-keystone' to 'victoria' WARNING: Changing 'hacluster-keystone' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-keystone' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-neutron' to 'victoria' WARNING: Changing 'hacluster-neutron' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-neutron' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-nova' to 'victoria' WARNING: Changing 'hacluster-nova' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-nova' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-octavia' to 'victoria' WARNING: Changing 'hacluster-octavia' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-octavia' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-placement' to 'victoria' WARNING: Changing 'hacluster-placement' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-placement' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-radosgw' to 'victoria' WARNING: Changing 'hacluster-radosgw' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-radosgw' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-vault' to 'victoria' WARNING: Changing 'hacluster-vault' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'hacluster-vault' to the new channel: '2.4/stable' Upgrade plan for 'keystone-ldap' to 'victoria' WARNING: Changing 'keystone-ldap' channel from latest/stable to ussuri/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'keystone-ldap' to the new channel: 'victoria/stable' + Upgrade 'keystone-ldap' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'aodh-mysql-router' to 'victoria' Refresh 'aodh-mysql-router' to the latest revision of '8.0/stable' Upgrade plan for 'cinder-mysql-router' to 'victoria' @@ -266,11 +248,11 @@ plan: | Upgrade plan for 'vault-mysql-router' to 'victoria' Refresh 'vault-mysql-router' to the latest revision of '8.0/stable' Upgrade plan for 'neutron-openvswitch-octavia' to 'victoria' - Upgrade 'neutron-openvswitch-octavia' to the new channel: 'victoria/stable' + Upgrade 'neutron-openvswitch-octavia' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'octavia-dashboard' to 'victoria' - Upgrade 'octavia-dashboard' to the new channel: 'victoria/stable' + Upgrade 'octavia-dashboard' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'octavia-diskimage-retrofit' to 'victoria' - Upgrade 'octavia-diskimage-retrofit' to the new channel: 'victoria/stable' + Upgrade 'octavia-diskimage-retrofit' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrading all applications deployed on machines with hypervisor. Upgrade plan for 'zone2' to 'victoria' Upgrade software packages of 'cinder-volume' from the current APT repositories @@ -289,7 +271,7 @@ plan: | Ψ Upgrade software packages on unit 'nova-compute-kvm/3' Ψ Upgrade software packages on unit 'nova-compute-kvm/9' Refresh 'nova-compute-kvm' to the latest revision of 'ussuri/stable' - Upgrade 'cinder-volume' to the new channel: 'victoria/stable' + Upgrade 'cinder-volume' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'cinder-volume' 'openstack-origin' to 'cloud:focal-victoria' Upgrade plan for units: cinder-volume/0, cinder-volume/2, cinder-volume/3, cinder-volume/9 Ψ Upgrade plan for unit 'cinder-volume/0' @@ -308,7 +290,7 @@ plan: | Pause the unit: 'cinder-volume/9' Upgrade the unit: 'cinder-volume/9' Resume the unit: 'cinder-volume/9' - Upgrade 'nova-compute-kvm' to the new channel: 'victoria/stable' + Upgrade 'nova-compute-kvm' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'nova-compute-kvm' 'openstack-origin' to 'cloud:focal-victoria' Upgrade plan for units: nova-compute-kvm/0, nova-compute-kvm/2, nova-compute-kvm/3, nova-compute-kvm/9 Ψ Upgrade plan for unit 'nova-compute-kvm/0' @@ -356,7 +338,7 @@ plan: | Ψ Upgrade software packages on unit 'nova-compute-kvm/11' Ψ Upgrade software packages on unit 'nova-compute-kvm/5' Refresh 'nova-compute-kvm' to the latest revision of 'ussuri/stable' - Upgrade 'cinder-volume' to the new channel: 'victoria/stable' + Upgrade 'cinder-volume' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'cinder-volume' 'openstack-origin' to 'cloud:focal-victoria' Upgrade plan for units: cinder-volume/1, cinder-volume/10, cinder-volume/11, cinder-volume/5 Ψ Upgrade plan for unit 'cinder-volume/1' @@ -375,7 +357,7 @@ plan: | Pause the unit: 'cinder-volume/5' Upgrade the unit: 'cinder-volume/5' Resume the unit: 'cinder-volume/5' - Upgrade 'nova-compute-kvm' to the new channel: 'victoria/stable' + Upgrade 'nova-compute-kvm' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'nova-compute-kvm' 'openstack-origin' to 'cloud:focal-victoria' Upgrade plan for units: nova-compute-kvm/1, nova-compute-kvm/10, nova-compute-kvm/11, nova-compute-kvm/5 Ψ Upgrade plan for unit 'nova-compute-kvm/1' @@ -423,7 +405,7 @@ plan: | Ψ Upgrade software packages on unit 'nova-compute-kvm/7' Ψ Upgrade software packages on unit 'nova-compute-kvm/8' Refresh 'nova-compute-kvm' to the latest revision of 'ussuri/stable' - Upgrade 'cinder-volume' to the new channel: 'victoria/stable' + Upgrade 'cinder-volume' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'cinder-volume' 'openstack-origin' to 'cloud:focal-victoria' Upgrade plan for units: cinder-volume/4, cinder-volume/6, cinder-volume/7, cinder-volume/8 Ψ Upgrade plan for unit 'cinder-volume/4' @@ -442,7 +424,7 @@ plan: | Pause the unit: 'cinder-volume/8' Upgrade the unit: 'cinder-volume/8' Resume the unit: 'cinder-volume/8' - Upgrade 'nova-compute-kvm' to the new channel: 'victoria/stable' + Upgrade 'nova-compute-kvm' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'nova-compute-kvm' 'openstack-origin' to 'cloud:focal-victoria' Upgrade plan for units: nova-compute-kvm/4, nova-compute-kvm/6, nova-compute-kvm/7, nova-compute-kvm/8 Ψ Upgrade plan for unit 'nova-compute-kvm/4' @@ -481,20 +463,19 @@ plan: | Ψ Upgrade software packages on unit 'ceph-osd/1' Ψ Upgrade software packages on unit 'ceph-osd/2' WARNING: Changing 'ceph-osd' channel from latest/stable to octopus/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'ceph-osd' to the new channel: 'octopus/stable' Change charm config of 'ceph-osd' 'source' to 'cloud:focal-victoria' Wait for up to 300s for app 'ceph-osd' to reach the idle state Verify that the workload of 'ceph-osd' has been upgraded on units: ceph-osd/0, ceph-osd/1, ceph-osd/2 Data Plane subordinate(s) upgrade plan Upgrade plan for 'ceilometer-agent' to 'victoria' Refresh 'ceilometer-agent' to the latest revision of 'ussuri/stable' - Upgrade 'ceilometer-agent' to the new channel: 'victoria/stable' + Upgrade 'ceilometer-agent' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'cinder-lvm-fast' to 'victoria' - Upgrade 'cinder-lvm-fast' to the new channel: 'victoria/stable' + Upgrade 'cinder-lvm-fast' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'cinder-lvm-fast2' to 'victoria' - Upgrade 'cinder-lvm-fast2' to the new channel: 'victoria/stable' + Upgrade 'cinder-lvm-fast2' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'cinder-lvm-slow' to 'victoria' - Upgrade 'cinder-lvm-slow' to the new channel: 'victoria/stable' + Upgrade 'cinder-lvm-slow' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'cinder-volume-mysql-router' to 'victoria' Refresh 'cinder-volume-mysql-router' to the latest revision of '8.0/stable' diff --git a/tests/mocked_plans/sample_plans/9eb9af6a-b919-4cf9-8f2f-9df16a1556be.yaml b/tests/mocked_plans/sample_plans/9eb9af6a-b919-4cf9-8f2f-9df16a1556be.yaml index 7602f59a..73ef59aa 100644 --- a/tests/mocked_plans/sample_plans/9eb9af6a-b919-4cf9-8f2f-9df16a1556be.yaml +++ b/tests/mocked_plans/sample_plans/9eb9af6a-b919-4cf9-8f2f-9df16a1556be.yaml @@ -9,7 +9,7 @@ plan: | Ψ Upgrade software packages on unit 'rabbitmq-server/1' Ψ Upgrade software packages on unit 'rabbitmq-server/2' Refresh 'rabbitmq-server' to the latest revision of '3.8/stable' - Upgrade 'rabbitmq-server' to the new channel: '3.9/stable' + Upgrade 'rabbitmq-server' from '3.8/stable' to the new channel: '3.9/stable' Change charm config of 'rabbitmq-server' 'source' to 'cloud:focal-victoria' Wait for up to 2400s for model '9eb9af6a-b919-4cf9-8f2f-9df16a1556be' to reach the idle state Verify that the workload of 'rabbitmq-server' has been upgraded on units: rabbitmq-server/0, rabbitmq-server/1, rabbitmq-server/2 @@ -29,7 +29,7 @@ plan: | Ψ Upgrade software packages on unit 'keystone/1' Ψ Upgrade software packages on unit 'keystone/2' Change charm config of 'keystone' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'keystone' to the new channel: 'victoria/stable' + Upgrade 'keystone' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'keystone' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 2400s for model '9eb9af6a-b919-4cf9-8f2f-9df16a1556be' to reach the idle state Verify that the workload of 'keystone' has been upgraded on units: keystone/0, keystone/1, keystone/2 @@ -39,7 +39,7 @@ plan: | Ψ Upgrade software packages on unit 'aodh/1' Ψ Upgrade software packages on unit 'aodh/2' Change charm config of 'aodh' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'aodh' to the new channel: 'victoria/stable' + Upgrade 'aodh' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'aodh' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'aodh' to reach the idle state Verify that the workload of 'aodh' has been upgraded on units: aodh/0, aodh/1, aodh/2 @@ -49,7 +49,7 @@ plan: | Ψ Upgrade software packages on unit 'barbican/1' Ψ Upgrade software packages on unit 'barbican/2' Change charm config of 'barbican' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'barbican' to the new channel: 'victoria/stable' + Upgrade 'barbican' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'barbican' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'barbican' to reach the idle state Verify that the workload of 'barbican' has been upgraded on units: barbican/0, barbican/1, barbican/2 @@ -59,7 +59,7 @@ plan: | Ψ Upgrade software packages on unit 'ceilometer/1' Ψ Upgrade software packages on unit 'ceilometer/2' Change charm config of 'ceilometer' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'ceilometer' to the new channel: 'victoria/stable' + Upgrade 'ceilometer' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'ceilometer' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'ceilometer' to reach the idle state Verify that the workload of 'ceilometer' has been upgraded on units: ceilometer/0, ceilometer/1, ceilometer/2 @@ -78,7 +78,7 @@ plan: | Ψ Upgrade software packages on unit 'cinder/1' Ψ Upgrade software packages on unit 'cinder/2' Change charm config of 'cinder' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'cinder' to the new channel: 'victoria/stable' + Upgrade 'cinder' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'cinder' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'cinder' to reach the idle state Verify that the workload of 'cinder' has been upgraded on units: cinder/0, cinder/1, cinder/2 @@ -88,7 +88,7 @@ plan: | Ψ Upgrade software packages on unit 'designate/1' Ψ Upgrade software packages on unit 'designate/2' Change charm config of 'designate' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'designate' to the new channel: 'victoria/stable' + Upgrade 'designate' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'designate' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'designate' to reach the idle state Verify that the workload of 'designate' has been upgraded on units: designate/0, designate/1, designate/2 @@ -97,7 +97,7 @@ plan: | Ψ Upgrade software packages on unit 'designate-bind/0' Ψ Upgrade software packages on unit 'designate-bind/1' Refresh 'designate-bind' to the latest revision of 'ussuri/stable' - Upgrade 'designate-bind' to the new channel: 'victoria/stable' + Upgrade 'designate-bind' from 'ussuri/stable' to the new channel: 'victoria/stable' Wait for up to 300s for app 'designate-bind' to reach the idle state Verify that the workload of 'designate-bind' has been upgraded on units: designate-bind/0, designate-bind/1 Upgrade plan for 'glance' to 'victoria' @@ -107,7 +107,7 @@ plan: | Ψ Upgrade software packages on unit 'glance/2' Refresh 'glance' to the latest revision of 'ussuri/stable' Change charm config of 'glance' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'glance' to the new channel: 'victoria/stable' + Upgrade 'glance' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'glance' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'glance' to reach the idle state Verify that the workload of 'glance' has been upgraded on units: glance/0, glance/1, glance/2 @@ -117,7 +117,7 @@ plan: | Ψ Upgrade software packages on unit 'gnocchi/1' Ψ Upgrade software packages on unit 'gnocchi/2' Change charm config of 'gnocchi' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'gnocchi' to the new channel: 'victoria/stable' + Upgrade 'gnocchi' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'gnocchi' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'gnocchi' to reach the idle state Verify that the workload of 'gnocchi' has been upgraded on units: gnocchi/0, gnocchi/1, gnocchi/2 @@ -127,7 +127,7 @@ plan: | Ψ Upgrade software packages on unit 'heat/1' Ψ Upgrade software packages on unit 'heat/2' Change charm config of 'heat' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'heat' to the new channel: 'victoria/stable' + Upgrade 'heat' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'heat' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'heat' to reach the idle state Verify that the workload of 'heat' has been upgraded on units: heat/0, heat/1, heat/2 @@ -137,7 +137,7 @@ plan: | Ψ Upgrade software packages on unit 'neutron-api/1' Ψ Upgrade software packages on unit 'neutron-api/2' Change charm config of 'neutron-api' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'neutron-api' to the new channel: 'victoria/stable' + Upgrade 'neutron-api' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'neutron-api' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'neutron-api' to reach the idle state Verify that the workload of 'neutron-api' has been upgraded on units: neutron-api/0, neutron-api/1, neutron-api/2 @@ -147,7 +147,6 @@ plan: | Ψ Upgrade software packages on unit 'ovn-central/1' Ψ Upgrade software packages on unit 'ovn-central/2' WARNING: Changing 'ovn-central' channel from latest/stable to 22.03/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'ovn-central' to the new channel: '22.03/stable' Change charm config of 'ovn-central' 'source' to 'cloud:focal-victoria' Wait for up to 300s for app 'ovn-central' to reach the idle state Verify that the workload of 'ovn-central' has been upgraded on units: ovn-central/0, ovn-central/1, ovn-central/2 @@ -157,7 +156,7 @@ plan: | Ψ Upgrade software packages on unit 'placement/1' Ψ Upgrade software packages on unit 'placement/2' Change charm config of 'placement' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'placement' to the new channel: 'victoria/stable' + Upgrade 'placement' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'placement' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'placement' to reach the idle state Verify that the workload of 'placement' has been upgraded on units: placement/0, placement/1, placement/2 @@ -167,7 +166,7 @@ plan: | Ψ Upgrade software packages on unit 'nova-cloud-controller/1' Ψ Upgrade software packages on unit 'nova-cloud-controller/2' Change charm config of 'nova-cloud-controller' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'nova-cloud-controller' to the new channel: 'victoria/stable' + Upgrade 'nova-cloud-controller' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'nova-cloud-controller' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'nova-cloud-controller' to reach the idle state Verify that the workload of 'nova-cloud-controller' has been upgraded on units: nova-cloud-controller/0, nova-cloud-controller/1, nova-cloud-controller/2 @@ -178,7 +177,7 @@ plan: | Ψ Upgrade software packages on unit 'openstack-dashboard/2' Refresh 'openstack-dashboard' to the latest revision of 'ussuri/stable' Change charm config of 'openstack-dashboard' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'openstack-dashboard' to the new channel: 'victoria/stable' + Upgrade 'openstack-dashboard' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'openstack-dashboard' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 300s for app 'openstack-dashboard' to reach the idle state Verify that the workload of 'openstack-dashboard' has been upgraded on units: openstack-dashboard/0, openstack-dashboard/1, openstack-dashboard/2 @@ -188,14 +187,14 @@ plan: | Ψ Upgrade software packages on unit 'octavia/1' Ψ Upgrade software packages on unit 'octavia/2' Change charm config of 'octavia' 'action-managed-upgrade' from 'True' to 'False' - Upgrade 'octavia' to the new channel: 'victoria/stable' + Upgrade 'octavia' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'octavia' 'openstack-origin' to 'cloud:focal-victoria' Wait for up to 2400s for app 'octavia' to reach the idle state Verify that the workload of 'octavia' has been upgraded on units: octavia/0, octavia/1, octavia/2 Upgrade plan for 'glance-simplestreams-sync' to 'victoria' Upgrade software packages of 'glance-simplestreams-sync' from the current APT repositories Ψ Upgrade software packages on unit 'glance-simplestreams-sync/0' - Upgrade 'glance-simplestreams-sync' to the new channel: 'victoria/stable' + Upgrade 'glance-simplestreams-sync' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'glance-simplestreams-sync' 'source' to 'cloud:focal-victoria' Upgrade plan for 'mysql-innodb-cluster' to 'victoria' Upgrade software packages of 'mysql-innodb-cluster' from the current APT repositories @@ -216,65 +215,64 @@ plan: | Verify that the workload of 'vault' has been upgraded on units: vault/0, vault/1, vault/2 Control Plane subordinate(s) upgrade plan Upgrade plan for 'barbican-vault' to 'victoria' - Upgrade 'barbican-vault' to the new channel: 'victoria/stable' + Upgrade 'barbican-vault' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'ceph-dashboard' to 'victoria' Refresh 'ceph-dashboard' to the latest revision of 'octopus/stable' Upgrade plan for 'cinder-ceph' to 'victoria' Refresh 'cinder-ceph' to the latest revision of 'ussuri/stable' - Upgrade 'cinder-ceph' to the new channel: 'victoria/stable' + Upgrade 'cinder-ceph' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'hacluster-aodh' to 'victoria' Refresh 'hacluster-aodh' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-aodh' to the new channel: '2.4/stable' + Upgrade 'hacluster-aodh' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-barbican' to 'victoria' Refresh 'hacluster-barbican' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-barbican' to the new channel: '2.4/stable' + Upgrade 'hacluster-barbican' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-ceilometer' to 'victoria' Refresh 'hacluster-ceilometer' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-ceilometer' to the new channel: '2.4/stable' + Upgrade 'hacluster-ceilometer' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-ceph-radosgw' to 'victoria' Refresh 'hacluster-ceph-radosgw' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-ceph-radosgw' to the new channel: '2.4/stable' + Upgrade 'hacluster-ceph-radosgw' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-cinder' to 'victoria' Refresh 'hacluster-cinder' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-cinder' to the new channel: '2.4/stable' + Upgrade 'hacluster-cinder' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-designate' to 'victoria' Refresh 'hacluster-designate' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-designate' to the new channel: '2.4/stable' + Upgrade 'hacluster-designate' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-glance' to 'victoria' Refresh 'hacluster-glance' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-glance' to the new channel: '2.4/stable' + Upgrade 'hacluster-glance' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-gnocchi' to 'victoria' Refresh 'hacluster-gnocchi' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-gnocchi' to the new channel: '2.4/stable' + Upgrade 'hacluster-gnocchi' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-heat' to 'victoria' Refresh 'hacluster-heat' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-heat' to the new channel: '2.4/stable' + Upgrade 'hacluster-heat' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-keystone' to 'victoria' Refresh 'hacluster-keystone' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-keystone' to the new channel: '2.4/stable' + Upgrade 'hacluster-keystone' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-neutron-api' to 'victoria' Refresh 'hacluster-neutron-api' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-neutron-api' to the new channel: '2.4/stable' + Upgrade 'hacluster-neutron-api' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-nova-cloud-controller' to 'victoria' Refresh 'hacluster-nova-cloud-controller' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-nova-cloud-controller' to the new channel: '2.4/stable' + Upgrade 'hacluster-nova-cloud-controller' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-octavia' to 'victoria' Refresh 'hacluster-octavia' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-octavia' to the new channel: '2.4/stable' + Upgrade 'hacluster-octavia' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-openstack-dashboard' to 'victoria' Refresh 'hacluster-openstack-dashboard' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-openstack-dashboard' to the new channel: '2.4/stable' + Upgrade 'hacluster-openstack-dashboard' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-placement' to 'victoria' Refresh 'hacluster-placement' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-placement' to the new channel: '2.4/stable' + Upgrade 'hacluster-placement' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'hacluster-vault' to 'victoria' Refresh 'hacluster-vault' to the latest revision of '2.0.3/stable' - Upgrade 'hacluster-vault' to the new channel: '2.4/stable' + Upgrade 'hacluster-vault' from '2.0.3/stable' to the new channel: '2.4/stable' Upgrade plan for 'openstack-loadbalancer-hacluster' to 'victoria' WARNING: Changing 'openstack-loadbalancer-hacluster' channel from latest/stable to 2.4/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'openstack-loadbalancer-hacluster' to the new channel: '2.4/stable' Upgrade plan for 'keystone-saml-mellon' to 'victoria' - Upgrade 'keystone-saml-mellon' to the new channel: 'victoria/stable' + Upgrade 'keystone-saml-mellon' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'aodh-mysql-router' to 'victoria' Refresh 'aodh-mysql-router' to the latest revision of '8.0/stable' Upgrade plan for 'barbican-mysql-router' to 'victoria' @@ -304,15 +302,14 @@ plan: | Upgrade plan for 'vault-mysql-router' to 'victoria' Refresh 'vault-mysql-router' to the latest revision of '8.0/stable' Upgrade plan for 'neutron-api-plugin-ovn' to 'victoria' - Upgrade 'neutron-api-plugin-ovn' to the new channel: 'victoria/stable' + Upgrade 'neutron-api-plugin-ovn' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'octavia-dashboard' to 'victoria' - Upgrade 'octavia-dashboard' to the new channel: 'victoria/stable' + Upgrade 'octavia-dashboard' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'octavia-diskimage-retrofit' to 'victoria' Refresh 'octavia-diskimage-retrofit' to the latest revision of 'ussuri/stable' - Upgrade 'octavia-diskimage-retrofit' to the new channel: 'victoria/stable' + Upgrade 'octavia-diskimage-retrofit' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'octavia-ovn-chassis' to 'victoria' WARNING: Changing 'octavia-ovn-chassis' channel from latest/stable to 22.03/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'octavia-ovn-chassis' to the new channel: '22.03/stable' Upgrading all applications deployed on machines with hypervisor. Upgrade plan for 'az1' to 'victoria' Disable nova-compute scheduler from unit: 'nova-compute/0' @@ -323,7 +320,7 @@ plan: | Ψ Upgrade software packages on unit 'nova-compute/2' Ψ Upgrade software packages on unit 'nova-compute/3' Refresh 'nova-compute' to the latest revision of 'ussuri/stable' - Upgrade 'nova-compute' to the new channel: 'victoria/stable' + Upgrade 'nova-compute' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'nova-compute' 'openstack-origin' to 'cloud:focal-victoria' Upgrade plan for units: nova-compute/0, nova-compute/2, nova-compute/3 Ψ Upgrade plan for unit 'nova-compute/0' @@ -355,7 +352,7 @@ plan: | Ψ Upgrade software packages on unit 'nova-compute/6' Ψ Upgrade software packages on unit 'nova-compute/8' Refresh 'nova-compute' to the latest revision of 'ussuri/stable' - Upgrade 'nova-compute' to the new channel: 'victoria/stable' + Upgrade 'nova-compute' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'nova-compute' 'openstack-origin' to 'cloud:focal-victoria' Upgrade plan for units: nova-compute/1, nova-compute/6, nova-compute/8 Ψ Upgrade plan for unit 'nova-compute/1' @@ -387,7 +384,7 @@ plan: | Ψ Upgrade software packages on unit 'nova-compute/5' Ψ Upgrade software packages on unit 'nova-compute/7' Refresh 'nova-compute' to the latest revision of 'ussuri/stable' - Upgrade 'nova-compute' to the new channel: 'victoria/stable' + Upgrade 'nova-compute' from 'ussuri/stable' to the new channel: 'victoria/stable' Change charm config of 'nova-compute' 'openstack-origin' to 'cloud:focal-victoria' Upgrade plan for units: nova-compute/4, nova-compute/5, nova-compute/7 Ψ Upgrade plan for unit 'nova-compute/4' @@ -429,10 +426,9 @@ plan: | Verify that the workload of 'ceph-osd' has been upgraded on units: ceph-osd/0, ceph-osd/1, ceph-osd/2, ceph-osd/3, ceph-osd/4, ceph-osd/5, ceph-osd/6, ceph-osd/7, ceph-osd/8 Data Plane subordinate(s) upgrade plan Upgrade plan for 'ceilometer-agent' to 'victoria' - Upgrade 'ceilometer-agent' to the new channel: 'victoria/stable' + Upgrade 'ceilometer-agent' from 'ussuri/stable' to the new channel: 'victoria/stable' Upgrade plan for 'ovn-chassis' to 'victoria' WARNING: Changing 'ovn-chassis' channel from latest/stable to 22.03/stable. This may be a charm downgrade, which is generally not supported. - Upgrade 'ovn-chassis' to the new channel: '22.03/stable' applications: rabbitmq-server: diff --git a/tests/unit/apps/test_auxiliary.py b/tests/unit/apps/test_auxiliary.py index eec1422a..f040633f 100644 --- a/tests/unit/apps/test_auxiliary.py +++ b/tests/unit/apps/test_auxiliary.py @@ -1471,19 +1471,14 @@ def test_auxiliary_wrong_channel(model): workload_version="15.2.0", ) - # plan will warn that channel will change from quincy to octopus to match the workload version, - # but this can be a downgrade. - exp_plan = dedent_plan( - """\ - Upgrade plan for 'ceph-mon' to 'victoria' - Upgrade software packages of 'ceph-mon' from the current APT repositories - Ψ Upgrade software packages on unit 'ceph-mon/0' - Ensure that the 'require-osd-release' option matches the 'ceph-osd' version - WARNING: Changing 'ceph-mon' channel from quincy/stable to octopus/stable. This may be a charm downgrade, which is generally not supported. - Change charm config of 'ceph-mon' 'source' to 'cloud:focal-victoria' - Wait for up to 2400s for model 'test_model' to reach the idle state - Verify that the workload of 'ceph-mon' has been upgraded on units: ceph-mon/0 - """ # noqa: E501 line too long + # plan will raise exception because the channel is on quincy and was expected to be on octopus + # or pacific. The user will need manual intervention + + exp_msg = ( + r"'ceph-mon' has the channel ahead from expected\. The channel 'quincy/stable' doesn't " + r"match with the expected 'octopus/stable' or with the target channel 'octopus/stable'\. " + r"Manual intervention is required\." ) - plan = app.generate_upgrade_plan(target, force=False) - assert str(plan) == exp_plan + + with pytest.raises(ApplicationError, match=exp_msg): + app.generate_upgrade_plan(target, force=False) diff --git a/tests/unit/apps/test_base.py b/tests/unit/apps/test_base.py index 1bc6478a..ffa99e81 100644 --- a/tests/unit/apps/test_base.py +++ b/tests/unit/apps/test_base.py @@ -561,16 +561,18 @@ def test_get_change_channel_possible_downgrade_step(current_os_release, model): units={}, workload_version="1", ) - description, _ = app._get_change_channel_possible_downgrade_step( - target, app.expected_current_channel(target) - ) - exp_description = ( + description = ( f"WARNING: Changing '{app.name}' channel from latest/stable to " "ussuri/stable. This may be a charm downgrade, which is generally not supported." ) - assert description == exp_description - model.upgrade_charm.assert_called_once_with(app.name, "ussuri/stable") + + assert app._get_change_channel_possible_downgrade_step( + target, app.expected_current_channel(target) + ) == PreUpgradeStep( + description=description, + coro=model.upgrade_charm(app.name, app.expected_current_channel(target)), + ) def test_get_refresh_current_channel_step(model): @@ -700,12 +702,11 @@ def test_get_refresh_charm_step_change_to_openstack_channels( ) coro = model.upgrade_charm(app.name, app.expected_current_channel) + expected_step = PreUpgradeStep(description=description, coro=coro) - mock_possible_downgrade_step.return_value = (description, coro) + mock_possible_downgrade_step.return_value = expected_step - expected_result = PreUpgradeStep(description=description, coro=coro) - - assert app._get_refresh_charm_step(target) == expected_result + assert app._get_refresh_charm_step(target) == expected_step mock_ch_migration.assert_not_called() mock_possible_downgrade_step.assert_called_once_with(target, "ussuri/stable")