-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add support for NetBSD #18562
Add support for NetBSD #18562
Conversation
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.
Hi @darkgeek! Thanks for opening this PR. A few comments other than the remarks I've left inline:
- Does this need for
gopsutil
to cut a tag with Add some support for NetBSD shirou/gopsutil#1530, and then for Nomad to pick up that dependency bump in the go.mod? - Is this actually enough to run workloads? What task drivers are you using to verify this?
command/agent/host/netbsd.go
Outdated
//go:build netbsd | ||
// +build netbsd |
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.
It looks like we're missing this same function for other non-Linux/Darwin Unixes (which makes me wonder if any of the BSDs can build?). Should this be a unix
build tag instead of a netbsd
build tag?
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.
OK, I deleted darwin.go
, linux.go
, netbsd.go
, and moved the mountedPaths()
function to unix.go
with unix
build tag in this commit: 1c61ce3.
Then I tried on Linux
and NetBSD
, it built and ran well like before. Though my tests are quite limited.
Yes, my PR has been merged, and
It's enough to (and only can) run |
Ok, but in which case we should do that in this same PR. |
@darkgeek you've got some merge conflicts here you'll need to resolve. |
Currently, the `raw_exec` is the only usable driver.
878e280
to
b1cd0a9
Compare
Resolved by doing rebase on |
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!
I've tested this out on Linux and I've had one of my colleagues who's on macOS give this a spin just to make sure nothing got broken there. I've added a changelog entry as well. Once this is green in CI we'll merge it and it'll go out in the upcoming Nomad 1.7.0 release.
Thanks @darkgeek!
The |
Hi,
I want to add some code to make
Nomad
build and run onNetBSD
.In this PR,
allocdir/fs_netbsd.go
andhost/netbsd.go
are used forNetBSD
only, while the df part inhost/unix.go
is reworked, which might affect other Linux/Unix: instead of leveraging on the frozensyscall
package, whereStatfs
is not available onNetBSD
, it might be better to switch togopsutil
, which supports more platforms (currently it doesn't support NetBSD though, I have also sent a PR shirou/gopsutil#1530 to it).Can you check this PR to see if it's decent enough to be merged? Thanks.