Merge "Refactoring of upgrade tests"
This commit is contained in:
commit
4e8761f8ea
@ -325,10 +325,11 @@ class AdminActions(BaseActions):
|
|||||||
"find /var/www/nailgun/targetimages/ -name 'env*{}*'"
|
"find /var/www/nailgun/targetimages/ -name 'env*{}*'"
|
||||||
" -delete".format(distro.lower()))
|
" -delete".format(distro.lower()))
|
||||||
|
|
||||||
def upgrade_master_node(self):
|
def upgrade_master_node(self, rollback=False, file_upload=True):
|
||||||
"""This method upgrades master node with current state."""
|
"""This method upgrades master node with current state."""
|
||||||
|
|
||||||
with self.admin_remote as master:
|
with self.admin_remote as master:
|
||||||
|
if file_upload:
|
||||||
checkers.upload_tarball(master, hlp_data.TARBALL_PATH, '/var')
|
checkers.upload_tarball(master, hlp_data.TARBALL_PATH, '/var')
|
||||||
checkers.check_file_exists(master,
|
checkers.check_file_exists(master,
|
||||||
os.path.join(
|
os.path.join(
|
||||||
@ -340,13 +341,22 @@ class AdminActions(BaseActions):
|
|||||||
|
|
||||||
keystone_pass = hlp_data.KEYSTONE_CREDS['password']
|
keystone_pass = hlp_data.KEYSTONE_CREDS['password']
|
||||||
checkers.run_script(master, '/var', 'upgrade.sh',
|
checkers.run_script(master, '/var', 'upgrade.sh',
|
||||||
password=keystone_pass)
|
password=keystone_pass,
|
||||||
|
rollback=rollback,
|
||||||
|
exit_code=255 if rollback else 0)
|
||||||
|
if not rollback:
|
||||||
checkers.wait_upgrade_is_done(master, 3000,
|
checkers.wait_upgrade_is_done(master, 3000,
|
||||||
phrase='***UPGRADING MASTER NODE'
|
phrase='***UPGRADING MASTER NODE'
|
||||||
' DONE SUCCESSFULLY')
|
' DONE SUCCESSFULLY')
|
||||||
checkers.check_upgraded_containers(master,
|
checkers.check_upgraded_containers(master,
|
||||||
hlp_data.UPGRADE_FUEL_FROM,
|
hlp_data.UPGRADE_FUEL_FROM,
|
||||||
hlp_data.UPGRADE_FUEL_TO)
|
hlp_data.UPGRADE_FUEL_TO)
|
||||||
|
elif rollback:
|
||||||
|
checkers.wait_rollback_is_done(master, 3000)
|
||||||
|
checkers.check_upgraded_containers(master,
|
||||||
|
hlp_data.UPGRADE_FUEL_TO,
|
||||||
|
hlp_data.UPGRADE_FUEL_FROM)
|
||||||
|
logger.debug("all containers are ok")
|
||||||
|
|
||||||
|
|
||||||
class NailgunActions(BaseActions):
|
class NailgunActions(BaseActions):
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
from proboscis.asserts import assert_equal
|
from proboscis.asserts import assert_equal
|
||||||
from proboscis.asserts import assert_true
|
from proboscis.asserts import assert_true
|
||||||
from proboscis import test
|
from proboscis import test
|
||||||
@ -71,24 +69,8 @@ class UpgradeFuelMaster(base_test_data.TestBasic):
|
|||||||
remote = self.env.d_env.get_ssh_to_remote(_ip)
|
remote = self.env.d_env.get_ssh_to_remote(_ip)
|
||||||
expected_kernel = self.get_slave_kernel(remote)
|
expected_kernel = self.get_slave_kernel(remote)
|
||||||
|
|
||||||
checkers.upload_tarball(self.env.d_env.get_admin_remote(),
|
self.env.admin_actions.upgrade_master_node()
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
|
||||||
checkers.check_file_exists(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.basename(hlp_data.
|
|
||||||
TARBALL_PATH), '/var')
|
|
||||||
checkers.run_script(self.env.d_env.get_admin_remote(),
|
|
||||||
'/var', 'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'])
|
|
||||||
checkers.wait_upgrade_is_done(self.env.d_env.get_admin_remote(), 3000,
|
|
||||||
phrase='*** UPGRADING MASTER NODE'
|
|
||||||
' DONE SUCCESSFULLY')
|
|
||||||
checkers.check_upgraded_containers(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM,
|
|
||||||
hlp_data.UPGRADE_FUEL_TO)
|
|
||||||
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
||||||
self.fuel_web.wait_nodes_get_online_state(
|
self.fuel_web.wait_nodes_get_online_state(
|
||||||
self.env.d_env.nodes().slaves[:3])
|
self.env.d_env.nodes().slaves[:3])
|
||||||
@ -141,24 +123,9 @@ class UpgradeFuelMaster(base_test_data.TestBasic):
|
|||||||
self.env.revert_snapshot('ceph_ha_one_controller_compact')
|
self.env.revert_snapshot('ceph_ha_one_controller_compact')
|
||||||
|
|
||||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||||
checkers.upload_tarball(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
self.env.admin_actions.upgrade_master_node()
|
||||||
checkers.check_file_exists(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.basename(hlp_data.
|
|
||||||
TARBALL_PATH), '/var')
|
|
||||||
checkers.run_script(self.env.d_env.get_admin_remote(),
|
|
||||||
'/var', 'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'])
|
|
||||||
checkers.wait_upgrade_is_done(self.env.d_env.get_admin_remote(), 3000,
|
|
||||||
phrase='*** UPGRADING MASTER NODE'
|
|
||||||
' DONE SUCCESSFULLY')
|
|
||||||
checkers.check_upgraded_containers(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM,
|
|
||||||
hlp_data.UPGRADE_FUEL_TO)
|
|
||||||
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
||||||
self.fuel_web.wait_nodes_get_online_state(
|
self.fuel_web.wait_nodes_get_online_state(
|
||||||
self.env.d_env.nodes().slaves[:3])
|
self.env.d_env.nodes().slaves[:3])
|
||||||
@ -210,24 +177,9 @@ class UpgradeFuelMaster(base_test_data.TestBasic):
|
|||||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||||
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
||||||
release_name=hlp_data.OPENSTACK_RELEASE)
|
release_name=hlp_data.OPENSTACK_RELEASE)
|
||||||
checkers.upload_tarball(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
self.env.admin_actions.upgrade_master_node()
|
||||||
checkers.check_file_exists(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.basename(hlp_data.
|
|
||||||
TARBALL_PATH), '/var')
|
|
||||||
checkers.run_script(self.env.d_env.get_admin_remote(),
|
|
||||||
'/var', 'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'])
|
|
||||||
checkers.wait_upgrade_is_done(self.env.d_env.get_admin_remote(), 3000,
|
|
||||||
phrase='*** UPGRADING MASTER NODE'
|
|
||||||
' DONE SUCCESSFULLY')
|
|
||||||
checkers.check_upgraded_containers(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM,
|
|
||||||
hlp_data.UPGRADE_FUEL_TO)
|
|
||||||
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
||||||
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
||||||
self.fuel_web.wait_nodes_get_online_state(
|
self.fuel_web.wait_nodes_get_online_state(
|
||||||
@ -299,26 +251,9 @@ class UpgradeFuelMaster(base_test_data.TestBasic):
|
|||||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||||
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
||||||
release_name=hlp_data.OPENSTACK_RELEASE)
|
release_name=hlp_data.OPENSTACK_RELEASE)
|
||||||
checkers.upload_tarball(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
|
||||||
checkers.check_file_exists(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.basename(hlp_data.
|
|
||||||
TARBALL_PATH), '/var')
|
|
||||||
|
|
||||||
# Upgrade
|
self.env.admin_actions.upgrade_master_node()
|
||||||
checkers.run_script(self.env.d_env.get_admin_remote(),
|
|
||||||
'/var', 'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'])
|
|
||||||
checkers.wait_upgrade_is_done(self.env.d_env.get_admin_remote(), 3000,
|
|
||||||
phrase='*** UPGRADING MASTER NODE'
|
|
||||||
' DONE SUCCESSFULLY')
|
|
||||||
checkers.check_upgraded_containers(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM,
|
|
||||||
hlp_data.UPGRADE_FUEL_TO)
|
|
||||||
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
||||||
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
||||||
self.fuel_web.wait_nodes_get_online_state(
|
self.fuel_web.wait_nodes_get_online_state(
|
||||||
@ -416,24 +351,9 @@ class UpgradeFuelMaster(base_test_data.TestBasic):
|
|||||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||||
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
||||||
release_name=hlp_data.OPENSTACK_RELEASE)
|
release_name=hlp_data.OPENSTACK_RELEASE)
|
||||||
checkers.upload_tarball(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
self.env.admin_actions.upgrade_master_node()
|
||||||
checkers.check_file_exists(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.basename(hlp_data.TARBALL_PATH),
|
|
||||||
'/var')
|
|
||||||
checkers.run_script(self.env.d_env.get_admin_remote(),
|
|
||||||
'/var', 'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'])
|
|
||||||
checkers.wait_upgrade_is_done(self.env.d_env.get_admin_remote(), 3000,
|
|
||||||
phrase='*** UPGRADING MASTER NODE'
|
|
||||||
' DONE SUCCESSFULLY')
|
|
||||||
checkers.check_upgraded_containers(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM,
|
|
||||||
hlp_data.UPGRADE_FUEL_TO)
|
|
||||||
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
||||||
self.fuel_web.wait_nodes_get_online_state(
|
self.fuel_web.wait_nodes_get_online_state(
|
||||||
self.env.d_env.nodes().slaves[:3])
|
self.env.d_env.nodes().slaves[:3])
|
||||||
@ -510,26 +430,9 @@ class UpgradeFuelMaster(base_test_data.TestBasic):
|
|||||||
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
||||||
release_name=hlp_data.OPENSTACK_RELEASE)
|
release_name=hlp_data.OPENSTACK_RELEASE)
|
||||||
|
|
||||||
remote = self.env.d_env.get_admin_remote
|
|
||||||
|
|
||||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||||
checkers.upload_tarball(remote(), hlp_data.TARBALL_PATH, '/var')
|
|
||||||
checkers.check_file_exists(remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(remote(), os.path.basename(hlp_data.TARBALL_PATH),
|
|
||||||
'/var')
|
|
||||||
|
|
||||||
# Upgrade with rollback
|
self.env.admin_actions.upgrade_master_node(rollback=True)
|
||||||
keystone_pass = hlp_data.KEYSTONE_CREDS['password']
|
|
||||||
checkers.run_script(remote(), '/var', 'upgrade.sh',
|
|
||||||
password=keystone_pass, rollback=True,
|
|
||||||
exit_code=255)
|
|
||||||
checkers.wait_rollback_is_done(remote(), 3000)
|
|
||||||
checkers.check_upgraded_containers(remote(), hlp_data.UPGRADE_FUEL_TO,
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM)
|
|
||||||
logger.debug("all containers are ok")
|
|
||||||
_wait(lambda: self.fuel_web.get_nailgun_node_by_devops_node(
|
_wait(lambda: self.fuel_web.get_nailgun_node_by_devops_node(
|
||||||
self.env.d_env.nodes().slaves[0]), timeout=8 * 60)
|
self.env.d_env.nodes().slaves[0]), timeout=8 * 60)
|
||||||
logger.debug("all services are up now")
|
logger.debug("all services are up now")
|
||||||
@ -541,15 +444,7 @@ class UpgradeFuelMaster(base_test_data.TestBasic):
|
|||||||
self.fuel_web.run_ostf(cluster_id,
|
self.fuel_web.run_ostf(cluster_id,
|
||||||
test_sets=['ha', 'smoke', 'sanity'])
|
test_sets=['ha', 'smoke', 'sanity'])
|
||||||
|
|
||||||
# Upgrade fuel master
|
self.env.admin_actions.upgrade_master_node(file_upload=False)
|
||||||
checkers.run_script(remote(), '/var', 'upgrade.sh',
|
|
||||||
password=keystone_pass)
|
|
||||||
checkers.wait_upgrade_is_done(remote(), 3000,
|
|
||||||
phrase='*** UPGRADING MASTER NODE'
|
|
||||||
' DONE SUCCESSFULLY')
|
|
||||||
checkers.check_upgraded_containers(remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM,
|
|
||||||
hlp_data.UPGRADE_FUEL_TO)
|
|
||||||
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
||||||
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
||||||
self.fuel_web.wait_nodes_get_online_state(
|
self.fuel_web.wait_nodes_get_online_state(
|
||||||
@ -617,25 +512,9 @@ class RollbackFuelMaster(base_test_data.TestBasic):
|
|||||||
|
|
||||||
self.env.revert_snapshot("deploy_neutron_gre_ha")
|
self.env.revert_snapshot("deploy_neutron_gre_ha")
|
||||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||||
checkers.upload_tarball(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
self.env.admin_actions.upgrade_master_node(rollback=True)
|
||||||
checkers.check_file_exists(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.basename(hlp_data.
|
|
||||||
TARBALL_PATH), '/var')
|
|
||||||
checkers.run_script(self.env.d_env.get_admin_remote(),
|
|
||||||
'/var',
|
|
||||||
'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'],
|
|
||||||
rollback=True, exit_code=255)
|
|
||||||
checkers.wait_rollback_is_done(self.env.d_env.get_admin_remote(), 3000)
|
|
||||||
checkers.check_upgraded_containers(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_TO,
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM)
|
|
||||||
logger.debug("all containers are ok")
|
|
||||||
_wait(lambda: self.fuel_web.get_nailgun_node_by_devops_node(
|
_wait(lambda: self.fuel_web.get_nailgun_node_by_devops_node(
|
||||||
self.env.d_env.nodes().slaves[0]), timeout=8 * 60)
|
self.env.d_env.nodes().slaves[0]), timeout=8 * 60)
|
||||||
logger.debug("all services are up now")
|
logger.debug("all services are up now")
|
||||||
@ -687,27 +566,8 @@ class RollbackFuelMaster(base_test_data.TestBasic):
|
|||||||
remote = self.env.d_env.get_ssh_to_remote(_ip)
|
remote = self.env.d_env.get_ssh_to_remote(_ip)
|
||||||
expected_kernel = UpgradeFuelMaster.get_slave_kernel(remote)
|
expected_kernel = UpgradeFuelMaster.get_slave_kernel(remote)
|
||||||
|
|
||||||
checkers.upload_tarball(self.env.d_env.get_admin_remote(),
|
self.env.admin_actions.upgrade_master_node(rollback=True)
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
|
||||||
checkers.check_file_exists(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.basename(hlp_data.
|
|
||||||
TARBALL_PATH), '/var')
|
|
||||||
# we expect 255 exit code here because upgrade failed
|
|
||||||
# and exit status is 255
|
|
||||||
checkers.run_script(self.env.d_env.get_admin_remote(),
|
|
||||||
'/var',
|
|
||||||
'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'],
|
|
||||||
rollback=True, exit_code=255)
|
|
||||||
checkers.wait_rollback_is_done(self.env.d_env.get_admin_remote(), 3000)
|
|
||||||
checkers.check_upgraded_containers(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_TO,
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM)
|
|
||||||
logger.debug("all containers are ok")
|
|
||||||
_wait(lambda: self.fuel_web.get_nailgun_node_by_devops_node(
|
_wait(lambda: self.fuel_web.get_nailgun_node_by_devops_node(
|
||||||
self.env.d_env.nodes().slaves[0]), timeout=8 * 60)
|
self.env.d_env.nodes().slaves[0]), timeout=8 * 60)
|
||||||
logger.debug("all services are up now")
|
logger.debug("all services are up now")
|
||||||
@ -761,27 +621,8 @@ class RollbackFuelMaster(base_test_data.TestBasic):
|
|||||||
self.env.revert_snapshot("deploy_neutron_gre")
|
self.env.revert_snapshot("deploy_neutron_gre")
|
||||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||||
|
|
||||||
checkers.upload_tarball(self.env.d_env.get_admin_remote(),
|
self.env.admin_actions.upgrade_master_node(rollback=True)
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
|
||||||
checkers.check_file_exists(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.basename(hlp_data.
|
|
||||||
TARBALL_PATH), '/var')
|
|
||||||
# we expect 255 exit code here because upgrade failed
|
|
||||||
# and exit status is 255
|
|
||||||
checkers.run_script(self.env.d_env.get_admin_remote(),
|
|
||||||
'/var',
|
|
||||||
'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'],
|
|
||||||
rollback=True, exit_code=255)
|
|
||||||
checkers.wait_rollback_is_done(self.env.d_env.get_admin_remote(), 3000)
|
|
||||||
checkers.check_upgraded_containers(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_TO,
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM)
|
|
||||||
logger.debug("all containers are ok")
|
|
||||||
_wait(lambda: self.fuel_web.get_nailgun_node_by_devops_node(
|
_wait(lambda: self.fuel_web.get_nailgun_node_by_devops_node(
|
||||||
self.env.d_env.nodes().slaves[0]), timeout=8 * 60)
|
self.env.d_env.nodes().slaves[0]), timeout=8 * 60)
|
||||||
logger.debug("all services are up now")
|
logger.debug("all services are up now")
|
||||||
|
@ -12,15 +12,12 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
from proboscis import test
|
from proboscis import test
|
||||||
from proboscis import SkipTest
|
from proboscis import SkipTest
|
||||||
|
|
||||||
from fuelweb_test.settings import DEPLOYMENT_MODE
|
from fuelweb_test.settings import DEPLOYMENT_MODE
|
||||||
from fuelweb_test.tests.base_test_case import SetupEnvironment
|
from fuelweb_test.tests.base_test_case import SetupEnvironment
|
||||||
|
|
||||||
from fuelweb_test.helpers import checkers
|
|
||||||
from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
||||||
from fuelweb_test import logger
|
from fuelweb_test import logger
|
||||||
from fuelweb_test import settings as hlp_data
|
from fuelweb_test import settings as hlp_data
|
||||||
@ -101,24 +98,9 @@ class UpgradeFuelChains(base_test_data.TestBasic):
|
|||||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||||
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
available_releases_before = self.fuel_web.get_releases_list_for_os(
|
||||||
release_name=hlp_data.OPENSTACK_RELEASE)
|
release_name=hlp_data.OPENSTACK_RELEASE)
|
||||||
checkers.upload_tarball(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
self.env.admin_actions.upgrade_master_node()
|
||||||
checkers.check_file_exists(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(self.env.d_env.get_admin_remote(),
|
|
||||||
os.path.basename(hlp_data.
|
|
||||||
TARBALL_PATH), '/var')
|
|
||||||
checkers.run_script(self.env.d_env.get_admin_remote(),
|
|
||||||
'/var', 'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'])
|
|
||||||
checkers.wait_upgrade_is_done(self.env.d_env.get_admin_remote(), 3000,
|
|
||||||
phrase='*** UPGRADING MASTER NODE'
|
|
||||||
' DONE SUCCESSFULLY')
|
|
||||||
checkers.check_upgraded_containers(self.env.d_env.get_admin_remote(),
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM,
|
|
||||||
hlp_data.UPGRADE_FUEL_TO)
|
|
||||||
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
||||||
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
||||||
self.fuel_web.wait_nodes_get_online_state(
|
self.fuel_web.wait_nodes_get_online_state(
|
||||||
@ -188,24 +170,8 @@ class UpgradeFuelChains(base_test_data.TestBasic):
|
|||||||
remote = self.env.d_env.get_admin_remote()
|
remote = self.env.d_env.get_admin_remote()
|
||||||
remote.execute("rm -rf /var/*upgrade*")
|
remote.execute("rm -rf /var/*upgrade*")
|
||||||
|
|
||||||
checkers.upload_tarball(remote,
|
self.env.admin_actions.upgrade_master_node()
|
||||||
hlp_data.TARBALL_PATH, '/var')
|
|
||||||
checkers.check_file_exists(remote,
|
|
||||||
os.path.join('/var',
|
|
||||||
os.path.basename(
|
|
||||||
hlp_data.TARBALL_PATH)))
|
|
||||||
checkers.untar(remote,
|
|
||||||
os.path.basename(hlp_data.
|
|
||||||
TARBALL_PATH), '/var')
|
|
||||||
checkers.run_script(remote,
|
|
||||||
'/var', 'upgrade.sh',
|
|
||||||
password=hlp_data.KEYSTONE_CREDS['password'])
|
|
||||||
checkers.wait_upgrade_is_done(remote, 3000,
|
|
||||||
phrase='*** UPGRADING MASTER NODE'
|
|
||||||
' DONE SUCCESSFULLY')
|
|
||||||
checkers.check_upgraded_containers(remote,
|
|
||||||
hlp_data.UPGRADE_FUEL_FROM,
|
|
||||||
hlp_data.UPGRADE_FUEL_TO)
|
|
||||||
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
self.fuel_web.assert_fuel_version(hlp_data.UPGRADE_FUEL_TO)
|
||||||
self.fuel_web.wait_nodes_get_online_state(
|
self.fuel_web.wait_nodes_get_online_state(
|
||||||
self.env.d_env.nodes().slaves[:6])
|
self.env.d_env.nodes().slaves[:6])
|
||||||
|
Loading…
Reference in New Issue
Block a user