Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
"/etc/init.d/xendomains stop" does not shut down xen domains
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Robert S
Guru
Guru


Joined: 15 Aug 2004
Posts: 460
Location: Canberra Australia

PostPosted: Tue Sep 19, 2006 1:15 pm    Post subject: "/etc/init.d/xendomains stop" does not shut down x Reply with quote

I have just installed the xen packages according the instructions on the wiki. I have downloaded a pre-build debian disk image. I have copied a config file into the /etc/xen/auto directory thus:
Quote:
# cat /etc/xen/auto/debian.3-1.xen.cfg
kernel = "/boot/vmlinuz-2.6.16.28-xenU"
memory = 128
name = "debian31"
nics = 1
dhcp = "dhcp"
disk = ['file:/home/robert/debian/debian.3-1.img,sda1,w', 'file:/home/robert/debian/debian.swap,sda2,w']
root = "/dev/sda1 ro"
vif = [ '' ]

The domain "debian31" starts up when I do the following:
Quote:
athlon robert # /etc/init.d/xendomains start
* Starting Xen domains from /etc/xen/auto
* Creating screen session to hold domain consoles ... [ ok ]
* Starting domain debian31" ... [ ok ]
athlon robert # /etc/init.d/xendomains status
* status: started
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 256 1 r----- 3498.3
debian31 2 128 1 -b---- 4.4

. . . but when I shut the domain down I get the following:
Quote:
athlon robert # /etc/init.d/xendomains stop
* Shutting down Xen domains from /etc/xen/auto
* Not stopping domain debian31" - not running
* Closing screen session xen ...

It appears that the domain gets the name 'debian31"' instead of 'debian31'.

Should this be filed as a bug and is there a simple workaround?
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Tue Sep 19, 2006 2:46 pm    Post subject: Reply with quote

what version of xen-tools do you have?
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
Robert S
Guru
Guru


Joined: 15 Aug 2004
Posts: 460
Location: Canberra Australia

PostPosted: Tue Sep 19, 2006 9:19 pm    Post subject: Reply with quote

Its 3.0.2-r3. The latest.
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Wed Sep 20, 2006 2:30 am    Post subject: Reply with quote

Hmm, I am not having that problem, try re-emerging xen-tools and make sure that there aren't any config that need to be updated.
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
Robert S
Guru
Guru


Joined: 15 Aug 2004
Posts: 460
Location: Canberra Australia

PostPosted: Wed Sep 20, 2006 9:50 am    Post subject: Reply with quote

Done that. No luck. Any chance of posting your config files(s) to see how it differs from mine?
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Wed Sep 20, 2006 4:22 pm    Post subject: Reply with quote

Below are the files I think are releavant. The bottom is the init.d script, but only the get_domname function, since that seems to be where the problem seems to be. If you could post your function so we can compare that would be nice.

cat /etc/xen/auto/gentoo
Code:
kernel = "/var/xen/boot/vmlinuz-2.6.16.26-r1"
memory = 512
name = "gentoo"
vif = [ 'ip=69.13.46.105' ]
disk = ['file:/var/xen/gentoo/gentoo.img,sda1,w', 'file:/var/xen/gentoo/gentoo.swap,sda2,w']
root = "/dev/sda1 ro"
extra = "gentoo=nodevfs"


cat /etc/conf.d/xendomains
Code:
# /etc/conf.d/xendomains

# Directory of domains to boot. AUTODIR should contain one or more symlinks
# to domain config files in /etc/xen

AUTODIR=/etc/xen/auto


cat /etc/init.d/xendomains
Code:
get_domname() {
   local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alpha:]_]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)

   if [[ -z ${name_from_file} ]] ; then
      basename "${1}"
   else
      echo ${name_from_file}   
   fi
}

_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
Robert S
Guru
Guru


Joined: 15 Aug 2004
Posts: 460
Location: Canberra Australia

PostPosted: Wed Sep 20, 2006 9:02 pm    Post subject: Reply with quote

Thanks. I probably won't get a chance to look at this until the weekend.
Back to top
View user's profile Send private message
Robert S
Guru
Guru


Joined: 15 Aug 2004
Posts: 460
Location: Canberra Australia

PostPosted: Fri Sep 22, 2006 10:50 am    Post subject: Reply with quote

AHA!! :wink:

Replace ":alpha:" with ":alnum:"
Code:
local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)


It doesn't like numeric characters in the domain name. Maybe there's a reason for this?? Conversely I could leave out the numeric characters from the domain name.
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Fri Sep 22, 2006 1:16 pm    Post subject: Reply with quote

Either way, you might want to take that code snippet and create a bug report so it is documentin in bugzilla, I don't think that would be a big problem.
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
Robert S
Guru
Guru


Joined: 15 Aug 2004
Posts: 460
Location: Canberra Australia

PostPosted: Fri Sep 22, 2006 9:18 pm    Post subject: Reply with quote

Done: https://bugs.gentoo.org/show_bug.cgi?id=148628
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum