-
Notifications
You must be signed in to change notification settings - Fork 61
Propagate rabbitmq users to nova-cellX secret #1066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1063,12 +1063,15 @@ func CreateNovaWithNCellsAndEnsureReady(cellNumber int, novaNames *NovaNames) { | |
| DeferCleanup(keystone.DeleteKeystoneAPI, novaNames.KeystoneAPIName) | ||
|
|
||
| // Set region on KeystoneAPI to ensure GetRegion() returns a value | ||
| keystoneAPI := keystone.GetKeystoneAPI(novaNames.KeystoneAPIName) | ||
| keystoneAPI.Spec.Region = "regionOne" | ||
| Expect(k8sClient.Update(ctx, keystoneAPI)).To(Succeed()) | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we might want to keep this in an Eventually bock.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with that said i think this commit shoudl have been in a different pr im happ to approve the priror commit but i think we had the ocnte in the eventually block becuase of ci issue in thepast with stablity on slow nodes so im concervitive with this type of refactor without review form others |
||
| // Update status separately after spec is applied | ||
| Eventually(func(g Gomega) { | ||
| keystoneAPI := keystone.GetKeystoneAPI(novaNames.KeystoneAPIName) | ||
| keystoneAPI.Spec.Region = "regionOne" | ||
| g.Expect(k8sClient.Update(ctx, keystoneAPI)).To(Succeed()) | ||
| keystoneAPI.Status.Region = "regionOne" | ||
| g.Expect(k8sClient.Status().Update(ctx, keystoneAPI)).To(Succeed()) | ||
| ks := keystone.GetKeystoneAPI(novaNames.KeystoneAPIName) | ||
| ks.Status.Region = "regionOne" | ||
| g.Expect(k8sClient.Status().Update(ctx, ks)).To(Succeed()) | ||
| }, timeout, interval).Should(Succeed()) | ||
|
|
||
| memcachedSpec := infra.GetDefaultMemcachedSpec() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -307,51 +307,54 @@ endpoint_service_type = compute`)) | |
| ) | ||
|
|
||
| // Wait for config to be regenerated with region | ||
| var configData string | ||
| Eventually(func(g Gomega) { | ||
| configDataMap := th.GetSecret(novaNames.APIConfigDataName) | ||
| g.Expect(configDataMap).ShouldNot(BeNil()) | ||
| g.Expect(configDataMap.Data).Should(HaveKey("01-nova.conf")) | ||
| configData := string(configDataMap.Data["01-nova.conf"]) | ||
|
|
||
| // Parse the INI file to properly access sections | ||
| cfg, err := ini.Load([]byte(configData)) | ||
| g.Expect(err).ShouldNot(HaveOccurred(), "Should be able to parse config as INI") | ||
|
|
||
| // Verify region_name in [keystone_authtoken] | ||
| section := cfg.Section("keystone_authtoken") | ||
| g.Expect(section).ShouldNot(BeNil(), "Should find [keystone_authtoken] section") | ||
| g.Expect(section.Key("region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify region_name in [placement] | ||
| section = cfg.Section("placement") | ||
| g.Expect(section).ShouldNot(BeNil(), "Should find [placement] section") | ||
| g.Expect(section.Key("region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify region_name in [glance] | ||
| section = cfg.Section("glance") | ||
| g.Expect(section).ShouldNot(BeNil(), "Should find [glance] section") | ||
| g.Expect(section.Key("region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify region_name in [neutron] | ||
| section = cfg.Section("neutron") | ||
| g.Expect(section).ShouldNot(BeNil(), "Should find [neutron] section") | ||
| g.Expect(section.Key("region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify os_region_name in [cinder] | ||
| section = cfg.Section("cinder") | ||
| g.Expect(section).ShouldNot(BeNil(), "Should find [cinder] section") | ||
| g.Expect(section.Key("os_region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify barbican_region_name in [barbican] | ||
| section = cfg.Section("barbican") | ||
| g.Expect(section).ShouldNot(BeNil(), "Should find [barbican] section") | ||
| g.Expect(section.Key("barbican_region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify endpoint_region_name in [oslo_limit] | ||
| section = cfg.Section("oslo_limit") | ||
| g.Expect(section).ShouldNot(BeNil(), "Should find [oslo_limit] section") | ||
| g.Expect(section.Key("endpoint_region_name").String()).Should(Equal(testRegion)) | ||
| configData = string(configDataMap.Data["01-nova.conf"]) | ||
| // Quick check that config contains the expected region before parsing | ||
| g.Expect(configData).To(ContainSubstring(testRegion)) | ||
| }, timeout, interval).Should(Succeed()) | ||
|
|
||
| // Parse the INI file once after Eventually succeeds (avoids repeated parsing) | ||
| cfg, err := ini.Load([]byte(configData)) | ||
| Expect(err).ShouldNot(HaveOccurred(), "Should be able to parse config as INI") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this might bite us in the futre since the nova.conf is not an ini file its in oslo config format which is a superset fo ini format but htis is a prexisign test so its fine. just noting tha twe cant assume its ini formce as its technially not even if they default config we generate is only useing the base feature of ini |
||
|
|
||
| // Verify region_name in [keystone_authtoken] | ||
| section := cfg.Section("keystone_authtoken") | ||
| Expect(section).ShouldNot(BeNil(), "Should find [keystone_authtoken] section") | ||
| Expect(section.Key("region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify region_name in [placement] | ||
| section = cfg.Section("placement") | ||
| Expect(section).ShouldNot(BeNil(), "Should find [placement] section") | ||
| Expect(section.Key("region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify region_name in [glance] | ||
| section = cfg.Section("glance") | ||
| Expect(section).ShouldNot(BeNil(), "Should find [glance] section") | ||
| Expect(section.Key("region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify region_name in [neutron] | ||
| section = cfg.Section("neutron") | ||
| Expect(section).ShouldNot(BeNil(), "Should find [neutron] section") | ||
| Expect(section.Key("region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify os_region_name in [cinder] | ||
| section = cfg.Section("cinder") | ||
| Expect(section).ShouldNot(BeNil(), "Should find [cinder] section") | ||
| Expect(section.Key("os_region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify barbican_region_name in [barbican] | ||
| section = cfg.Section("barbican") | ||
| Expect(section).ShouldNot(BeNil(), "Should find [barbican] section") | ||
| Expect(section.Key("barbican_region_name").String()).Should(Equal(testRegion)) | ||
|
|
||
| // Verify endpoint_region_name in [oslo_limit] | ||
| section = cfg.Section("oslo_limit") | ||
| Expect(section).ShouldNot(BeNil(), "Should find [oslo_limit] section") | ||
| Expect(section.Key("endpoint_region_name").String()).Should(Equal(testRegion)) | ||
| }) | ||
|
|
||
| It("stored the input hash in the Status", func() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without this PR
with this PR - adds rabbitmq_user_name and notification_rabbitmq_user_name