Skip to content

cgroups: provide UserConnection for non-linux platforms#1726

Merged
openshift-ci[bot] merged 1 commit intocontainers:mainfrom
giuseppe:fix-podman-freebsd
Nov 2, 2023
Merged

cgroups: provide UserConnection for non-linux platforms#1726
openshift-ci[bot] merged 1 commit intocontainers:mainfrom
giuseppe:fix-podman-freebsd

Conversation

@giuseppe
Copy link
Copy Markdown
Member

@giuseppe giuseppe commented Nov 2, 2023

No description provided.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@openshift-ci
Copy link
Copy Markdown
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

Details 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
Copy Markdown
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
Copy Markdown
Member

rhatdan commented Nov 2, 2023

LGTM

Copy link
Copy Markdown
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
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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?

"fmt"
"os"

systemdDbus "github.com/coreos/go-systemd/v22/dbus"
Copy link
Copy Markdown
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
Copy Markdown
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