cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject [01/15] git commit: updated refs/heads/master to e4ba640
Date Tue, 28 Jun 2016 15:28:35 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master f7f23ec72 -> e4ba640a2


VR CsAddress fixes:
* cleanup imports,
* fix to_str(),
* improve & fix service post_config logic
* don't arpPing when there's no gateway


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d14a4843
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d14a4843
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d14a4843

Branch: refs/heads/master
Commit: d14a4843749c20a01994eca0cf587fa3f9d67855
Parents: 6055ed6
Author: Ronald van Zantvoort <ronald@pcextreme.nl>
Authored: Fri May 13 17:28:39 2016 +0200
Committer: Wido den Hollander <wido@widodh.nl>
Committed: Tue Jun 7 13:03:09 2016 +0200

----------------------------------------------------------------------
 .../debian/config/opt/cloud/bin/cs/CsAddress.py | 35 +++++++++++---------
 1 file changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d14a4843/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
index e4c5d1f..efcb94f 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
@@ -15,15 +15,13 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-from CsDatabag import CsDataBag, CsCmdLine
-from CsApp import CsApache, CsDnsmasq, CsPasswdSvc
-import CsHelper
 import logging
 from netaddr import IPAddress, IPNetwork
-import CsHelper
-
 import subprocess
 import time
+import CsHelper
+from CsDatabag import CsDataBag
+from CsApp import CsApache, CsDnsmasq, CsPasswdSvc
 from CsRoute import CsRoute
 from CsRule import CsRule
 
@@ -198,7 +196,7 @@ class CsInterface:
         return self.get_attr("add")
 
     def to_str(self):
-        pprint(self.address)
+        return self.address
 
 
 class CsDevice:
@@ -293,9 +291,10 @@ class CsIP:
 
             interfaces = [CsInterface(address, self.config)]
             CsHelper.reconfigure_interfaces(self.cl, interfaces)
-
             self.set_mark()
-            self.arpPing()
+
+            if 'gateway' in self.address:
+                self.arpPing()
 
             CsRpsrfs(self.dev).enable()
             self.post_config_change("add")
@@ -514,16 +513,19 @@ class CsIP:
         self.fw_vpcrouter()
 
         # On deletion nw_type will no longer be known
-        if self.get_type() in ["guest"] and self.config.is_vpc():
+        if self.get_type() in ('guest'):
+            if self.config.is_vpc() or self.config.is_router():
+                CsDevice(self.dev, self.config).configure_rp()
+                logging.error(
+                    "Not able to setup source-nat for a regular router yet")
 
-            CsDevice(self.dev, self.config).configure_rp()
+            if self.config.has_dns() or self.config.is_dhcp():
+                dns = CsDnsmasq(self)
+                dns.add_firewall_rules()
 
-            logging.error(
-                "Not able to setup source-nat for a regular router yet")
-            dns = CsDnsmasq(self)
-            dns.add_firewall_rules()
-            app = CsApache(self)
-            app.setup()
+            if self.config.has_metadata():
+                app = CsApache(self)
+                app.setup()
 
         cmdline = self.config.cmdline()
         # If redundant then this is dealt with by the master backup functions
@@ -685,3 +687,4 @@ class CsRpsrfs:
         if count < 2:
             logging.debug("Single CPU machine")
         return count
+


Mime
View raw message