From e3f9894aeadac301e01e28d840ad0cb5ebdaa09a Mon Sep 17 00:00:00 2001 From: Liam Young Date: Wed, 19 Aug 2020 07:09:19 +0000 Subject: [PATCH] Add erasure-coded pool bundle This change adds a bundle that configures erasure coded pools for glance, cinder-ceph and nova. To verify that the pools are using EC it also adds a test which verifies the pool type. To verify that the nova pool is configured correctly in all scenarious all the bundles have been updated to set libvirt-image-backend to rbd which triggers the nova pool creation. During testing the Prometheus tests were failing which is down to a known bug *1 in the prometheus charm. The bundles have been updated to pin the prometheus2 charm to an earlier version to get round the bug. *1 https://bugs.launchpad.net/charm-prometheus2/+bug/1891942 Change-Id: I7d29aec3ba9924d5677be25137907b1465401f9c --- tests/bundles/bionic-queens.yaml | 5 +- tests/bundles/bionic-rocky.yaml | 4 +- tests/bundles/bionic-stein.yaml | 4 +- tests/bundles/bionic-train-with-fsid.yaml | 1 + tests/bundles/bionic-train.yaml | 4 +- tests/bundles/bionic-ussuri.yaml | 4 +- tests/bundles/focal-ussuri-ec.yaml | 269 ++++++++++++++++++++++ tests/bundles/focal-ussuri.yaml | 4 +- tests/bundles/focal-victoria.yaml | 4 +- tests/bundles/groovy-victoria.yaml | 4 +- tests/bundles/trusty-mitaka.yaml | 1 + tests/bundles/xenial-mitaka.yaml | 2 + tests/bundles/xenial-ocata.yaml | 1 + tests/bundles/xenial-pike.yaml | 1 + tests/bundles/xenial-queens.yaml | 4 +- tests/tests.yaml | 2 + 16 files changed, 305 insertions(+), 9 deletions(-) create mode 100644 tests/bundles/focal-ussuri-ec.yaml diff --git a/tests/bundles/bionic-queens.yaml b/tests/bundles/bionic-queens.yaml index 4f81e82f..614442e7 100644 --- a/tests/bundles/bionic-queens.yaml +++ b/tests/bundles/bionic-queens.yaml @@ -30,6 +30,8 @@ applications: nova-compute: charm: cs:~openstack-charmers-next/nova-compute num_units: 1 + options: + libvirt-image-backend: rbd glance: expose: True charm: cs:~openstack-charmers-next/glance @@ -48,7 +50,8 @@ applications: charm: cs:~openstack-charmers-next/nova-cloud-controller num_units: 1 prometheus2: - charm: cs:prometheus2 +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 num_units: 1 relations: - - nova-compute:amqp diff --git a/tests/bundles/bionic-rocky.yaml b/tests/bundles/bionic-rocky.yaml index 2154c6a3..dde594de 100644 --- a/tests/bundles/bionic-rocky.yaml +++ b/tests/bundles/bionic-rocky.yaml @@ -38,6 +38,7 @@ applications: charm: cs:~openstack-charmers-next/nova-compute num_units: 1 options: + libvirt-image-backend: rbd openstack-origin: cloud:bionic-rocky glance: expose: True @@ -62,7 +63,8 @@ applications: options: openstack-origin: cloud:bionic-rocky prometheus2: - charm: cs:prometheus2 +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 num_units: 1 relations: - - nova-compute:amqp diff --git a/tests/bundles/bionic-stein.yaml b/tests/bundles/bionic-stein.yaml index eeedbed3..92f889eb 100644 --- a/tests/bundles/bionic-stein.yaml +++ b/tests/bundles/bionic-stein.yaml @@ -38,6 +38,7 @@ applications: charm: cs:~openstack-charmers-next/nova-compute num_units: 1 options: + libvirt-image-backend: rbd openstack-origin: cloud:bionic-stein glance: expose: True @@ -62,7 +63,8 @@ applications: options: openstack-origin: cloud:bionic-stein prometheus2: - charm: cs:prometheus2 +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 num_units: 1 relations: - - nova-compute:amqp diff --git a/tests/bundles/bionic-train-with-fsid.yaml b/tests/bundles/bionic-train-with-fsid.yaml index 0624b45d..d41c63b3 100644 --- a/tests/bundles/bionic-train-with-fsid.yaml +++ b/tests/bundles/bionic-train-with-fsid.yaml @@ -39,6 +39,7 @@ applications: num_units: 1 options: openstack-origin: cloud:bionic-train/proposed + libvirt-image-backend: rbd glance: expose: True charm: cs:~openstack-charmers-next/glance diff --git a/tests/bundles/bionic-train.yaml b/tests/bundles/bionic-train.yaml index 2f4d65fb..4c24951a 100644 --- a/tests/bundles/bionic-train.yaml +++ b/tests/bundles/bionic-train.yaml @@ -38,6 +38,7 @@ applications: num_units: 1 options: openstack-origin: cloud:bionic-train + libvirt-image-backend: rbd glance: expose: True charm: cs:~openstack-charmers-next/glance @@ -66,7 +67,8 @@ applications: options: openstack-origin: cloud:bionic-train prometheus2: - charm: cs:prometheus2 +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 num_units: 1 relations: - - nova-compute:amqp diff --git a/tests/bundles/bionic-ussuri.yaml b/tests/bundles/bionic-ussuri.yaml index 086a077f..bbed4302 100644 --- a/tests/bundles/bionic-ussuri.yaml +++ b/tests/bundles/bionic-ussuri.yaml @@ -38,6 +38,7 @@ applications: num_units: 1 options: openstack-origin: cloud:bionic-ussuri + libvirt-image-backend: rbd glance: expose: True charm: cs:~openstack-charmers-next/glance @@ -66,7 +67,8 @@ applications: options: openstack-origin: cloud:bionic-ussuri prometheus2: - charm: cs:prometheus2 +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 num_units: 1 relations: - - nova-compute:amqp diff --git a/tests/bundles/focal-ussuri-ec.yaml b/tests/bundles/focal-ussuri-ec.yaml new file mode 100644 index 00000000..8cedf3b2 --- /dev/null +++ b/tests/bundles/focal-ussuri-ec.yaml @@ -0,0 +1,269 @@ +variables: + openstack-origin: &openstack-origin distro + +series: focal + +comment: +- 'machines section to decide order of deployment. database sooner = faster' +machines: + '0': + constraints: mem=3072M + '1': + constraints: mem=3072M + '2': + constraints: mem=3072M + '3': + '4': + '5': + '6': + '7': + '8': + '9': + '10': + '11': + '12': + '13': + '14': + '15': + '16': + '17': + '18': + '19': + '20': + +applications: + + keystone-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + glance-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + cinder-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + nova-cloud-controller-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + placement-mysql-router: + charm: cs:~openstack-charmers-next/mysql-router + + mysql-innodb-cluster: + charm: cs:~openstack-charmers-next/mysql-innodb-cluster + num_units: 3 + options: + source: *openstack-origin + to: + - '0' + - '1' + - '2' + + ceph-osd: + charm: cs:~openstack-charmers-next/ceph-osd + num_units: 6 + storage: + osd-devices: '10G' + options: + source: *openstack-origin + to: + - '3' + - '4' + - '5' + - '17' + - '18' + - '19' + + ceph-mon: + charm: cs:~openstack-charmers-next/ceph-mon + num_units: 3 + options: + source: *openstack-origin + monitor-count: '3' + to: + - '6' + - '7' + - '8' + + ceph-radosgw: + charm: cs:~openstack-charmers-next/ceph-radosgw + num_units: 1 + num_units: 1 + options: + source: *openstack-origin + pool-type: erasure-coded + ec-profile-k: 4 + ec-profile-m: 2 + to: + - '20' + + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + options: + source: *openstack-origin + to: + - '9' + + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '10' + + nova-compute: + charm: cs:~openstack-charmers-next/nova-compute + num_units: 1 + options: + openstack-origin: *openstack-origin + pool-type: erasure-coded + ec-profile-k: 4 + ec-profile-m: 2 + ec-profile-plugin: isa + libvirt-image-backend: rbd + to: + - '11' + + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: *openstack-origin + pool-type: erasure-coded + ec-profile-k: 4 + ec-profile-m: 2 + ec-profile-plugin: jerasure + to: + - '12' + + cinder: + expose: True + charm: cs:~openstack-charmers-next/cinder + num_units: 1 + options: + block-device: 'None' + glance-api-version: '2' + openstack-origin: *openstack-origin + to: + - '13' + + cinder-ceph: + charm: cs:~openstack-charmers-next/cinder-ceph + options: + pool-type: erasure-coded + ec-profile-k: 4 + ec-profile-m: 2 + ec-profile-plugin: lrc + ec-profile-locality: 3 + + nova-cloud-controller: + expose: True + charm: cs:~openstack-charmers-next/nova-cloud-controller + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '14' + + placement: + charm: cs:~openstack-charmers-next/placement + num_units: 1 + options: + openstack-origin: *openstack-origin + to: + - '15' + + prometheus2: +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 + num_units: 1 + to: + - '16' + +relations: + - - 'nova-compute:amqp' + - 'rabbitmq-server:amqp' + + - - 'nova-compute:image-service' + - 'glance:image-service' + + - - 'nova-compute:ceph' + - 'ceph-mon:client' + + - - 'nova-compute:ceph-access' + - 'cinder-ceph:ceph-access' + + - - 'keystone:shared-db' + - 'keystone-mysql-router:shared-db' + - - 'keystone-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'glance:shared-db' + - 'glance-mysql-router:shared-db' + - - 'glance-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'glance:identity-service' + - 'keystone:identity-service' + + - - 'glance:amqp' + - 'rabbitmq-server:amqp' + + - - 'glance:ceph' + - 'ceph-mon:client' + + - - 'cinder:shared-db' + - 'cinder-mysql-router:shared-db' + - - 'cinder-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'cinder:identity-service' + - 'keystone:identity-service' + + - - 'cinder:amqp' + - 'rabbitmq-server:amqp' + + - - 'cinder:image-service' + - 'glance:image-service' + + - - 'cinder-ceph:storage-backend' + - 'cinder:storage-backend' + + - - 'cinder-ceph:ceph' + - 'ceph-mon:client' + + - - 'ceph-osd:mon' + - 'ceph-mon:osd' + + - - 'nova-cloud-controller:shared-db' + - 'nova-cloud-controller-mysql-router:shared-db' + - - 'nova-cloud-controller-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'nova-cloud-controller:identity-service' + - 'keystone:identity-service' + + - - 'nova-cloud-controller:amqp' + - 'rabbitmq-server:amqp' + + - - 'nova-cloud-controller:cloud-compute' + - 'nova-compute:cloud-compute' + + - - 'nova-cloud-controller:image-service' + - 'glance:image-service' + + - - 'placement:shared-db' + - 'placement-mysql-router:shared-db' + - - 'placement-mysql-router:db-router' + - 'mysql-innodb-cluster:db-router' + + - - 'placement' + - 'keystone' + + - - 'placement' + - 'nova-cloud-controller' + + - - 'ceph-mon:prometheus' + - 'prometheus2:target' + + - - 'ceph-radosgw:mon' + - 'ceph-mon:radosgw' diff --git a/tests/bundles/focal-ussuri.yaml b/tests/bundles/focal-ussuri.yaml index 227060fd..533bee4a 100644 --- a/tests/bundles/focal-ussuri.yaml +++ b/tests/bundles/focal-ussuri.yaml @@ -97,6 +97,7 @@ applications: num_units: 1 options: openstack-origin: *openstack-origin + libvirt-image-backend: rbd to: - '11' @@ -141,7 +142,8 @@ applications: - '15' prometheus2: - charm: cs:prometheus2 +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 num_units: 1 to: - '16' diff --git a/tests/bundles/focal-victoria.yaml b/tests/bundles/focal-victoria.yaml index 49a7767d..1bfd8964 100644 --- a/tests/bundles/focal-victoria.yaml +++ b/tests/bundles/focal-victoria.yaml @@ -97,6 +97,7 @@ applications: num_units: 1 options: openstack-origin: *openstack-origin + libvirt-image-backend: rbd to: - '11' @@ -141,7 +142,8 @@ applications: - '15' prometheus2: - charm: cs:prometheus2 +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 num_units: 1 to: - '16' diff --git a/tests/bundles/groovy-victoria.yaml b/tests/bundles/groovy-victoria.yaml index cef3f244..49b42437 100644 --- a/tests/bundles/groovy-victoria.yaml +++ b/tests/bundles/groovy-victoria.yaml @@ -97,6 +97,7 @@ applications: num_units: 1 options: openstack-origin: *openstack-origin + libvirt-image-backend: rbd to: - '11' @@ -141,7 +142,8 @@ applications: - '15' prometheus2: - charm: cs:prometheus2 +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 num_units: 1 to: - '16' diff --git a/tests/bundles/trusty-mitaka.yaml b/tests/bundles/trusty-mitaka.yaml index c6ae9dc5..63db332e 100644 --- a/tests/bundles/trusty-mitaka.yaml +++ b/tests/bundles/trusty-mitaka.yaml @@ -59,6 +59,7 @@ applications: num_units: 1 options: openstack-origin: cloud:trusty-mitaka + libvirt-image-backend: rbd # workaround while awaiting release of next version of python-libjuju with # model-constraints support constraints: diff --git a/tests/bundles/xenial-mitaka.yaml b/tests/bundles/xenial-mitaka.yaml index 90409212..7cba4099 100644 --- a/tests/bundles/xenial-mitaka.yaml +++ b/tests/bundles/xenial-mitaka.yaml @@ -30,6 +30,8 @@ applications: nova-compute: charm: cs:~openstack-charmers-next/nova-compute num_units: 1 + options: + libvirt-image-backend: rbd glance: expose: True charm: cs:~openstack-charmers-next/glance diff --git a/tests/bundles/xenial-ocata.yaml b/tests/bundles/xenial-ocata.yaml index e4ad7e3c..c20d9e39 100644 --- a/tests/bundles/xenial-ocata.yaml +++ b/tests/bundles/xenial-ocata.yaml @@ -39,6 +39,7 @@ applications: num_units: 1 options: openstack-origin: cloud:xenial-ocata + libvirt-image-backend: rbd glance: expose: True charm: cs:~openstack-charmers-next/glance diff --git a/tests/bundles/xenial-pike.yaml b/tests/bundles/xenial-pike.yaml index 2c0e88e7..098691a8 100644 --- a/tests/bundles/xenial-pike.yaml +++ b/tests/bundles/xenial-pike.yaml @@ -39,6 +39,7 @@ applications: num_units: 1 options: openstack-origin: cloud:xenial-pike + libvirt-image-backend: rbd glance: expose: True charm: cs:~openstack-charmers-next/glance diff --git a/tests/bundles/xenial-queens.yaml b/tests/bundles/xenial-queens.yaml index 8e7f7ae1..9bfed07e 100644 --- a/tests/bundles/xenial-queens.yaml +++ b/tests/bundles/xenial-queens.yaml @@ -39,6 +39,7 @@ applications: num_units: 1 options: openstack-origin: cloud:xenial-queens + libvirt-image-backend: rbd glance: expose: True charm: cs:~openstack-charmers-next/glance @@ -62,7 +63,8 @@ applications: options: openstack-origin: cloud:xenial-queens prometheus2: - charm: cs:prometheus2 +# Pin prometheus2 charm version Bug #1891942 + charm: cs:prometheus2-18 num_units: 1 relations: - - nova-compute:amqp diff --git a/tests/tests.yaml b/tests/tests.yaml index 4bd8868e..b5b2fb45 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,5 +1,6 @@ charm_name: ceph-mon gate_bundles: + - focal-ussuri-ec - focal-ussuri - bionic-ussuri - bionic-train @@ -20,6 +21,7 @@ dev_bundles: configure: - zaza.openstack.charm_tests.glance.setup.add_lts_image tests: + - zaza.openstack.charm_tests.ceph.tests.CheckPoolTypes - zaza.openstack.charm_tests.ceph.tests.CephLowLevelTest - zaza.openstack.charm_tests.ceph.tests.CephRelationTest - zaza.openstack.charm_tests.ceph.tests.CephTest