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:
parent
666e02fbfd
commit
6c58d52fa1
|
@ -3,4 +3,5 @@ node-daemon/pvcnoded.sample.yaml etc/pvc
|
||||||
node-daemon/pvcnoded usr/share/pvc
|
node-daemon/pvcnoded usr/share/pvc
|
||||||
node-daemon/pvcnoded.service lib/systemd/system
|
node-daemon/pvcnoded.service lib/systemd/system
|
||||||
node-daemon/pvc.target lib/systemd/system
|
node-daemon/pvc.target lib/systemd/system
|
||||||
|
node-daemon/pvcautoready.service lib/systemd/system
|
||||||
node-daemon/monitoring usr/share/pvc
|
node-daemon/monitoring usr/share/pvc
|
||||||
|
|
|
@ -5,6 +5,7 @@ systemctl daemon-reload
|
||||||
|
|
||||||
# Enable the service and target
|
# Enable the service and target
|
||||||
systemctl enable /lib/systemd/system/pvcnoded.service
|
systemctl enable /lib/systemd/system/pvcnoded.service
|
||||||
|
systemctl enable /lib/systemd/system/pvcautoready.service
|
||||||
systemctl enable /lib/systemd/system/pvc.target
|
systemctl enable /lib/systemd/system/pvc.target
|
||||||
|
|
||||||
# Inform administrator of the service restart/startup not occurring automatically
|
# Inform administrator of the service restart/startup not occurring automatically
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue