Add more robust requirements to pvc-flush service

This commit is contained in:
Joshua Boniface 2020-04-01 15:09:44 -04:00
parent 98a7005c1b
commit a0ebc0d3a7
1 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@
[Unit] [Unit]
Description = Parallel Virtual Cluster autoflush daemon Description = Parallel Virtual Cluster autoflush daemon
After = pvcnoded.service After = pvcnoded.service
Requires = pvcnoded.service
PartOf = pvc.target PartOf = pvc.target
[Service] [Service]
@ -10,10 +11,10 @@ Type = oneshot
RemainAfterExit = true RemainAfterExit = true
WorkingDirectory = /usr/share/pvc WorkingDirectory = /usr/share/pvc
TimeoutSec = 30min TimeoutSec = 30min
ExecStartPre = /bin/sleep 30 ExecStartPre = /bin/sleep 15
ExecStart = /usr/bin/pvc -c local node unflush --wait ExecStart = /usr/bin/pvc -c local node unflush --wait
ExecStop = /usr/bin/pvc -c local node flush --wait ExecStop = /usr/bin/pvc -c local node flush --wait
ExecStopPost = /bin/sleep 30 ExecStopPost = /bin/sleep 5
[Install] [Install]
WantedBy = pvc.target WantedBy = pvc.target