Fail to notify changes in feed repo

Since the deploy start turned async it failed to notify the patch
agent about the feed changes. This review changes the code to
notify the patch agent to run at the end of deploy start.

Test plan:
PASS: (SX) 'software deploy host <hostname>' ends with host-done
PASS: (SX) Check if the active ostree repo was updated
      'ostree log --repo=/sysroot/ostree/repo starlingx'
PASS: (DX) 'software deploy host <hostname>' ends with host-done
PASS: (DX) Check if the active ostree repo was updated
      'ostree log --repo=/sysroot/ostree/repo starlingx'

Story: 2010676
Task: 50572

Change-Id: I653209a6b6aad47272843a318ca5b0646245515b
Signed-off-by: Lindley Vieira <lindley.vieira@windriver.com>
This commit is contained in:
Lindley Vieira
2024-07-12 04:56:47 -03:00
parent 41283a5607
commit 6f8a725875
2 changed files with 3 additions and 3 deletions

View File

@@ -93,9 +93,6 @@ class DeployController(RestController):
if result and 'error' in result and result["error"] != "":
response.status = 406
sc.send_latest_feed_commit_to_agent()
sc.software_sync()
return result
@expose(method='GET', template='json')

View File

@@ -2576,6 +2576,9 @@ class PatchController(PatchService):
deploy_state.start_done()
self._update_state_to_peer()
self.send_latest_feed_commit_to_agent()
self.software_sync()
def wait_deploy_patch_then_run(self, proc, metadata_file, previous_commit, feed_repo):
def monitor():
p = proc.wait()