Skip to content
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

Bug 2002420: making sure stage labels are added to running pods only #1198

Merged
merged 2 commits into from Sep 9, 2021

Conversation

JaydipGabani
Copy link
Contributor

Skip adding stage labels to pods that are not in running state

@github-actions
Copy link

github-actions bot commented Sep 8, 2021

Valid bug 2002420

@djwhatle
Copy link
Contributor

djwhatle commented Sep 8, 2021

This fixed the test case mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=2002420 for me. ACK

@djwhatle
Copy link
Contributor

djwhatle commented Sep 8, 2021

@JaydipGabani if you have IBM ROKS clusters around, would be good to test the same TC on your end in case there is different PVC behavior there. Thinking about the scenario where a completed app Pod and running stage Pod both reference the same PVC.

@JaydipGabani JaydipGabani changed the title Bug 2002420: making sure stage labels are added to stage pods only Bug 2002420: making sure stage labels are added to running pods only Sep 8, 2021
if pod.Status.Phase != corev1.PodRunning {
continue
}
if pod.DeletionTimestamp == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the opposite of what we want? If it's deleted, we skip it. If it's not deleted, we annotate it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh! Good catch!!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch Scott.

@djwhatle
Copy link
Contributor

djwhatle commented Sep 8, 2021

Re-tested after recent change set, still works 👍

@JaydipGabani JaydipGabani merged commit 63f8c54 into migtools:master Sep 9, 2021
JaydipGabani added a commit to JaydipGabani/mig-controller that referenced this pull request Sep 9, 2021
…igtools#1198)

* making sure stage labels are added to stage pods only

* making sure stage labels are added to running pods only

(cherry picked from commit 63f8c54)
JaydipGabani added a commit that referenced this pull request Sep 9, 2021
…1198) (#1199)

* making sure stage labels are added to stage pods only

* making sure stage labels are added to running pods only

(cherry picked from commit 63f8c54)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants