Sheepdog wrong system units

Svetoslav Naydenov

New Member
Apr 16, 2016
2
0
1
50
Sheepdog depends on corosync and should be started after it
Sheepdog must not be stopped before shutdown of all machines

Workaround I use is:
sed -i 's/After=network.target/After=network-online.target\nAfter=corosync.service/' /lib/systemd/system/sheepdog.service
sed -i 's/After=ceph.service/After=ceph.service\nAfter=sheepdog.service/' /lib/systemd/system/pveproxy.service

But it is better to be fixed in the distribution service files
 
I think you installed "sheepdog" instead of "pve-sheepdog"?

Code:
systemctl show sheepdog | grep After=
After=network.target corosync.service systemd-journald.socket basic.target system.slice
 
Important is to start sheepdog after network-online and corosync
And much more important is not to stop it before shutting down all virtual machines.

As of pve-sheepdog 1.0 it should be:

sed -i 's/After=network.target/After=network-online.target/' /lib/systemd/system/sheepdog.service
sed -i 's/After=ceph.service/After=ceph.service\nAfter=sheepdog.service/' /lib/systemd/system/pveproxy.service
 
that would still be wrong, you would need "Wants=network-online.target" if you want to force sheepdog to wait for the network to come online. but that is not needed either (with sheepdog-pve), because sheepdog is ordered after corosync, which both requires and is ordered after network-online. feel free to upstream the Wants and After directives to sheepdog though - they don't hurt.

green = After, Black = Requires
sheepdog.png


adding sheepdog to the pveproxy dependencies would probably make sense.

note that you should never edit the files in /lib/systemd , as they will be overwritten by updates. instead, either provide your own redefinition in /etc/systemd/system , or better partially overwrite/extend the unit by dropping a snippet in e.g. /etc/systemd/system/sheepdog.service.d/mysnippet.conf
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!