Bug#695041: [Pkg-xen-devel] Bug#695041: service xendomains stop sleeps XENDOMAINS_STOP_MAXWAIT seconds for every domain

2012-12-04 Thread Robert Hofer

Hallo,

Am 03.12.2012 16:05, schrieb Bastian Blank:

On Mon, Dec 03, 2012 at 03:35:05PM +0100, Robert Hofer wrote:

so check_running is also called with the name
The output of xm domid name for a running domain is the ID of
the domain and None for a known, but not runing domain. The return
code for both cases is 0. So the function always returns 0. With xen
3 and no xend, this code was correct.



...

With xm and 4.1:
| # xen domid test; echo $?
| Error: Domain 'test' does not exist.
| 3


Does domain test exists on your host?
'exist' or 'known' means known to Xend domain management.

Here is my output with a known domain, running and not running:

root# xm list
Name  ID   Mem VCPUs  State   Time(s)
Domain-0   0  1331 4 r-376.8
elearn 4   2 -b  4.8
pulli  1  1600 2 -b 42.2
root# xm shutdown elearn
root# xm list
Name  ID   Mem VCPUs  State   Time(s)
Domain-0   0  1331 4 r-379.0
elearn 2 5.4
pulli  1  1600 2 -b 42.2
root# xm domid elearn
None
0
root# sleep 300; xm domid elearn ; echo $?
None
0
root# xm domid mushroom ; echo $?
Error: Domain 'mushroom' does not exist.
3
root# xm start elearn
root# xm list
Name  ID   Mem VCPUs  State   Time(s)
Domain-0   0  1331 4 r-383.5
elearn 5   2 -b  4.8
pulli  1  1600 2 -b 42.2
root# xm domid elearn ; echo $?
5
0

So with a not known domain, 'mushroom' in my case, i got the same output 
as you. But with an known domain, the return code of xm domid dont 
indicates the running state.


\robert


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695041: [Pkg-xen-devel] Bug#695041: service xendomains stop sleeps XENDOMAINS_STOP_MAXWAIT seconds for every domain

2012-12-03 Thread Bastian Blank
On Mon, Dec 03, 2012 at 03:35:05PM +0100, Robert Hofer wrote:
 so check_running is also called with the name
 The output of xm domid name for a running domain is the ID of
 the domain and None for a known, but not runing domain. The return
 code for both cases is 0. So the function always returns 0. With xen
 3 and no xend, this code was correct.

With xl and 4.1:
| # xen domid test; echo $?
| Can't get domid of domain name 'test', maybe this domain does not exist.
| 1

With xm and 4.1:
| # xen domid test; echo $?
| Error: Domain 'test' does not exist.
| 3

So this command fails for not existing domains.

 I suggest to parse the output of xm list -l name  for  (status 0).

Nope, this does not work.

Bastian

-- 
It is a human characteristic to love little animals, especially if
they're attractive in some way.
-- McCoy, The Trouble with Tribbles, stardate 4525.6


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org