diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2015-05-19 15:50:19 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2015-05-27 16:33:17 +0000 |
commit | 9a831cc07ce3b5e7e52c309abf013ccccd147b7a (patch) | |
tree | e10d100785821e65e214fd173db2e634c26fdbf0 /morphlib | |
parent | 87bfac4ebf7969319d34e1c2562c3179739bd868 (diff) | |
download | morph-9a831cc07ce3b5e7e52c309abf013ccccd147b7a.tar.gz |
deploy: Don't imply --upgrade in subsystems
--upgrade being passed on to subsystem deployments broke attempting to
perfom an ssh-rsync upgrade with a system that had a sysroot in it.
Therefore it is appropriate to prevent --upgrade being inherited like
this, as it is seldom what is wanted, and if needed, it can be set in
the cluster, or on the command-line separately.
Change-Id: I59d261ded26df2808ee83cb862bdc247542d1327
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/plugins/deploy_plugin.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py index cca95e69..1be4a3d1 100644 --- a/morphlib/plugins/deploy_plugin.py +++ b/morphlib/plugins/deploy_plugin.py @@ -65,8 +65,10 @@ def configuration_for_system(system_id, vars_from_commandline, return final_env -def determine_if_upgrade(deploy_env, upgrade_config): +def determine_if_upgrade(deploy_env, upgrade_config, is_subsystem): if 'UPGRADE' not in deploy_env: + if is_subsystem: + return False return upgrade_config return deploy_env['UPGRADE'].lower() in ('1', 'true', 'yes') @@ -501,7 +503,8 @@ class DeployPlugin(cliapp.Plugin): is_upgrade = determine_if_upgrade( deploy_env=final_env, - upgrade_config=self.app.settings['upgrade']) + upgrade_config=self.app.settings['upgrade'], + is_subsystem=(parent_location != '')) final_env['UPGRADE'] = ('yes' if is_upgrade else 'no') deployment_type, location = deployment_type_and_location( |