You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2020/02/25 19:38:34 UTC

[cloudstack] 01/01: Add logging around arping

This is an automated email from the ASF dual-hosted git repository.

andrijapanic pushed a commit to branch add-logging-around-arping
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 5237eec4f4de64675a247f0eec44d89a0b2c2a64
Author: Andrija Panic <45...@users.noreply.github.com>
AuthorDate: Tue Feb 25 20:38:18 2020 +0100

    Add logging around arping
---
 systemvm/debian/opt/cloud/bin/cs/CsAddress.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py
index ba9ee08..5068a72 100755
--- a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py
+++ b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py
@@ -627,11 +627,14 @@ class CsIP:
         return ip in self.address.values()
 
     def arpPing(self):
-        cmd = "arping -c 1 -I %s -A -U -s %s %s" % (
-            self.dev, self.address['public_ip'], self.address['gateway'])
+        #bit of logging added inside the command itself, to make sure whether it's executed or not (due to possible race/timeout conditions
+        cmd = "arping -c 1 -I %s -A -U -s %s %s >> /tmp/arpping.log" % (self.dev, self.address['public_ip'], self.address['gateway'])
         if not self.cl.is_redundant() and (not self.address['gateway'] or self.address['gateway'] == "None"):
-            cmd = "arping -c 1 -I %s -A -U %s" % (self.dev, self.address['public_ip'])
+                cmd = "arping -c 1 -I %s -A -U %s >> /tmp/arpping1.log" % (self.dev, self.address['public_ip'])
         CsHelper.execute2(cmd, False)
+        # This is only for logging/troubleshooting purposes, not functional...
+        cmd = "ping -c 2 %s >> /tmp/pingGtw.log; ping -c 2 8.8.8.8 >> /tmp/ping8888.log" % (self.address['gateway'])
+        CsHelper.execute2(cmd, False)u
 
     # Delete any ips that are configured but not in the bag
     def compare(self, bag):