Ejemplo n.º 1
0
def upload_cfg(name, access_data):
    ip = access_data['addr'].split(':')[0]
    # DRY: flashlight/genconfig/cloud.yaml.tmpl
    access_data.update(pipeline=True, trusted=True, qos=10, weight=1000000)
    redis_shell.lpush(
        REGION + ":srvq", "%s|%s|\n    %s" %
        (ip, name, yaml.dump({'fallback-' + ip: access_data})))
Ejemplo n.º 2
0
def retire_server(msg):
    if os.path.exists(retire_flag_filename):
        print "Not retiring myself again."
        return
    redis_shell.lpush(vps_util.my_cm() + ':retireq', '%s|%s' % (instance_id, ip))
    flag_as_done(retire_flag_filename)
    send_alarm("Chained proxy RETIRED",
               " retired because I " + msg)
Ejemplo n.º 3
0
def upload_cfg(name, access_data):
    ip = access_data['addr'].split(':')[0]
    # DRY: flashlight/genconfig/cloud.yaml.tmpl
    access_data.update(pipeline=True,
                       trusted=True,
                       qos=10,
                       weight=1000000)
    redis_shell.lpush(REGION + ":srvq",
                      "%s|%s|\n    %s" % (ip,
                                          name,
                                          yaml.dump({'fallback-' + ip: access_data})))