Skip to content

Add an optionnal prefix to /proc for gathering data ? #121

@bpetit

Description

@bpetit

Hi,

First thanks a lot for this library that we use actively in https://github.com/hubblo-org/scaphandre/. This is really great work and allows us to save a lot of time.

I'd like to propose a feature that would be definitely useful for us but I'm not sure if it would fit in the direction you want to take with procfs. So this is more a question about whether you'd accept considering this feature or not. If so, I'd gladly propose a PR accordingly.

To allow our project to run with Docker while being as secure as possible, we'd like to enable mounting /proc (and /sys/class/powercap, but this is specific to scaphandre) as RO volumes. However this causes apparmor in the container to crash as it need to touch /proc/self at some point (didn't test yet with selinux for example). This behavior is discussed here if you are interested in the details.

To fix that we would like to pass an optionnal prefix (/myprefix for example) for scaphandre to gather data from /myprefix/proc and /myprefix/sys/class/powercap instead of /proc and /sys/class/powercap.
So the question is: would you consider adding an optionnal prefix, using procfs, so that it could get data from a prefixed path in such a context ?

Thanks a lot for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions