Partially Revert "Pass extended network information in to occ/shade"

Adding the config value "nat_destination" increased the surface area of
the nodepool.yaml networks list being used for two reasons. The primary
purpose of nodepool.yaml is to tell nodepool what to create - and the
networks list says "please boot the vms for this provider on all of the
networks in this list". However, there are, for some clouds, additional
information that needs to be configured about the cloud that should not
also imply that nodes should boot on the associated networks. A good
example is internap, where the networks do not follow patterns that
allow them to be discovered. One needs, in config, to tell shade "this
network is public and this network is private" but nodepool really only
wants to boot with a nic connected to the public network.

Long story short - we should not aim to duplicate all of the features of
clouds.yaml in nodepool.yaml. They are two different files with two
different purposes in life. One should use clouds.yaml to configure
qualities of the cloud, and nodepool.yaml to configure how you want to
use the cloud.

This reverts commit 2a30810b2e.

Change-Id: Ic7801d2ad49574f2b24c28c5a8f747ba73c6bf24
This commit is contained in:
Monty Taylor 2016-04-15 08:37:06 -05:00
parent fdcc7f6c08
commit b382904214
No known key found for this signature in database
GPG Key ID: 3390DB68041A12F0
4 changed files with 2 additions and 21 deletions

View File

@ -409,8 +409,7 @@ provider, the Nodepool image types are also defined (see
Specify custom Neutron networks that get attached to each
node. Specify the ``name`` of the network (a string) and if the
network routes to the Internet, set the boolean ``public`` to
true. If the network should be the target of floating IP NAT, set
``nat_destination`` to true.
true.
``ipv6-preferred``
If it is set to True, nodepool will try to find ipv6 in public net first

View File

@ -51,7 +51,6 @@ class ConfigValidator:
network = {
'name': v.Required(str),
'public': bool,
'nat_destination': bool,
}
providers = {

View File

@ -163,7 +163,6 @@ def loadConfig(config_path):
n.name = network.get('name')
n.id = None
n.public = network.get('public', False)
n.nat_destination = network.get('nat_destination', False)
p.ipv6_preferred = provider.get('ipv6-preferred')
p.azs = provider.get('availability-zones')
p.template_hostname = provider.get(
@ -312,22 +311,6 @@ def _cloudKwargsFromProvider(provider):
if 'service-name' in provider:
cloud_kwargs['compute-service-name'] = provider['service-name']
if 'networks' in provider:
networks = []
for network in provider.get('networks', []):
if 'net-id' in network:
name_or_id = network['net-id']
elif 'net-label' in network:
name_or_id = network['net-label']
else:
name_or_id = network.get('name')
external = network.get('public', False)
nat_destination = network.get('nat_destination', False)
networks.append(dict(
name=name_or_id, routes_externally=external,
nat_destination=nat_destination))
cloud_kwargs['networks'] = networks
auth_kwargs = {}
for auth_key in (
'username', 'password', 'auth-url', 'project-id', 'project-name'):

View File

@ -14,7 +14,7 @@ PyMySQL
PrettyTable>=0.6,<0.8
# shade has a looser requirement on six than nodepool, so install six first
six>=1.7.0
os-client-config>=1.17.0
os-client-config>=1.2.0
shade>=1.6.2
diskimage-builder
voluptuous