Pre-upgrade computes after upgrading of control plane

Run octane upgrade-computeonly if upgrading from <8.0 onto >=9.0

PROD-6652 Upgrade MOS cloud 7.0->9.1: upgrade of control plane validation

Change-Id: I54fd1d9acdf2aa67362e27b61fea6ffd8329bc02
This commit is contained in:
Alexey Stepanov 2016-08-22 09:33:51 +03:00
parent c3b978c681
commit 3fb4325c4b
2 changed files with 39 additions and 6 deletions

View File

@ -144,11 +144,13 @@ class TestOSupgrade(OSUpgradeBase):
2. Select cluster for upgrade and upgraded cluster
3. Run octane upgrade-control <orig_env_id> <seed_env_id>
4. Check cluster consistency
5. Collect old controllers for upgrade
6. Run octane upgrade-node <seed_cluster_id> <node_id> <node_id>
7. Check tasks status after upgrade run completion
8. Run network verification on target cluster
9. Run minimal OSTF sanity check (user list) on target cluster
5. Check, if required pre-upgrade computes packages and run:
run octane upgrade-compute ${SEED_ID} <NODE_ID> [... <NODE_ID>]
6. Collect old controllers for upgrade
7. Run octane upgrade-node <seed_cluster_id> <node_id> <node_id>
8. Check tasks status after upgrade run completion
9. Run network verification on target cluster
10. Run minimal OSTF sanity check (user list) on target cluster
"""
@ -164,6 +166,10 @@ class TestOSupgrade(OSUpgradeBase):
self.upgrade_control_plane_code(seed_cluster_id)
self.pre_upgrade_computes(
orig_cluster_id=self.orig_cluster_id,
seed_cluster_id=seed_cluster_id)
# upgrade controllers part
self.upgrade_controllers_code(seed_cluster_id)

View File

@ -14,6 +14,12 @@
from __future__ import unicode_literals
# pylint: disable=import-error
# pylint: disable=no-name-in-module
from distutils.version import LooseVersion
# pylint: enable=no-name-in-module
# pylint: enable=import-error
from proboscis.asserts import assert_equal
from proboscis.asserts import assert_not_equal
from proboscis.asserts import assert_true
@ -24,6 +30,8 @@ from fuelweb_test import logger
from fuelweb_test.settings import KEYSTONE_CREDS
from fuelweb_test.settings import OPENSTACK_RELEASE
from fuelweb_test.settings import OPENSTACK_RELEASE_UBUNTU
from fuelweb_test.settings import UPGRADE_FUEL_FROM
from fuelweb_test.settings import UPGRADE_FUEL_TO
from fuelweb_test.tests.tests_upgrade.test_data_driven_upgrade_base import \
DataDrivenUpgradeBase
@ -106,7 +114,7 @@ class OSUpgradeBase(DataDrivenUpgradeBase):
assert_equal(
self.fuel_web.get_cluster_release_id(new_cluster_id),
self.fuel_web.client.get_release_id(
release_name='Liberty on Ubuntu 14.04'))
release_name='Mitaka on Ubuntu 14.04'))
def upgrade_first_controller_code(self, seed_cluster_id):
self.show_step(self.next_step)
@ -312,6 +320,25 @@ class OSUpgradeBase(DataDrivenUpgradeBase):
self.minimal_check(seed_cluster_id=seed_cluster_id, nwk_check=True)
def pre_upgrade_computes(self, orig_cluster_id, seed_cluster_id):
self.show_step(self.next_step)
# Fuel-octane can run pre-upgrade only starting from version 9.0 and
# we are upgrading packages only if version difference is >1 step
if LooseVersion(UPGRADE_FUEL_TO) >= LooseVersion('9.0') and \
LooseVersion(UPGRADE_FUEL_FROM) < LooseVersion('8.0'):
computes = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
orig_cluster_id, ["compute"]
)
self.ssh_manager.check_call(
ip=self.ssh_manager.admin_ip,
command="octane upgrade-compute {0} {1}".format(
seed_cluster_id,
" ".join([str(comp["id"]) for comp in computes])),
error_info="octane upgrade-node failed")
def upgrade_nodes(self, seed_cluster_id, nodes_str, live_migration=False):
self.ssh_manager.check_call(
ip=self.ssh_manager.admin_ip,