From a6f8b65150c2f9fba663a2a85f8bfd7ba259e8e2 Mon Sep 17 00:00:00 2001 From: Deepinder Setia Date: Wed, 21 Sep 2016 11:56:34 -0700 Subject: [PATCH] VM launched automatically (V1) as part of service instance should be owned by tenant. Otherwise RBAC would prevent user access to the VM. Change-Id: I7645dde6c1b1dc53e9b3577bbfdead127dfc1b2f Closes-Bug: #1625874 --- src/config/svc-monitor/svc_monitor/instance_manager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config/svc-monitor/svc_monitor/instance_manager.py b/src/config/svc-monitor/svc_monitor/instance_manager.py index 2d472b182c3..e0cdc9ab288 100644 --- a/src/config/svc-monitor/svc_monitor/instance_manager.py +++ b/src/config/svc-monitor/svc_monitor/instance_manager.py @@ -242,6 +242,10 @@ def link_si_to_vm(self, si, st, instance_index, vm_uuid): VirtualMachineSM.locate(vm_obj.uuid) self.logger.info("Info: VM %s updated SI %s" % (vm_obj.get_fq_name_str(), si_obj.get_fq_name_str())) + + # vm should be owned by tenant + proj_obj = self._get_project_obj(si.fq_name[:-1]) + self._vnc_lib.chown(vm_uuid, proj_obj.uuid) return vm_obj def create_port_tuple(self, si, st, instance_index, pt_uuid):