Agent RPC step size in config.
Number of resources for neutron to divide the large RPC call data sets always equals 100. In "big" networks even these numbers can be still huge and cause service timeouts. Now we can decrease these numbers in config. Default value equals 20 now. Closes-Bug: 1938202 Change-Id: Idf545ad31398ded460b6c2ae1675dd5e9ae71440
This commit is contained in:
parent
476bf74783
commit
1221cf1b24
@ -34,7 +34,6 @@ from oslo_utils import uuidutils
|
||||
|
||||
from neutron.agent import resource_cache
|
||||
from neutron.api.rpc.callbacks import resources
|
||||
from neutron.common import _constants as n_const
|
||||
from neutron import objects
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -182,7 +181,7 @@ class PluginApi(object):
|
||||
ret_devices_down = []
|
||||
failed_devices_down = []
|
||||
|
||||
step = n_const.RPC_RES_PROCESSING_STEP
|
||||
step = cfg.CONF.rpc_resources_processing_step
|
||||
devices_up = list(devices_up)
|
||||
devices_down = list(devices_down)
|
||||
for i in range(0, max(len(devices_up), len(devices_down)), step):
|
||||
|
@ -27,7 +27,6 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent import firewall
|
||||
from neutron.common import _constants as common_constants
|
||||
from neutron.conf.agent import securitygroups_rpc as sc_cfg
|
||||
|
||||
|
||||
@ -155,7 +154,7 @@ class SecurityGroupAgentRpc(object):
|
||||
|
||||
@_port_filter_lock
|
||||
def _apply_port_filter(self, device_ids, update_filter=False):
|
||||
step = common_constants.AGENT_RES_PROCESSING_STEP
|
||||
step = cfg.CONF.rpc_resources_processing_step
|
||||
devices = {}
|
||||
security_groups = {}
|
||||
security_group_member_ips = {}
|
||||
|
@ -13,6 +13,7 @@
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron._i18n import _
|
||||
from neutron.common import _constants
|
||||
|
||||
AGENT_OPTS = [
|
||||
cfg.IntOpt('agent_down_time', default=75,
|
||||
@ -41,6 +42,12 @@ AGENT_OPTS = [
|
||||
"enable_new_agents=False. In the case, user's "
|
||||
"resources will not be scheduled automatically to the "
|
||||
"agent until admin changes admin_state_up to True.")),
|
||||
cfg.IntOpt("rpc_resources_processing_step",
|
||||
default=_constants.RPC_RES_PROCESSING_STEP, min=1,
|
||||
help=_("Number of resources for neutron to divide "
|
||||
"the large RPC call data sets. It can be reduced "
|
||||
"if RPC timeout occurred. The best value can be "
|
||||
"determined empirically in your environment."))
|
||||
]
|
||||
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Introduced config option for RPC agent step size customization:
|
||||
rpc_resources_processing_step - Number of resources for neutron to divide
|
||||
the large RPC call data sets. It can be reduced if RPC timeout occurred.
|
||||
Default value equals 20. The best value can be determined empirically in
|
||||
your environment.
|
Loading…
Reference in New Issue
Block a user