Merge "Update sysinv to handle newer version of python-docker"
This commit is contained in:
commit
54fdc72026
|
@ -315,6 +315,7 @@ class KubeAppController(rest.RestController):
|
||||||
return KubeApp.convert_with_links(db_app)
|
return KubeApp.convert_with_links(db_app)
|
||||||
else:
|
else:
|
||||||
if db_app.status not in [constants.APP_APPLY_SUCCESS,
|
if db_app.status not in [constants.APP_APPLY_SUCCESS,
|
||||||
|
constants.APP_REMOVE_FAILURE,
|
||||||
constants.APP_APPLY_FAILURE]:
|
constants.APP_APPLY_FAILURE]:
|
||||||
raise wsme.exc.ClientSideError(_(
|
raise wsme.exc.ClientSideError(_(
|
||||||
"Application-remove rejected: operation is not allowed while "
|
"Application-remove rejected: operation is not allowed while "
|
||||||
|
|
|
@ -42,7 +42,6 @@ kube_app_opts = [
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(kube_app_opts)
|
CONF.register_opts(kube_app_opts)
|
||||||
ARMADA_CONTAINER_NAME = 'armada_service'
|
ARMADA_CONTAINER_NAME = 'armada_service'
|
||||||
ARMADA_ERRORS = ['ERROR', 'failed', 'timed out']
|
|
||||||
MAX_DOWNLOAD_THREAD = 20
|
MAX_DOWNLOAD_THREAD = 20
|
||||||
|
|
||||||
|
|
||||||
|
@ -705,8 +704,8 @@ class DockerHelper(object):
|
||||||
if armada_svc:
|
if armada_svc:
|
||||||
if request == 'validate':
|
if request == 'validate':
|
||||||
cmd = 'armada validate ' + manifest_file
|
cmd = 'armada validate ' + manifest_file
|
||||||
exec_logs = armada_svc.exec_run(cmd)
|
(exit_code, exec_logs) = armada_svc.exec_run(cmd)
|
||||||
if "Successfully validated" in exec_logs:
|
if exit_code == 0:
|
||||||
LOG.info("Manifest file %s was successfully validated." %
|
LOG.info("Manifest file %s was successfully validated." %
|
||||||
manifest_file)
|
manifest_file)
|
||||||
else:
|
else:
|
||||||
|
@ -716,8 +715,8 @@ class DockerHelper(object):
|
||||||
elif request == 'apply':
|
elif request == 'apply':
|
||||||
cmd = 'armada apply --debug ' + manifest_file + overrides_str
|
cmd = 'armada apply --debug ' + manifest_file + overrides_str
|
||||||
LOG.info("Armada apply command = %s" % cmd)
|
LOG.info("Armada apply command = %s" % cmd)
|
||||||
exec_logs = armada_svc.exec_run(cmd)
|
(exit_code, exec_logs) = armada_svc.exec_run(cmd)
|
||||||
if not any(str in exec_logs for str in ARMADA_ERRORS):
|
if exit_code == 0:
|
||||||
LOG.info("Application manifest %s was successfully "
|
LOG.info("Application manifest %s was successfully "
|
||||||
"applied/re-applied." % manifest_file)
|
"applied/re-applied." % manifest_file)
|
||||||
else:
|
else:
|
||||||
|
@ -726,8 +725,8 @@ class DockerHelper(object):
|
||||||
exec_logs)
|
exec_logs)
|
||||||
elif request == 'delete':
|
elif request == 'delete':
|
||||||
cmd = 'armada delete --debug --manifest ' + manifest_file
|
cmd = 'armada delete --debug --manifest ' + manifest_file
|
||||||
exec_logs = armada_svc.exec_run(cmd)
|
(exit_code, exec_logs) = armada_svc.exec_run(cmd)
|
||||||
if not any(str in exec_logs for str in ARMADA_ERRORS):
|
if exit_code == 0:
|
||||||
LOG.info("Application charts were successfully "
|
LOG.info("Application charts were successfully "
|
||||||
"deleted.")
|
"deleted.")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue