Skip to content

Update label to identify number of pods #648

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

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/controller/queuejob/queuejob_controller_ex.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func GetQueueJobKey(obj interface{}) (string, error) {
// UpdateQueueJobStatus was part of pod informer, this is now a method of queuejob_controller file.
// This change is done in an effort to simplify the controller and enable to move to controller runtime.
func (qjm *XController) UpdateQueueJobStatus(queuejob *arbv1.AppWrapper) error {
labelSelector := fmt.Sprintf("%s=%s", "appwrapper.mcad.ibm.com", queuejob.Name)
labelSelector := fmt.Sprintf("%s=%s", "ray.io/cluster", queuejob.Name)
Copy link
Contributor

@sutaakar sutaakar Sep 25, 2023

Choose a reason for hiding this comment

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

This looks suspicious.
Why would MCAD label pod using Ray label?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. @ChristianZaccaria this probably works for your particular use case, but that mechanism must be generic, for whatever resources managed by the AppWrapper. So the root cause is likely a missing update of these managed resources, so they are labeled with appwrapper.mcad.ibm.com.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that makes sense now. The managed resources are not updating their labels to use appwrapper.mcad.ibm.com. So, are we speaking about a bug issue, or is this something just happening on my end? (I suppose in any case, we could probably close this issue). Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

It's very possible it's a bug. One possibility is that controller owning the resource / generic item overwrites the label applied by MCAD.

pods, errt := qjm.clients.CoreV1().Pods("").List(context.TODO(), metav1.ListOptions{LabelSelector: labelSelector})
if errt != nil {
return errt
Expand Down