From 9a831cc07ce3b5e7e52c309abf013ccccd147b7a Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Tue, 19 May 2015 15:50:19 +0000 Subject: 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 --- morphlib/plugins/deploy_plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'morphlib/plugins') 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( -- cgit v1.2.1