From ff3e5a4ed6ad7aea5b8b9617b6a8e58f97d62e10 Mon Sep 17 00:00:00 2001 From: scottda <scott.dangelo@hp.com> Date: Mon, 2 Feb 2015 21:16:04 +0000 Subject: [PATCH] reset-state should warn that it is DB only The python-cinderclient command 'reset-state' will only change the state in the Cinder database, without affecting any connection/export of a volume from the driver backend to a Nova compute host/instance. The Doc string should explicitly state that this is the case, and Warn that it might result in an unusable volume, i.e. a volume is set to 'available' in the Cinder DB, but is still attached and therefore cannot be attached to another instance, nor detached. Change-Id: Iee66570dbb93776490ae8fb663a7f835dc496bc2 Closes-Bug: 1417273 --- cinderclient/v2/shell.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cinderclient/v2/shell.py b/cinderclient/v2/shell.py index debdf23ed..fe2464035 100644 --- a/cinderclient/v2/shell.py +++ b/cinderclient/v2/shell.py @@ -425,7 +425,14 @@ def do_force_delete(cs, args): 'Default=available.')) @utils.service_type('volumev2') def do_reset_state(cs, args): - """Explicitly updates the volume state.""" + """Explicitly updates the volume state in the Cinder database. + + Note that this does not affect whether the volume is actually attached to + the Nova compute host or instance and can result in an unusable volume. + Being a database change only, this has no impact on the true state of the + volume and may not match the actual state. This can render a volume + unusable in the case of change to the 'available' state. + """ failure_flag = False for volume in args.volume: