From 11f708bb54adb3992554a40b5822a60a22f4817e Mon Sep 17 00:00:00 2001 From: Aurelien Lourot Date: Mon, 19 Jul 2021 11:42:52 +0200 Subject: [PATCH] Add tempest to openstack-upgrade tests Change-Id: If77c1f150fc4184d705620035d3af25959e02a7c --- tests/charm-upgrade/tests/tests.yaml | 9 +- .../kitchen-sink-bionic-queens.yaml.j2 | 1 + .../kitchen-sink-focal-victoria.yaml.j2 | 1 + tests/openstack-upgrade/tests/tests.yaml | 84 +++- .../shared/kitchen-sink-bionic-queens.yaml.j2 | 413 ++++++++++++++++++ .../shared/kitchen-sink-focal-ussuri.yaml.j2 | 1 + .../kitchen-sink-focal-victoria.yaml.j2 | 1 + 7 files changed, 500 insertions(+), 10 deletions(-) create mode 120000 tests/openstack-upgrade/tests/bundles/kitchen-sink-bionic-queens.yaml.j2 create mode 120000 tests/openstack-upgrade/tests/bundles/kitchen-sink-focal-victoria.yaml.j2 create mode 100644 tests/shared/kitchen-sink-bionic-queens.yaml.j2 diff --git a/tests/charm-upgrade/tests/tests.yaml b/tests/charm-upgrade/tests/tests.yaml index 64aedaf8..d1e72140 100644 --- a/tests/charm-upgrade/tests/tests.yaml +++ b/tests/charm-upgrade/tests/tests.yaml @@ -39,12 +39,11 @@ tests_options: default: smoke: True exclude-list: - # NOTE(lourot): these test cases occasionally fail (at least on - # focal-ussuri distro) already before charm upgrade. Blocklisting for - # now: + - octavia_tempest_plugin # workaround for zaza-openstack-tests#603 + # NOTE(lourot): these not-so-important test cases occasionally fail (at + # least on focal-ussuri distro) already before charm upgrade. + # Blocklisting for now. See charmed-openstack-tester#55 - tempest.api.identity.admin.v3.test_credentials.CredentialsTestJSON.test_credentials_create_get_update_delete - tempest.api.identity.admin.v3.test_roles.RolesV3TestJSON.test_role_create_update_show_list - tempest.api.identity.admin.v3.test_services.ServicesTestJSON.test_create_update_get_service - tempest.api.object_storage.test_container_quotas.ContainerQuotasTest.test_upload_too_many_objects - exclude-regex: - - octavia_tempest_plugin # workaround for zaza-openstack-tests#603 diff --git a/tests/openstack-upgrade/tests/bundles/kitchen-sink-bionic-queens.yaml.j2 b/tests/openstack-upgrade/tests/bundles/kitchen-sink-bionic-queens.yaml.j2 new file mode 120000 index 00000000..3306aba9 --- /dev/null +++ b/tests/openstack-upgrade/tests/bundles/kitchen-sink-bionic-queens.yaml.j2 @@ -0,0 +1 @@ +../../../shared/kitchen-sink-bionic-queens.yaml.j2 \ No newline at end of file diff --git a/tests/openstack-upgrade/tests/bundles/kitchen-sink-focal-victoria.yaml.j2 b/tests/openstack-upgrade/tests/bundles/kitchen-sink-focal-victoria.yaml.j2 new file mode 120000 index 00000000..5d681285 --- /dev/null +++ b/tests/openstack-upgrade/tests/bundles/kitchen-sink-focal-victoria.yaml.j2 @@ -0,0 +1 @@ +../../../shared/kitchen-sink-focal-victoria.yaml.j2 \ No newline at end of file diff --git a/tests/openstack-upgrade/tests/tests.yaml b/tests/openstack-upgrade/tests/tests.yaml index 4cbfa46c..c49b982b 100644 --- a/tests/openstack-upgrade/tests/tests.yaml +++ b/tests/openstack-upgrade/tests/tests.yaml @@ -1,24 +1,64 @@ before_deploy: - - kitchen-sink-focal-ussuri: + - queens-to-rocky: &pre_deploy - zaza.openstack.configure.pre_deploy_certs.set_cidr_certs + - ussuri-to-victoria: *pre_deploy + - victoria-to-wallaby: *pre_deploy configure: - - kitchen-sink-focal-ussuri: + - queens-to-rocky: + - zaza.openstack.charm_tests.ceilometer.setup.basic_setup + - zaza.openstack.charm_tests.glance.setup.add_cirros_image + - zaza.openstack.charm_tests.glance.setup.add_cirros_alt_image + - zaza.openstack.charm_tests.glance.setup.add_lts_image + - zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network + - zaza.openstack.charm_tests.nova.setup.create_flavors + - zaza.openstack.charm_tests.nova.setup.manage_ssh_key + - zaza.openstack.charm_tests.keystone.setup.add_demo_user + - zaza.openstack.charm_tests.keystone.setup.add_tempest_roles + - ussuri-to-victoria: &configure_with_vault - zaza.openstack.charm_tests.ceilometer.setup.basic_setup - zaza.openstack.charm_tests.vault.setup.auto_initialize - zaza.openstack.charm_tests.glance.setup.add_cirros_image + - zaza.openstack.charm_tests.glance.setup.add_cirros_alt_image - zaza.openstack.charm_tests.glance.setup.add_lts_image - zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network - zaza.openstack.charm_tests.nova.setup.create_flavors - zaza.openstack.charm_tests.nova.setup.manage_ssh_key + - zaza.openstack.charm_tests.keystone.setup.add_demo_user + - zaza.openstack.charm_tests.keystone.setup.add_tempest_roles + - victoria-to-wallaby: *configure_with_vault tests: - - kitchen-sink-focal-ussuri: + - queens-to-rocky: + - zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneV3 + # NOTE(lourot): the openstack-upgrade action on `keystone` fails on + # `keystone-manage bootstrap ...`. See lp:1901982 + # - zaza.openstack.charm_tests.openstack_upgrade.tests.OpenStackUpgradeTestsByOption + # - zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneV3 + + - ussuri-to-victoria: + - zaza.openstack.charm_tests.openstack_upgrade.tests.WaitForMySQL + - zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneV3 + # NOTE(lourot) the pause action on `ceilometer-hacluster` occasionally fails + # with `Couldn't pause: Resources still running on unit`. See + # charmed-openstack-tester#56 + - zaza.openstack.charm_tests.openstack_upgrade.tests.OpenStackUpgradeTestsByOption + # NOTE(lourot): test cases involving floating IPs fail at this point. See + # charmed-openstack-tester#57 + # - zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneV3 + + - victoria-to-wallaby: - zaza.openstack.charm_tests.openstack_upgrade.tests.WaitForMySQL - - zaza.openstack.charm_tests.openstack_upgrade.tests.OpenStackUpgradeTestsFocalUssuri + - zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneV3 + # NOTE(lourot) the pause action on `swift-proxy` fails and exits 1. See + # lp:1947559 + # - zaza.openstack.charm_tests.openstack_upgrade.tests.OpenStackUpgradeTestsByOption + # - zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneV3 smoke_bundles: - - kitchen-sink-focal-ussuri: kitchen-sink-focal-ussuri + - queens-to-rocky: kitchen-sink-bionic-queens + - ussuri-to-victoria: kitchen-sink-focal-ussuri + - victoria-to-wallaby: kitchen-sink-focal-victoria target_deploy_status: easyrsa: @@ -31,3 +71,37 @@ target_deploy_status: ceilometer: workload-status: blocked workload-status-message: "Run the ceilometer-upgrade action on the leader to initialize ceilometer and gnocchi" +tests_options: + openstack-upgrade: + detect-using-charm: keystone + tempest: + queens-to-rocky: + smoke: True + exclude-list: + - octavia_tempest_plugin # workaround for zaza-openstack-tests#603 + # NOTE(lourot): these not-so-important test cases occasionally fail + # already before openstack upgrade. Blocklisting for now. See + # charmed-openstack-tester#55 + - tempest.api.identity.admin.v3.test_credentials.CredentialsTestJSON.test_credentials_create_get_update_delete + - tempest.api.identity.admin.v3.test_roles.RolesV3TestJSON.test_role_create_update_show_list + - tempest.api.identity.admin.v3.test_services.ServicesTestJSON.test_create_update_get_service + - tempest.api.object_storage.test_container_quotas.ContainerQuotasTest.test_upload_too_many_objects + # NOTE(lourot): Some volume-related test cases are failing already + # before openstack upgrade against bionic-queens. See + # charmed-openstack-tester#58 + - tempest.api.volume + - tempest.api.compute.servers.test_create_server.ServersTestBootFromVolume + ussuri-to-victoria: + smoke: True + exclude-list: &common_tempest_exclude_list + - octavia_tempest_plugin # workaround for zaza-openstack-tests#603 + # NOTE(lourot): these not-so-important test cases occasionally fail + # already before openstack upgrade. Blocklisting for now. See + # charmed-openstack-tester#55 + - tempest.api.identity.admin.v3.test_credentials.CredentialsTestJSON.test_credentials_create_get_update_delete + - tempest.api.identity.admin.v3.test_roles.RolesV3TestJSON.test_role_create_update_show_list + - tempest.api.identity.admin.v3.test_services.ServicesTestJSON.test_create_update_get_service + - tempest.api.object_storage.test_container_quotas.ContainerQuotasTest.test_upload_too_many_objects + victoria-to-wallaby: + smoke: True + exclude-list: *common_tempest_exclude_list diff --git a/tests/shared/kitchen-sink-bionic-queens.yaml.j2 b/tests/shared/kitchen-sink-bionic-queens.yaml.j2 new file mode 100644 index 00000000..12688eb2 --- /dev/null +++ b/tests/shared/kitchen-sink-bionic-queens.yaml.j2 @@ -0,0 +1,413 @@ +variables: + openstack-origin: &openstack-origin distro + +series: bionic +applications: + aodh: + charm: cs:~openstack-charmers-next/aodh + num_units: 3 + options: + openstack-origin: *openstack-origin + vip: {{ TEST_VIP00 }} + constraints: mem=1024 + aodh-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + ceilometer: + charm: cs:~openstack-charmers-next/ceilometer + num_units: 3 + options: + openstack-origin: *openstack-origin + vip: {{ TEST_VIP01 }} + constraints: mem=1024 + ceilometer-agent: + charm: cs:~openstack-charmers-next/ceilometer-agent + ceilometer-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + ceph-mon: + charm: cs:~openstack-charmers-next/ceph-mon + num_units: 3 + options: + expected-osd-count: 3 + source: *openstack-origin + ceph-osd: + charm: cs:~openstack-charmers-next/ceph-osd + num_units: 3 + options: + source: *openstack-origin + constraints: mem=1024 + storage: + osd-devices: cinder,40G + cinder: + charm: cs:~openstack-charmers-next/cinder + num_units: 3 + options: + block-device: None + glance-api-version: 2 + openstack-origin: *openstack-origin + vip: {{ TEST_VIP02 }} + constraints: mem=1024 + cinder-ceph: + charm: cs:~openstack-charmers-next/cinder-ceph + cinder-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + dashboard-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 3 + options: + nameservers: ns1.mojo.serverstack.com. + neutron-domain: "" + neutron-domain-email: "" + nova-domain: "" + nova-domain-email: "" + openstack-origin: *openstack-origin + vip: {{ TEST_VIP03 }} + constraints: mem=1024 + designate-bind: + charm: cs:~openstack-charmers-next/designate-bind + num_units: 3 + designate-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + easyrsa: + charm: cs:~containers/easyrsa + num_units: 1 + etcd: + series: bionic + charm: cs:~containers/etcd-474 + num_units: 3 + options: + channel: 3.1/stable + glance: + charm: cs:~openstack-charmers-next/glance + num_units: 3 + options: + openstack-origin: *openstack-origin + vip: {{ TEST_VIP04 }} + constraints: mem=1024 + glance-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + gnocchi: + charm: cs:~openstack-charmers-next/gnocchi + num_units: 3 + options: + openstack-origin: *openstack-origin + vip: {{ TEST_VIP05 }} + gnocchi-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + heat: + charm: cs:~openstack-charmers-next/heat + num_units: 3 + options: + openstack-origin: *openstack-origin + vip: {{ TEST_VIP06 }} + heat-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 3 + options: + openstack-origin: *openstack-origin + vip: {{ TEST_VIP07 }} + constraints: mem=1024 + keystone-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + memcached: + series: bionic + charm: cs:memcached + num_units: 1 + mysql: + charm: cs:percona-cluster + num_units: 1 + options: + dataset-size: 50% + max-connections: 20000 + root-password: ChangeMe123 + source: *openstack-origin + sst-password: ChangeMe123 + constraints: mem=4096 + neutron-api: + charm: cs:~openstack-charmers-next/neutron-api + num_units: 3 + options: + manage-neutron-plugin-legacy-mode: True + dns-domain: mojo.serverstack. + enable-ml2-dns: true + enable-ml2-port-security: true + flat-network-providers: physnet1 + ipv4-ptr-zone-prefix-size: 24 + neutron-security-groups: true + openstack-origin: *openstack-origin + reverse-dns-lookup: true + vip: {{ TEST_VIP09 }} + constraints: mem=1024 + neutron-gateway: + charm: cs:~openstack-charmers-next/neutron-gateway + num_units: 1 + options: + bridge-mappings: physnet1:br-ex + instance-mtu: 1300 + openstack-origin: *openstack-origin + constraints: mem=4096 + neutron-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + neutron-openvswitch: + charm: cs:~openstack-charmers-next/neutron-openvswitch + nova-cc-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + nova-cloud-controller: + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 3 + options: + network-manager: Neutron + openstack-origin: *openstack-origin + vip: {{ TEST_VIP10 }} + constraints: mem=2048 + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 3 + options: + enable-live-migration: true + enable-resize: true + migration-auth-type: ssh + openstack-origin: *openstack-origin + constraints: mem=4096 + openstack-dashboard: + charm: cs:~openstack-charmers-next/openstack-dashboard + num_units: 3 + options: + openstack-origin: *openstack-origin + vip: {{ TEST_VIP11 }} + constraints: mem=1024 + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + constraints: mem=2048 + swift-hacluster: + charm: cs:~openstack-charmers-next/hacluster + options: + cluster_count: 3 + corosync_transport: unicast + swift-proxy: + charm: cs:~openstack-charmers-next/swift-proxy + num_units: 3 + options: + openstack-origin: *openstack-origin + replicas: 3 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + vip: {{ TEST_VIP12 }} + zone-assignment: manual + constraints: mem=1024 + swift-storage-z1: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + options: + openstack-origin: *openstack-origin + zone: 1 + constraints: mem=1024 + storage: + block-devices: cinder,10G + swift-storage-z2: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + options: + openstack-origin: *openstack-origin + zone: 2 + constraints: mem=1024 + storage: + block-devices: cinder,10G + swift-storage-z3: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + options: + openstack-origin: *openstack-origin + zone: 3 + constraints: mem=1024 + storage: + block-devices: cinder,10G +relations: +- - nova-cloud-controller:amqp + - rabbitmq-server:amqp +- - nova-cloud-controller:image-service + - glance:image-service +- - nova-cloud-controller:identity-service + - keystone:identity-service +- - nova-compute:cloud-compute + - nova-cloud-controller:cloud-compute +- - nova-cloud-controller:memcache + - memcached:cache +- - nova-compute:amqp + - rabbitmq-server:amqp +- - nova-compute:image-service + - glance:image-service +- - nova-compute:ceph + - ceph-mon:client +- - glance:identity-service + - keystone:identity-service +- - glance:ceph + - ceph-mon:client +- - glance:image-service + - cinder:image-service +- - glance:amqp + - rabbitmq-server:amqp +- - cinder:amqp + - rabbitmq-server:amqp +- - cinder:cinder-volume-service + - nova-cloud-controller:cinder-volume-service +- - cinder:identity-service + - keystone:identity-service +- - cinder:storage-backend + - cinder-ceph:storage-backend +- - cinder-ceph:ceph + - ceph-mon:client +- - neutron-gateway:quantum-network-service + - nova-cloud-controller:quantum-network-service +- - openstack-dashboard:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-proxy:swift-storage + - swift-storage-z1:swift-storage +- - swift-proxy:swift-storage + - swift-storage-z2:swift-storage +- - swift-proxy:swift-storage + - swift-storage-z3:swift-storage +- - heat:identity-service + - keystone:identity-service +- - heat:amqp + - rabbitmq-server:amqp +- - neutron-gateway:amqp + - rabbitmq-server:amqp +- - neutron-api:amqp + - rabbitmq-server:amqp +- - neutron-api:neutron-api + - nova-cloud-controller:neutron-api +- - neutron-api:neutron-plugin-api + - neutron-openvswitch:neutron-plugin-api +- - neutron-api:identity-service + - keystone:identity-service +- - neutron-api:neutron-plugin-api + - neutron-gateway:neutron-plugin-api +- - neutron-openvswitch:neutron-plugin + - nova-compute:neutron-plugin +- - neutron-openvswitch:amqp + - rabbitmq-server:amqp +- - ceph-osd:mon + - ceph-mon:osd +- - keystone:ha + - keystone-hacluster:ha +- - nova-cloud-controller:ha + - nova-cc-hacluster:ha +- - cinder:ha + - cinder-hacluster:ha +- - glance:ha + - glance-hacluster:ha +- - openstack-dashboard:ha + - dashboard-hacluster:ha +- - swift-proxy:ha + - swift-hacluster:ha +- - neutron-api:ha + - neutron-hacluster:ha +- - heat:ha + - heat-hacluster:ha +- - etcd:certificates + - easyrsa:client +- - aodh:amqp + - rabbitmq-server:amqp +- - aodh:identity-service + - keystone:identity-service +- - aodh:ha + - aodh-hacluster:ha +- - designate:identity-service + - keystone:identity-service +- - designate:amqp + - rabbitmq-server:amqp +- - designate:dns-backend + - designate-bind:dns-backend +- - designate:coordinator-memcached + - memcached:cache +- - designate:dnsaas + - neutron-api:external-dns +- - designate:ha + - designate-hacluster:ha +- - gnocchi:storage-ceph + - ceph-mon:client +- - gnocchi:amqp + - rabbitmq-server:amqp +- - gnocchi:coordinator-memcached + - memcached:cache +- - gnocchi:metric-service + - ceilometer:metric-service +- - gnocchi:identity-service + - keystone:identity-service +- - cinder-ceph:ceph-access + - nova-compute:ceph-access +- - ceilometer:identity-credentials + - keystone:identity-credentials +- - ceilometer:identity-notifications + - keystone:identity-notifications +- - ceilometer:amqp + - rabbitmq-server:amqp +- - ceilometer-agent:nova-ceilometer + - nova-compute:nova-ceilometer +- - ceilometer-agent:ceilometer-service + - ceilometer:ceilometer-service +- - ceilometer-agent:amqp + - rabbitmq-server:amqp +- - ceilometer:ha + - ceilometer-hacluster:ha +- - gnocchi:ha + - gnocchi-hacluster:ha +- - keystone:shared-db + - mysql:shared-db +- - heat:shared-db + - mysql:shared-db +- - nova-cloud-controller:shared-db + - mysql:shared-db +- - neutron-api:shared-db + - mysql:shared-db +- - aodh:shared-db + - mysql:shared-db +- - gnocchi:shared-db + - mysql:shared-db +- - glance:shared-db + - mysql:shared-db +- - designate:shared-db + - mysql:shared-db +- - cinder:shared-db + - mysql:shared-db diff --git a/tests/shared/kitchen-sink-focal-ussuri.yaml.j2 b/tests/shared/kitchen-sink-focal-ussuri.yaml.j2 index c8be52d5..f1d5ce49 100644 --- a/tests/shared/kitchen-sink-focal-ussuri.yaml.j2 +++ b/tests/shared/kitchen-sink-focal-ussuri.yaml.j2 @@ -162,6 +162,7 @@ applications: manage-neutron-plugin-legacy-mode: True dns-domain: mojo.serverstack. enable-ml2-dns: true + enable-ml2-port-security: true flat-network-providers: physnet1 ipv4-ptr-zone-prefix-size: 24 neutron-security-groups: true diff --git a/tests/shared/kitchen-sink-focal-victoria.yaml.j2 b/tests/shared/kitchen-sink-focal-victoria.yaml.j2 index ce7b502b..c1b576c2 100644 --- a/tests/shared/kitchen-sink-focal-victoria.yaml.j2 +++ b/tests/shared/kitchen-sink-focal-victoria.yaml.j2 @@ -163,6 +163,7 @@ applications: manage-neutron-plugin-legacy-mode: True dns-domain: mojo.serverstack. enable-ml2-dns: true + enable-ml2-port-security: true flat-network-providers: physnet1 ipv4-ptr-zone-prefix-size: 24 neutron-security-groups: true