Skip to content

Commit

Permalink
Closes-Bug: #1459869
Browse files Browse the repository at this point in the history
Server Manager: contrail_upgrade flag should not be set after re-image
and provision Edit

Issue:
contrail_upgrade flag is set when we provision a target right after
re-image.
This flag needs to be set only when an already provisioned server,
is provisioned with a different image.

Change-Id: If5bcb838658b3e319e337de2bdc26aa399fa1285
  • Loading branch information
thilakrajs committed Jun 1, 2015
1 parent 6fa0c0c commit b2f2efa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server_mgr_puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,10 @@ def add_contrail_upgrade(
self, server, provision_parameters):
data = ''

if server.get('provisioned_id',"") != provision_parameters.get('package_image_id', ""):
#Set the flag only when targets image_id is not equal to what it is going
#to be provisoned with
if server.get('provisioned_id', "") != "" and \
server.get('provisioned_id',"") != provision_parameters.get('package_image_id', ""):
data += 'contrail::params::contrail_upgrade: %s\n' %(
True)

Expand Down

0 comments on commit b2f2efa

Please sign in to comment.