Removed the ability to manually set ip address for nsxv metadata proxy.

Deleted 'Allocate IP address in management network for NSX metadata
proxy' parameter. Now this is the default behavior when choosing a
management network for "nova metadata api".

If "nsxv metadata proxy" address will be different from openstack
management network -  between "nova metadat api" and "nsxv metadata
proxy" will not l3 connectedness.

Change-Id: I7484fbe0fa749e2d2c7a6a8d8ce53d5e55e68ece
This commit is contained in:
Artem Savinov 2016-05-30 12:36:44 +03:00
parent fecfe2f335
commit ee4d192be8
3 changed files with 12 additions and 20 deletions

View File

@ -10,13 +10,15 @@ if $settings['nsxv_metadata_initializer'] {
$metadata_shared_secret = $neutron_config['metadata']['metadata_proxy_shared_secret']
$nova_metadata_ips = get_nova_metadata_ip($settings['nsxv_metadata_listen'])
if $settings['nsxv_mgt_reserve_ip'] {
if $settings['nsxv_metadata_listen'] == 'management' {
# "nova metadata api" will be listened to management network
prepare_network_config(hiera('network_scheme'))
$network_metadata = hiera('network_metadata')
$mgt_ip = $network_metadata['vips']['nsxv_metadataproxy_ip']['ipaddr']
$mgt_netmask = get_network_role_property('mgmt/vip', 'netmask')
$mgt_gateway = hiera('management_vrouter_vip')
} else {
# otherwise "nova metadata api" will be listened to public network
$mgt_ip = $settings['nsxv_mgt_net_proxy_ips']
$mgt_netmask = $settings['nsxv_mgt_net_proxy_netmask']
$mgt_gateway = $settings['nsxv_mgt_net_default_gateway']

View File

@ -97,10 +97,12 @@ Plugin contains the following settings:
nodes. Currently two options are available *Public* and *Management*
networks.
Subitem "Allocate IP address in management network for NSX metadata proxy"
allows automatically allocate free IP address from management network range
for nova-api-metadata, if you want to specify you own IP address, netmask
and gateway see metadata related settings below.
If *Management* network selected, then free IP address from management
network range for nova-api-metadata will be allocated automatically and
you don't need to specify your own IP address, netmask, gateway.
If *Public* network selected, then you need to specify you own IP address, netmask
and gateway. See metadata related settings below.
To enable Nova metadata service, the following settings must be set:

View File

@ -126,18 +126,6 @@ attributes:
restrictions:
- condition: 'settings:nsxv.nsxv_metadata_initializer.value == false'
action: 'hide'
nsxv_mgt_reserve_ip:
value: false
label: 'Allocate IP address in management network for NSX metadata proxy'
description: 'If enabled, then IP address for NSX metadata proxy will be allocated in the OpenStack management network. In the parameter "Metadata portgroup MoRef ID", you must specify portgroup id, which is adjacent with OpenStack management network'
weight: 80
type: 'checkbox'
restrictions:
- condition: "settings:nsxv.nsxv_metadata_listen.value == 'public'"
message: 'Management network to access the nova-api-metadata not selected'
action: 'disable'
- condition: 'settings:nsxv.nsxv_metadata_initializer.value == false'
action: 'hide'
nsxv_metadata_nova_client_cert:
value: ''
label: 'Certificate for metadata proxy'
@ -195,7 +183,7 @@ attributes:
source: '^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$'
error: 'Invalid IP address'
restrictions:
- condition: 'settings:nsxv.nsxv_mgt_reserve_ip.value == true'
- condition: "settings:nsxv.nsxv_metadata_listen.value == 'management'"
action: 'hide'
- condition: 'settings:nsxv.nsxv_metadata_initializer.value == false'
action: 'hide'
@ -209,7 +197,7 @@ attributes:
source: '^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$'
error: 'Invalid netmask'
restrictions:
- condition: 'settings:nsxv.nsxv_mgt_reserve_ip.value == true'
- condition: "settings:nsxv.nsxv_metadata_listen.value == 'management'"
action: 'hide'
- condition: 'settings:nsxv.nsxv_metadata_initializer.value == false'
action: 'hide'
@ -223,7 +211,7 @@ attributes:
source: '^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$'
error: 'Invalid IP address of the default gateway'
restrictions:
- condition: 'settings:nsxv.nsxv_mgt_reserve_ip.value == true'
- condition: "settings:nsxv.nsxv_metadata_listen.value == 'management'"
action: 'hide'
- condition: 'settings:nsxv.nsxv_metadata_initializer.value == false'
action: 'hide'