The VMs are not always resumes on reboot
The “libvirt-guests” service can conflict with “onevm-all” and we don't need to wait for each VM to boot during start. * posttemplate/10-libvirt-guests: disable the “libvirt-guests” service. * init/onenode.service (ExecStart): use default wait timeout (60s). (TimeoutStartSec): wait for longer than the default timeout. (ExecReload): just try to resume any remaining VMs. (ExecStop): wait longer for VM to suspend. (TimeoutStopSec): wait for longer than the stop timeout. * scripts/onevm-all: schedule actions in parallel and wait globally for their executions. Ref: #22155
This commit is contained in:
@ -8,11 +8,15 @@ After=multi-user.target
|
||||
Type=oneshot
|
||||
Environment=CREDS=/var/lib/one/.one/one_auth
|
||||
Environment=ENDPOINT=http://127.0.0.1:2633/RPC2
|
||||
TimeoutSec=1min
|
||||
RemainAfterExit=yes
|
||||
Restart=no
|
||||
ExecStart=/usr/share/eole/sbin/onevm-all -t 20 -w -c ${CREDS} -e ${ENDPOINT} -a "resume"
|
||||
ExecStop=/usr/share/eole/sbin/onevm-all -t 20 -w -c ${CREDS} -e ${ENDPOINT} -a "suspend"
|
||||
ExecStart=/usr/share/eole/sbin/onevm-all -c ${CREDS} -e ${ENDPOINT} -a "resume"
|
||||
# Permit to start remaining VMs at distance by a simple restart
|
||||
ExecReload=/usr/share/eole/sbin/onevm-all -c ${CREDS} -e ${ENDPOINT} -a "resume"
|
||||
ExecStop=/usr/share/eole/sbin/onevm-all -w 300 -c ${CREDS} -e ${ENDPOINT} -a "suspend"
|
||||
# Keep some marging with timeout
|
||||
TimeoutStartSec=120s
|
||||
TimeoutStopSec=360s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Reference in New Issue
Block a user