-
Notifications
You must be signed in to change notification settings - Fork 150
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
fix: Omit cleaning containerless kernels which are still creating its container #2317
fix: Omit cleaning containerless kernels which are still creating its container #2317
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f0985d1
to
17b9bfa
Compare
bd7d1e4
to
25e70f3
Compare
552b746
to
59cbbc9
Compare
17b9bfa
to
dcca90e
Compare
c8c6916
to
a648eb3
Compare
@@ -233,6 +235,9 @@ def __getstate__(self) -> Mapping[str, Any]: | |||
return props | |||
|
|||
def __setstate__(self, props) -> None: | |||
# Used when a `Kernel` object is loaded from pickle data. | |||
if "state" not in props: | |||
props["state"] = KernelLifecycleStatus.RUNNING |
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.
When we shutdown and restart an agent to update its version, kernel_registry
is dumped as a pickle file and the agent loads the pickle file when it restarts. Old Kernel
objects that are dumped before the version update do not have state
field when we restart agent.
We need to insert the state
value to the old Kernel
objects.
… container (#2317) Co-authored-by: Kyujin Cho <[email protected]> Backported-from: main (24.09) Backported-to: 24.03 Backport-of: 2317
… container (#2317) (#2468) Co-authored-by: Sanghun Lee <[email protected]> Co-authored-by: Kyujin Cho <[email protected]>
When we create a kernel, agent registers the kernel to
kernel_registry
before creating an actual container.sync_container_lifecycles()
task scanskernel_registry
and deregister kernels that do not have an actual container.If the task scans at the moment before the container is created after the kernel is registered, the kernel being created gets removed, which is a malfunction.
Let's add
state
field toKernel
object so that the task can omit to clean kernels being created.Checklist: (if applicable)