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

cri/server: use containerd/oci instead of libcontainer/devices (remove libcontainer/devices dependency) #5324

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

thaJeztah
Copy link
Member

Looks like we had our own copy of the "getDevices" code already, so use
that code (which also matches the code that's used to generate the spec,
so a better match).

Moving the code to a separate file, I also noticed that the _unix and _linux
code was exactly the same (baring some //nolint: comments), so also
removing the duplicated code.

With this patch applied, we removed the dependency on the libcontainer/devices
package (leaving only libcontainer/user).

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 8, 2021

Build succeeded.

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah
Copy link
Member Author

thaJeztah commented Apr 8, 2021

Oh; let me make 1 minor change; errNotADevice is duplicated now, and only used in utils_unix.go, so let me move it there;

var errNotADevice = errors.New("not a device node")

var errNotADevice = errors.New("not a device node")

Looks like we had our own copy of the "getDevices" code already, so use
that code (which also matches the code that's used to _generate_ the spec,
so a better match).

Moving the code to a separate file, I also noticed that the _unix and _linux
code was _exactly_ the same (baring some `//nolint:` comments), so also
removing the duplicated code.

With this patch applied, we removed the dependency on the libcontainer/devices
package (leaving only libcontainer/user).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 8, 2021

Build succeeded.

Copy link
Member

@dims dims left a comment

Choose a reason for hiding this comment

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

LGTM

Any dependency reduction is a win!

@thaJeztah
Copy link
Member Author

and it's ✅ 🎉 (which is always nice to see!)

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

@dmcgowan dmcgowan merged commit 01a3926 into containerd:master Apr 8, 2021
@thaJeztah thaJeztah deleted the no_libcontainer_devices branch April 9, 2021 00:42
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.

None yet

4 participants