def contrail_dpdk_on_vf_add_controller(self): """Verify that Contrail controller role can be added after deploying. Scenario: 1. Create an environment with "Neutron with tunneling segmentation" as a network configuration 2. Enable and configure Contrail plugin 3. Enable DPDK on VF feature 4. Deploy cluster with following node configuration: node-1: 'controller', 'ceph-osd'; node-2: 'contrail-controller'; node-3: 'compute', 'ceph-osd'; node-4: 'compute', 'ceph-osd'; node-5: 'contrail-analytics', 'contrail-analytics-db'; node-6: 'contrail-analytics'; 5. Run OSTF tests 6. Run contrail health check tests 7. Add one node with following configuration: node-7: 'controller', 'ceph-osd'; 8. Deploy changes 9. Run OSTF tests 10. Run contrail health check tests """ conf_contrail = { "dpdk_on_vf": True, } self.show_step(1) plugin.prepare_contrail_plugin(self, slaves=9, options={ 'images_ceph': True, 'volumes_ceph': True, 'ephemeral_ceph': True, 'objects_ceph': True, 'volumes_lvm': False }) self.bm_drv.host_prepare() plugin.show_range(self, 2, 4) # activate plugin with DPDK feature plugin.activate_dpdk(self, **conf_contrail) # activate vSRX image vsrx_setup_result = vsrx.activate() self.show_step(4) self.bm_drv.setup_fuel_node(self, cluster_id=self.cluster_id, roles=['compute', 'dpdk', 'dpdk-on-vf']) openstack.setup_hugepages(self) conf_nodes = { 'slave-01': ['controller', 'ceph-osd'], 'slave-02': ['contrail-controller'], 'slave-03': ['compute', 'ceph-osd'], 'slave-04': ['compute', 'ceph-osd'], 'slave-05': ['contrail-analytics', 'contrail-analytics-db'], 'slave-06': ['contrail-analytics'], } conf_controller = {'slave-07': ['controller', 'ceph-osd']} # Cluster configuration self.fuel_web.update_nodes(self.cluster_id, nodes_dict=conf_nodes, update_interfaces=False) self.bm_drv.update_vm_node_interfaces(self, self.cluster_id) # Enable SRIOV on interface openstack.enable_sriov(self) # add mandatory kernel parameters for DPDK on VK fuel.add_kernel_params(self) # Deploy cluster openstack.deploy_cluster(self) # Run OSTF tests self.show_step(5) # FIXME: remove shouldfail, when livemigration+DPDK works if vsrx_setup_result: self.fuel_web.run_ostf( cluster_id=self.cluster_id, test_sets=['smoke', 'sanity', 'ha'], should_fail=2, failed_test_name=[ 'Instance live migration', 'Check network connectivity from SRIOV instance via' ' floating IP' ]) TestContrailCheck(self).cloud_check( ['dpdk', 'sriov', 'contrail'], should_fail=[ "test_dpdk_boot_snapshot_vm", "test_dpdk_check_public_connectivity_from_instance" ]) # Add Compute node and check again self.show_step(6) # Cluster configuration self.fuel_web.update_nodes(self.cluster_id, nodes_dict=conf_controller, update_interfaces=False) self.bm_drv.update_vm_node_interfaces(self, self.cluster_id) # Enable SRIOV on interface openstack.enable_sriov(self) # Deploy cluster self.show_step(7) openstack.deploy_cluster(self) # Run OSTF tests self.show_step(8) # FIXME: remove shouldfail, when livemigration+DPDK works if vsrx_setup_result: self.fuel_web.run_ostf( cluster_id=self.cluster_id, test_sets=['smoke', 'sanity', 'ha'], should_fail=2, failed_test_name=[ 'Instance live migration', 'Check network connectivity from SRIOV instance via' ' floating IP' ]) self.show_step(9) TestContrailCheck(self).cloud_check( ['dpdk', 'sriov', 'contrail'], should_fail=[ "test_dpdk_boot_snapshot_vm", "test_dpdk_check_public_connectivity_from_instance" ])
def contrail_dpdk_on_vf_delete_controller(self): """Verify that Contrail controller role can be deleted after deploying. Scenario: 1. Create an environment with "Neutron with tunneling segmentation" as a network configuration 2. Enable and configure Contrail plugin 3. Enable DPDK on VF feature 4. Deploy cluster with following node configuration: node-01: 'controller'; node-02: 'contrail-controller'; node-03: 'controller'; node-04: 'compute', 'cinder'; node-05: 'controller'; node-06: 'contrail-analytics', 'contrail-analytics-db'; node-07: 'contrail-analytics-db'; node-08: 'contrail-analytics-db'; 5. Run OSTF tests 6. Delete node-01 with "controller" role 7. Deploy changes 8. Run OSTF tests 9. Run contrail health check tests """ self.show_step(1) plugin.prepare_contrail_plugin(self, slaves=9) self.bm_drv.host_prepare() self.show_step(2) # activate plugin with DPDK on VF feature conf_contrail = {"dpdk_on_vf": True} plugin.activate_dpdk(self, **conf_contrail) # activate vSRX image vsrx_setup_result = vsrx.activate() plugin.show_range(self, 3, 4) self.bm_drv.setup_fuel_node(self, cluster_id=self.cluster_id, roles=['compute', 'dpdk', 'dpdk-on-vf']) openstack.setup_hugepages(self) conf_controller = {'slave-01': ['controller']} conf_no_controller = { # slave-01 here 'slave-02': ['contrail-controller'], 'slave-03': ['controller'], 'slave-04': ['compute', 'cinder'], 'slave-05': ['controller'], 'slave-06': ['contrail-analytics', 'contrail-analytics-db'], 'slave-07': ['contrail-analytics-db'], 'slave-08': ['contrail-analytics-db'], } self.fuel_web.update_nodes(self.cluster_id, nodes_dict=dict(conf_no_controller, **conf_controller), update_interfaces=False) self.bm_drv.update_vm_node_interfaces(self, self.cluster_id) # Enable SRIOV on interface openstack.enable_sriov(self) # add mandatory kernel parameters for DPDK on VK fuel.add_kernel_params(self) # Deploy cluster openstack.deploy_cluster(self) # Run OSTF tests if vsrx_setup_result: self.fuel_web.run_ostf( cluster_id=self.cluster_id, test_sets=['smoke', 'sanity', 'ha'], should_fail=2, failed_test_name=[ 'Instance live migration', 'Check network connectivity from SRIOV instance via' ' floating IP' ]) TestContrailCheck(self).cloud_check( ['dpdk', 'sriov', 'contrail'], should_fail=[ "test_dpdk_boot_snapshot_vm", "test_dpdk_check_public_connectivity_from_instance" ]) # Delete Compute node and check again plugin.show_range(self, 5, 7) self.fuel_web.update_nodes(self.cluster_id, nodes_dict=conf_controller, pending_addition=False, pending_deletion=True, update_interfaces=False) # Deploy cluster openstack.deploy_cluster(self) # Run OSTF tests if vsrx_setup_result: self.fuel_web.run_ostf(cluster_id=self.cluster_id, test_sets=['smoke', 'sanity'], should_fail=1, failed_test_name=[ 'Check that required ' 'services are running' ]) self.show_step(8) TestContrailCheck(self).cloud_check( ['dpdk', 'sriov', 'contrail'], should_fail=[ "test_dpdk_boot_snapshot_vm", "test_dpdk_check_public_connectivity_from_instance" ])
def contrail_add_to_dpdk_sriov(self): """Verify that Contrail controller role can be added after deploying. Scenario: 1. Create an environment with "Neutron with tunneling segmentation" as a network configuration 2. Enable and configure Contrail plugin 3. Add dpdk+compute node 4. Add nodes with following node configuration: node-1: 'controller'; node-2: 'contrail-controller'; node-3: 'compute', 'cinder', node-4: 'contrail-analytics', 'contrail-analytics-db'; 5. Enable sriov on interfaces of dpdk+compute node. 6. Deploy cluster 7. Run OSTF 8. Run contrail health check tests 9. Add nodes with configurations: node-5: 'contrail-controller'; node-6: 'contrail-controller'; node-7: 'contrail-analytics-db'; node-8: 'contrail-analytics'; node-9: 'contrail-analytics', 'contrail-analytics-db'; 10. Deploy changes 11. Run OSTF 12. Run contrail health check tests """ self.show_step(1) plugin.prepare_contrail_plugin(self, slaves=9) self.bm_drv.host_prepare() self.show_step(2) # activate plugin with DPDK feature plugin.activate_dpdk(self) # activate vSRX image vsrx_setup_result = vsrx.activate() plugin.show_range(self, 3, 5) self.bm_drv.setup_fuel_node(self, cluster_id=self.cluster_id, roles=['compute', 'dpdk']) openstack.setup_hugepages(self) conf_nodes = { 'slave-01': ['controller'], 'slave-02': ['contrail-controller'], 'slave-03': ['compute', 'cinder'], 'slave-04': ['contrail-analytics', 'contrail-analytics-db'] } conf_controller = { 'slave-05': ['contrail-controller'], 'slave-06': ['contrail-controller'], 'slave-07': ['contrail-analytics-db'], 'slave-08': ['contrail-analytics'], 'slave-09': ['contrail-analytics', 'contrail-analytics-db'] } # Cluster configuration self.fuel_web.update_nodes(self.cluster_id, nodes_dict=conf_nodes, update_interfaces=False) self.bm_drv.update_vm_node_interfaces(self, self.cluster_id) self.show_step(5) # Enable SRIOV on interface openstack.enable_sriov(self) # Deploy cluster self.show_step(6) openstack.deploy_cluster(self) # Run OSTF tests if vsrx_setup_result: self.show_step(7) self.fuel_web.run_ostf(cluster_id=self.cluster_id, should_fail=1, failed_test_name=[ 'Check network connectivity from SRIOV ' 'instance via floating IP' ]) self.show_step(8) TestContrailCheck(self).cloud_check( ['dpdk', 'contrail'], should_fail=[ "test_dpdk_boot_snapshot_vm", "test_dpdk_check_public_connectivity_from_instance" ]) # Add Contrail node and check again self.show_step(9) # Cluster configuration self.fuel_web.update_nodes(self.cluster_id, nodes_dict=conf_controller, update_interfaces=False) self.bm_drv.update_vm_node_interfaces(self, self.cluster_id) fuel.add_kernel_params() # Deploy cluster self.show_step(10) openstack.deploy_cluster(self) # Run OSTF tests if vsrx_setup_result: self.show_step(11) self.fuel_web.run_ostf(cluster_id=self.cluster_id, should_fail=1, failed_test_name=[ 'Check network connectivity from SRIOV ' 'instance via floating IP' ]) self.show_step(12) TestContrailCheck(self).cloud_check( ['dpdk', 'contrail'], should_fail=["test_dpdk_boot_snapshot_vm"])