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

cgroups: provide UserConnection for non-linux platforms #1726

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Nov 2, 2023

No description provided.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Copy link
Contributor

openshift-ci bot commented Nov 2, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Nov 2, 2023
@giuseppe
Copy link
Member Author

giuseppe commented Nov 2, 2023

@rhatdan ready to ship: containers/podman#20568 passes

@giuseppe giuseppe marked this pull request as ready for review November 2, 2023 16:42
@rhatdan
Copy link
Member

rhatdan commented Nov 2, 2023

LGTM

Copy link
Member

@ashley-cui ashley-cui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 2, 2023
@openshift-ci openshift-ci bot merged commit 6a67921 into containers:main Nov 2, 2023
7 checks passed
Copy link
Member

@edsantiago edsantiago left a 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")
Copy link
Member

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()?

Copy link
Member

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

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?

Copy link
Member Author

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.

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

Successfully merging this pull request may close these issues.

4 participants