Indicate to plugin resource verification where we are
This makes the resource verify commands take a second argument that indicates if we are pre-upgrade or post-upgrade. This may be needed in order to validate things that will not be true before, but must be true after an upgrade. Change-Id: I6383c5f641bb8eb7fee6f1fbd41bca3a281d9636
This commit is contained in:
parent
12aed011ab
commit
a3874c58d4
20
PLUGINS.rst
20
PLUGINS.rst
|
@ -16,13 +16,13 @@ Proposed new basic flow:
|
|||
- verify_base
|
||||
- for project in projects; do verify_project; done
|
||||
- resources.sh create
|
||||
- resources.sh verify
|
||||
- resources.sh verify pre-upgrade
|
||||
- shutdown
|
||||
- for project in projects; do shutdown; done
|
||||
- snapshot.sh pre_upgrade (NOT YET IMPLEMENTED)
|
||||
- resources.sh verify_noapi
|
||||
- resources.sh verify_noapi pre-upgrade
|
||||
- upgrade ...
|
||||
- resources.sh verify
|
||||
- resources.sh verify post-upgrade
|
||||
- verify_target
|
||||
- resources.sh destroy
|
||||
|
||||
|
@ -87,10 +87,11 @@ The following is the supported calling interface
|
|||
|
||||
Example: create an instance in nova or a volume in cinder
|
||||
|
||||
- resources.sh verify
|
||||
- resources.sh verify (pre-upgrade|post-upgrade)
|
||||
|
||||
verify that the resources were created. Services are running at this
|
||||
point, and the APIs may be expected to work.
|
||||
point, and the APIs may be expected to work. The second argument
|
||||
indicates whether we are pre-upgrade or post-upgrade.
|
||||
|
||||
Example: use the nova command to verify that the test instance is
|
||||
still ACTIVE, or the cinder command to verify that the volume is
|
||||
|
@ -102,7 +103,8 @@ The following is the supported calling interface
|
|||
phase where services are stopped, and APIs are expected to not be
|
||||
accessible. Resource verification at this phase my require probing
|
||||
underlying components to make sure nothing has gone awry during
|
||||
service shutdown.
|
||||
service shutdown. The second argument indicates whether we are
|
||||
pre-upgrade or post-upgrade.
|
||||
|
||||
Example: check with libvirt to make sure the instance is actually
|
||||
created and running. Bonus points for being able to ping the
|
||||
|
@ -121,11 +123,11 @@ The calling sequence during a grenade run looks as follows:
|
|||
|
||||
- # start old side
|
||||
- create (create will be called during the working old side)
|
||||
- verify
|
||||
- verify pre-upgrade
|
||||
- # shutdown all services
|
||||
- verify_noapi
|
||||
- verify_noapi pre-upgrade
|
||||
- # upgrade and start all services
|
||||
- verify
|
||||
- verify post-upgrade
|
||||
- destroy
|
||||
|
||||
The important thing to remember is verify/verify_noapi will be called
|
||||
|
|
|
@ -265,7 +265,7 @@ if [[ "$RUN_BASE" == "True" ]]; then
|
|||
resources create
|
||||
|
||||
# Verify the resources were created
|
||||
resources verify
|
||||
resources verify pre-upgrade
|
||||
|
||||
# Save some stuff before we shut that whole thing down
|
||||
echo_summary "Saving current state information"
|
||||
|
@ -277,7 +277,7 @@ if [[ "$RUN_BASE" == "True" ]]; then
|
|||
shutdown_services
|
||||
|
||||
# Verify the resources still exist after the shutdown
|
||||
resources verify_noapi
|
||||
resources verify_noapi pre-upgrade
|
||||
fi
|
||||
|
||||
|
||||
|
@ -313,7 +313,7 @@ if [[ "$RUN_TARGET" == "True" ]]; then
|
|||
# =============
|
||||
|
||||
# Verify the resources still exist after the upgrade
|
||||
resources verify
|
||||
resources verify post-upgrade
|
||||
|
||||
# Validate the upgrade
|
||||
if [[ "$TARGET_RUN_SMOKE" == "True" ]]; then
|
||||
|
|
|
@ -92,6 +92,7 @@ function shutdown_services {
|
|||
function resources {
|
||||
# which resource phase are we in
|
||||
local phase=$1
|
||||
local side=$2
|
||||
local project=""
|
||||
|
||||
# bail early if we aren't going to do this level of verification.
|
||||
|
@ -115,7 +116,7 @@ function resources {
|
|||
if [[ -e $resource ]]; then
|
||||
# NOTE(sdague): we might need to set topdir differently?
|
||||
TOP_DIR=$BASE_DEVSTACK_DIR LOGDIR=$LOGDIR \
|
||||
$resource $phase || die $LINENO "Failed to run ``$resource $phase``"
|
||||
$resource $phase $side || die $LINENO "Failed to run ``$resource $phase $side``"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue