-
Notifications
You must be signed in to change notification settings - Fork 55
Delete NovaCell cr only when deletion job pass #917
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 |
---|---|---|
|
@@ -1113,6 +1113,8 @@ var _ = Describe("Nova multi cell deletion", func() { | |
g.Expect(k8sClient.Update(ctx, nova)).To(Succeed()) | ||
}, timeout, interval).Should(Succeed()) | ||
|
||
th.SimulateJobSuccess(cell2.CellDeleteJobName) | ||
th.SimulateJobSuccess(cell3.CellDeleteJobName) | ||
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. +1 |
||
Eventually(func(g Gomega) { | ||
nova := GetNova(novaNames.NovaName) | ||
g.Expect(nova.Status.RegisteredCells).To(HaveKey(cell2.CellCRName.Name)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,18 +178,28 @@ var _ = Describe("Nova reconfiguration", func() { | |
g.Expect(k8sClient.Update(ctx, nova)).To(Succeed()) | ||
}, timeout, interval).Should(Succeed()) | ||
|
||
Eventually(func(g Gomega) { | ||
nova := GetNova(novaNames.NovaName) | ||
g.Expect(nova.Status.RegisteredCells).NotTo(HaveKey(cell1.CellCRName.Name)) | ||
}, timeout, interval).Should(Succeed()) | ||
|
||
NovaCellNotExists(cell1.CellCRName) | ||
Eventually(func(g Gomega) { | ||
mappingJob := th.GetJob(cell1.CellDeleteJobName) | ||
newJobInputHash := GetEnvVarValue( | ||
mappingJob.Spec.Template.Spec.Containers[0].Env, "INPUT_HASH", "") | ||
g.Expect(newJobInputHash).NotTo(BeNil()) | ||
}, timeout, interval).Should(Succeed()) | ||
|
||
// Check that the cell status is not deleted | ||
Consistently(func(g Gomega) { | ||
nova := GetNova(novaNames.NovaName) | ||
g.Expect(nova.Status.RegisteredCells).To(HaveKey(cell1.CellCRName.Name)) | ||
auniyal61 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, timeout, interval).Should(Succeed()) | ||
mrkisaolamb marked this conversation as resolved.
Show resolved
Hide resolved
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. nit: you can put a GetNovaCell(cell1.CellCRName) into the Consistently block as well to show that NovaCell/cell1 is not deleted until the Job succeeds. 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. Thanks will fix with other patch touching statuses |
||
|
||
// Simulate the cell delete job success | ||
th.SimulateJobSuccess(cell1.CellDeleteJobName) | ||
mrkisaolamb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Eventually(func(g Gomega) { | ||
nova := GetNova(novaNames.NovaName) | ||
g.Expect(nova.Status.RegisteredCells).NotTo(HaveKey(cell1.CellCRName.Name)) | ||
}, timeout, interval).Should(Succeed()) | ||
|
||
NovaCellNotExists(cell1.CellCRName) | ||
|
||
th.AssertSecretDoesNotExist(cell1.InternalCellSecretName) | ||
|
||
Eventually(func(g Gomega) { | ||
|
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.
sure, though I do have this move added here with a test specific to sorting
https://github.com/openstack-k8s-operators/nova-operator/pull/940/files
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.
Yeah I did this like 5 day ago after rebase https://github.com/openstack-k8s-operators/nova-operator/compare/99a98e8e08ca4e49c4569aac778a58c423649c81..2b3cf8c0f7981a1d1d9418052411109164ef6b30 . This PR is going for quite long time so I didn't want to wait on any other pr
Uh oh!
There was an error while loading. Please reload this page.
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.
sure, as this may merge first, lets use this.