commit b4d49961b968168b4654ca2449b16b6d7840fbd0 Author: Itsuro Oda Date: Tue Sep 29 10:39:24 2020 +0900 Fix functional test of RemoteCommandExecutor This patch fixes three problems to solve test_cmd_executor funciotnal test failure. * make the metadata server accessible from VMs * connect the compute1 node to the controller node via net_mgmt * wait while after VM start until sshd start Change-Id: Id5b72b7eae4ecf6b8038f06b84567324edaa98a8 Closes-bug: #1897643 Related-bug: #1886213 diff --git a/.zuul.yaml b/.zuul.yaml index 977fe51..70bb656 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -76,6 +76,11 @@ Q_SERVICE_PLUGIN_CLASSES: router,neutron.services.metering.metering_plugin.MeteringPlugin,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,neutron.services.qos.qos_plugin.QoSPlugin,qos Q_ML2_PLUGIN_EXT_DRIVERS: port_security,qos L2_AGENT_EXTENSIONS: qos + devstack_local_conf: + post-config: + $NEUTRON_DHCP_CONF: + DEFAULT: + enable_isolated_metadata: True test_matrix_configs: [neutron] zuul_work_dir: src/opendev.org/openstack/tacker host-vars: @@ -149,6 +154,7 @@ devstack_localrc: CELLSV2_SETUP: singleconductor PHYSICAL_NETWORK: mgmtphysnet0 + OVS_BRIDGE_MAPPINGS: public:br-ex,mgmtphysnet0:br-infra DATABASE_TYPE: mysql devstack_services: q-agt: true diff --git a/tacker/tests/functional/common/test_cmd_executer.py b/tacker/tests/functional/common/test_cmd_executer.py index 8c98738..e3b3c12 100644 --- a/tacker/tests/functional/common/test_cmd_executer.py +++ b/tacker/tests/functional/common/test_cmd_executer.py @@ -10,6 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. +import time import yaml from oslo_config import cfg @@ -50,6 +51,10 @@ class TestRemoteCommandExecutor(base.BaseTackerTest): def _test_cmd_executor(self, vnfd_file, vnf_name): vnf_id, mgmt_ip = self._test_create_vnf(vnfd_file, vnf_name) + # Wait for VM initialization. It takes time after VM started until + # sshd starts. It is a bit ad-hoc but adopted it for simplicity. + time.sleep(100) + # Login on VNF instance, and execute 'hostname' command to verify # connection and command output. usr = 'cirros'