Add node autoready oneshot unit
This replicates some of the more important functionality of the defunct pvc-flush.service unit. On presence of a trigger file (i.e. /etc/pvc/autoready), it will trigger a "node ready" on boot. It does nothing on shutdown as this must be handled by other mechanisms, though a similar autoflush could be added as well.
This commit is contained in:
19
node-daemon/pvcautoready.service
Normal file
19
node-daemon/pvcautoready.service
Normal file
@ -0,0 +1,19 @@
|
||||
# Parallel Virtual Cluster autoready oneshot
|
||||
|
||||
[Unit]
|
||||
Description = Parallel Virtual Cluster autoready oneshot
|
||||
After = pvcnoded.service pvcapid.service zookeeper.service libvirtd.service ssh.service ceph.target network-online.target
|
||||
Wants = pvcnoded.service pvcapid.service
|
||||
PartOf = pvc.target
|
||||
ConditionPathExists=/etc/pvc/autoready
|
||||
|
||||
[Service]
|
||||
Type = oneshot
|
||||
RemainAfterExit = false
|
||||
WorkingDirectory = /usr/share/pvc
|
||||
TimeoutSec = 31min
|
||||
ExecStartPre = /bin/sleep 60
|
||||
ExecStart = /usr/bin/pvc -c local node ready --wait
|
||||
|
||||
[Install]
|
||||
WantedBy = pvc.target
|
Reference in New Issue
Block a user