This change adds support for the SHELVED_OFFLOADED and (partly)
VERIFY_RESIZE states. Shelved-offloaded instances don't have a
hypervisor associated with them. VERIFY_RESIZE instances should still
be running on their associated hypervisor. They are also present, but
"shut off", on another hypervisor. Even with this change, the code
still generates a warning about the instance being present on multiple
hypervisors. Personally I find the warning quite useful, and I don't
really know what to do about it. Maybe we should suppress the warning
if the instance hasn't been in this state for long.
Change-Id: I3a56500bd350a070c96f719e702a5334ec8c8558
Adds a very basic one-by-one livemigration tool to remove instances from
a host, but not quite as aggressively as the openstack CLI tool.
Change-Id: I54b03e7f7eb6eb0f4efc10de97dc208498f2a56b
Add a JSON output flag to enable this tool to more easily be called by
other scripts and used in pipelines. Re-factor a bit, add a class and
remove some code duplication
Change-Id: If4586cf18a7e30580a00e6d9d1d7e166d4001aea
This script checks a given Nova Server Group for any instances that fall
foul of invalid anti-affinity rules, i.e there are multiple instances
running on the same hypervisor in a Server Group where the anti-affinity
policy has been set.
Example usage:
./antiaffinitycheck.py --check c353197c-5fbb-410f-a7b3-843452a55276
Anti-affinity rules violated in Server Group: c353197c-5fbb-410f-a7b3-843452a55276
+--------------------------------------+-----------+--------------+
| Instance ID | Instance | Hypervisor |
+--------------------------------------+-----------+--------------+
| 4c38cf7f-2073-4d96-b377-d2bd29595d8a | app-db-12 | compute2.dev |
| 5c40b1e9-8b38-4978-98b2-391e53e65418 | app-db-11 | compute2.dev |
+--------------------------------------+-----------+--------------+
Change-Id: I2fee4c5eaa1aa0b511c6912f6d7cc35f736621a8
We had a host die last week and it's really annoying to iterate all the
VMs to get customer contact info. That inspired this tool. Given a
hypervisor, get all customer names and emails (pasteable) so that you
can let the customers know about a potential issue. Also useful for
maintenance.
Change-Id: I783a942755d9c61a33a5f32ded10391db56ba124