Skip to content
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

Merged
merged 1 commit into from
Sep 5, 2018

Conversation

baude
Copy link
Contributor

@baude baude commented Sep 5, 2018

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

@codecov-io
Copy link

codecov-io commented Sep 5, 2018

Codecov Report

Merging #53 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
systemd.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3024bc7...15ed73c. Read the comment docs.

@mrunalp
Copy link

mrunalp commented Sep 5, 2018

@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
Copy link
Member

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 ?

@baude
Copy link
Contributor Author

baude commented Sep 5, 2018

@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
Copy link
Member

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

Copy link
Contributor Author

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>
@dmcgowan
Copy link
Member

dmcgowan commented Sep 5, 2018

LGTM

1 similar comment
@crosbymichael
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants