Browse Source

check app progress before swact

This update adds a new check which will
reject a swact while an application
apply is in progress.

Closes-Bug: 1926405
Change-Id: I3c683776f3ecaf9c78d111b5b1108e9582497aaa
Signed-off-by: Daniel Safta <daniel.safta@windriver.com>
changes/45/788245/7
Daniel Safta 2 months ago
parent
commit
6ac2c0e3d0
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py

+ 8
- 0
sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py View File

@ -6081,6 +6081,14 @@ class HostController(rest.RestController):
raise wsme.exc.ClientSideError(
_("%s" % response['error_details']))
# Check no app apply is in progress
# Skip if it is a force swact
if force_swact is False:
for _app in pecan.request.dbapi.kube_app_get_all():
if _app.status == constants.APP_APPLY_IN_PROGRESS:
raise wsme.exc.ClientSideError(
_("Swact action not allowed. %s apply is in progress." % _app.name))
def check_lock_storage(self, hostupdate, force=False):
"""Pre lock semantic checks for storage"""
LOG.info("%s ihost check_lock_storage" % hostupdate.displayid)


Loading…
Cancel
Save