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

FreeBSD Support #26

Closed
rosstimson opened this issue Nov 18, 2015 · 10 comments
Closed

FreeBSD Support #26

rosstimson opened this issue Nov 18, 2015 · 10 comments
Labels
enhancement help wanted stale Used by https://probot.github.io/apps/stale/

Comments

@rosstimson
Copy link

Goss looks awesome. It would be great to get FreeBSD support.

@aelsabbahy
Copy link
Member

I'll gladly accept pull requests on something like this, but don't currently have the free time to undertake this task.

@jeremypruitt
Copy link

I think I'll dive into this as we need to test FreeBSD hosts and I don't want to fragment our internal toolspace to accomplish that. I don't know what I am getting into as I haven't looked at the Goss code much. How tied to Linux is this? Did you try to write in a way that other OS could be added later or has it been mostly a Linux focused effort with no real concern about future OS?

I think my first goal is just to get the command resource and reporting features to work. That might end up being all I really need.

@aelsabbahy
Copy link
Member

How tied to Linux is this?

Goss was definitely written with only linux in mind. Ports uses /proc, package managers and services have been implemented on a per-distro basis. It's been a very long time since I used freebsd, so I'm sure there's gotchas, just not sure how many.

Did you try to write in a way that other OS could be added later or has it been mostly a Linux focused effort with no real concern about future OS?

The later.

I'm very curious on your findings once you try to get this working. I would first see if it compiles for freebsd as-is, and try a goss file with just command resource defined. Most resources are lazy loaded from the system, so it might just work for that limited use case (if it compiles that is..).

@jeremypruitt
Copy link

I had to mess with the Makefile a bit, and I definitely don't have test coverage or anything like that, but basically the first build just worked as you suggested it might. It ran the command resource just fine, both in passing an failing conditions. This is FreeBSD 10.3-RELEASE-p11 amd64, btw. Clearly work to be done on the coverage and such, but so happy to see "it just works."

@jeremypruitt
Copy link

jeremypruitt commented Dec 9, 2016

I just tried a number of the resources and this is what my initial efforts suggest goss can do on FreeBSD 10 in its current state.

Resources that can be validated on FreeBSD 10:

  • command
  • dns
  • goss
  • group
  • http
  • process
  • user

Resources that can be partially validated on FreeBSD 10:

  • file: specifically the owner and group fields don’t seem to work. The mode, size, filetype, and contains all work well.

Resources that do not validate at all on FreeBSD 10:

  • kernel-param: This makes sense as most likely tied to Linux kernel params.
  • mount? Seems like this one should work as it uses docker/pkg/mount which has FreeBSD support. But it couldn’t find any local mounts on this FreeBSD 10 VM I am using. Needs further testing and investigation.
  • package: This makes sense as each package management system is different, even on Linux.
  • port: All the golang netstat libs seem to read /proc, including the one goss uses.
  • service: This makes sense as service management systems vary widely.

Also, as a bonus, I tried the goss “serve” command and that also worked. :)

@aelsabbahy
Copy link
Member

Wow, that's a lot more than I expected, awesome!

  • Package and service should be simple fixes, since they rely on external commands.
  • Surprised about file

Wonder if mount just needs to be bumped to a newer version from docker.

@jeremypruitt
Copy link

Ya, what you say about package/service makes sense

I was surprised about the owner/group part of the file resource. I can do a little more investigation on that. The file and mount resource issues make me wonder if it is just some kind of operator error :).

Also, the Makefile has steps like lint and test that shouldn't require much (any?) change, but what about steps like all?

Lastly, the integration tests are specific to Docker, which is fantastic, but I don't think that will work for FreeBSD testing. Any thoughts on this? Modify the current test.sh? Make a new test-freebsd.sh?

This was referenced Feb 15, 2017
@englishm-llnw
Copy link

I've submitted sysutils/goss as a new FreeBSD port with a caveat regarding the limited functionality linking to this issue.

[ports]/head/sysutils/goss/pkg-message @r446527:

WARNING: goss is not yet fully functional on FreeBSD.
See https://github.com/aelsabbahy/goss/issues/26 for details.

freeseacher pushed a commit to nocproject/ansible_deploy that referenced this issue May 19, 2018
Have to be added back if or even when goss-org/goss#26
@freeseacher
Copy link

freeseacher commented May 28, 2018

does patches for freebsd are eligible?

@stale
Copy link

stale bot commented Jul 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Used by https://probot.github.io/apps/stale/ label Jul 9, 2020
@stale stale bot closed this as completed Jul 16, 2020
freeseacher pushed a commit to nocproject/noc that referenced this issue Oct 22, 2020
Have to be added back if or even when goss-org/goss#26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted stale Used by https://probot.github.io/apps/stale/
Projects
None yet
Development

No branches or pull requests

5 participants