Compare commits

...

1 commit

Author SHA1 Message Date
Jérémy Lecour c194e6c664
kvm-host: revert remote DRBD role on migration error (untested)
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2625|0|2625|0|:zzz:
gitea/ansible-roles/pipeline/head This commit looks good
2023-10-14 07:26:51 +02:00

View file

@ -299,6 +299,12 @@ migrate_to() {
if is_vm_running_locally "${vm}"; then
migrate_vm_to "${vm}" "${remote_ip}"
retcode=$?
if [ ${retcode} != 0 ]; then
echo "An error occured while migrating ${vm}: ${retval}" >&2
set_drbd_role secondary "${resource}" "${remote_ip}"
exit 1
fi
else
echo "${vm} is not running locally, so it won't be started on ${remote_host}"
fi