Misplaced log statement in NSX plugin

Bug #1304723 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Salvatore Orlando

Bug Description

In the create_port method for the NSX plugin, successful creation in NSX is logged even before the DB transaction is committed.
This should be fixed with a simple patch.

diff --git a/neutron/plugins/vmware/plugins/base.py b/neutron/plugins/vmware/plugins/base.py
index fc39bec..9f9f7ac 100644
--- a/neutron/plugins/vmware/plugins/base.py
+++ b/neutron/plugins/vmware/plugins/base.py
@@ -1169,10 +1169,6 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                 self._create_mac_learning_state(context, port_data)
             elif mac_ext.MAC_LEARNING in port_data:
                 port_data.pop(mac_ext.MAC_LEARNING)
-
- LOG.debug(_("create_port completed on NSX for tenant "
- "%(tenant_id)s: (%(id)s)"), port_data)
-
             self._process_portbindings_create_and_update(context,
                                                          port['port'],
                                                          port_data)
@@ -1183,6 +1179,8 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                 port_data['device_owner'],
                 self._port_drivers['create']['default'])
             port_create_func(context, port_data)
+ LOG.debug(_("port created on NSX backend for tenant "
+ "%(tenant_id)s: (%(id)s)"), port_data)
         except n_exc.NotFound:
             LOG.warning(_("Logical switch for network %s was not "
                           "found in NSX."), port_data['network_id'])

Tags: vmware
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/86188

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/86188
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0e889bbb8283a539177a21f063db9034a5310ee7
Submitter: Jenkins
Branch: master

commit 0e889bbb8283a539177a21f063db9034a5310ee7
Author: Salvatore Orlando <email address hidden>
Date: Tue Apr 8 16:37:43 2014 -0700

    VMware: log backend port creation in the right place

    Change-Id: Ifb8cbb31902193ecf0dde56c46688dcdd637b3bb
    Closes-Bug: 1304723

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.