Skip to content

Commit

Permalink
Add os_vif exceptions
Browse files Browse the repository at this point in the history
Include these in types matched in openstack Nova logs.
  • Loading branch information
dosaboy committed Mar 10, 2023
1 parent 13ec4d3 commit f244dd4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions hotsos/core/plugins/openstack/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2194,6 +2194,32 @@
"UnableToAutoAllocateNetwork",
]

# sed -rn 's/^class\s+(\S+)\(.+/ "\1",/p' ./os_vif/exception.py
# sed -rn 's/^class\s+(\S+)\(.+/ "\1",/p' ./vif_plug_ovs/exception.py
_OS_VIF_EXCEPTIONS = [
"ExceptionBase",
"LibraryNotInitialized",
"NoMatchingPlugin",
"NoMatchingPortProfileClass",
"NoSupportedPortProfileVersion",
"NoMatchingVIFClass",
"NoSupportedVIFVersion",
"PlugException",
"UnplugException",
"NetworkMissingPhysicalNetwork",
"NetworkInterfaceNotFound",
"NetworkInterfaceTypeNotDefined",
"ExternalImport",
"NotImplementedForOS",
"AgentError",
"MissingPortProfile",
"WrongPortProfile",
"RepresentorNotFound",
"PciDeviceNotFoundById",
]
OS_VIF_EXCEPTIONS = ["os_vif.exception.{}".format(exc)
for exc in _OS_VIF_EXCEPTIONS]

# Exceptions common to any project should be defined here
EXCEPTIONS_COMMON = [
r'AMQP server on .+ is unreachable',
Expand Down
3 changes: 2 additions & 1 deletion hotsos/core/plugins/openstack/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
NEUTRON_EXCEPTIONS,
NEUTRONCLIENT_EXCEPTIONS,
OCTAVIA_EXCEPTIONS,
OS_VIF_EXCEPTIONS,
OVSDBAPP_EXCEPTIONS,
MASAKARI_EXCEPTIONS,
)
Expand Down Expand Up @@ -193,7 +194,7 @@
'masakari': MASAKARI_EXCEPTIONS,
'neutron': NEUTRON_EXCEPTIONS + OVSDBAPP_EXCEPTIONS,
'nova': NOVA_EXCEPTIONS + PYTHON_LIBVIRT_EXCEPTIONS +
NEUTRONCLIENT_EXCEPTIONS,
NEUTRONCLIENT_EXCEPTIONS + OS_VIF_EXCEPTIONS,
'octavia': OCTAVIA_EXCEPTIONS,
'placement': PLACEMENT_EXCEPTIONS,
}
Expand Down

0 comments on commit f244dd4

Please sign in to comment.