NSX|V: increase default retries

When the VC is under heavy load there are cases when a spoofguard
policy is unable to update the status of a vNIC. This is due to
the fact that the VC is under load and the actual instance port may
not be up.

In addition to this if we have a BadRequest exception we increase
the wait timeout from 2 seconds to 4.

Change-Id: I2d2d0a7b59cc6ece41f8b5932a23209071a9df58
This commit is contained in:
Gary Kotton 2016-03-09 00:24:43 -08:00
parent 57aa0ffd5e
commit ada21d59b1
2 changed files with 2 additions and 2 deletions

View File

@ -332,7 +332,7 @@ nsxv_opts = [
'edge_size: compact, large, xlarge, quadlarge '
'and default is large.')),
cfg.IntOpt('retries',
default=10,
default=20,
help=_('Maximum number of API retries on endpoint.')),
cfg.StrOpt('mgt_net_moid',
help=_('Network ID for management network connectivity')),

View File

@ -75,7 +75,7 @@ CSR = "csr"
CERTIFICATE = "certificate"
def retry_upon_exception(exc, delay=500, max_delay=2000,
def retry_upon_exception(exc, delay=500, max_delay=4000,
max_attempts=cfg.CONF.nsxv.retries):
return retrying.retry(retry_on_exception=lambda e: isinstance(e, exc),
wait_exponential_multiplier=delay,