Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

config: use copy() of vol config in _load_volumes

Previously, _load_volumes would pass a reference to the original volume
settings stored in the StarClusterConfig object when parsing cluster
templates. Updated the code to use a copy() of the volume config
instead. This prevents a Cluster object or its plugin objects from
potentially modifying the original values in the StarClusterConfig
object.
  • Loading branch information...
commit 80f5956fdd49b3dfb1c9aad83ddd5eefd80cab2a 1 parent cba12ad
@jtriley authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  starcluster/config.py
View
3  starcluster/config.py
@@ -364,7 +364,8 @@ def _load_volumes(self, store):
if not volume in self.vols:
raise exception.ConfigError(
"volume '%s' not defined in config" % volume)
- vol = self.vols.get(volume)
+ vol = self.vols.get(volume).copy()
+ del vol['__name__']
vols[volume] = vol
def _load_plugins(self, store):
Please sign in to comment.
Something went wrong with that request. Please try again.