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

RFE to allow for container usage #23

Open
adkerr opened this issue Aug 27, 2020 · 2 comments
Open

RFE to allow for container usage #23

adkerr opened this issue Aug 27, 2020 · 2 comments

Comments

@adkerr
Copy link

adkerr commented Aug 27, 2020

My use case is probably fairly unusual and I do have a work around, but I was wondering if you'd be willing to consider adding an optional value to systemInfo struct that would place a prefix on all the paths to files? What I'm attempting to do is use this package inside a docker container and mount the host filesystem into the container in order to detect the host's info. Typically when this is done you'll mount the host's FS into a directory like /host so it doesn't collide with the container's FS. So if it was possible to set something like si.PathPrefix or whatever name you like that gets prepended to each of the currently hardcoded file paths that would be very useful. For now I'm able to simply mount the host's /etc dir directly over the container's /etc and it works as expected (I personally am most interested in the OS info, so only need etc), but it would be best, and allow expanded use cases, to keep the host and container FS's separated properly.

@zcalusic
Copy link
Owner

Hello @adkerr, and thanks for your comment.

While I do run lots of containers, somehow I haven't yet attempted to run sysinfo in a container. ;)

But, I'm certain it would be useful in many cases, so yes, I'd actually be willing to check the details and do what needs to be done, so that it can be used in a container enviroment more easily.

Even if sysinfo is actually a per-host thing, I see the beauty of orchestrating it (say via k8s daemonset) and using it that way to access host info.

I can't promise when I'll have enough time to investigate all that properly, but I can promise I'll come back to this topic ASAP. Together with all other ideas that I've collected in the meantime and just didn't have time to execute them yet. 😢

@adkerr
Copy link
Author

adkerr commented Aug 27, 2020

Thanks for your response @zcalusic. No rush on this; as I said I've got a workaround.

You've got a wonderful tool here that has greatly simplified the task of figuring the host distro and version for me. Keep up the good work!

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

No branches or pull requests

2 participants