@@ -39,7 +39,7 @@ import (
39
39
"k8s.io/utils/ptr"
40
40
)
41
41
42
- func CreateNovaWith3CellsAndEnsureReady (novaNames NovaNames ) {
42
+ func CreateNovaWith3CellsAndEnsureReady (novaNames * NovaNames ) {
43
43
cell0 := novaNames .Cells ["cell0" ]
44
44
cell1 := novaNames .Cells ["cell1" ]
45
45
cell2 := novaNames .Cells ["cell2" ]
@@ -107,7 +107,8 @@ func CreateNovaWith3CellsAndEnsureReady(novaNames NovaNames) {
107
107
spec ["apiMessageBusInstance" ] = cell0 .TransportURLName .Name
108
108
109
109
DeferCleanup (th .DeleteInstance , CreateNova (novaNames .NovaName , spec ))
110
- DeferCleanup (keystone .DeleteKeystoneAPI , keystone .CreateKeystoneAPI (novaNames .NovaName .Namespace ))
110
+ novaNames .KeystoneAPIName = keystone .CreateKeystoneAPI (novaNames .NovaName .Namespace )
111
+ DeferCleanup (keystone .DeleteKeystoneAPI , novaNames .KeystoneAPIName )
111
112
memcachedSpec := infra .GetDefaultMemcachedSpec ()
112
113
113
114
DeferCleanup (infra .DeleteMemcached , infra .CreateMemcached (novaNames .NovaName .Namespace , MemcachedInstance , memcachedSpec ))
@@ -166,7 +167,7 @@ var _ = Describe("Nova reconfiguration", func() {
166
167
// matchers
167
168
// format.MaxLength = 0
168
169
169
- CreateNovaWith3CellsAndEnsureReady (novaNames )
170
+ CreateNovaWith3CellsAndEnsureReady (& novaNames )
170
171
})
171
172
When ("cell1 is deleted" , func () {
172
173
It ("cell cr is deleted" , func () {
@@ -1178,4 +1179,52 @@ var _ = Describe("Nova reconfiguration", func() {
1178
1179
g .Expect (diff ).To (BeEmpty ())
1179
1180
}, timeout , interval ).Should (Succeed ())
1180
1181
})
1182
+
1183
+ It ("updates the KeystoneAuthURL of the sub components if keystone internal endpoint changes" , func () {
1184
+ newInternalEndpoint := "https://keystone-internal"
1185
+
1186
+ keystone .UpdateKeystoneAPIEndpoint (novaNames .KeystoneAPIName , "internal" , newInternalEndpoint )
1187
+ logger .Info ("Reconfigured" )
1188
+
1189
+ SimulateReadyOfNovaTopServices ()
1190
+ th .SimulateJobSuccess (cell0 .DBSyncJobName )
1191
+ th .SimulateJobSuccess (cell1 .DBSyncJobName )
1192
+ th .SimulateJobSuccess (cell2 .DBSyncJobName )
1193
+ th .SimulateStatefulSetReplicaReady (cell0 .ConductorStatefulSetName )
1194
+
1195
+ for _ , cell := range []types.NamespacedName {cell0 .ConductorName , cell1 .ConductorName , cell2 .ConductorName } {
1196
+ Eventually (func (g Gomega ) {
1197
+ cond := GetNovaConductor (cell )
1198
+ g .Expect (cond ).ToNot (BeNil ())
1199
+ g .Expect (cond .Spec .KeystoneAuthURL ).To (Equal (newInternalEndpoint ))
1200
+ }, timeout , interval ).Should (Succeed ())
1201
+ }
1202
+
1203
+ for _ , cell := range []types.NamespacedName {cell1 .NoVNCProxyName , cell2 .NoVNCProxyName } {
1204
+ Eventually (func (g Gomega ) {
1205
+ vnc := GetNovaNoVNCProxy (cell )
1206
+ g .Expect (vnc ).ToNot (BeNil ())
1207
+ g .Expect (vnc .Spec .KeystoneAuthURL ).To (Equal (newInternalEndpoint ))
1208
+ }, timeout , interval ).Should (Succeed ())
1209
+ }
1210
+
1211
+ Eventually (func (g Gomega ) {
1212
+ api := GetNovaAPI (novaNames .APIName )
1213
+ g .Expect (api ).ToNot (BeNil ())
1214
+ g .Expect (api .Spec .KeystoneAuthURL ).To (Equal (newInternalEndpoint ))
1215
+ }, timeout , interval ).Should (Succeed ())
1216
+
1217
+ Eventually (func (g Gomega ) {
1218
+ sch := GetNovaScheduler (novaNames .SchedulerName )
1219
+ g .Expect (sch ).ToNot (BeNil ())
1220
+ g .Expect (sch .Spec .KeystoneAuthURL ).To (Equal (newInternalEndpoint ))
1221
+ }, timeout , interval ).Should (Succeed ())
1222
+
1223
+ Eventually (func (g Gomega ) {
1224
+ metadata := GetNovaMetadata (novaNames .MetadataName )
1225
+ g .Expect (metadata ).ToNot (BeNil ())
1226
+ g .Expect (metadata .Spec .KeystoneAuthURL ).To (Equal (newInternalEndpoint ))
1227
+ }, timeout , interval ).Should (Succeed ())
1228
+ })
1229
+
1181
1230
})
0 commit comments