Skip to content

Commit

Permalink
Fix regressions issued in svc monitor
Browse files Browse the repository at this point in the history
Few regressions have been introduced in svc monitor which broke v2 service chaining.
Thanks to Senthil for providing the fix.

Change-Id: Ide539adee94b619ded6b129540ac6cc04f78e0a9
Closes-Bug: 1545663
  • Loading branch information
Sachin Bansal committed Feb 17, 2016
1 parent bc983d5 commit 94a2385
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/config/svc-monitor/svc_monitor/config_db.py
Expand Up @@ -469,7 +469,6 @@ def evaluate(self):
vm = VirtualMachineSM.get(self.virtual_machine)
if vm:
self._manager.port_delete_or_si_link(vm, self)
return

self._manager.port_tuple_agent.update_port_tuple(self)

Expand Down
18 changes: 10 additions & 8 deletions src/config/svc-monitor/svc_monitor/port_tuple.py
Expand Up @@ -53,7 +53,7 @@ def _allocate_iip_for_family(self, iip_family, si, port, vmi):
iip_obj.set_instance_ip_mode(si.ha_mode)
try:
self._vnc_lib.instance_ip_create(iip_obj)
self._vnc_lib.ref_relax_for_delete(iip_id, vn_obj.uuid)
self._vnc_lib.ref_relax_for_delete(iip_obj.uuid, vn_obj.uuid)
except RefsExistError:
self._vnc_lib.instance_ip_update(iip_obj)
except Exception as e:
Expand Down Expand Up @@ -196,12 +196,14 @@ def get_port_config(self, st, si):

return port_config

def update_port_tuple(self, vmi):
if not vmi.port_tuple:
self.delete_old_vmi_links(vmi)
return

pt = PortTupleSM.get(vmi.port_tuple)
def update_port_tuple(self, vmi=None, pt_id=None):
if vmi:
if not vmi.port_tuple:
self.delete_old_vmi_links(vmi)
return
pt = PortTupleSM.get(vmi.port_tuple)
if pt_id:
pt = PortTupleSM.get(pt_id)
if not pt:
return
si = ServiceInstanceSM.get(pt.parent_key)
Expand Down Expand Up @@ -234,6 +236,6 @@ def update_port_tuple(self, vmi):
def update_port_tuples(self):
for si in ServiceInstanceSM.values():
for pt_id in si.port_tuples:
self.update_port_tuple(pt_id)
self.update_port_tuple(pt_id=pt_id)
for iip in InstanceIpSM.values():
self.delete_shared_iip(iip)

0 comments on commit 94a2385

Please sign in to comment.