Simplify environment configuration for review_fuel_agent_ironic_deploy test

Use less resource-consuming cluster configuration.
Fix _wait_for_ironic_hypervisor to work without computes.

Change-Id: I2abb01faca3e5fbfa1ef5d548432a7be65ecaae1
Closes-Bug: #1571997
This commit is contained in:
Kyrylo Romanenko 2016-04-20 16:11:35 +03:00
parent 2c16561044
commit ca9b08cb7d
2 changed files with 25 additions and 48 deletions

View File

@ -78,7 +78,7 @@ class IronicActions(os_actions.OpenStackActions):
def wait_for_ironic_hypervisors(ironic_conn, ironic_slaves): def wait_for_ironic_hypervisors(ironic_conn, ironic_slaves):
def _wait_for_ironic_hypervisor(): def _wait_for_ironic_hypervisor():
hypervisors = ironic_conn.get_hypervisors() hypervisors = ironic_conn.get_hypervisors() or []
ironic_hypervisors = [h for h in hypervisors if ironic_hypervisors = [h for h in hypervisors if
h.hypervisor_type == 'ironic'] h.hypervisor_type == 'ironic']

View File

@ -16,8 +16,7 @@ from proboscis import test
from fuelweb_test import settings from fuelweb_test import settings
from fuelweb_test.helpers.fuel_actions import BaseActions from fuelweb_test.helpers.fuel_actions import BaseActions
# from fuelweb_test.helpers import ironic_actions from fuelweb_test.helpers import ironic_actions
# uncomment after resolving Bug #1571997
from fuelweb_test.helpers.checkers import verify_bootstrap_on_node from fuelweb_test.helpers.checkers import verify_bootstrap_on_node
from fuelweb_test.helpers.decorators import log_snapshot_after_test from fuelweb_test.helpers.decorators import log_snapshot_after_test
from fuelweb_test.tests.test_ironic_base import TestIronicDeploy from fuelweb_test.tests.test_ironic_base import TestIronicDeploy
@ -62,17 +61,14 @@ class Gate(TestIronicDeploy):
4. Rebuild bootstrap 4. Rebuild bootstrap
5. Bootstrap 5 slaves 5. Bootstrap 5 slaves
6. Verify Ubuntu bootstrap on slaves 6. Verify Ubuntu bootstrap on slaves
7. Add 1 node with controller and ceph roles 7. Add 1 node with controller
8. Add 1 node with controller, ironic, ceph roles 8. Add 1 node ironic role
9. Add 1 node with controller, ironic, ceph roles 9. Deploy the cluster
10. Add 1 node with ironic role 10. Verify fuel-agent version in ubuntu and ironic-bootstrap
11. Add 1 node with compute 11. Upload image to glance
12. Deploy the cluster 12. Enroll Ironic nodes
13. Verify fuel-agent version in ubuntu and ironic-bootstrap 13. Boot nova instance
14. Upload image to glance 14. Check Nova instance status
15. Enroll Ironic nodes
16. Boot nova instance
17. Check Nova instance status
Snapshot review_fuel_agent_ironic_deploy Snapshot review_fuel_agent_ironic_deploy
""" """
@ -99,66 +95,47 @@ class Gate(TestIronicDeploy):
self.show_step(5) self.show_step(5)
self.env.bootstrap_nodes( self.env.bootstrap_nodes(
self.env.d_env.nodes().slaves[:5]) self.env.d_env.nodes().slaves[:2])
self.show_step(6) self.show_step(6)
for node in self.env.d_env.nodes().slaves[:5]: for node in self.env.d_env.nodes().slaves[:2]:
_ip = self.fuel_web.get_nailgun_node_by_devops_node(node)['ip'] _ip = self.fuel_web.get_nailgun_node_by_devops_node(node)['ip']
verify_bootstrap_on_node(_ip, os_type="ubuntu", uuid=uuid) verify_bootstrap_on_node(_ip, os_type="ubuntu", uuid=uuid)
data = { data = {
'volumes_ceph': True, "net_provider": 'neutron',
'images_ceph': True, "net_segment_type": settings.NEUTRON_SEGMENT['vlan'],
'objects_ceph': True, "ironic": True}
'volumes_lvm': False,
'tenant': 'ceph1',
'user': 'ceph1',
'password': 'ceph1',
'net_provider': settings.NEUTRON,
'net_segment_type': settings.NEUTRON_SEGMENT['vlan'],
'ironic': True}
nodes = { nodes = {
'slave-01': ['controller', 'ceph-osd'], 'slave-01': ['controller'],
'slave-02': ['controller', 'ironic', 'ceph-osd'], 'slave-02': ['ironic']}
'slave-03': ['controller', 'ironic', 'ceph-osd'],
'slave-04': ['ironic'],
'slave-05': ['compute']}
self.show_step(7) self.show_step(7)
self.show_step(8) self.show_step(8)
self.show_step(9) self.show_step(9)
self.show_step(10)
self.show_step(11)
self.show_step(12)
cluster_id = self._deploy_ironic_cluster(settings=data, nodes=nodes) cluster_id = self._deploy_ironic_cluster(settings=data, nodes=nodes)
"""
# Need to uncomment after resolving Bug #1571997
ironic_conn = ironic_actions.IronicActions( ironic_conn = ironic_actions.IronicActions(
self.fuel_web.get_public_vip(cluster_id), self.fuel_web.get_public_vip(cluster_id))
user='ceph1',
passwd='ceph1',
tenant='ceph1')"""
self.show_step(13) self.show_step(10)
check_package_version_injected_in_bootstraps("fuel-agent") check_package_version_injected_in_bootstraps("fuel-agent")
check_package_version_injected_in_bootstraps("fuel-agent", check_package_version_injected_in_bootstraps("fuel-agent",
cluster_id=cluster_id, cluster_id=cluster_id,
ironic=True) ironic=True)
""" self.show_step(11)
# Need to uncomment after resolving Bug #1571997 self.show_step(12)
self.show_step(14)
self.show_step(15)
self._create_os_resources(ironic_conn) self._create_os_resources(ironic_conn)
self.show_step(16) self.show_step(13)
self._boot_nova_instances(ironic_conn) self._boot_nova_instances(ironic_conn)
self.show_step(17) self.show_step(14)
ironic_conn.wait_for_vms(ironic_conn) ironic_conn.wait_for_vms(ironic_conn)
ironic_conn.verify_vms_connection(ironic_conn)""" ironic_conn.verify_vms_connection(ironic_conn)
self.env.make_snapshot("review_fuel_agent_ironic_deploy") self.env.make_snapshot("review_fuel_agent_ironic_deploy")