-
Notifications
You must be signed in to change notification settings - Fork 240
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
NewSystemd must not ignore UnitExists #279
Comments
I'll take a look at this |
I assume that this is the block that you're talking about refactoring? In a nutshell, are you proposing the following:
I'll see if I can throw together a PR. Seems straightforward enough, if my understanding is correct... |
As done in this runc PR opencontainers/runc#3782, UnitExists errors are no longer ignored when starting units. If it already exists, we attempt to reset the failed unit and retry once. Otherwise, we fail. See containerd#279 for more context. Signed-off-by: Matt Merkes <[email protected]>
@mmerkes yes, your understanding is correct. The most straightforward fix would be to merely return a "unit already exists" error and when fix the callers who do not expect it. The slightly more elaborated one is to call reset-failed (which will remove the failed/non-running unit, if exists) and retry, like I did in runc/libcontainer/cgroups. |
This is the same issue as described in opencontainers/runc#3780
In short,
NewSystemd
ignoresUnitExists
error from systemd, as a result the PID is not added to the proper systemd unit and thus the cgroup.See the above issue for details as to how that may happen.
See the opencontainers/runc#3782 as to how this might be fixed.
The text was updated successfully, but these errors were encountered: