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

Create mechanism to read files from host / #2082

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

pipex
Copy link
Contributor

@pipex pipex commented Dec 20, 2022

The supervisor needs to read some files from the host root since there are no alternative interfaces that the host provides. These files are

  • /etc/os-release to read the OS version
  • /run/openvpn/vpn_status/active to check the VPN status

While we are working to introduce alternative interfaces for reading the information provided by these files, the supervisor still needs a backwards compatible way to get that info.

This PR uses the fact that the supervisor has access to the docker socket to mount a file into a container and read the file from there.

Change-type: minor

@pipex pipex marked this pull request as draft December 20, 2022 13:44
The supervisor needs to read some files from the host root since there
are no alternative interfaces that the host provides. These files are

- /etc/os-release to read the OS version
- /run/openvpn/vpn_status/active to check the VPN status

While we are working to introduce alternative interfaces for reading the
information provided by these files, the supervisor still needs a
backwards compatible way to get that info.

This PR uses the fact that the supervisor has access to the docker
socket to mount a file into a container and read the file from there.

Change-type: minor
This removes VPN status monitoring, which
would be too expensive to do with a container and is really not
necessary. The VPN status information will be available for requests via
the supervisor API.
@pipex
Copy link
Contributor Author

pipex commented Dec 20, 2022

TODO

  • Get the supervisor image id and use that image to do the reading
  • Write tests
  • Read os-config from root

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

Successfully merging this pull request may close these issues.

1 participant