Skip to content

Commit

Permalink
Service instance spawn issue after upgrade
Browse files Browse the repository at this point in the history
Service instance upgrade failed because of a config_db change to
store VM index correctly. VM index should be extracted from nova
vm name for all releases prior to 2.2.

Change-Id: I34fd02a643c8300d6992dc7fd20971449feb53ea
Closes-Bug: #1475820

Update service on static route changes

Update service state so that any property changes are reflected.
This does not relaunch the service VMs but only updates the properties
that have changed (in this case interface static routes)

Change-Id: I1b49be6bc159dab962f002c1f134cf45dc41fe41
Closes-Bug: #1479283
  • Loading branch information
rrugge committed Sep 16, 2015
1 parent 6fbba98 commit ae118a3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/config/svc-monitor/svc_monitor/svc_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def _vnc_subscribe_actions(self, oper_info):
for si_id in dependency_tracker.resources.get('service_instance', []):
si = ServiceInstanceSM.get(si_id)
if si:
si.state = 'launch'
self._create_service_instance(si)
else:
for vm_id in dependency_tracker.resources.get(
Expand Down Expand Up @@ -364,15 +365,15 @@ def upgrade(self):
si.proj_name, id=vm_id)
if not nova_vm:
continue
if not nova_vm.name.split('__')[-1].isdigit():
continue

si_obj = ServiceInstance()
si_obj.name = si.name
si_obj.fq_name = si.fq_name
index = int(nova_vm.name.split('__')[-1]) - 1
instance_name = self.vm_manager._get_instance_name(
si_obj, vm.index)
if vm.name == instance_name:
continue
nova_vm.update(name=instance_name)
si_obj, index)
vm_obj = VirtualMachine()
vm_obj.uuid = vm_id
vm_obj.fq_name = [vm_id]
Expand Down

0 comments on commit ae118a3

Please sign in to comment.