diff --git a/README b/README index c8abe2d47..328765294 100644 --- a/README +++ b/README @@ -24,6 +24,9 @@ directory, ie: git review -x XXXXX +If the cloud being used has no default_floating_pool defined in nova.conf, +you will need to define a pool name using nodepool.layout to use floating ips. + Set up database: mysql -u root diff --git a/nodepool/nodepool.py b/nodepool/nodepool.py index 433b72376..ef17879ef 100644 --- a/nodepool/nodepool.py +++ b/nodepool/nodepool.py @@ -321,7 +321,8 @@ class NodeLauncher(threading.Thread): ip = server.get('public_v4') if not ip and self.manager.hasExtension('os-floating-ips'): - ip = self.manager.addPublicIP(server_id) + ip = self.manager.addPublicIP(server_id, + pool=self.provider.pool) if not ip: raise Exception("Unable to find public IP of server") @@ -459,7 +460,8 @@ class ImageUpdater(threading.Thread): ip = server.get('public_v4') if not ip and self.manager.hasExtension('os-floating-ips'): - ip = self.manager.addPublicIP(server_id) + ip = self.manager.addPublicIP(server_id, + pool=self.provider.pool) if not ip: raise Exception("Unable to find public IP of server") server['public_v4'] = ip @@ -644,6 +646,7 @@ class NodePool(threading.Thread): p.service_name = provider.get('service-name') p.region_name = provider.get('region-name') p.max_servers = provider['max-servers'] + p.pool = provider.get('pool') p.rate = provider.get('rate', 1.0) p.boot_timeout = provider.get('boot-timeout', 60) p.images = {} @@ -713,6 +716,7 @@ class NodePool(threading.Thread): p.service_type != oldmanager.provider.service_type or p.service_name != oldmanager.provider.service_name or p.max_servers != oldmanager.provider.max_servers or + p.pool != oldmanager.provider.pool or p.rate != oldmanager.provider.rate or p.boot_timeout != oldmanager.provider.boot_timeout): stop_managers.append(oldmanager) diff --git a/tools/fake.yaml b/tools/fake.yaml index fa7ef0735..00a04f462 100644 --- a/tools/fake.yaml +++ b/tools/fake.yaml @@ -18,6 +18,7 @@ providers: auth-url: 'fake' project-id: 'fake' max-servers: 96 + pool: 'fake' images: - name: nodepool-fake base-image: 'Fake Precise'