Fail: No deploy in progress in "deploy start"

Bug #2069829 reported by Lindley Werner Soares Vieira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Lindley Werner Soares Vieira

Bug Description

Brief Description

Software deploy start <release> API fails with below error

[sysadmin@controller-0 ~(keystone_admin)]$ software deploy start starlingx-24.09.1
Error:
Internal error occurred. Error signature [822412ba]
Severity

Critical

Steps to Reproduce

Install the system with latest master build
software upload <reboot required patch>
software deploy start <release>

Expected Behavior

Start API to execute successfully

Actual Behavior

Start API fails

Reproducibility

Intermittent

1 out of 5 times

System Configuration

AIO-DX

Load info (2024-06-10_19-00-11)

Timestamp/Logs

2024-06-12T13:56:37: software-controller-daemon[1592499:139811624507136]: software_controller.py(686): ERROR: Peer controller deploy state has diverged.
2024-06-12T13:56:37: software-controller-daemon[1592499:139811633035008]: utils.py(62): ERROR: Error to update deploy state. No deploy in progress.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pecan/core.py", line 683, in __call__
    self.invoke_controller(controller, args, kwargs, state)
  File "/usr/lib/python3/dist-packages/pecan/core.py", line 574, in invoke_controller
    result = controller(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/software/api/controllers/v1/deploy.py", line 79, in start
    result = sc.software_deploy_start_api(release, _force)
  File "/usr/lib/python3/dist-packages/software/deploy_state.py", line 226, in exec_op
    res = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/software/software_controller.py", line 2561, in software_deploy_start_api
    deploy_state.start_done()
  File "/usr/lib/python3/dist-packages/software/deploy_state.py", line 164, in start_done
    self.transform(DEPLOY_STATES.START_DONE)
  File "/usr/lib/python3/dist-packages/software/deploy_state.py", line 131, in transform
    db_api.update_deploy(state=target_state)
  File "/usr/lib/python3/dist-packages/software/db/api.py", line 65, in update_deploy
    self.deploy_handler.update(new_state=state)
  File "/usr/lib/python3/dist-packages/software/software_entities.py", line 323, in update
    raise DeployDoNotExist("Error to update deploy state. No deploy in progress.")
software.exceptions.DeployDoNotExist: Error to update deploy state. No deploy in progress.
Test Activity

Developer Testing

Changed in starlingx:
assignee: nobody → Lindley Werner Soares Vieira (lindley-vieira)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to update (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/update/+/922327

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to update (master)

Reviewed: https://review.opendev.org/c/starlingx/update/+/922327
Committed: https://opendev.org/starlingx/update/commit/93323430073aea289a8e43e577c7ac92e012853e
Submitter: "Zuul (22348)"
Branch: master

commit 93323430073aea289a8e43e577c7ac92e012853e
Author: Lindley Vieira <email address hidden>
Date: Wed Jun 19 10:58:15 2024 -0300

    Fail: No deploy in progress in "deploy start"

    During deploy start, it queries all deployments inside software.json
    to update the state, but this file is being wrongly populated.

    This review fixes the software.json file population.
    Also removes a duplicated call to create a deploy host in this file.

    Test plan:
    PASS: "software deploy start <patch>"
    PASS: Should not fail with: "Error to update deploy state."
    PASS: Should not fail with: \
          "Error to create. Deploy host already exist."
    PASS: Deploy start must complete with the patch in the repo.

    Closes-bug: 2069829
    Story: 2010676
    Task: 50494

    Change-Id: I560a905240ec04084e4659b251cce644a4593f33
    Signed-off-by: Lindley Vieira <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.10.0 stx.update
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.