WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-bugs

[Xen-bugs] [Bug 1471] xendomains incorrectly checks status of running do

To: xen-bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-bugs] [Bug 1471] xendomains incorrectly checks status of running domains
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Tue, 12 Oct 2010 12:35:34 -0700
Delivery-date: Tue, 12 Oct 2010 12:35:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <bug-1471-3@xxxxxxxxxxxxxxxxxxxxxxxxxxx/bugzilla/>
List-help: <mailto:xen-bugs-request@lists.xensource.com?subject=help>
List-id: Xen Bugzilla <xen-bugs.lists.xensource.com>
List-post: <mailto:xen-bugs@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=unsubscribe>
Reply-to: bugs@xxxxxxxxxxxxxxxxxx
Sender: xen-bugs-bounces@xxxxxxxxxxxxxxxxxxx
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1471





------- Comment #1 from ezaton@xxxxxxxxx  2010-10-12 12:35 -------
I have tested and seen this solution in 4.1 testing, used on Centos 5.5 x86_64.
xendomains script cannot detect VMs. The parseln function returns empty values. 
The "=~" is not being correctly interpreted, this the function returns empty
results, and leaves the guests up and running.
I have used somewhat "heavier" command (grep) to work around this issue:


diff xendomains xendomains.new 

185c185
<     if [[ "$1" =~ '(domain' ]]; then
---
>     if  echo "$1" | grep '(domain' >/dev/null 2>&1 ; then
187c187
<     else if [[ "$1" =~ '(name' ]]; then
---
>     else if echo "$1" | grep '(name' >/dev/null 2>&1 ; then
189c189
<     else if [[ "$1" =~ '(domid' ]]; then
---
>     else if echo "$1" | grep '(domid' >/dev/null 2>&1 ; then


The resulting parseln function looks like this:

parseln()
{
    if  echo "$1" | grep '(domain' >/dev/null 2>&1 ; then
        name=;id=
    else if echo "$1" | grep '(name' >/dev/null 2>&1 ; then
        name=$(echo $1 | sed -e 's/^.*(name \(.*\))$/\1/')
    else if echo "$1" | grep '(domid' >/dev/null 2>&1 ; then
        id=$(echo $1 | sed -e 's/^.*(domid \(.*\))$/\1/')
    fi; fi; fi

    [ -n "$name" -a -n "$id" ] && return 0 || return 1
}


-- 
Configure bugmail: 
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

_______________________________________________
Xen-bugs mailing list
Xen-bugs@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-bugs

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-bugs] [Bug 1471] xendomains incorrectly checks status of running domains, bugzilla-daemon <=