Skip to content

Commit 1e8d39b

Browse files
committed
CLOUDSTACK-8999: Don't override resource if provided by agent.properties
If a custom resource (kvm/libvirt implementation) is defined in agent.properties don't override with the default, but check and fallback to the default if resource property not defined Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> (cherry picked from commit 536a8b2) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 535ab51 commit 1e8d39b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

python/lib/cloudutils/serviceConfig.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ def configAgent(self):
678678
cfo.addEntry("guid", str(self.syscfg.env.uuid))
679679
if cfo.getEntry("local.storage.uuid") == "":
680680
cfo.addEntry("local.storage.uuid", str(bash("uuidgen").getStdout()))
681-
cfo.addEntry("resource", "com.cloud.hypervisor.kvm.resource.LibvirtComputingResource")
681+
if cfo.getEntry("resource") == "":
682+
cfo.addEntry("resource", "com.cloud.hypervisor.kvm.resource.LibvirtComputingResource")
682683
cfo.save()
683684

684685
self.syscfg.svo.stopService("cloudstack-agent")

0 commit comments

Comments
 (0)