Skip to content

Commit dc137f1

Browse files
Merge pull request #613 from fultonj/dz_storage_post_deploy_az
Update Glance configuration for dz-storage Update Nova on EDPM nodes for each rack to use a unique Glance URL per AZ by switching the standard nova-extra-config to a custom nova-extra-config-az for each AZ 0,1,2. Increase timeout for GlanceAPI and HAProxy since tempest tests had timeouts and add Glance enabled_import_methods. Update automation dz-storage.yaml to post_stage_run ci-framework playbook dz_storage_post_deploy_az.yaml which creates Cinder volume types for Glance and run playbook dz_storage_pre_test_images.yaml which creates images in multiple stores so that Tempest has what in needs in order to test Glance with distributed zones. Depends-On: openstack-k8s-operators/ci-framework#3250 Reviewed-by: Andrew Bays <[email protected]>
2 parents 033399d + f91b85b commit dc137f1

18 files changed

+207
-30
lines changed

automation/vars/dz-storage.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,16 @@ vas:
222222
src_file: values.yaml
223223
build_output: edpm-deployment.yaml
224224
post_stage_run:
225-
- name: Wait until computes are ready
225+
- name: "1 - Wait until computes are ready"
226226
type: playbook
227227
source: "../../playbooks/bgp-l3-computes-ready.yml"
228228
extra_vars:
229229
num_computes: 6
230+
- name: "2 - Setup Cinder volume types and Nova aggregates for dz-storage"
231+
type: playbook
232+
source: "../../hooks/playbooks/dz_storage_post_deploy_az.yaml"
233+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
234+
- name: "3 - Create and import cirros image to all Glance stores"
235+
type: playbook
236+
source: "../../hooks/playbooks/dz_storage_pre_test_images.yaml"
237+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"

examples/dt/dz-storage/control-plane/kustomization.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ kind: Kustomization
55
components:
66
- ../../../../dt/bgp/
77

8+
patches:
9+
# Override the base layer's glance apiOverrides with empty object
10+
- target:
11+
kind: OpenStackControlPlane
12+
name: controlplane
13+
patch: |-
14+
- op: replace
15+
path: /spec/glance/apiOverrides
16+
value: {}
17+
818
resources:
919
- networking/nncp/values.yaml
1020
- service-values.yaml
@@ -155,6 +165,19 @@ replacements:
155165
options:
156166
create: true
157167

168+
# Set glance apiTimeout for timeout configuration
169+
- source:
170+
kind: ConfigMap
171+
name: service-values
172+
fieldPath: data.glance.apiTimeout
173+
targets:
174+
- select:
175+
kind: OpenStackControlPlane
176+
fieldPaths:
177+
- spec.glance.template.apiTimeout
178+
options:
179+
create: true
180+
158181
# Set all four glanceAPIs (default, az{0,1,2})
159182
- source:
160183
kind: ConfigMap

examples/dt/dz-storage/control-plane/service-values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,15 @@ data:
107107
replicas: 0
108108
# Ensure keystoneEndpoint is set
109109
keystoneEndpoint: default
110+
# Set API timeout to 600 seconds (this controls both HAProxy and Apache timeouts)
111+
apiTimeout: 600
110112
# There are 4 glanceAPIs keys below (default, az{0,1,2})
111113
glanceAPIs:
112114
az0:
113115
customServiceConfig: |
114116
[DEFAULT]
115117
enabled_backends = az0:cinder
118+
enabled_import_methods = [web-download,copy-image,glance-direct]
116119
debug = true
117120
[glance_store]
118121
default_backend = az0
@@ -146,6 +149,7 @@ data:
146149
customServiceConfig: |
147150
[DEFAULT]
148151
enabled_backends = az0:cinder,az1:cinder
152+
enabled_import_methods = [web-download,copy-image,glance-direct]
149153
[glance_store]
150154
default_backend = az1
151155
[az1]
@@ -188,6 +192,7 @@ data:
188192
customServiceConfig: |
189193
[DEFAULT]
190194
enabled_backends = az0:cinder,az2:cinder
195+
enabled_import_methods = [web-download,copy-image,glance-direct]
191196
[glance_store]
192197
default_backend = az2
193198
[az2]
@@ -230,6 +235,7 @@ data:
230235
customServiceConfig: |
231236
[DEFAULT]
232237
enabled_backends = az0:cinder,az1:cinder,az2:cinder
238+
enabled_import_methods = [web-download,copy-image,glance-direct]
233239
[glance_store]
234240
default_backend = az0
235241
[az0]

examples/dt/dz-storage/data-plane.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,50 @@ vi values.yaml
4141

4242
## Storage Related Compute Node Overrides
4343

44-
Edit the following file to contain any desired override to the Nova configuration:
44+
Due to the distributed zones architecture, each availability zone requires its own Nova configuration to use the local Glance endpoint. Instead of using a single global `nova-extra-config`, we use **AZ-specific EDPM custom services**.
4545

46-
- [edpm/computes/nova-extra-config.yaml](edpm/computes/nova-extra-config.yaml)
46+
### AZ-specific ConfigMaps
4747

48-
The file is prepopulated with the following:
48+
Each AZ has its own Nova configuration file:
49+
50+
- [edpm/computes/r0/nova-extra-config-az0.yaml](edpm/computes/r0/nova-extra-config-az0.yaml) - points to `glance-az0-internal.openstack.svc:9292`
51+
- [edpm/computes/r1/nova-extra-config-az1.yaml](edpm/computes/r1/nova-extra-config-az1.yaml) - points to `glance-az1-internal.openstack.svc:9292`
52+
- [edpm/computes/r2/nova-extra-config-az2.yaml](edpm/computes/r2/nova-extra-config-az2.yaml) - points to `glance-az2-internal.openstack.svc:9292`
53+
54+
Each file contains:
4955
```ini
5056
[DEFAULT]
5157
# Triple the default of the following
5258
reimage_timeout_per_gb = 60
59+
[glance]
60+
endpoint_override = https://glance-azX-internal.openstack.svc:9292
61+
valid_interfaces = internal
62+
[cinder]
63+
cross_az_attach = False
64+
catalog_info = volumev3:cinderv3:internalURL
5365
```
54-
The configmap can be genereated with the following command.
55-
```
56-
kustomize build edpm/computes/
57-
```
5866

59-
As per [the docs](https://docs.redhat.com/en/documentation/red_hat_openstack_services_on_openshift/18.0/html-single/customizing_the_red_hat_openstack_services_on_openshift_deployment/index#proc_configuring-a-node-set-for-a-feature-or-workload_custom_dataplane),
67+
### EDPM Custom Services
68+
69+
Each AZ uses its own EDPM custom service that references the appropriate ConfigMap:
70+
71+
- [edpm/computes/r0/nova-custom-az0.yaml](edpm/computes/r0/nova-custom-az0.yaml)
72+
- [edpm/computes/r1/nova-custom-az1.yaml](edpm/computes/r1/nova-custom-az1.yaml)
73+
- [edpm/computes/r2/nova-custom-az2.yaml](edpm/computes/r2/nova-custom-az2.yaml)
74+
75+
### Deployment Process
76+
77+
The ConfigMaps and custom services are automatically included when generating the nodeset CRs from each rack's directory. Each r0, r1, r2 directory contains its own AZ-specific configurations and generates the complete CRs including ConfigMaps and custom services.
78+
79+
### Nodeset Configuration
80+
81+
Each compute nodeset references its AZ-specific custom service:
6082

61-
> The Compute service (nova) provides a default ConfigMap CR named nova-extra-config, where you can add generic configuration that applies to all the node sets that use the default nova service. If you use this default nova-extra-config ConfigMap to add generic configuration to be applied to all the node sets, then you do not need to create a custom service.
83+
- r0 nodesets use `nova-custom-az0` service
84+
- r1 nodesets use `nova-custom-az1` service
85+
- r2 nodesets use `nova-custom-az2` service
6286

63-
The EDPM `nova` service created in the next step will apply the above configuration to all Compute nodes.
87+
This ensures that Nova compute services in each AZ connect to their local Glance endpoints for optimal performance and proper distributed zones functionality.
6488

6589
## Create Networker and Compute Nodeset CRs
6690

examples/dt/dz-storage/edpm/computes/kustomization.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/dt/dz-storage/edpm/computes/nova-extra-config.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/dt/dz-storage/edpm/computes/r0/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ components:
99

1010
resources:
1111
- values.yaml
12+
- nova-extra-config-az0.yaml
13+
- nova-custom-az0.yaml
1214

1315
patches:
1416
- target:
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
apiVersion: dataplane.openstack.org/v1beta1
3+
kind: OpenStackDataPlaneService
4+
metadata:
5+
name: nova-custom-az0
6+
spec:
7+
addCertMounts: false
8+
caCerts: combined-ca-bundle
9+
edpmServiceType: nova
10+
playbook: osp.edpm.nova
11+
tlsCerts:
12+
default:
13+
contents:
14+
- dnsnames
15+
- ips
16+
edpmRoleServiceName: nova
17+
issuer: osp-rootca-issuer-internal
18+
networks:
19+
- ctlplane
20+
dataSources:
21+
- configMapRef:
22+
name: nova-extra-config-az0
23+
- secretRef:
24+
name: nova-migration-ssh-key
25+
- secretRef:
26+
name: nova-cell1-compute-config
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: nova-extra-config-az0
6+
data:
7+
25-nova-extra.conf: |
8+
[DEFAULT]
9+
# Triple the default of the following
10+
reimage_timeout_per_gb = 60
11+
[glance]
12+
endpoint_override = https://glance-az0-internal.openstack.svc:9292
13+
valid_interfaces = internal
14+
[cinder]
15+
cross_az_attach = False
16+
catalog_info = volumev3:cinderv3:internalURL

examples/dt/dz-storage/edpm/computes/r0/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ data:
203203
- neutron-metadata
204204
- ovn-bgp-agent
205205
- libvirt
206-
- nova
206+
- nova-custom-az0
207207
nova:
208208
migration:
209209
ssh_keys:

0 commit comments

Comments
 (0)