Enhance warning for mgmt network configuration
This fix enhance the warning regarding the size of the address pool when configuring the management network. A subnet of /29 will only allow 8 addresses. If a LVM/Ceph image backend is added (e.g. system storage-backend-add lvm -s cinder –confirmed, system storage-backend-add ceph -s cinder,glance –confirmed), the command will fail with “Address pool management has no available addresses”. The user will now be asked to confirm this configuration. Closes-Bug: 1796306 Change-Id: Ib33efff1e929e9754c241d6c93398be5c4d83db8 Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
This commit is contained in:
parent
0ffdae6953
commit
7d16a8a9d9
@ -1,2 +1,2 @@
|
|||||||
SRC_DIR="controllerconfig"
|
SRC_DIR="controllerconfig"
|
||||||
TIS_PATCH_VER=146
|
TIS_PATCH_VER=147
|
||||||
|
@ -1113,8 +1113,21 @@ class ConfigAssistant():
|
|||||||
self.management_start_address = self.management_subnet[2]
|
self.management_start_address = self.management_subnet[2]
|
||||||
self.management_end_address = self.management_subnet[-2]
|
self.management_end_address = self.management_subnet[-2]
|
||||||
if self.management_subnet.size < 255:
|
if self.management_subnet.size < 255:
|
||||||
print "WARNING: Subnet allows only %d addresses." \
|
print "WARNING: Subnet allows only %d addresses.\n" \
|
||||||
% self.management_subnet.size
|
"This will not allow you to provision a Cinder LVM" \
|
||||||
|
" or Ceph backend." % self.management_subnet.size
|
||||||
|
while True:
|
||||||
|
user_input = raw_input(
|
||||||
|
"Do you want to continue with the current "
|
||||||
|
"configuration? [Y/n]: ")
|
||||||
|
if user_input.lower() == 'q' or \
|
||||||
|
user_input.lower() == 'n':
|
||||||
|
raise UserQuit
|
||||||
|
elif user_input.lower() == 'y' or user_input == "":
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
print "Invalid choice"
|
||||||
|
continue
|
||||||
break
|
break
|
||||||
except ValidateFail as e:
|
except ValidateFail as e:
|
||||||
print "{}".format(e)
|
print "{}".format(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user