@@ -39,7 +39,7 @@ import (
3939 "k8s.io/utils/ptr"
4040)
4141
42- func CreateNovaWith3CellsAndEnsureReady (novaNames NovaNames ) {
42+ func CreateNovaWith3CellsAndEnsureReady (novaNames * NovaNames ) {
4343 cell0 := novaNames .Cells ["cell0" ]
4444 cell1 := novaNames .Cells ["cell1" ]
4545 cell2 := novaNames .Cells ["cell2" ]
@@ -107,7 +107,8 @@ func CreateNovaWith3CellsAndEnsureReady(novaNames NovaNames) {
107107 spec ["apiMessageBusInstance" ] = cell0 .TransportURLName .Name
108108
109109 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 )
111112 memcachedSpec := infra .GetDefaultMemcachedSpec ()
112113
113114 DeferCleanup (infra .DeleteMemcached , infra .CreateMemcached (novaNames .NovaName .Namespace , MemcachedInstance , memcachedSpec ))
@@ -166,7 +167,7 @@ var _ = Describe("Nova reconfiguration", func() {
166167 // matchers
167168 // format.MaxLength = 0
168169
169- CreateNovaWith3CellsAndEnsureReady (novaNames )
170+ CreateNovaWith3CellsAndEnsureReady (& novaNames )
170171 })
171172 When ("cell1 is deleted" , func () {
172173 It ("cell cr is deleted" , func () {
@@ -1178,4 +1179,52 @@ var _ = Describe("Nova reconfiguration", func() {
11781179 g .Expect (diff ).To (BeEmpty ())
11791180 }, timeout , interval ).Should (Succeed ())
11801181 })
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+
11811230})
0 commit comments