Beispiel #1
0
 def start_node(node_name, cfg):
     inner = [
         env['arakoon_bin'],
         "--node", node_name,
         "-config", cfg
     ]
     cmd_line = alba._detach(inner)
     local(cmd_line)
Beispiel #2
0
def spreadsheet_my_ass(start=0, end = 13400):
    env['osds_on_separate_fs'] = True
    start = int(start)
    def fresh():
        alba.demo_kill()
        alba.demo_setup()

        # deliver osd & nsm messages
        time.sleep(1)
        cmd = [
            env['alba_bin'],
            'deliver-messages',
            '--config', arakoon_config_file
        ]
        local(' '.join(cmd))

        # stop asd 0
        alba.osd_stop(alba.get_osd_port(0))

    if start == 0:
        fresh()

    # fill the demo namespace
    local("dd if=/dev/urandom of=%s/obj bs=40K count=1" % ALBA_BASE_PATH)
    for i in xrange(start, end):
        cmd = [
            env['alba_bin'],
            'proxy-upload-object',
            "-h 127.0.0.1 ",
            'demo', '%s/obj' % ALBA_BASE_PATH,
            str(i)
        ]
        local(" ".join(cmd))

    # show the disk usage
    local("df")

    # restart asd 0 as a not slow asd
    alba._detach(
        [ env['alba_bin'], 'asd-start', '--config', '%s/asd/00/cfg.json' % ALBA_BASE_PATH ],
        out='%s/asd/00/output' % ALBA_BASE_PATH
    )

    # let maintenance process do some rebalancing
    time.sleep(120)
    local("df")