Merge "Fix the issue which raise FloatingIpPoolNotFound"

This commit is contained in:
Jenkins 2013-12-09 18:45:18 +00:00 committed by Gerrit Code Review
commit 6020f1db45
3 changed files with 10 additions and 2 deletions

3
README
View File

@ -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

View File

@ -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)

View File

@ -18,6 +18,7 @@ providers:
auth-url: 'fake'
project-id: 'fake'
max-servers: 96
pool: 'fake'
images:
- name: nodepool-fake
base-image: 'Fake Precise'