Summary: Disallow shrinking volume type QCOW2 to fail with better message

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360093176 -0700
This commit is contained in:
Marcus Sorensen 2013-02-05 12:39:36 -07:00
parent 4f274d0b8e
commit 3535f88d16
1 changed files with 2 additions and 0 deletions

View File

@ -1429,6 +1429,8 @@ ServerResource {
if (type == null) {
return new ResizeVolumeAnswer(cmd, false, "Unsupported volume format: pool type '"
+ pool.getType() + "' and volume format '" + vol.getFormat() + "'");
} else if (type.equals("QCOW2") && shrinkOk) {
return new ResizeVolumeAnswer(cmd, false, "Unable to shrink volumes of type " + type);
}
s_logger.debug("got to the stage where we execute the volume resize, params:"