Skip to content

Comments

Adding file path for nerdctl and finch#87

Merged
jeffwidman merged 1 commit intovishvananda:masterfrom
Shubhranshu153:master
Aug 13, 2024
Merged

Adding file path for nerdctl and finch#87
jeffwidman merged 1 commit intovishvananda:masterfrom
Shubhranshu153:master

Conversation

@Shubhranshu153
Copy link
Contributor

Adding the paths for pidfile for enabling usage with nerdctl and finch.

@Shubhranshu153
Copy link
Contributor Author

Also wanted to check a couple of things

  1. want to update the go version as the one here is old.
  2. Any plans for releasing a stable 1.0 version?

Copy link
Collaborator

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

it seems fine to me to add nerdctl/finch, but I'm curious... can you please explain your use case?

Re: your other questions--they're good/valid questions, but should be discussed as distinct issues with dedicated threads, not as a distraction from the code change in this PR.

Thanks!

go.mod Outdated
module github.com/vishvananda/netns

go 1.17
go 1.22
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should go in a separate PR as it's orthogonal to the primary intent of the PR. Also, please don't bump the go version... it means different things in the context of a library than it does in your app.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack will remove this

@Shubhranshu153
Copy link
Contributor Author

it seems fine to me to add nerdctl/finch, but I'm curious... can you please explain your use case?

Re: your other questions--they're good/valid questions, but should be discussed as distinct issues with dedicated threads, not as a distraction from the code change in this PR.

Thanks!

nerdctl uses this package for netns, for finch one of our customer requested it for their systems which uses nerdctl to create a container and have a custom network namespace the container connects to.

Signed-off-by: Shubharanshu Mahapatra <[email protected]>
@Shubhranshu153
Copy link
Contributor Author

moved the other questions to issues.

Copy link
Collaborator

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

Thanks!

@jeffwidman
Copy link
Collaborator

LGTM... longterm it seems weird to have hardcoded paths in here rather than an interface that the user can override a set of defaults, but for now it's fine I think... it's not like this list is growing exponentially!

@jeffwidman jeffwidman merged commit 4c46424 into vishvananda:master Aug 13, 2024
@Shubhranshu153
Copy link
Contributor Author

@jeffwidman Will it be possible to release a 0.5.0 for this commit, tagging it to a version seems easier to pull and use.
Not sure the steps here for a release.

@jeffwidman
Copy link
Collaborator

// Support for nerdctl
filepath.Join(cgroupRoot, "system.slice", "nerdctl-"+id+".scope", pidFile),
// Support for finch
filepath.Join(cgroupRoot, "..", "systemd", "finch", id, pidFile),

Choose a reason for hiding this comment

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

Does finch still use cgroup v1?

Copy link
Contributor Author

@Shubhranshu153 Shubhranshu153 Feb 13, 2025

Choose a reason for hiding this comment

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

@AkihiroSuda
AL2 machines are using cgroupfs, their cgroup is set to cgroup v1.

dev-dsk-shubhum-2b-5b633f8c % sudo nerdctl info                      
Client:
 Namespace:     default
 Debug Mode:    false

Server:
 Server Version: 1.7.25
 Storage Driver: overlayfs
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Log:     fluentd journald json-file none syslog
  Storage: native overlayfs soci
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version:   5.10.233-203.887.amzn2int.x86_64
 Operating System: Amazon Linux 2
 OSType:           linux
 Architecture:     x86_64
 CPUs:             8
 Total Memory:     15.26GiB
 Name:             dev-dsk-shubhum-2b-5b633f8c.us-west-2.amazon.com
 ID:               c9a0db03-7d44-421e-b75a-14eef9237a23

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.

3 participants