Apply network templates before preupgrade handler

Controller's "preupgrade" handler replaces
  deployment_info if "isolated". After that
  Octane applies network template.

  But nailgun will NOT apply any new settings
  if replaced_deployment_info exists for node.

  Closes-bug: 1572240

Change-Id: I06922a59a5f6976acb7c268460fb95fcde86aa54
(cherry picked from commit 62f75c1044)
This commit is contained in:
Roman Sokolkov 2016-05-26 09:36:27 +03:00 committed by Oleg Gelbukh
parent 39b75e2bf9
commit ebab9a6562
1 changed files with 1 additions and 1 deletions

View File

@ -54,9 +54,9 @@ def upgrade_node(env_id, node_ids, isolated=False, network_template=None):
call_handlers('preupgrade')
call_handlers('prepare')
env_util.move_nodes(env, nodes)
call_handlers('predeploy')
if network_template:
env_util.set_network_template(env, network_template)
call_handlers('predeploy')
if isolated or len(nodes) == 1:
env_util.deploy_nodes(env, nodes)
else: