NSX|V: don't log eception when edge is not active
There is no need to log the exception trace when an edge is down or in error state. A log error is sufficient. Change-Id: Icf06db06f3f3e02f01917d543d269b3b4c317aa9
This commit is contained in:
parent
30a4cf2d5f
commit
cc0609b5b4
@ -223,8 +223,9 @@ class EdgeApplianceDriver(object):
|
||||
status_level = self._edge_status_to_level(
|
||||
response['edgeStatus'])
|
||||
except exceptions.VcnsApiException as e:
|
||||
LOG.exception(_LE("VCNS: Failed to get edge status:\n%s"),
|
||||
e.response)
|
||||
LOG.error(_LE("VCNS: Failed to get edge %(edge_id)s status: "
|
||||
"Reason: %(reason)s"),
|
||||
{'edge_id': edge_id, 'reason': e.response})
|
||||
status_level = constants.RouterStatus.ROUTER_STATUS_ERROR
|
||||
try:
|
||||
desc = jsonutils.loads(e.response)
|
||||
@ -232,7 +233,7 @@ class EdgeApplianceDriver(object):
|
||||
constants.VCNS_ERROR_CODE_EDGE_NOT_RUNNING):
|
||||
status_level = constants.RouterStatus.ROUTER_STATUS_DOWN
|
||||
except ValueError:
|
||||
LOG.exception(e.response)
|
||||
LOG.error(_LE('Error code not present. %s'), e.response)
|
||||
|
||||
return status_level
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user