Browse Source

Merge "check app progress before swact"

changes/97/790497/1
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
5d11877c68
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