8000 FreeBSD jail fixes by biancalana · Pull Request #1019 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

FreeBSD jail fixes #1019

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

Closed
wants to merge 3 commits into from
Closed

Conversation

biancalana
Copy link
Contributor

Currently the process and swap plugins does not work inside Jail on FreeBSD, this patch fixes that.

@mfournier
Copy link

Thanks a lot @biancalana !

I'm not too familiar with this, can you comment on the implications of changing the 2nd parameter to /dev/null on non-jailed instances of collectd ? Are you sure all the subsequent uses of the kvm descriptor don't do anything which requires access to the kernel memory ?

Also, I noticed the tcpconns plugin invokes kvm_open() the same way the processes and swap plugins do. Do you know if this plugin suffers from the same problem ? If it does, would you mind also updating this plugin ? Thanks !

@mfournier mfournier added Bug A genuine bug bsd only labels May 3, 2015
{
ERROR ("swap plugin: kvm_open failed.");
ERROR ("swap plugin: kvm_open failed, %s", errbuf);
return (-1);

Choose a reason for hiding this comment

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

Please change the message so it reads [...] kvm_openfiles [...]. Thanks !

- fix error msg on kvm_openfiles failure
@biancalana
Copy link
Contributor Author

Hi @mfournier !

I have based my changes on FreeBSD ps code, that use kvm_openfiles and works inside and outside jails... Also I have collectd with that changes working on FreeBSD with and without jails, but I can speak about other BSDs.

I make additional changes as you requested.

Regards,
Alexandre

@mfournier
Copy link

Great @biancalana, thanks !

I just pushed your patchset to the collectd-5.3 branch (the oldest relevant bugfix branch). It will eventually get merged to the more recent branches, and be part of the next bugfix & feature releases.

I also realised meanwhile that the tcpconns plugin doesn't support the freebsd platform. The kvm_openfiles() in there is for openbsd & netbsd if I'm correct. Sorry for the confusion !

@mfournier mfournier closed this May 5, 2015
@biancalana
Copy link
Contributor Author

@mfournier,

I'm using tcpconns plugin on FreeBSD and it works inside and outside Jails. As far as I can say it has always worked. 😂

Do you know when the next version will be released ?

@mfournier
Copy link

@biancalana by bad, it does indeed ! 😕

Thanks for checking, good to know all 3 of them work inside jails !

There's no fixed date for the next releases, although the next feature release (5.5) should get out pretty soon !

@biancalana
Copy link
Contributor Author

@mfournier do you plan to merge this fixes ?

@biancalana
Copy link
Contributor Author

Actually I've seen that it was merged, but 5.5 changelog doesn't mention anything about fixes

@mfournier
Copy link

@biancalana yes, as it's actually a bugfix it will be part of the next relevant bugfix release. It's in the wiki page from which the changelog is generated at release time though: https://collectd.org/wiki/index.php/Version_5.3

This is a bit confusing admitedly :-/

@octo octo added Fix A pull request fixing a bug and removed Bug A genuine bug labels Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bsd only Fix A pull request fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0