diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index b8c86fcd73..624691f25a 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -786,10 +786,10 @@ virLockManagerSanlockRegisterKillscript(int sock, return 0; case VIR_DOMAIN_LOCK_FAILURE_POWEROFF: - case VIR_DOMAIN_LOCK_FAILURE_RESTART: case VIR_DOMAIN_LOCK_FAILURE_PAUSE: break; + case VIR_DOMAIN_LOCK_FAILURE_RESTART: case VIR_DOMAIN_LOCK_FAILURE_IGNORE: case VIR_DOMAIN_LOCK_FAILURE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, diff --git a/src/locking/sanlock_helper.c b/src/locking/sanlock_helper.c index c913cc3f64..08102ebcd7 100644 --- a/src/locking/sanlock_helper.c +++ b/src/locking/sanlock_helper.c @@ -91,33 +91,13 @@ main(int argc, char **argv) ret = EXIT_SUCCESS; break; - case VIR_DOMAIN_LOCK_FAILURE_RESTART: - if (virDomainIsPersistent(dom)) { - if ((virDomainDestroy(dom) == 0 || - virDomainIsActive(dom) == 0) && - virDomainCreate(dom) == 0) - ret = EXIT_SUCCESS; - } else { - xml = virDomainGetXMLDesc(dom, - VIR_DOMAIN_XML_SECURE | - VIR_DOMAIN_XML_INACTIVE); - - if (!xml || - (virDomainDestroy(dom) < 0 && - virDomainIsActive(dom) != 0)) - goto cleanup; - virDomainFree(dom); - if ((dom = virDomainCreateXML(conn, xml, 0))) - ret = EXIT_SUCCESS; - } - break; - case VIR_DOMAIN_LOCK_FAILURE_PAUSE: if (virDomainSuspend(dom) == 0) ret = EXIT_SUCCESS; break; case VIR_DOMAIN_LOCK_FAILURE_DEFAULT: + case VIR_DOMAIN_LOCK_FAILURE_RESTART: case VIR_DOMAIN_LOCK_FAILURE_IGNORE: case VIR_DOMAIN_LOCK_FAILURE_LAST: fprintf(stderr, _("unsupported failure action: '%s'\n"),