예제 #1
0
def start_servo():
    spin_locks()
    cmd_line = 'sudo modprobe floppy > /dev/null'
    if subprocess.call(cmd_line, shell=True) != 0:
        log.error('failed to load floppy driver')
    CWLoop().start()
    ServoLoop().start()
예제 #2
0
def spin_locks():
    try:
        while not (os.path.exists("/var/lib/load-balancer-servo/ntp.lock")):
            time.sleep(2)
            log.debug('waiting on ntp setup (reboot if continued)')
        os.remove("/var/lib/load-balancer-servo/ntp.lock")
    except Exception, err:
        log.error('failed to spin on locks: %s' % err)
예제 #3
0
def spin_locks():
    try:
        while not (os.path.exists("/var/lib/load-balancer-servo/ntp.lock")):
            time.sleep(2)
            log.debug('waiting on ntp setup (reboot if continued)')
        os.remove("/var/lib/load-balancer-servo/ntp.lock")
    except Exception, err:
        log.error('failed to spin on locks: %s' % err)
예제 #4
0
def start_servo():
    if run_as_sudo('modprobe floppy') != 0:
        log.error('failed to load floppy driver')
    ServoLoop().run()
예제 #5
0
def start_servo():
    spin_locks()
    if run_as_sudo('modprobe floppy') != 0:
        log.error('failed to load floppy driver')
    CWLoop().start()
    ServoLoop().start()
예제 #6
0
def start_servo():
    if run_as_sudo('modprobe floppy') != 0:
        log.error('failed to load floppy driver')
    ServoLoop().run()