Ignore:
Timestamp:
Oct 22, 2008, 12:48:44 AM (16 years ago)
Author:
broder
Message:

There's a race condition for if the VM gets powered off between the
listvms and the actual request. Solve the problem correctly by using a
non-conflicting error code to indicate an invalid command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-remote-server/files/usr/sbin/sipb-xen-remote-control

    r1159 r1163  
    3131    (out, err) = p.communicate()
    3232    if p.returncode == 1:
     33        print >>sys.stderr, "machine '%s' is not on" % machine_name
     34        return 1
     35    elif p.returncode == 34:
    3336        print >>sys.stderr, "ERROR: invalid command"
    34         return 1
     37        return 34
    3538    sys.stderr.write(err)
    3639    sys.stdout.write(out)
Note: See TracChangeset for help on using the changeset viewer.