-
Notifications
You must be signed in to change notification settings - Fork 198
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
cgroups: provide UserConnection for non-linux platforms #1726
Conversation
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@rhatdan ready to ship: containers/podman#20568 passes |
LGTM |
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.
/lgtm
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.
Oh well, day late dollar short.
|
||
// UserConnection returns an user connection to D-BUS | ||
func UserConnection(uid int) (*systemdDbus.Conn, error) { | ||
return nil, fmt.Errorf("systemd d-bus is not supported on this platform") |
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.
Errorf()
could probably just be Error()
?
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.
Shouldn't the linter have blocked this?
"os" | ||
|
||
systemdDbus "github.com/coreos/go-systemd/v22/dbus" |
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.
Does this library compile on non-linux? Is there a way to fake the prototype so it isn't necessary to pull in this package?
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.
that is a good idea, I'll look into it. For now I've just tried to fix some of the issues I've introduced with #1716 that prevented revendoring into Podman: containers/podman#20568
There is still room for cleanups in the cgroups package.
No description provided.