diff --git a/docs_user/modules/openstack-glance_adoption.adoc b/docs_user/modules/openstack-glance_adoption.adoc index b8c4fa14e..6659f6385 100644 --- a/docs_user/modules/openstack-glance_adoption.adoc +++ b/docs_user/modules/openstack-glance_adoption.adoc @@ -95,7 +95,7 @@ spec: spec: type: LoadBalancer networkAttachments: - - storage + - storage ---- Having `Swift` as a backend establishes a dependency between the two services, diff --git a/tests/roles/cinder_adoption/tasks/main.yaml b/tests/roles/cinder_adoption/tasks/main.yaml index 6cb0b2d8c..2c101bf60 100644 --- a/tests/roles/cinder_adoption/tasks/main.yaml +++ b/tests/roles/cinder_adoption/tasks/main.yaml @@ -35,11 +35,11 @@ ' - name: Deploy cinder-volume if necessary - when: cinder_volume_backend != '' + when: cinder_volume_backend | default('') != '' ansible.builtin.include_tasks: volume_backend.yaml - name: Deploy cinder-backup if necessary - when: cinder_backup_backend != '' + when: cinder_backup_backend | default('') != '' ansible.builtin.include_tasks: backup_backend.yaml - name: wait for Cinder pods to start up @@ -58,7 +58,7 @@ # Give time for volume and backup services to initialize drivers, otherwise they # always looks ok (up) because that's the default at the start. - name: Pause to allow backend drivers to start - when: cinder_volume_backend != '' or cinder_backup_backend != '' + when: cinder_volume_backend | default('') != '' or cinder_backup_backend | default('') != '' ansible.builtin.pause: seconds: 90 diff --git a/tests/roles/glance_adoption/files/glance_swift.yaml b/tests/roles/glance_adoption/files/glance_swift.yaml new file mode 100644 index 000000000..0a33a889a --- /dev/null +++ b/tests/roles/glance_adoption/files/glance_swift.yaml @@ -0,0 +1,37 @@ +spec: + glance: + enabled: true + apiOverrides: + default: + route: {} + template: + databaseInstance: openstack + storageClass: "local-storage" + storageRequest: 10G + customServiceConfig: | + [DEFAULT] + enabled_backends = default_backend:swift + [glance_store] + default_backend = default_backend + [default_backend] + swift_store_create_container_on_put = True + swift_store_auth_version = 3 + swift_store_auth_address = {{ .KeystoneInternalURL }} + swift_store_endpoint_type = internalURL + swift_store_user = service:glance + swift_store_key = {{ .ServicePassword }} + glanceAPIs: + default: + replicas: 1 + override: + service: + internal: + metadata: + annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + spec: + type: LoadBalancer + networkAttachments: + - storage diff --git a/tests/roles/glance_adoption/tasks/main.yaml b/tests/roles/glance_adoption/tasks/main.yaml index baccc3725..40a4163bd 100644 --- a/tests/roles/glance_adoption/tasks/main.yaml +++ b/tests/roles/glance_adoption/tasks/main.yaml @@ -16,42 +16,7 @@ ansible.builtin.shell: | {{ shell_header }} {{ oc_header }} - oc patch openstackcontrolplane openstack --type=merge --patch ' - spec: - glance: - enabled: true - template: - databaseInstance: openstack - customServiceConfig: | - [DEFAULT] - enabled_backends = default_backend:swift - [glance_store] - default_backend = default_backend - [default_backend] - swift_store_create_container_on_put = True - swift_store_auth_version = 3 - swift_store_auth_address = {{ .KeystoneInternalURL }} - swift_store_endpoint_type = internalURL - swift_store_user = service:glance - swift_store_key = {{ .ServicePassword }} - storageClass: "local-storage" - storageRequest: 10G - glanceAPIs: - default: - replicas: 1 - override: - service: - internal: - metadata: - annotations: - metallb.universe.tf/address-pool: internalapi - metallb.universe.tf/allow-shared-ip: internalapi - metallb.universe.tf/loadBalancerIPs: 172.17.0.80 - spec: - type: LoadBalancer - networkAttachments: - - storage - ' + oc patch openstackcontrolplane openstack --type=merge --patch-file={{ role_path }}/files/glance_swift.yaml when: glance_backend == 'swift' - name: Check the adopted GlanceAPI