Merge "Network agent rebalance/reschedule config changes"

This commit is contained in:
Zuul 2019-04-18 13:35:30 +00:00 committed by Gerrit Code Review
commit 7eace6889e
5 changed files with 14 additions and 16 deletions

View File

@ -1163,14 +1163,6 @@ data:
# Increase from default of 75 seconds to avoid agents being declared
# down during controller swacts, reboots, etc...
agent_down_time: 180
# Set to false so as to remove conflict with newly introduced
# network rebalancing/rescheduling that will move routers off
# down l3 agents, rebalance routers to newly up l3 agents.
router_auto_schedule: false
# Set to false so as to remove conflict with newly introduced
# network rebalancing/rescheduling that will move networks off
# down DHCP agents, rebalance networks to newly up DHCP agents.
network_auto_schedule: false
agent:
root_helper: sudo
vhost:

View File

@ -2490,7 +2490,7 @@ class HostController(rest.RestController):
db_app.progress = None
db_app.save()
pecan.request.rpcapi.perform_app_apply(
pecan.request.context, db_app)
pecan.request.context, db_app, False)
else:
LOG.info("%s system app is present but not applied, "
"skipping re-apply" % constants.HELM_APP_OPENSTACK)

View File

@ -282,11 +282,12 @@ class KubeAppController(rest.RestController):
raise wsme.exc.ClientSideError(_(
"Application-apply rejected: operation is not allowed "
"while the current status is {}.".format(db_app.status)))
app_not_already_applied = (db_app.status != constants.APP_APPLY_SUCCESS)
db_app.status = constants.APP_APPLY_IN_PROGRESS
db_app.progress = None
db_app.save()
pecan.request.rpcapi.perform_app_apply(pecan.request.context,
db_app)
db_app, app_not_already_applied)
return KubeApp.convert_with_links(db_app)
else:
if db_app.status not in [constants.APP_APPLY_SUCCESS,

View File

@ -10805,17 +10805,19 @@ class ConductorManager(service.PeriodicService):
"""
self._app.perform_app_upload(rpc_app, tarfile)
def perform_app_apply(self, context, rpc_app):
def perform_app_apply(self, context, rpc_app, app_not_already_applied):
"""Handling of application install request (via AppOperator)
:param context: request context.
:param rpc_app: data object provided in the rpc request
:param app_not_already_applied: app not yet successfully applied
"""
app_installed = self._app.perform_app_apply(rpc_app)
if app_installed:
if app_installed and app_not_already_applied:
# Update the VIM configuration as it may need to manage the newly
# installed application.
# installed application. Only do this if the application
# was not already applied.
self._update_vim_config(context)
return app_installed

View File

@ -1768,15 +1768,18 @@ class ConductorAPI(sysinv.openstack.common.rpc.proxy.RpcProxy):
rpc_app=rpc_app,
tarfile=tarfile))
def perform_app_apply(self, context, rpc_app):
def perform_app_apply(self, context, rpc_app, app_not_already_applied):
"""Handle application apply request
:param context: request context.
:param rpc_app: data object provided in the rpc request
:param app_not_already_applied: app not already succesfully applied
"""
return self.cast(context,
self.make_msg('perform_app_apply',
rpc_app=rpc_app))
self.make_msg(
'perform_app_apply',
rpc_app=rpc_app,
app_not_already_applied=app_not_already_applied))
def perform_app_remove(self, context, rpc_app):
"""Handle application remove request