Skip to content

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 [email protected]

@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 baude force-pushed the systemdslicedelegate branch from 25c651e to c0d66a3 Compare September 5, 2018 20:53
@baude
Copy link
Contributor Author

baude commented Sep 5, 2018

@crosbymichael is this what you had in mind ?

systemd.go Outdated
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 <[email protected]>
@baude baude force-pushed the systemdslicedelegate branch from c0d66a3 to 15ed73c Compare September 5, 2018 21:28
@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