From 594f4eff8ad96ab03f633e38d7784a62073b3d68 Mon Sep 17 00:00:00 2001 From: wangyu Date: Mon, 3 Aug 2020 14:57:25 +0800 Subject: [PATCH] Switch legacy Zuul jobs to native Zuul v3 jobs Replace the 'karbor-dsvm-fullstack' legacy Zuul job with the 'karbor-fullstack' native Zuul v3 job. See https://governance.openstack.org/tc/goals/selected/victoria/native-zuulv3-jobs.html for more details. Change-Id: I558c8e02011e98950354266254511bd113d5c5ec --- .zuul.yaml | 61 ++++++++++--- devstack/plugin.sh | 4 +- karbor/tests/fullstack/test_protectables.py | 6 +- .../legacy/karbor-dsvm-fullstack/post.yaml | 80 ----------------- .../legacy/karbor-dsvm-fullstack/run.yaml | 88 ------------------- test-requirements.txt | 1 + 6 files changed, 56 insertions(+), 184 deletions(-) delete mode 100644 playbooks/legacy/karbor-dsvm-fullstack/post.yaml delete mode 100644 playbooks/legacy/karbor-dsvm-fullstack/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 04ea6b8b..cb0a9aef 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -3,23 +3,60 @@ - openstack-cover-jobs - openstack-lower-constraints-jobs - check-requirements - - openstack-python3-ussuri-jobs + - openstack-python3-victoria-jobs - publish-openstack-docs-pti check: jobs: - - karbor-dsvm-fullstack: + - karbor-fullstack: voting: false - job: - name: karbor-dsvm-fullstack - parent: legacy-dsvm-base - run: playbooks/legacy/karbor-dsvm-fullstack/run.yaml - post-run: playbooks/legacy/karbor-dsvm-fullstack/post.yaml + name: karbor-fullstack + parent: devstack-tox-functional timeout: 7800 required-projects: - - openstack/devstack-gate - - openstack/karbor - - openstack/python-karborclient - - openstack/trove - - openstack/trove-dashboard - - openstack/manila-tempest-plugin + - opendev.org/openstack/karbor + - opendev.org/openstack/python-karborclient + - opendev.org/openstack/trove + - opendev.org/openstack/trove-dashboard + - opendev.org/openstack/manila + - opendev.org/openstack/manila-tempest-plugin + vars: + devstack_plugins: + karbor: https://opendev.org/openstack/karbor + manila: https://opendev.org/openstack/manila + tox_envlist: fullstack + devstack_localrc: + API_WORKERS: 4 + VOLUME_BACKING_FILE_SIZE: 20490M + MANILA_OPTGROUP_generic1_driver_handles_share_servers: False + MANILA_USE_SERVICE_INSTANCE_PASSWORD: True + MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS: 'snapshot_support=True create_share_from_snapshot_support=True mount_snapshot_support=True driver_handles_share_servers=False' + SHARE_DRIVER: manila.share.drivers.lvm.LVMShareDriver + SWIFT_HASH: 66a3d6b56c1f479c8b4e70ab5c2000f5 + SWIFT_REPLICAS: 1 + SWIFT_LOOPBACK_DISK_SIZE: 10G + DATABASE_PASSWORD: password + RABBIT_PASSWORD: password + SERVICE_PASSWORD: password + SERVICE_TOKEN: password + ADMIN_PASSWORD: password + devstack_local_conf: + test-config: + $SWIFT_CONFIG_PROXY_SERVER: + DEFAULT: + workers: 4 + $CINDER_CONF: + DEFAULT: + osapi_volume_workers: 8 + rpc_response_timeout: 120 + $KARBOR_API_CONF: + DEFAULT: + max_window_time: 150 + min_window_time: 75 + min_interval: 300 + devstack_services: + tls-proxy: false + karbor-api: True + karbor-protection: True + karbor-operationengine: True diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 0e0b29b9..980a6a64 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -91,7 +91,7 @@ function start_karbor_api_mod_wsgi { } function start_karbor_api_uwsgi { - run_process karbor-api "$KARBOR_BIN_DIR/uwsgi --ini $KARBOR_API_UWSGI_CONF" "" + run_process karbor-api "$(which uwsgi) --ini $KARBOR_API_UWSGI_CONF" "" echo "Waiting for Karbor API to start..." if ! wait_for_service $SERVICE_TIMEOUT $KARBOR_API_ENDPOINT; then @@ -116,7 +116,7 @@ function configure_karbor { # generate configuration file cd $KARBOR_DIR - tox -e genconfig + oslo-config-generator --config-file etc/oslo-config-generator/karbor.conf --output-file etc/karbor.conf.sample cp etc/karbor.conf.sample etc/karbor.conf cp $KARBOR_DIR/etc/karbor.conf $KARBOR_CONF diff --git a/karbor/tests/fullstack/test_protectables.py b/karbor/tests/fullstack/test_protectables.py index 5e55326f..050e847c 100644 --- a/karbor/tests/fullstack/test_protectables.py +++ b/karbor/tests/fullstack/test_protectables.py @@ -82,10 +82,12 @@ class ProtectablesTest(karbor_base.KarborBaseTest): ins_res = self.karbor_client.protectables.get_instance( 'OS::Nova::Server', volume_item.attachments[0]["server_id"]) self.assertTrue(ins_res.dependent_resources) - self.assertEqual('OS::Cinder::Volume', + self.assertEqual('OS::Glance::Image', ins_res.dependent_resources[0]["type"]) + self.assertEqual('OS::Cinder::Volume', + ins_res.dependent_resources[1]["type"]) self.assertEqual(volume.id, - ins_res.dependent_resources[0]["id"]) + ins_res.dependent_resources[1]["id"]) def test_share_protectables_list_instances(self): self.skipTest('Waiting new manilaclient being merged.') diff --git a/playbooks/legacy/karbor-dsvm-fullstack/post.yaml b/playbooks/legacy/karbor-dsvm-fullstack/post.yaml deleted file mode 100644 index 5f4a3293..00000000 --- a/playbooks/legacy/karbor-dsvm-fullstack/post.yaml +++ /dev/null @@ -1,80 +0,0 @@ -- hosts: primary - tasks: - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=**/*nose_results.html - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=**/*testr_results.html.gz - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/.stestr/tmp* - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=**/*stestr.subunit.gz - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}/tox' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/.tox/*/log/* - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff --git a/playbooks/legacy/karbor-dsvm-fullstack/run.yaml b/playbooks/legacy/karbor-dsvm-fullstack/run.yaml deleted file mode 100644 index 30f554f8..00000000 --- a/playbooks/legacy/karbor-dsvm-fullstack/run.yaml +++ /dev/null @@ -1,88 +0,0 @@ -- hosts: all - name: Autoconverted job legacy-karbor-dsvm-fullstack from old job gate-karbor-dsvm-fullstack-nv - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - shell: - cmd: | - set -e - set -x - cat > clonemap.yaml << EOF - clonemap: - - name: openstack/devstack-gate - dest: devstack-gate - EOF - /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ - https://opendev.org \ - openstack/devstack-gate - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - cat << 'EOF' >>"/tmp/dg-local.conf" - [[post-config|$SWIFT_CONFIG_PROXY_SERVER]] - [DEFAULT] - workers=4 - - [[post-config|$CINDER_CONF]] - [DEFAULT] - osapi_volume_workers=8 - rpc_response_timeout=120 - - [[post-config|$KARBOR_API_CONF]] - [DEFAULT] - max_window_time=150 - min_window_time=75 - min_interval=300 - - EOF - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - export PYTHONUNBUFFERED=true - export DEVSTACK_GATE_TEMPEST=0 - export DEVSTACK_GATE_NEUTRON=1 - export DEVSTACK_GATE_INSTALL_TESTONLY=1 - export DEVSTACK_GATE_USE_PYTHON3=True - - export BRANCH_OVERRIDE=default - if [ "$BRANCH_OVERRIDE" != "default" ] ; then - export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE - fi - - export PROJECTS="openstack/karbor $PROJECTS" - export PROJECTS="openstack/trove $PROJECTS" - export PROJECTS="openstack/trove-dashboard $PROJECTS" - export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" - export DEVSTACK_PROJECT_FROM_GIT="python-karborclient" - - export DEVSTACK_GATE_SETTINGS=/opt/stack/new/karbor/devstack/devstackgaterc - - function gate_hook { - bash -xe $BASE/new/karbor/karbor/tests/contrib/gate_hook.sh fullstack - } - export -f gate_hook - - function post_test_hook { - bash -xe $BASE/new/karbor/karbor/tests/contrib/post_test_hook.sh fullstack - } - export -f post_test_hook - - cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh - ./safe-devstack-vm-gate-wrap.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/test-requirements.txt b/test-requirements.txt index e8cfab98..bb732247 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -21,6 +21,7 @@ python-freezerclient>=1.3.0 # Apache-2.0 python-karborclient>=0.6.0 # Apache-2.0 python-neutronclient>=6.7.0 # Apache-2.0 python-troveclient>=2.2.0 # Apache-2.0 +python-manilaclient>=1.16.0 # Apache-2.0 # Documentation sphinx>=2.0.0,!=2.1.0 # BSD