Write the cloud name into the provider info

So that we can do per-region mirrors with the name of the cloud
accounted for, write out a NODEPOOL_CLOUD variable.

Change-Id: Ic6b72b5ecc52dad243d8be91469ab2b6073a4dc5
This commit is contained in:
Monty Taylor 2015-11-18 13:31:54 -05:00 committed by James E. Blair
parent a7f1f2aace
commit 17674a3146
2 changed files with 3 additions and 0 deletions

View File

@ -66,6 +66,8 @@ Those files include:
**NODEPOOL_PROVIDER**
The name of the provider
**NODEPOOL_CLOUD**
The name of the cloud
**NODEPOOL_REGION**
The name of the region
**NODEPOOL_AZ**

View File

@ -623,6 +623,7 @@ class NodeLauncher(threading.Thread):
# Provider information for this node set
f = ftp.open('/etc/nodepool/provider', 'w')
f.write('NODEPOOL_PROVIDER=%s\n' % self.provider.name)
f.write('NODEPOOL_CLOUD=%s\n' % self.provider.cloud_config.name)
f.write('NODEPOOL_REGION=%s\n' % (
self.provider.region_name or '',))
f.write('NODEPOOL_AZ=%s\n' % (self.node.az or '',))