Skip to content

Conversation

@Mees-Molenaar
Copy link

@Mees-Molenaar Mees-Molenaar commented Jan 2, 2026

Feature or Problem

When redeploying a Workload, before the previous Workload is resolved, this Workload will not be removed from the host. So the Workload will exist forever.

When the Kubernetes operator sends a WorkloadStart request to a Host, it will only get a Workload ID assigned when the workload_start command is completely finished. Therefore, when you stop a Workload by redeploying, it will send a WorkloadStop request without an ID, because it does not have a Workload ID assigned yet.

In this PR, I decided that we keep the Scheduler's (In this case the runtime-operator) UID. This way, the scheduler always knows which Workload is started and it always can be stopped by calling WorkloadStop request with that ID.

Another way of solving this, would be to wait in the Workloads finalizer for a Workload ID, or if the Workload deployment Errored for some reason. However, I preferred the implemented solution over this.

Release Information

next

Consumer Impact

When restarting the host without the correct runtime-operator, it will set empty workload_ids in for example the workload_to_host maps for http routing. Thus, the host should and runtime-operators should match.

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

  1. Deploy a workload
  2. Check with logs that the new workload that is being made uses the same ID as the Kubernetes Workload UID.

@Mees-Molenaar Mees-Molenaar force-pushed the feat/make_workload_id_set_by_scheduler branch 2 times, most recently from 2cb07bf to 8e726c5 Compare January 2, 2026 13:42
This prevents issues where the workload is not fully started, but a stop workload is called. Then the stop workload is called without an ID, and once the workload is fully started it wont be stopped. Therefore, it will run forever, which causes problems when you want to call a workload with a certain host. It might resolve to an old workload, which it shouldnt. Now it will always get removed successfully

Also has some cleanups in log statements

Signed-off-by: Mees Molenaar <[email protected]>
@Mees-Molenaar Mees-Molenaar force-pushed the feat/make_workload_id_set_by_scheduler branch from 8e726c5 to 00b61da Compare January 2, 2026 13:51
@Mees-Molenaar Mees-Molenaar marked this pull request as ready for review January 2, 2026 14:24
@Mees-Molenaar Mees-Molenaar requested a review from a team as a code owner January 2, 2026 14:24
@lxfontes lxfontes moved this to Todo in wash v2 release Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant