osops-tools-contrib/nova
Simon Leinen a7e8010598 Handle SHELVED_OFFLOADED and VERIFY_RESIZE states
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
2017-02-20 09:54:47 +01:00
..
README.md nova-libvirt-compare.py: compare Nova state to hypervisor state 2017-01-05 11:04:49 +01:00
antiaffinitycheck.py Fix incorrect output for json output case 2016-06-30 20:24:03 +01:00
livemigrate_instances.py Add livemigration helper for hypervisor maint 2016-10-19 16:31:38 +13:00
nova-libvirt-compare.py Handle SHELVED_OFFLOADED and VERIFY_RESIZE states 2017-02-20 09:54:47 +01:00
nova-vms-on-host.py Add a nova-vms-on-host tool. 2015-12-14 23:12:33 -07:00

README.md

Nova folder

this folder contains scripts that are related to Nova

Compare Nova state to hypervisor state: nova-libvirt-compare.py

This retrieves all instances in a region (or all regions when called with -a), then compares that with the libvirt domains running on all hypervisor hosts in that region, and reports any differences.

Usage

usage: nova-libvirt-compare.py [-h] [-a] [-l REMOTE_USER]
                               [--no-note-incomplete]
                               [--blindly-trust-host-keys] [-p PROCESSES] [-v]

Check for inconsistent state between Nova DB and hypervisors

optional arguments:
  -h, --help            show this help message and exit
  -a, --all-regions     query all regions
  -l REMOTE_USER, --remote-user REMOTE_USER
                        SSH remote username for connecting to hypervisors
  --no-note-incomplete  Don't report incomplete instances
  --blindly-trust-host-keys
                        Accept all SSH host keys. This enables man-in-the-
                        middle attacks!
  -p PROCESSES, --processes PROCESSES
                        Number of parallel processes connecting to hypervisors
  -v, --verbose         verbose

Example

$ ./nova-libvirt-compare.py
Hypervisor zhdk0062.zhdk.cloud.switch.ch should know about bd384f32-5e05-43a5-a66e-fc11693a733b, but doesn't
Instance ebd1c623-35c3-4385-998f-10a96ecfbcdf (state BUILD) has no hypervisor