|
|
734564 |
From 8b9c49fd965f73709d5a6e2c21987ba26af4856b Mon Sep 17 00:00:00 2001
|
|
|
734564 |
From: Luca Miccini <lmiccini@redhat.com>
|
|
|
734564 |
Date: Wed, 25 Sep 2019 17:12:39 +0200
|
|
|
734564 |
Subject: [PATCH] Add a configurable delay to Nova Evacuate calls
|
|
|
734564 |
|
|
|
734564 |
In case /var/lib/nova/instances resides on NFS we have seen migrations
|
|
|
734564 |
failing with 'Failed to get "write" lock - Is another process using the
|
|
|
734564 |
image' errors.
|
|
|
734564 |
|
|
|
734564 |
This has been tracked down to grace/lease timeouts not having expired
|
|
|
734564 |
before attempting the migration/evacuate, so in this cases it might be
|
|
|
734564 |
desirable to delay the nova evacuate call to give the storage time to
|
|
|
734564 |
release the locks.
|
|
|
734564 |
|
|
|
734564 |
Change-Id: Ie2fe784202d754eda38092479b1ab3ff4d02136a
|
|
|
734564 |
Resolves: rhbz#1740069
|
|
|
734564 |
---
|
|
|
734564 |
|
|
|
734564 |
diff --git a/heartbeat/NovaEvacuate b/heartbeat/NovaEvacuate
|
|
|
734564 |
index 810f30a..596f520 100644
|
|
|
734564 |
--- a/heartbeat/NovaEvacuate
|
|
|
734564 |
+++ b/heartbeat/NovaEvacuate
|
|
|
734564 |
@@ -125,6 +125,15 @@
|
|
|
734564 |
<content type="boolean" default="0" />
|
|
|
734564 |
</parameter>
|
|
|
734564 |
|
|
|
734564 |
+<parameter name="evacuate_delay" unique="0" required="0">
|
|
|
734564 |
+<longdesc lang="en">
|
|
|
734564 |
+Allows delaying the nova evacuate API call, e.g. to give a storage array time to clean
|
|
|
734564 |
+up eventual locks/leases.
|
|
|
734564 |
+</longdesc>
|
|
|
734564 |
+<shortdesc lang="en">Nova evacuate delay</shortdesc>
|
|
|
734564 |
+<content type="integer" default="0" />
|
|
|
734564 |
+</parameter>
|
|
|
734564 |
+
|
|
|
734564 |
</parameters>
|
|
|
734564 |
|
|
|
734564 |
<actions>
|
|
|
734564 |
@@ -216,6 +225,11 @@
|
|
|
734564 |
fence_agent="fence_evacuate"
|
|
|
734564 |
fi
|
|
|
734564 |
|
|
|
734564 |
+ if [ ${OCF_RESKEY_evacuate_delay} != 0 ]; then
|
|
|
734564 |
+ ocf_log info "Delaying nova evacuate by $OCF_RESKEY_evacuate_delay seconds"
|
|
|
734564 |
+ sleep ${OCF_RESKEY_evacuate_delay}
|
|
|
734564 |
+ fi
|
|
|
734564 |
+
|
|
|
734564 |
ocf_log notice "Initiating evacuation of $node with $fence_agent"
|
|
|
734564 |
$fence_agent ${fence_options} -o status -n ${node}
|
|
|
734564 |
if [ $? = 1 ]; then
|