@@ -73,16 +73,35 @@ openstack volume type show {{ $name }} || \
73
73
{{- /* Check volume type and properties were added * /}}
74
74
openstack volume type list --long
75
75
76
- # Set volumes quote to unlim for cinder service project to have a chance to create
77
- # volumes, images etc inside it.
78
76
SERVICE_DOMAIN_ID=$( openstack --os-cloud admin-system domain show {{ .Values.endpoints.identity.auth.cinder.project_domain_name }} -f value -c id)
79
77
SERVICE_PROJECT_ID=$( openstack --os-cloud admin-system project show {{ .Values.endpoints.identity.auth.cinder.project_name }} --domain ${SERVICE_DOMAIN_ID} -f value -c id)
80
78
79
+ INTERNAL_PROJECT_DOMAIN_ID=$( openstack --os-cloud admin-system domain show {{ .Values.conf.cinder.DEFAULT.internal_project_domain_name }} -f value -c id)
80
+ INTERNAL_PROJECT_ID=$( openstack --os-cloud admin-system project show {{ .Values.conf.cinder.DEFAULT.internal_project_name }} --domain ${INTERNAL_PROJECT_DOMAIN_ID} -f value -c id)
81
+
81
82
# NOTE(vsaienko): unless is fixed PRODX-23599 in Yogga release, command: openstack --os-cloud admin quota set --volumes -1 507d9f0509524609bff4c0159432739a doesn't work.
82
83
VOLUME_V3_ENDPOINT=$( openstack --os-cloud admin catalog show volumev3 | grep internal | awk ' {print $4}' )
83
84
if [[ -n $VOLUME_V3_ENDPOINT ]]; then
84
85
TOKEN=$( openstack token issue -f value -c id)
86
+ # Set volumes quote to unlim for cinder service project to have a chance to create
87
+ # volumes, images etc inside it.
85
88
curl -X PUT ${VOLUME_V3_ENDPOINT} /os-quota-sets/${SERVICE_PROJECT_ID} -H " Accept: application/json" -H " Content-Type: application/json" -H " X-Auth-Token: $TOKEN " -d ' {"quota_set": {"tenant_id": "' ${SERVICE_PROJECT_ID} ' ", "volumes": -1}}'
89
+ # Set cinder quotes for internal project
90
+ curl -X PUT ${VOLUME_V3_ENDPOINT} /os-quota-sets/${INTERNAL_PROJECT_ID} \
91
+ -H " Accept: application/json" \
92
+ -H " Content-Type: application/json" \
93
+ -H " X-Auth-Token: $TOKEN " \
94
+ -d ' {
95
+ "quota_set": {
96
+ "tenant_id": "' ${INTERNAL_PROJECT_ID} ' ",
97
+ "volumes": {{ .Values.bootstrap.quotas.Default.internal_cinder.volumes }},
98
+ "snapshots": {{ .Values.bootstrap.quotas.Default.internal_cinder.snapshots }},
99
+ "groups": {{ .Values.bootstrap.quotas.Default.internal_cinder.groups }},
100
+ "gigabytes": {{ .Values.bootstrap.quotas.Default.internal_cinder.gigabytes }},
101
+ "backups": {{ .Values.bootstrap.quotas.Default.internal_cinder.backups }},
102
+ "backup_gigabytes": {{ .Values.bootstrap.quotas.Default.internal_cinder.backup_gigabytes }}
103
+ }
104
+ }'
86
105
fi
87
106
88
107
{{- end }}
0 commit comments