Skip to content

Commit a9fdb31

Browse files
fmaximusyadvr
authored andcommitted
CLOUDSTACK-9749: Fix Password server running on internal LB VM (#2409)
Fixes code to start password server only on routers.
1 parent 7d144e1 commit a9fdb31

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

systemvm/debian/opt/cloud/bin/cs/CsAddress.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,21 @@ def post_config_change(self, method):
549549
self.fw_router()
550550
self.fw_vpcrouter()
551551

552+
cmdline = self.config.cmdline()
553+
552554
# On deletion nw_type will no longer be known
553555
if self.get_type() in ('guest'):
554556
if self.config.is_vpc() or self.config.is_router():
555557
CsDevice(self.dev, self.config).configure_rp()
558+
559+
# If redundant then this is dealt with
560+
# by the master backup functions
561+
if not cmdline.is_redundant():
562+
if method == "add":
563+
CsPasswdSvc(self.address['public_ip']).start()
564+
elif method == "delete":
565+
CsPasswdSvc(self.address['public_ip']).stop()
566+
556567
logging.error(
557568
"Not able to setup source-nat for a regular router yet")
558569

@@ -564,11 +575,6 @@ def post_config_change(self, method):
564575
app = CsApache(self)
565576
app.setup()
566577

567-
cmdline = self.config.cmdline()
568-
# If redundant then this is dealt with by the master backup functions
569-
if self.get_type() in ["guest"] and not cmdline.is_redundant():
570-
pwdsvc = CsPasswdSvc(self.address['public_ip']).start()
571-
572578
if self.get_type() == "public" and self.config.is_vpc() and method == "add":
573579
if self.address["source_nat"]:
574580
vpccidr = cmdline.get_vpccidr()

0 commit comments

Comments
 (0)