diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index 924e656225..88864ba0ae 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -958,10 +958,10 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin, port['port'], ret_port) + update_assigned_addresses = False if addr_pair.ADDRESS_PAIRS in attrs: - self.update_address_pairs_on_port(context, id, port, - original_port, - ret_port) + update_assigned_addresses = self.update_address_pairs_on_port( + context, id, port, original_port, ret_port) if comp_owner_update: # Create dhcp bindings, the port is now owned by an instance @@ -984,7 +984,8 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin, self._delete_dhcp_static_binding(context, original_port) else: # Update vnic with the newest approved IP addresses - if has_port_security and updates_fixed_ips: + if (has_port_security and + (updates_fixed_ips or update_assigned_addresses)): LOG.debug("Updating vnic port fixed-ips: port %s, vnic " "%s, fixed-ips %s", id, vnic_id, ret_port['fixed_ips'])