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

Add is_container charm library #9

Merged
merged 4 commits into from
Jul 10, 2024

Conversation

NucciTheBoss
Copy link
Member

This pull request adds the small is_container charm library. This utility enables us to check if the current charm is running within a container using the systemd-detect-virt utility.

Why add this library? In multiple places we're using a utility like this - like both the Slurm and NFS operators - so it would be good to just have one source of truth for this method. We can also extend as necessary to detect multiple different container runtimes.

@NucciTheBoss NucciTheBoss added the enhancement New feature or request label Jul 10, 2024
@NucciTheBoss NucciTheBoss requested a review from jedel1043 July 10, 2024 18:18
Copy link
Contributor

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Overall looks good! I just have some suggestions and discussion points.

lib/charms/hpc_libs/v0/is_container.py Outdated Show resolved Hide resolved
lib/charms/hpc_libs/v0/is_container.py Outdated Show resolved Hide resolved
@NucciTheBoss NucciTheBoss requested a review from jedel1043 July 10, 2024 18:42
Copy link
Contributor

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Looks perfect to me!

@NucciTheBoss NucciTheBoss merged commit aeb2418 into charmed-hpc:main Jul 10, 2024
4 checks passed
@NucciTheBoss NucciTheBoss deleted the add-is-container branch July 10, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants