From 3b23d5af740b57acd7745d4475fb2a5877bbf043 Mon Sep 17 00:00:00 2001 From: Frank Maximus Date: Tue, 23 Jan 2018 17:20:03 +0100 Subject: [PATCH] CLOUDSTACK-10245: Fix password server regression (#2419) In case of isolated, both self.config.is_vpc() and self.config.is_router() are false, but self.config.is_dhcp() is true. Moved the password server logic to the `if has_metadata` block, as this is valid for all 3 systemvm types. --- systemvm/debian/opt/cloud/bin/cs/CsAddress.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py index 8b68f538fa4..42992b55123 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py @@ -556,14 +556,6 @@ class CsIP: 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") @@ -575,6 +567,14 @@ class CsIP: app = CsApache(self) app.setup() + # 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() + if self.get_type() == "public" and self.config.is_vpc() and method == "add": if self.address["source_nat"]: vpccidr = cmdline.get_vpccidr()