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.
This commit is contained in:
Frank Maximus 2018-01-23 17:20:03 +01:00 committed by Rohit Yadav
parent 2ca264ca4d
commit 3b23d5af74
1 changed files with 8 additions and 8 deletions

View File

@ -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()