Пример #1
0
                'size':'*','draining':'*','backfill_time':'*'}
                for part in parts]))
        sys.exit(0)

    if opts.clean_block:
        if sys_type == 'bgp':
            print "Force clenaing not available for BG/P systems"
            sys.exit(0)
        sched_enabled = ComponentProxy('scheduler',defer=False).sched_status()
        boot_disabled = system.booting_status()
        #if sched_enabled or not boot_disabled:
        #    print "scheduling and booting must be disabled prior to force-cleaning blocks."
        #    print "No blocks were marked for cleaning."
        #    sys.exit(1)
        for part in parts:
            system.set_cleaning(part, None, whoami)
            print "Initiating cleanup on block %s" % part
        sys.exit(0)

    if opts.list_blocks:
        # need to cascade up busy and non-functional flags
#        print "buildRackTopology sees : " + repr(parts)
#
#        partinfo = Cobalt.Util.buildRackTopology(parts)

        try:
            scheduler = ComponentProxy("scheduler", defer=False)
            if sys_type == 'bgq':
                reservations = scheduler.get_reservations([{'queue':"*",
                    'partitions':"*", 'active':True, 'block_passthrough':'*'}])
            elif sys_type == 'bgp':
Пример #2
0
                    'backfill_time': '*'
                } for part in parts]))
        sys.exit(0)

    if opts.clean_block:
        if sys_type == 'bgp':
            print "Force clenaing not available for BG/P systems"
            sys.exit(0)
        sched_enabled = ComponentProxy('scheduler', defer=False).sched_status()
        boot_disabled = system.booting_status()
        #if sched_enabled or not boot_disabled:
        #    print "scheduling and booting must be disabled prior to force-cleaning blocks."
        #    print "No blocks were marked for cleaning."
        #    sys.exit(1)
        for part in parts:
            system.set_cleaning(part, None, whoami)
            print "Initiating cleanup on block %s" % part
        sys.exit(0)

    if opts.list_blocks:
        # need to cascade up busy and non-functional flags
        #        print "buildRackTopology sees : " + repr(parts)
        #
        #        partinfo = Cobalt.Util.buildRackTopology(parts)

        try:
            scheduler = ComponentProxy("scheduler", defer=False)
            if sys_type == 'bgq':
                reservations = scheduler.get_reservations([{
                    'queue':
                    "*",