Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions systemvm/debian/opt/cloud/bin/cs/CsHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

PUBLIC_INTERFACES = {"router": "eth2", "vpcrouter": "eth1"}

STATE_COMMANDS = {"router": "ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo \"MASTER\"; else echo \"BACKUP\"; fi'",
"vpcrouter": "ip addr | grep eth1 | grep state | awk '{print $9;}' | xargs bash -c 'if [ $0 == \"UP\" ]; then echo \"MASTER\"; else echo \"BACKUP\"; fi'"}
STATE_COMMANDS = {"router": "ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo \"MASTER\"; else echo \"BACKUP\"; fi'",
"vpcrouter": "ip addr show dev eth1 | grep state | awk '{print $9;}' | xargs bash -c 'if [ $0 == \"UP\" ]; then echo \"MASTER\"; else echo \"BACKUP\"; fi'"}


def reconfigure_interfaces(router_config, interfaces):
Expand Down Expand Up @@ -215,7 +215,7 @@ def save_iptables(command, iptables_file):

def execute2(command, wait=True):
""" Execute command """
logging.debug("Executing: %s" % command)
logging.info("Executing: %s" % command)
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
if wait:
p.wait()
Expand Down
4 changes: 2 additions & 2 deletions systemvm/debian/opt/cloud/bin/cs/CsRedundant.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _redundant_on(self):
command = "ip link show %s | grep 'state UP'" % dev
devUp = CsHelper.execute(command)
if devUp:
logging.info("Device %s is present, let's start keepalive now." % dev)
logging.info("Device %s is present, let's start keepalived now." % dev)
isDeviceReady = True

if not isDeviceReady:
Expand Down Expand Up @@ -231,7 +231,7 @@ def set_fault(self):
return

self.set_lock()
logging.info("Router switched to fault mode")
logging.info("Setting router to fault")

interfaces = [interface for interface in self.address.get_interfaces() if interface.is_public()]
for interface in interfaces:
Expand Down