• S
    xend_internal: Use domain/status for shutdown check · 26e9ef47
    Stefan Bader 提交于
    On newer xend (v3.x and after) there is no state and domid reported
    for inactive domains. When initially creating connections this is
    handled in various places by assigning domain->id = -1.
    But once an instance has been running, the id is set to the current
    domain id. And it does not change when the instance is shut down.
    So when querying the domain info, the hypervisor driver, which gets
    asked first will indicate it cannot find information, then the
    xend driver is asked and will set the status to NOSTATE because it
    checks for the -1 domain id.
    Checking domain/status for 0 seems to be more reliable for that.
    
    One note: I am not sure whether the domain->id also should get set
    back to -1 whenever any sub-driver thinks the instance is no longer
    running.
    
    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=746007
    BugLink: http://bugs.launchpad.net/bugs/929626Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
    26e9ef47
xend_internal.c 115.2 KB