Fix start-done removing positional argument

Commit [1] introduced a positional argument in one of the
state deploy state transition functions. This argument isn't
passed all times it is called, so this commit sets a default
value for the argument so that it won't fail if it is not passed.

[1] https://review.opendev.org/c/starlingx/update/+/924455

Test Plan
PASS: run major release deploy start successfully in a failed
      system after applying the fix

Closes-bug: 2074083

Change-Id: I10ba23d6f368928358a747ae6d9c3de6300d5392
Signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>
This commit is contained in:
Heitor Matsui
2024-07-25 10:13:58 -03:00
parent 43941c1876
commit ed7c7956f0

View File

@@ -173,7 +173,7 @@ class DeployState(object):
def start_failed(self):
self.transform(DEPLOY_STATES.START_FAILED)
def start_done(self, commit_id):
def start_done(self, commit_id=None):
db_api_instance = get_instance()
db_api_instance.update_deploy(commit_id=commit_id)
self.transform(DEPLOY_STATES.START_DONE)