Commit Graph

29 Commits

Author SHA1 Message Date
Luca Miccini 8b9c49fd96 Add a configurable delay to Nova Evacuate calls
In case /var/lib/nova/instances resides on NFS we have seen migrations
failing with 'Failed to get "write" lock - Is another process using the
image' errors.

This has been tracked down to grace/lease timeouts not having expired
before attempting the migration/evacuate, so in this cases it might be
desirable to delay the nova evacuate call to give the storage time to
release the locks.

Change-Id: Ie2fe784202d754eda38092479b1ab3ff4d02136a
Resolves: rhbz#1740069
2019-09-25 20:33:45 +02:00
Adam Spiers 42bb0c53e3 NovaEvacuate: fix a syntax error
In all the chaos of complicated patch unentanglement and rebasing,
I forgot to actually even syntax-check the thing :-(

Change-Id: Ib0a31efe2ff75fc55cf67d4de73e74ebafb219b0
2018-01-17 12:17:06 +00:00
Zuul 1102662aad Merge "NovaEvacuate: Allow debug logging to be turned on easily" 2018-01-16 15:32:36 +00:00
Andrew Beekhof d46f78fda4 NovaEvacuate: Support the new split-out IHA fence agents with backwards compatibility
Change-Id: Ib43294fa1fe3e814d041167aabbfe46140032e24
2018-01-15 16:52:04 +00:00
Andrew Beekhof 7d61c3b0b2 NovaEvacuate: Correctly handle stopped hypervisors
Change-Id: Ia6c62c17945cd0ad00df19b2c5a4c306dd7f4f09
2018-01-15 16:49:43 +00:00
Andrew Beekhof b2197fcc13 NovaEvacuate: Allow debug logging to be turned on easily
Change-Id: I334c80ec0f9b2aa78b95decc6e9e7c4a01101248
2016-06-28 12:32:34 +10:00
Andrew Beekhof 4f2c49d7ba NovaEvacuate should use the existing status operation
No need to duplicate the same logic, plus it is slower than looking up
one specific host

Change-Id: I3ae432a8f42da80f8f235f689d5162d87ad2df5f
2016-06-28 12:02:50 +10:00
Dirk Mueller 3d724a29a9 Relicense to Apache-2.0
Apache-2.0 is the recommended license for OpenStack Big Tent
projects (see https://governance.openstack.org/reference/licensing.html)
and this simplifies the licensing of the overall git repo
quite a bit by removing an exception clause.

Change-Id: I827eb91fd18ced1848439d573cfe6df16ed27748
Closes-Bug: #1564844
2016-05-09 13:46:21 +02:00
Adam Spiers 75dcff3b9d Clarify risks of not using shared storage
Make it clearer what the risks of not using shared storage are.
Information is based on:

  http://docs.openstack.org/user-guide-admin/cli_nova_evacuate.html

which says "The command rebuilds the instance from the original image or
volume" but later says that "To preserve the user disk data on the
evacuated server, deploy Compute with a shared file system" and then use
--on-shared-storage.

Change-Id: I09600414eb0d7fff1cf301b11b3fa9a76fc08c77
2016-03-28 22:44:31 +01:00
Adam Spiers 35282eb288 NovaEvacuate: fix comment in header
This was a copy'n'paste from NovaCompute which someone forgot to change.

Change-Id: I240e6e21d4a87924ab96be1dae672119b58bca56
2016-03-15 17:15:01 +00:00
Norbert Illes 98a54ad759 Fix bashate E006 violations
This commit fixes bashate E006 (lines longer than 79 columns) violations
in the OCF scripts.

Partial-Bug: #1550203
Change-Id: Ic208477b2299697a03b641f8272a0946c897fb3e
Signed-off-by: Norbert Illes <norbert.e.illes@ericsson.com>
2016-03-02 19:45:07 +01:00
Norbert Illes 4397355193 Fix bashate E002 violations
This commit fixes bashate E002 (indents are only spaces, and not hard
tabs) violations

Partial-Bug: #1550203
Change-Id: I7d156d47023781be74e6fa8daef6ffc311b55d9d
Signed-off-by: Norbert Illes <norbert.e.illes@ericsson.com>
2016-02-26 16:15:05 +01:00
Jenkins 807c45f376 Merge "NovaEvacuate: Do not use reboot action for fence_compute" 2016-02-15 16:01:58 +00:00
Vincent Untz 9df293dcb1 Add insecure and region_name parameters to NovaCompute and NovaEvacuate
These can be quite useful in some setups.

This depends on https://github.com/ClusterLabs/fence-agents/pull/37

Change-Id: I2cfef0a4bf7f94f74041c8fee236788c7a110cc5
Signed-off-by: Vincent Untz <vuntz@suse.com>
2016-02-15 15:50:46 +01:00
Jenkins 29c9e6d0eb Merge "NovaEvacuate: Add domain parameter" 2016-02-15 14:30:07 +00:00
Jenkins a756a909a1 Merge "NovaCompute, NovaEvacuate: Add missing content in username description" 2016-02-11 11:25:28 +00:00
Vincent Untz 143864c694 NovaEvacuate: Avoid initial useless message on stderr
When no evacuation has been done yet, we're spamming syslog with:

  Could not query value of evacuate: attribute does not exist

So let's just filter this out, since it's known to be expected on
initial setup.

As this requires a bashism, also move the script to use bash.

Change-Id: I3351919febc0ef0101e4a08ce6eb412e3c7cfc76
2016-02-11 11:35:09 +01:00
Jenkins be881571a4 Merge "NovaEvacuate: Fix typo when fetching all evacuate attributes" 2016-02-11 10:16:39 +00:00
Norbert Illes 64be08fac8 Remove trailing whitespaces
This commit removes hopefully all trailing whitespaces from all files in
the repository.

Change-Id: I248160ee767e13c34c1cd19745c5496a4bcbba0b
Signed-off-by: Norbert Illes <norbert.e.illes@ericsson.com>
2016-02-11 10:24:32 +01:00
Vincent Untz 463694288e NovaCompute, NovaEvacuate: Add missing content in username description
The tag is required.

Change-Id: Id37a07fad6cc0f5351a95678e854b430aa4a99ab
2016-02-03 23:24:18 +01:00
Vincent Untz 0d39012dfb NovaEvacuate: Do not use reboot action for fence_compute
This got disabled in
92f78a8259

So switch to off.

Change-Id: If05ec78a61fc035b786e86c052823e6235cd9b00
2016-02-03 12:58:34 +01:00
Vincent Untz 45c6a5780b NovaEvacuate: Add domain parameter
This matches what we do in NovaCompute, so we can call fence_compute
with the same arguments.

Change-Id: I279ab942284176596109db92b93e9252ab7e3a81
2016-02-03 10:53:14 +01:00
Vincent Untz 447aeaec26 NovaEvacuate: Fix typo when fetching all evacuate attributes
Change-Id: Ib734721d81bfc05a8d6c014f19e3bc99cea67d31
2016-02-03 10:15:48 +01:00
Jenkins 1f11a534d6 Merge "use attrd_updater -U (-v is a legacy option)" 2015-12-10 13:27:56 +00:00
Adam Spiers 528a6536c7 use attrd_updater -U (-v is a legacy option)
attrd_updater deprecated usage of -v a long time ago in favour of -U:

  927660ba0c

so change the agent to use the documented option.

Change-Id: I4e19ef3e22c822bc7a6da98f684d67988367ef25
Signed-off-by: Adam Spiers <aspiers@suse.com>
2015-11-23 11:28:13 +00:00
Adam Spiers 3c7ec2d865 gracefully handle deleted attributes
attrd_updater -D doesn't remove attributes; it just sets them to the
empty string.  Make sure this is handled correctly in case anyone
invokes attrd_updater manually in order to mark a host as no longer
needing evacuation.

Change-Id: I0c05e92c706555459adff73dbc46891fe72d54b9
Signed-off-by: Adam Spiers <aspiers@suse.com>
2015-11-21 02:05:30 +00:00
Adam Spiers 2a0a39feb1 Remove executable permissions from Nova{Compute,Evacuate}
OCF RAs are not meant to be run directly, so for consistency with the
other RAs in this repo, remove the executable bits from these two files.

Change-Id: I35955089cbff0a73f3cd48fb1febfc05bc479dc1
Signed-off-by: Adam Spiers <aspiers@suse.com>
2015-11-19 12:19:35 +00:00
Adam Spiers bb71d6f7d3 fix 'evacute' typo
This requires the same fix to be applied to fence_compute:

  https://github.com/ClusterLabs/fence-agents/pull/27

and is a more complete version of

  33154a6680

which only patched NovaEvacuate and not NovaCompute.

Signed-off-by: Adam Spiers <aspiers@suse.com>

Change-Id: Iea778d6455341275303e592a09bca7d6db120950
2015-11-18 17:13:33 +00:00
Adam Spiers ebe80c5830 Import Nova{Compute,Evacuate} from osp-ha-deploy
These resource agents help provide high availability for
compute nodes, when used in conjuction with:

  https://github.com/ClusterLabs/fence-agents/blob/master/fence/agents/compute/fence_compute.py

They come from:

  https://github.com/beekhof/osp-ha-deploy/tree/master/pcmk

However as agreed with Andrew and Fabio in Tokyo, let's get them into
this vendor-neutral repository so that the community at large can
collaborate on them.

Corresponding documentation will hopefully come soon.

Signed-off-by: Adam Spiers <aspiers@suse.com>

Change-Id: I73b35ac33f4252b47dfe4ffda08166b178febbb4
2015-11-18 17:00:08 +00:00