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

lack of support for target creation. #123

Open
ArVincentr opened this issue Apr 23, 2019 · 3 comments
Open

lack of support for target creation. #123

ArVincentr opened this issue Apr 23, 2019 · 3 comments

Comments

@ArVincentr
Copy link
Contributor

Hi,

Currently the module doesn't support the creation of the .target in case of instantiated services (declared by "PartOf" which I requested to merge #122). the goal is to have let's say a service.target which controls other services like service@aa / service@bb. The ultimate goal is to start / stop all our sub-services using systemctl start|stop service@*

Kind regards

@jordiprats
Copy link
Contributor

Hi,
I'm adding this as future reference:

https://www.freedesktop.org/software/systemd/man/systemd.target.html

root@shuvak:/etc/systemd/system# ls
apport-forward.socket                       display-manager.service        laravelqueue@.service    netdata.service                  snapd.socket          timers.target.wants
bluetooth.target.wants                      display-manager.service.wants  libvirtd.service         network-online.target.wants      sockets.target.wants  ufw.service
dbus-org.bluez.service                      getty.target.wants             lxd-containers.service   paths.target.wants               sshd.service
dbus-org.freedesktop.Avahi.service          gpu-manager.service            lxd.service              printer.target.wants             sysinit.target.wants
dbus-org.freedesktop.ModemManager1.service  graphical.target.wants         lxd.socket               queuelisteneypmergehook.service  syslog.service
default.target.wants                        iscsi.service                  multi-user.target.wants  remote-fs.target.wants           teamviewerd.service
root@shuvak:/etc/systemd/system# ls multi-user.target.wants/
atd.service             cups-browsed.service           lm-sensors.service      netfilter-persistent.service  queuelisteneypmergehook.service  ubuntu-fan.service
avahi-daemon.service    cups.path                      lxcfs.service           networking.service            remote-fs.target                 ufw.service
binfmt-support.service  docker.service                 lxd-containers.service  nfs-client.target             rsyslog.service                  unattended-upgrades.service
cgmanager.service       laravelqueue@meteoapi.service  ModemManager.service    nfs-server.service            smartd.service
cgproxy.service         libvirt-bin.service            mysql.service           open-vm-tools.service         ssh.service
cron.service            libvirt-guests.service         netdata.service         openvpn.service               teamviewerd.service
root@shuvak:/etc/systemd/system# ls -ld multi-user.target.wants/netdata.service 
lrwxrwxrwx 1 root root 35 May 22  2016 multi-user.target.wants/netdata.service -> /etc/systemd/system/netdata.service

I believe we should be supporting the ability to manage a directory with symlinks to the actual services in addition to the .target file creation. Maybe it is even more useful to manage the symlink structure.

Thoughts?

kind regards,

@ArVincentr
Copy link
Contributor Author

Hi,

thank you for having merged. this issue can be closed as well.

Regards

@jordiprats
Copy link
Contributor

Hi Vincent,
I believe we should be also supporting the the ability to link services to a target using symlinks just like in the example above.

If you don't mind I would like to keep this issue open for keeping track of these changes as well

thanks,

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

No branches or pull requests

2 participants