direct-io.hg

changeset 8515:4aeb39501145

Remove "Died" support from the hotplug monitoring. This error code was used
when hotplugStatusCallback raised VmError, but this can no longer happen.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Tue Jan 03 16:28:00 2006 +0000 (2006-01-03)
parents f3d2e3659786
children a848ee1c9822
files tools/python/xen/xend/server/DevController.py
line diff
     1.1 --- a/tools/python/xen/xend/server/DevController.py	Tue Jan 03 16:26:24 2006 +0000
     1.2 +++ b/tools/python/xen/xend/server/DevController.py	Tue Jan 03 16:28:00 2006 +0000
     1.3 @@ -32,11 +32,10 @@ HOTPLUG_STATUS_ERROR = "error"
     1.4  HOTPLUG_STATUS_BUSY  = "busy"
     1.5  
     1.6  Connected = 1
     1.7 -Died      = 2
     1.8 -Error     = 3
     1.9 -Missing   = 4
    1.10 -Timeout   = 5
    1.11 -Busy      = 6
    1.12 +Error     = 2
    1.13 +Missing   = 3
    1.14 +Timeout   = 4
    1.15 +Busy      = 5
    1.16  
    1.17  xenbusState = {
    1.18      'Unknown'      : 0,
    1.19 @@ -157,11 +156,6 @@ class DevController:
    1.20              raise VmError("Device %s (%s) could not be connected. "
    1.21                            "Device not found." % (devid, self.deviceClass))
    1.22  
    1.23 -        elif status == Died:
    1.24 -            self.destroyDevice(devid)
    1.25 -            raise VmError("Device %s (%s) could not be connected. "
    1.26 -                          "Device has died." % (devid, self.deviceClass))
    1.27 -
    1.28          elif status == Busy:
    1.29              err = None
    1.30              frontpath = self.frontendPath(devid)
    1.31 @@ -408,20 +402,17 @@ class DevController:
    1.32  def hotplugStatusCallback(statusPath, ev, result):
    1.33      log.debug("hotplugStatusCallback %s.", statusPath)
    1.34  
    1.35 -    try:
    1.36 -        status = xstransact.Read(statusPath)
    1.37 +    status = xstransact.Read(statusPath)
    1.38  
    1.39 -        if status is not None:
    1.40 -            if status == HOTPLUG_STATUS_ERROR:
    1.41 -                result['status'] = Error
    1.42 -            elif status == HOTPLUG_STATUS_BUSY:
    1.43 -                result['status'] = Busy
    1.44 -            else:
    1.45 -                result['status'] = Connected
    1.46 +    if status is not None:
    1.47 +        if status == HOTPLUG_STATUS_ERROR:
    1.48 +            result['status'] = Error
    1.49 +        elif status == HOTPLUG_STATUS_BUSY:
    1.50 +            result['status'] = Busy
    1.51          else:
    1.52 -            return 1
    1.53 -    except VmError:
    1.54 -        result['status'] = Died
    1.55 +            result['status'] = Connected
    1.56 +    else:
    1.57 +        return 1
    1.58  
    1.59      log.debug("hotplugStatusCallback %d.", result['status'])
    1.60