From ee4d192be81f7b0974e3cb8eb27352ad0aec51af Mon Sep 17 00:00:00 2001 From: Artem Savinov Date: Mon, 30 May 2016 12:36:44 +0300 Subject: [PATCH] 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 --- .../puppet/manifests/nsxv-config.pp | 4 +++- doc/user/source/configuration.rst | 10 ++++++---- environment_config.yaml | 18 +++--------------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/deployment_scripts/puppet/manifests/nsxv-config.pp b/deployment_scripts/puppet/manifests/nsxv-config.pp index 91d66f3..b86b923 100644 --- a/deployment_scripts/puppet/manifests/nsxv-config.pp +++ b/deployment_scripts/puppet/manifests/nsxv-config.pp @@ -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'] diff --git a/doc/user/source/configuration.rst b/doc/user/source/configuration.rst index df1e4b4..0d176f9 100644 --- a/doc/user/source/configuration.rst +++ b/doc/user/source/configuration.rst @@ -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: diff --git a/environment_config.yaml b/environment_config.yaml index 091067c..7806d3a 100644 --- a/environment_config.yaml +++ b/environment_config.yaml @@ -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'