From 25aacfffc5fbf3c31e1fbd5144ec570703545b82 Mon Sep 17 00:00:00 2001 From: Frank Maximus Date: Mon, 22 Jan 2018 13:09:46 +0100 Subject: [PATCH] CLOUDSTACK-10245: Fix password server 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 8b68f538fa40..42992b55123f 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py @@ -556,14 +556,6 @@ def post_config_change(self, method): 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 @@ def post_config_change(self, method): 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()