Skip to content

Commit ff6b9f4

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Update volume-backed comment in _validate_flavor_image_nostatus"
2 parents 5efce38 + 8951149 commit ff6b9f4

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

nova/compute/api.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,18 @@ def _validate_flavor_image_nostatus(context, image, instance_type,
604604

605605
# Target disk is a volume. Don't check flavor disk size because it
606606
# doesn't make sense, and check min_disk against the volume size.
607-
if (root_bdm is not None and root_bdm.is_volume):
608-
# There are 2 possibilities here: either the target volume already
609-
# exists, or it doesn't, in which case the bdm will contain the
610-
# intended volume size.
607+
if root_bdm is not None and root_bdm.is_volume:
608+
# There are 2 possibilities here:
609+
#
610+
# 1. The target volume already exists but bdm.volume_size is not
611+
# yet set because this method is called before
612+
# _bdm_validate_set_size_and_instance during server create.
613+
# 2. The target volume doesn't exist, in which case the bdm will
614+
# contain the intended volume size
615+
#
616+
# Note that rebuild also calls this method with potentially a new
617+
# image but you can't rebuild a volume-backed server with a new
618+
# image (yet).
611619
#
612620
# Cinder does its own check against min_disk, so if the target
613621
# volume already exists this has already been done and we don't

0 commit comments

Comments
 (0)