Ignore:
Timestamp:
Oct 24, 2009, 8:40:08 PM (15 years ago)
Author:
adehnert
Message:

Minor cleanup of monocast and LVM load balancer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-remote/python/remote/monocast.py

    r2495 r2513  
    55hostnames = [ h.hostname for h in config.hosts ]
    66
    7 def monocast(args, hosts = hostnames, randomize = True):
     7def monocast(args, hostnames = hostnames, randomize = True):
    88    """
    99    Given a command and a list of hostnames or IPs, issue the command to each
     
    1818    """
    1919    if(randomize):
    20         hosts = random.sample(hosts, len(hosts))
     20        hostnames = random.sample(hostnames, len(hostnames))
    2121    hostsdown = []
    22     for host in hosts:
     22    for host in hostnames:
    2323        pipe = Popen(['remctl', host, 'remote', 'web'] + args, stdout=PIPE, stderr=PIPE)
    2424        output = pipe.communicate()
     
    2727                hostsdown.append(host)
    2828            else:
    29                 #raise RuntimeError("remctl to host %s returned non-zero exit status %d; stderr:\n%s"
    30                 #                   % (host, pipe.returncode, output[1]))
    3129                return (host, hostsdown, pipe.returncode,) + output
    3230        else:
Note: See TracChangeset for help on using the changeset viewer.