Add extra debug log with current and new port statuses in ML2 plugin

This patch only adds one extra debug log to log current and new
port statuses in the method which updates that status in the DB.
This may be useful e.g. to understand why notifications about port
change aren't send to Nova in some cases (like unshelve instance, see
related bug).

Related-Bug: #1953478
Change-Id: I4c6fd5b0b33bf764c0b182f169173453ea7a4efc
This commit is contained in:
Slawek Kaplonski 2021-12-23 11:57:47 +01:00
parent 19a20eaca8
commit 34e560fad0

View File

@ -2187,6 +2187,8 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2,
updated = False updated = False
network = None network = None
port_id = port.id port_id = port.id
LOG.debug("Current status of the port %s is: %s; "
"New status is: %s", port_id, port.status, status)
if ((port.status != status and if ((port.status != status and
port['device_owner'] != const.DEVICE_OWNER_DVR_INTERFACE) or port['device_owner'] != const.DEVICE_OWNER_DVR_INTERFACE) or
port['device_owner'] == const.DEVICE_OWNER_DVR_INTERFACE): port['device_owner'] == const.DEVICE_OWNER_DVR_INTERFACE):