From 17674a314623837d29e1d9841d94f8dbd1d73e48 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 18 Nov 2015 13:31:54 -0500 Subject: [PATCH] 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 --- doc/source/scripts.rst | 2 ++ nodepool/nodepool.py | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/source/scripts.rst b/doc/source/scripts.rst index efc3c3119..17e44cb3e 100644 --- a/doc/source/scripts.rst +++ b/doc/source/scripts.rst @@ -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** diff --git a/nodepool/nodepool.py b/nodepool/nodepool.py index c24539f5c..5df174e86 100644 --- a/nodepool/nodepool.py +++ b/nodepool/nodepool.py @@ -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 '',))