You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/01/19 08:12:01 UTC

[GitHub] rhtyd closed pull request #2409: CLOUDSTACK-9749: Fix Password server running on internal LB VM

rhtyd closed pull request #2409: CLOUDSTACK-9749: Fix Password server running on internal LB VM
URL: https://github.com/apache/cloudstack/pull/2409
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 @@ def post_config_change(self, method):
         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 @@ def post_config_change(self, method):
                 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()


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services