From a9fdb31585a1e3250fd3a4d1627c697d6f624018 Mon Sep 17 00:00:00 2001 From: Frank Maximus Date: Fri, 19 Jan 2018 09:11:57 +0100 Subject: [PATCH 1/2] CLOUDSTACK-9749: Fix Password server running on internal LB VM (#2409) Fixes code to start password server only on routers. --- systemvm/debian/opt/cloud/bin/cs/CsAddress.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py index 6ad50459b57..8b68f538fa4 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py @@ -549,10 +549,21 @@ class CsIP: self.fw_router() self.fw_vpcrouter() + cmdline = self.config.cmdline() + # On deletion nw_type will no longer be known if self.get_type() in ('guest'): if self.config.is_vpc() or self.config.is_router(): CsDevice(self.dev, self.config).configure_rp() + + # If redundant then this is dealt with + # by the master backup functions + if not cmdline.is_redundant(): + if method == "add": + CsPasswdSvc(self.address['public_ip']).start() + elif method == "delete": + CsPasswdSvc(self.address['public_ip']).stop() + logging.error( "Not able to setup source-nat for a regular router yet") @@ -564,11 +575,6 @@ class CsIP: app = CsApache(self) app.setup() - cmdline = self.config.cmdline() - # If redundant then this is dealt with by the master backup functions - if self.get_type() in ["guest"] and not cmdline.is_redundant(): - pwdsvc = CsPasswdSvc(self.address['public_ip']).start() - if self.get_type() == "public" and self.config.is_vpc() and method == "add": if self.address["source_nat"]: vpccidr = cmdline.get_vpccidr() From cfff78d9a114dca8f0552503a68bade83a7faeaa Mon Sep 17 00:00:00 2001 From: Frank Maximus Date: Fri, 19 Jan 2018 09:14:16 +0100 Subject: [PATCH 2/2] CLOUDSTACK-10233: Use namespace in Libvirt domain metadata. (#2410) The documentation of Libvirt specifies the requirement of using an XML namespace, when having metadata in the Domain XML. The Nuage extenstion metadata was not adhering to this specification, and the lastest Libvirt version ignores it in that case. --- .../kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java index 81077fa7254..385fe79ef2a 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java @@ -1544,7 +1544,7 @@ public class LibvirtVMDef { public String toString() { StringBuilder fsBuilder = new StringBuilder(); for (Map.Entry address : addresses.entrySet()) { - fsBuilder.append("\n") + fsBuilder.append("\n") .append("