Closed stephdl closed 3 months ago
QA The QA is to see if services are running , disabled, failed, you can stop container to see if the change is propagated (systemctl --user stop foo.service or systemctl -stop foo.service if rootfull)
install core 2.5.5-dev.2
curl https://raw.githubusercontent.com/NethServer/ns8-core/main/core/install.sh > install.sh
bash +x install.sh ghcr.io/nethserver/core:2.5.5-dev.2
install ns8-crowdsec and simulate the use of rootfull systemd template service once crowdsec installed
touch /etc/systemd/system/crowdsec1@.service ln -s /etc/systemd/system/crowdsec1@.service /etc/systemd/system/default.target.wants/crowdsec1@foo.service
go to the status page, the crowdsec template service crowdsec1@foo
should be displayed, but probably not running nor enabled
- install ns8-crowdsec and simulate the use of rootfull systemd template service once crowdsec installed
If we do not have a real rootfull module to test consider this case as optional
VERIFIED
Install a module with systemd template based like ns8-webserver We create service based on a systemd template that you can find in the default.target.wants , unfortunately our
get-status
module action does not handle this case, either for rootless or rootfullour systemd discovery just display the phpfpm@.service and not all other associated services
Proposed solution
I propose to handle to find and retrieve when the service is created from a template systemd service and enabled to run
at the end I would like to display all associated services to this service
rootless![image](https://github.com/NethServer/dev/assets/3164851/fd06c54d-dccc-4c10-b69b-ab5e37767b71)
rootfull![image](https://github.com/NethServer/dev/assets/3164851/f78fcb97-436e-4270-aa7d-af12cf9f3e67)
Alternative solutions
we have not a lot of choices, if a service is not running or fails to start we must be advised
Additional context
tested on core 2.5.4
See also