From 3c1d9dab853b4605856dc1709ee7bf7512505b6e Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Thu, 29 Aug 2019 14:26:58 +0200 Subject: [PATCH] Move live_migration test hooks under gate/ This patch resolves a TODO in the .zuul.yaml about using common irrelevant files in our dsvm jobs. To be able to do that we need to move the test hooks from nova/tests/live_migraton under gate/. Change-Id: I4e5352fd1a99ff2b4134a734eac6626be772caf1 --- .zuul.yaml | 24 +++---------------- .../live_migration/hooks/ceph.sh | 0 .../live_migration/hooks/nfs.sh | 0 .../live_migration/hooks/run_tests.sh | 6 ++--- .../live_migration/hooks/utils.sh | 0 .../nova-grenade-live-migration/run.yaml | 2 +- playbooks/legacy/nova-live-migration/run.yaml | 2 +- 7 files changed, 8 insertions(+), 26 deletions(-) rename {nova/tests => gate}/live_migration/hooks/ceph.sh (100%) rename {nova/tests => gate}/live_migration/hooks/nfs.sh (100%) rename {nova/tests => gate}/live_migration/hooks/run_tests.sh (92%) rename {nova/tests => gate}/live_migration/hooks/utils.sh (100%) diff --git a/.zuul.yaml b/.zuul.yaml index 72db6e9031fb..4f4b219b71b4 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -128,25 +128,7 @@ Config drive is forced on all instances. run: playbooks/legacy/nova-live-migration/run.yaml post-run: playbooks/legacy/nova-live-migration/post.yaml - irrelevant-files: &live-migration-irrelevant-files - # We define our own irrelevant-files because we need to run - # this if there are changes to nova/tests/live_migration/. - # TODO(mriedem): Move the nova/tests/live_migration/ scripts to gate/ - # so this job can use the standard dsvm-irrelevant-files. - - ^api-.*$ - - ^(test-|)requirements.txt$ - - ^.*\.rst$ - - ^.git.*$ - - ^doc/.*$ - - ^nova/hacking/.*$ - - ^nova/locale/.*$ - - ^nova/tests/(?!live_migration/).*$ - - ^nova/test.py$ - - ^releasenotes/.*$ - - ^setup.cfg$ - - ^tests-py3.txt$ - - ^tools/.*$ - - ^tox.ini$ + irrelevant-files: *dsvm-irrelevant-files - job: name: nova-lvm @@ -268,7 +250,7 @@ name: nova-grenade-live-migration parent: nova-dsvm-multinode-base description: | - Multi-node grenade job which runs nova/tests/live_migration/hooks tests. + Multi-node grenade job which runs gate/live_migration/hooks tests. In other words, this tests live migration with mixed-version compute services which is important for things like rolling upgrade support. The former name for this job was @@ -279,7 +261,7 @@ - openstack/grenade - openstack/devstack-gate - openstack/nova - irrelevant-files: *live-migration-irrelevant-files + irrelevant-files: *dsvm-irrelevant-files - job: name: nova-multi-cell diff --git a/nova/tests/live_migration/hooks/ceph.sh b/gate/live_migration/hooks/ceph.sh similarity index 100% rename from nova/tests/live_migration/hooks/ceph.sh rename to gate/live_migration/hooks/ceph.sh diff --git a/nova/tests/live_migration/hooks/nfs.sh b/gate/live_migration/hooks/nfs.sh similarity index 100% rename from nova/tests/live_migration/hooks/nfs.sh rename to gate/live_migration/hooks/nfs.sh diff --git a/nova/tests/live_migration/hooks/run_tests.sh b/gate/live_migration/hooks/run_tests.sh similarity index 92% rename from nova/tests/live_migration/hooks/run_tests.sh rename to gate/live_migration/hooks/run_tests.sh index ff005520b8a3..c34c9f52125d 100755 --- a/nova/tests/live_migration/hooks/run_tests.sh +++ b/gate/live_migration/hooks/run_tests.sh @@ -16,9 +16,9 @@ source $BASE/new/devstack/functions source $BASE/new/devstack/functions-common source $BASE/new/devstack/lib/nova source $WORKSPACE/devstack-gate/functions.sh -source $BASE/new/nova/nova/tests/live_migration/hooks/utils.sh -source $BASE/new/nova/nova/tests/live_migration/hooks/nfs.sh -source $BASE/new/nova/nova/tests/live_migration/hooks/ceph.sh +source $BASE/new/nova/gate/live_migration/hooks/utils.sh +source $BASE/new/nova/gate/live_migration/hooks/nfs.sh +source $BASE/new/nova/gate/live_migration/hooks/ceph.sh primary_node=$(cat /etc/nodepool/primary_node_private) SUBNODES=$(cat /etc/nodepool/sub_nodes_private) SERVICE_HOST=$primary_node diff --git a/nova/tests/live_migration/hooks/utils.sh b/gate/live_migration/hooks/utils.sh similarity index 100% rename from nova/tests/live_migration/hooks/utils.sh rename to gate/live_migration/hooks/utils.sh diff --git a/playbooks/legacy/nova-grenade-live-migration/run.yaml b/playbooks/legacy/nova-grenade-live-migration/run.yaml index 7c476f117ddd..b4ac861d5645 100644 --- a/playbooks/legacy/nova-grenade-live-migration/run.yaml +++ b/playbooks/legacy/nova-grenade-live-migration/run.yaml @@ -48,7 +48,7 @@ export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE fi function post_test_hook { - /opt/stack/new/nova/nova/tests/live_migration/hooks/run_tests.sh + /opt/stack/new/nova/gate/live_migration/hooks/run_tests.sh } export -f post_test_hook cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh diff --git a/playbooks/legacy/nova-live-migration/run.yaml b/playbooks/legacy/nova-live-migration/run.yaml index 215f61d66cc6..dd60e38a645f 100644 --- a/playbooks/legacy/nova-live-migration/run.yaml +++ b/playbooks/legacy/nova-live-migration/run.yaml @@ -48,7 +48,7 @@ export DEVSTACK_GATE_TEMPEST_NOTESTS=1 export DEVSTACK_GATE_TOPOLOGY="multinode" function post_test_hook { - /opt/stack/new/nova/nova/tests/live_migration/hooks/run_tests.sh + /opt/stack/new/nova/gate/live_migration/hooks/run_tests.sh $BASE/new/nova/gate/test_evacuate.sh } export -f post_test_hook