-
Notifications
You must be signed in to change notification settings - Fork 236
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
systemd-239+ no longer allows delegate slice #53
Conversation
Codecov Report
@@ Coverage Diff @@
## master #53 +/- ##
==========================================
- Coverage 13.32% 13.29% -0.03%
==========================================
Files 23 23
Lines 4518 4528 +10
==========================================
Hits 602 602
- Misses 3800 3810 +10
Partials 116 116
Continue to review full report at Codecov.
|
@crosbymichael ptal. |
systemd.go
Outdated
// We need to see if systemd can handle the delegate property | ||
// Systemd will return an error if it cannot handle delegate regardless | ||
// of its bool setting. | ||
canDelegate := true |
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.
can we move this to a sync.Once
?
25c651e
to
c0d66a3
Compare
@crosbymichael is this what you had in mind ? |
systemd.go
Outdated
@@ -78,17 +82,42 @@ func (s *SystemdController) Create(path string, resources *specs.LinuxResources) | |||
if err != nil { | |||
return err | |||
} | |||
var once sync.Once |
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.
This should be declared at the package level but otherwise, looks good
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.
Ok, fixed
Systemd no longer allows the setting of the Delegate property for cgroups. This patch is modeled after a runc commit 0e16bd9b53eb3c57ea6fe59fc6d9385c2edb9fd9 which corrects a similar situation for them. Signed-off-by: baude <bbaude@redhat.com>
c0d66a3
to
15ed73c
Compare
LGTM |
1 similar comment
LGTM |
Systemd no longer allows the setting of the Delegate property for
cgroups. This patch is modeled after a runc commit 0e16bd9b53eb3c57ea6fe59fc6d9385c2edb9fd9
which corrects a similar situation for them.
Signed-off-by: baude bbaude@redhat.com