Merge "Add workaround for bug 1457404 with dhcp mask"

This commit is contained in:
Jenkins 2015-06-17 16:28:19 +00:00 committed by Gerrit Code Review
commit 4decb9fff7
1 changed files with 93 additions and 18 deletions

View File

@ -44,10 +44,12 @@ class VcenterDeploy(TestBasic):
self.fuel_web.run_ostf(cluster_id, test_sets=['smoke'],
timeout=60 * 60)
except AssertionError:
time_to_wait = 660
logger.debug("Tests failed from first probe,"
" we sleep 60 seconds try one more time"
" and if it fails again - test will fails ")
time.sleep(60)
" waite {} seconds try one more time"
" and if it fails again - "
"tests will fail ".format(time_to_wait))
time.sleep(time_to_wait)
self.fuel_web.run_ostf(cluster_id,
test_sets=['smoke'],
timeout=60 * 60)
@ -75,6 +77,17 @@ class VcenterDeploy(TestBasic):
wait(lambda: os_conn.get_hypervisor_vms_count(hypervisor) != 0,
timeout=300)
def add_dhcp_lease(self, remote=None):
path = '/etc/puppet/modules/nova/manifests/network.pp'
d = ' nova_config { \'DEFAULT/dhcp_lease_time\': ''value=> \'600\'}\n'
old_file = remote.open(path, 'r')
contents = old_file.readlines()
contents.insert((contents.index(' if $floating_range {\n') - 1), d)
new_file = remote.open(path, 'w')
contents = "".join(contents)
new_file.write(contents)
new_file.close()
@test(depends_on=[SetupEnvironment.prepare_slaves_1],
groups=["smoke", "vcenter_smoke"])
@log_snapshot_after_test
@ -90,6 +103,8 @@ class VcenterDeploy(TestBasic):
"""
self.env.revert_snapshot("ready_with_1_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -127,7 +142,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity', 'ha'])
cluster_id=cluster_id, test_sets=['sanity', 'ha'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
@test(depends_on=[SetupEnvironment.prepare_slaves_3],
groups=["smoke", "vcenter_ceilometer"])
@ -144,6 +162,8 @@ class VcenterDeploy(TestBasic):
"""
self.env.revert_snapshot("ready_with_3_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -185,8 +205,11 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity', 'ha',
'tests_platform'])
cluster_id=cluster_id,
test_sets=['sanity', 'ha', 'platform_tests'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
groups=["smoke", "vcenter_cindervmdk"])
@ -205,6 +228,8 @@ class VcenterDeploy(TestBasic):
"""
self.env.revert_snapshot("ready_with_5_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -242,7 +267,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.verify_network(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity', 'ha'])
cluster_id=cluster_id, test_sets=['sanity', 'ha'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
groups=["vcenter_dualhv_ceph"])
@ -263,6 +291,8 @@ class VcenterDeploy(TestBasic):
"""
self.env.revert_snapshot("ready_with_5_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -328,6 +358,8 @@ class VcenterDeploy(TestBasic):
"""
self.env.revert_snapshot("ready_with_3_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -395,6 +427,8 @@ class VcenterDeploy(TestBasic):
self.env.revert_snapshot("ready_with_5_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -453,7 +487,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity', 'ha'])
cluster_id=cluster_id, test_sets=['sanity', 'ha'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
groups=["vcenter_vlan_cinder"])
@ -474,6 +511,8 @@ class VcenterDeploy(TestBasic):
self.env.revert_snapshot("ready_with_5_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -559,6 +598,8 @@ class VcenterDeploy(TestBasic):
self.env.revert_snapshot("ready_with_5_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -644,6 +685,8 @@ class VcenterDeploy(TestBasic):
"""
self.env.revert_snapshot("ready_with_5_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -730,6 +773,8 @@ class VcenterDeploy(TestBasic):
self.env.revert_snapshot("ready_with_9_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -786,7 +831,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity'])
cluster_id=cluster_id, test_sets=['sanity'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
# Add 1 node with cinder role and redeploy cluster
self.fuel_web.update_nodes(
@ -802,7 +850,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity'])
cluster_id=cluster_id, test_sets=['sanity'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
# Remove 1 node with cinder role
self.fuel_web.update_nodes(
@ -822,7 +873,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity'])
cluster_id=cluster_id, test_sets=['sanity'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
# Add 1 node with cinder role and redeploy cluster
self.fuel_web.update_nodes(
@ -838,7 +892,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity'])
cluster_id=cluster_id, test_sets=['sanity'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
# Remove nodes with roles: cinder-vmdk and cinder
self.fuel_web.update_nodes(
@ -860,7 +917,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity'])
cluster_id=cluster_id, test_sets=['sanity'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
# Add 1 node with cinder role and redeploy cluster
self.fuel_web.update_nodes(
@ -876,7 +936,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity'])
cluster_id=cluster_id, test_sets=['sanity'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
# Remove node with cinder role
self.fuel_web.update_nodes(
@ -897,7 +960,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity'])
cluster_id=cluster_id, test_sets=['sanity'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
# Add 1 node with compute role and 1 node with cinder role and redeploy
# cluster
@ -919,7 +985,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity'])
cluster_id=cluster_id, test_sets=['sanity', 'ha'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
groups=["vcenter_multiple_cluster"])
@ -944,6 +1013,8 @@ class VcenterDeploy(TestBasic):
"""
self.env.revert_snapshot("ready_with_5_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
@ -989,8 +1060,10 @@ class VcenterDeploy(TestBasic):
self.fuel_web.deploy_cluster_wait(cluster_id)
self.fuel_web.run_ostf(
cluster_id=cluster_id, test_sets=['smoke', 'sanity', 'ha'],
timeout=60 * 60)
cluster_id=cluster_id, test_sets=['sanity', 'ha'])
# ##### FIXME if 1457404 is fixed ######
self.run_smoke(cluster_id=cluster_id)
os_ip = self.fuel_web.get_public_vip(cluster_id)
os_conn = os_actions.OpenStackActions(
@ -1067,6 +1140,8 @@ class VcenterDeploy(TestBasic):
"""
self.env.revert_snapshot("ready_with_9_slaves")
self.add_dhcp_lease(remote=self.env.d_env.get_admin_remote())
# Configure cluster
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,