turn on disable_ec2_classic in devstack installation

fix problem with incorrect creation of default vpc from metadata

Change-Id: If84c4cc1b7ec5664ff194cecb64b8f85ba4ca844
This commit is contained in:
tikitavi 2017-06-09 14:45:06 +03:00
parent b0107f1f0e
commit 907de91b55
3 changed files with 3 additions and 2 deletions

View File

@ -151,6 +151,7 @@ function configure_ec2api_networking {
if [[ -n "$ext_net" ]]; then
iniset $EC2API_CONF_FILE DEFAULT external_network $ext_net
fi
iniset $EC2API_CONF_FILE DEFAULT disable_ec2_classic True
}
# Entry points

View File

@ -1030,7 +1030,7 @@ def _populate_parsed_bdm_parameter(bdm, short_root_device_name):
def _format_group_set(context, os_security_groups, groups):
if not os_security_groups:
return None
return []
return [{'groupName': sg['name'],
'groupId': groups[sg['name']]}
for sg in os_security_groups

View File

@ -164,7 +164,7 @@ def _create_vpc(context, cidr_block, is_default=False):
def _check_and_create_default_vpc(context):
if CONF.disable_ec2_classic:
if CONF.disable_ec2_classic and not context.is_os_admin:
for vpc in db_api.get_items(context, 'vpc'):
if vpc.get('is_default'):
return vpc