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

systemd-detect-virt: support Charliecloud #25549

Closed
reidpr opened this issue Nov 28, 2022 · 6 comments
Closed

systemd-detect-virt: support Charliecloud #25549

reidpr opened this issue Nov 28, 2022 · 6 comments
Labels
needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer pid1

Comments

@reidpr
Copy link

reidpr commented Nov 28, 2022

Component

systemd

Is your feature request related to a problem? Please describe

systemd-detect-virt can detect a variety of virtualized or containerized environments. Charliecloud is a well-known HPC container implementation but not apparently supported: it is not listed in the version 252 man page.

Note: I am the Charliecloud project lead.

Describe the solution you'd like

Add Charliecloud support to systemd-detect-virt; a reasonable ID would be charliecloud.

Detection is simple; ch-run(1), used to start a container, sets the environment variable CH_RUNNING.

Describe alternatives you've considered

One could also figure out some signature of a running Charliecloud container (e.g., which namespaces are in use), but since there is a documented method for detection, that seems best.

The systemd version you checked that didn't have the feature you are asking for

252

@reidpr reidpr added the RFE 🎁 Request for Enhancement, i.e. a feature request label Nov 28, 2022
@github-actions github-actions bot added the pid1 label Nov 28, 2022
@poettering
Copy link
Member

why doesn't this container implementation set $container= like everyone else?

https://systemd.io/CONTAINER_INTERFACE/

"CH_RUNNING" is a bit generic, and we rather not add more individualized hacks to our list of things to check. So far docker was the one speciality that was too special to follow the logic everyone else implements.

Can you ping the people working on this new container thing, to implement the stuff listed in the container interface document? To the very least the $container thing?

(And if they care about being able to runs systemd inside their containers also the rest)

@bluca bluca added needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer and removed RFE 🎁 Request for Enhancement, i.e. a feature request labels Dec 2, 2022
@poettering
Copy link
Member

Closing, since they really should just implement the same logic as everyone else

@reidpr
Copy link
Author

reidpr commented Jun 7, 2023

You get to run your project the way you want. But, regarding these:

Can you ping the people working on this new container thing
they really should just implement

I guess you missed this part of the initial bug report:

Note: I am the Charliecloud project lead.

That is, third person is inappropriate and disrespectful.

As to the substantive question, that variable appears to be a systemd thing rather than any kind of standard, and plenty of “everyone else” gets their own checks. I'm disinclined to support “individualized hacks” for systemd.

@poettering
Copy link
Member

at least nspawn, lxc, podman set $container=.

@poettering
Copy link
Member

libvirt sets it too btw

@poettering
Copy link
Member

If you are looking for more sw that checks for $container check this github search:

https://github.com/search?q=getenv%28%22container%22%29&type=code&p=2

Good luck convincing them all to check specifically for your own implementation instead...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer pid1
Development

No branches or pull requests

3 participants