Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361345 - app-emulation/xen-4.1.0 app-emulation/xen-tools-4.1.0 hard reboot on start domain0
Summary: app-emulation/xen-4.1.0 app-emulation/xen-tools-4.1.0 hard reboot on start d...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
: 376661 (view as bug list)
Depends on:
Blocks: 144994
  Show dependency tree
 
Reported: 2011-03-30 18:04 UTC by Alexandr Smolentsev
Modified: 2011-08-31 14:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (_del1,4.40 KB, text/plain)
2011-03-30 18:04 UTC, Alexandr Smolentsev
Details
error on xend start (_del2,3.40 KB, text/plain)
2011-03-30 18:07 UTC, Alexandr Smolentsev
Details
xencommons init.d script (etc_init.d_xencommons,2.60 KB, text/plain)
2011-04-01 09:58 UTC, Alexandre Ravey
Details
Patch for xend init.d script (etc_init.d_xend.patch,370 bytes, patch)
2011-04-01 09:59 UTC, Alexandre Ravey
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Smolentsev 2011-03-30 18:04:55 UTC
Created attachment 267865 [details]
emerge --info

Yesterday I updated the world, after reboot refused to start the daemon Xen.
before update in the system was installed Xen-4.0.1, Python-2.6.
Comment 1 Alexandr Smolentsev 2011-03-30 18:07:51 UTC
Created attachment 267869 [details]
error on xend start
Comment 2 Alexandr Smolentsev 2011-03-30 18:10:42 UTC
Yesterday I updated the world, after reboot refused to start the daemon Xen.
before update in the system was installed Xen-4.0.1, Python-2.6.

downgrade to python 2.6 is not solve problem, Xen 4.0.1 will be removed from portage.

[ebuild   R   ] app-emulation/xen-tools-4.1.0  USE="acm api hvm ioemu screen -custom-cflags -debug -doc -flask -pygrub" 0 kB
[ebuild   R   ] app-emulation/xen-4.1.0  USE="acm xsm -custom-cflags -debug -flask -pae" 0 kB
[ebuild   R   ] dev-lang/python-3.1.3-r1  USE="gdbm ncurses readline sqlite ssl threads (wide-unicode) xml -build -doc -examples -ipv6 -tk -wininst" 0 kB
Comment 3 Jeroen Roovers gentoo-dev 2011-03-31 19:25:00 UTC
Did you run python-updater after upgrading to python-2.7?
Comment 4 Alexandr Smolentsev 2011-04-01 06:32:38 UTC
-------------------------------
first

nano /vm/a4/config/hvm.cfg;cat /vm/a4/config/hvm.cfg | grep '^[^#].*'>/vm/a4/config/hvm.run;xm new -f /vm/a4/config/hvm.run
Unexpected error: <type 'exceptions.ImportError'>

Please report to xen-devel@lists.xensource.com
Traceback (most recent call last):
  File "/usr/sbin/xm", line 7, in <module>
    main.main(sys.argv)
  File "/usr/lib64/python2.7/site-packages/xen/xm/main.py", line 3983, in main
    _, rc = _run_cmd(cmd, cmd_name, args)
  File "/usr/lib64/python2.7/site-packages/xen/xm/main.py", line 4007, in _run_cmd
    return True, cmd(args)
  File "<string>", line 1, in <lambda>
  File "/usr/lib64/python2.7/site-packages/xen/xm/main.py", line 1518, in xm_importcommand
    cmd = __import__(command, globals(), locals(), 'xen.xm')
  File "/usr/lib64/python2.7/site-packages/xen/xm/new.py", line 26, in <module>
    from xen.xm.xenapi_create import *
  File "/usr/lib64/python2.7/site-packages/xen/xm/xenapi_create.py", line 25, in <module>
    from lxml import etree
ImportError: No module named lxml

[b][red]you have add dependent dev-python/lxml to app-emulation/xen-tools ebuild[/b][/red]

-------------------------------------------------
second

xm create /vm/a4/config/hvm.run
Using config file "/vm/a4/config/hvm.run".
Error: Unable to connect to xend: No such file or directory. Is xend running?

xm list
Error: Unable to connect to xend: No such file or directory. Is xend running?
/etc/init.d/xencommons start
Starting xenstored...
Setting domain 0 name...
Starting xenconsoled...

/etc/init.d/xend restart
 * Shutting down Xen domains from /etc/xen/auto
 * Closing screen session xen ...                                                                                                    [ ok ]
Error: Unable to connect to xend: No such file or directory. Is xend running?
 * Stopping Xen control daemon ...                                                                                                   [ ok ]
 * Starting Xen control daemon ...

/etc/init.d/xend restart
 *   Stopping all domains ...                                                                                                        [ ok ]
 * Stopping Xen control daemon ...                                                                                                   [ ok ]
 * Starting Xen control daemon ...

xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   520     4     r-----     24.5
ktssql                                          1536     2               109.7
mysql                                           2048     2                 2.6
squid-vm                                        1536     1                 0.0

xm new -f /vm/a4/config/hvm.run
Using config file "/vm/a4/config/hvm.run".

xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   520     4     r-----    158.7
a4                                              1024     2                 0.0
ktssql                                          1536     2               109.7
mysql                                           2048     2                 2.6
squid-vm                                        1536     1                 0.0

xm start a4
 and server go to hard reboot !


-- 
psychos
Comment 5 Alexandr Smolentsev 2011-04-01 06:39:17 UTC
(In reply to comment #3)
> Did you run python-updater after upgrading to python-2.7?

Yes after everu update world, i'am exec this commands

eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.1

etc-update && env-update && source /etc/profile && lafilefixer --justfixit  && revdep-rebuild && python-updater && perl-cleaner all && emerge --depclean -p
Comment 6 Alexandre Ravey 2011-04-01 09:02:14 UTC
Exactly the same problem here.

Updated 4 boxes, none work anymore. And since 4.0.1 is gone from tree, no way to solve the problem. A real pain in the ass.

Anyway, my situtation is like Alexandr Smolentsev, was Xen-4.0.1 and Python-2.6 and now Xen-4.1.0 and Python-2.7.
But I don't think Pyhton is involved here.

I'll add some lignes I have in my xend-debug.log
----------------
Xend started at Fri Apr  1 10:49:12 2011.
cat: /sys/bus/scsi/devices/host0/vendor: No such file or directory
cat: /sys/bus/scsi/devices/host0/model: No such file or directory
cat: /sys/bus/scsi/devices/host0/type: No such file or directory
cat: /sys/bus/scsi/devices/host0/rev: No such file or directory
cat: /sys/bus/scsi/devices/host0/scsi_level: No such file or directory
[...]
----------------
And continues with {host[12345],target[01]:0:0}



Now same thing as Alexandr:
----------------
albert ~ # /etc/init.d/xend restart
Error: Unable to connect to xend: Connection refused. Is xend running?
 * Stopping Xen control daemon ...                                                                                                          [ ok ]
 * Starting Xen control daemon ...                                                                                                          [ ok ]
albert ~ # xm list
Error: Unable to connect to xend: Connection refused. Is xend running?
albert ~ # /etc/init.d/xencommons status
xenstore-read: xs_open: Connection refused
albert ~ # /etc/init.d/xencommons start
Starting xenstored...
Setting domain 0 name...
Starting xenconsoled...
albert ~ # xm list
Error: Unable to connect to xend: Connection refused. Is xend running?
albert ~ # /etc/init.d/xend restart
Error: Unable to connect to xend: Connection refused. Is xend running?
 * Stopping Xen control daemon ...                                                                                                          [ ok ]
 * Starting Xen control daemon ...                                                                                                          [ ok ]
albert ~ # xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  1021     4     r-----    108.4
----------------

Except one thing, at this point i CAN start my vms.
Now hard reboot, everything is fine.

But i merged dev-python/lxml manually. I'll try to unmerge it et run some tests, be back to you then.
Comment 7 Alexandre Ravey 2011-04-01 09:56:06 UTC
Back after some tests.

dev-python/lxml make no differences, all my domUs are running nicely.

But IMHO the problem is the xencommons init.d script which is not very Gentoo friendly.

I've wrote a new one and patched the xend start scrpit to have xencommons as a dependancy.

This is far from complete, but it works fine.

Usage:
--------------
albert ~ # /etc/init.d/xend start
 * Starting xenstored... ...                                                                                                                [ ok ]
 * Setting domain 0 name... ...                                                                                                             [ ok ]
 * Starting xenconsoled... ...                                                                                                              [ ok ]
 * Starting Xen control daemon ...                                                                                                          [ ok ]
albert ~ # xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  1021     4     r-----      6.1
albert ~ # /etc/init.d/xencommons status
 * status:  started
albert ~ #
--------------
Comment 8 Alexandre Ravey 2011-04-01 09:58:17 UTC
Created attachment 268101 [details]
xencommons init.d script

Modification of the xencommons init.d script to use Gentoo's runscript.

Include dependancy checking and nice colored status ;)
But not much, not to be integrated as-is on the tree, but hope it helps.
Comment 9 Alexandre Ravey 2011-04-01 09:59:33 UTC
Created attachment 268103 [details, diff]
Patch for xend init.d script

Little patch to use xencommons script (see previous attachement) as a dependcy and start everything together when starting xend.
Comment 10 Alexandr Smolentsev 2011-04-01 10:35:23 UTC
(In reply to comment #3)
> Did you run python-updater after upgrading to python-2.7?

Yes after everu update world, i'am exec this commands

eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.1

etc-update && env-update && source /etc/profile && lafilefixer --justfixit  && revdep-rebuild && python-updater && perl-cleaner all && emerge --depclean -p
Comment 11 Alexandr Smolentsev 2011-04-01 10:54:32 UTC
ooops, i'm duplicate my comment, sorry (:

MigrationGuideToXen4.1+ [http://wiki.xensource.com/xenwiki/MigrationGuideToXen4.1%2b]
Comment 12 David Sperling 2011-04-02 07:23:50 UTC
Same issue here on a new system install.  Directly after first boot ran emerge --sync; emerge -eav system; emerge -eav world; python-updater.  However I'm using python 2.6:

hydra ~ # eselect python list
Available Python interpreters:
  [1]   python2.6 *
  [2]   python2.7
  [3]   python3.1

Adding xencommons to the default run level, rebooting, then running /etc/init.d/xend restart gets rid of the unable to connect to xend issue, at least until you reboot:

xm list
Error: Unable to connect to xend: Connection refused. Is xend running?
Comment 13 Alexandr Smolentsev 2011-04-03 12:45:43 UTC
> xm list
> Error: Unable to connect to xend: Connection refused. Is xend running?

use [xl list] =)

but i'm don't know how create dom0 guest system

xl new -j /path/to/vm/conf/file -> return error
Comment 14 Alexandr Smolentsev 2011-04-04 07:04:38 UTC
xl create -f /vm/a4/config/hvm.run
Parsing config file /vm/a4/config/hvm.run
xc: info: VIRTUAL MEMORY ARRANGEMENT:
  Loader:        0000000000100000->00000000001793b0
  TOTAL:         0000000000000000->000000005f800000
  ENTRY ADDRESS: 0000000000100000
xc: info: PHYSICAL MEMORY ALLOCATION:
  4KB PAGES: 0x0000000000000200
  2MB PAGES: 0x00000000000002fb
  1GB PAGES: 0x0000000000000000


after 4-5 seconds - hard reboot

xen 4.1.0
xen-tools 4.1.0
xen-sources 2.6.34-r4

cat /vm/a4/config/hvm.run
name = "a4"
memory = 1024
maxmem = 1536
vcpus = 2
arch_libdir = 'lib'
kernel  =       "hvmloader"
builder =       "hvm"
acpi    =       0
apic    =       0
pae     =       0
vif  =  [ 'type=ioemu, mac=00:30:48:7e:29:9a, bridge=xenbr0, model=e1000'
 ]
disk = [
 'file:/vm/a4/v-hdd/sda1-a4_sys,ioemu:hda,w'
 , 'file:/raid5/install/IMAGES/MICROSOFT/SQL/SQL2005/32BIT/Win_SQL_Srv_2005_Std_Rus/Win_SQL_Srv_2005_Std_Rus_Disc1.ISO,hdc:cdrom,r'
 , 'file:/raid5/install/IMAGES/MICROSOFT/SQL/SQL2005/32BIT/Win_SQL_Srv_2005_Std_Rus/Win_SQL_Srv_2005_Std_Rus_Disc2.ISO,hdd:cdrom,r'
 ]
boot    =       'c'
on_poweroff =   'destroy'
on_reboot =     'restart'
on_crash =      'preserve'
device_model = '/usr/lib/xen/bin/qemu-dm'
vfb = ['vnc=1,vnclisten=0.0.0.0']
vncpasswd =     ''
vncviewer =     1
opengl  =       1
sdl     =       0
vncconsole =    0
stdvga  =       0
serial  =       'pty'
usbdevice="tablet"
Comment 15 Alexandr Smolentsev 2011-04-04 09:10:26 UTC
xl create -f /vm/a4/config/hvm.run
Parsing config file /vm/a4/config/hvm.run
xc: info: VIRTUAL MEMORY ARRANGEMENT:
  Loader:        0000000000100000->00000000001793b0
  TOTAL:         0000000000000000->000000005f800000
  ENTRY ADDRESS: 0000000000100000
xc: info: PHYSICAL MEMORY ALLOCATION:
  4KB PAGES: 0x0000000000000200
  2MB PAGES: 0x00000000000002fb
  1GB PAGES: 0x0000000000000000


after 4-5 seconds - hard reboot

xen 4.1.0
xen-tools 4.1.0
xen-sources 2.6.34-r4

cat /vm/a4/config/hvm.run
name = "a4"
memory = 1024
maxmem = 1536
vcpus = 2
arch_libdir = 'lib'
kernel  =       "hvmloader"
builder =       "hvm"
acpi    =       0
apic    =       0
pae     =       0
vif  =  [ 'type=ioemu, mac=00:30:48:7e:29:9a, bridge=xenbr0, model=e1000'
 ]
disk = [
 'file:/vm/a4/v-hdd/sda1-a4_sys,ioemu:hda,w'
 , 'file:/raid5/install/IMAGES/MICROSOFT/SQL/SQL2005/32BIT/Win_SQL_Srv_2005_Std_Rus/Win_SQL_Srv_2005_Std_Rus_Disc1.ISO,hdc:cdrom,r'
 , 'file:/raid5/install/IMAGES/MICROSOFT/SQL/SQL2005/32BIT/Win_SQL_Srv_2005_Std_Rus/Win_SQL_Srv_2005_Std_Rus_Disc2.ISO,hdd:cdrom,r'
 ]
boot    =       'c'
on_poweroff =   'destroy'
on_reboot =     'restart'
on_crash =      'preserve'
device_model = '/usr/lib/xen/bin/qemu-dm'
vfb = ['vnc=1,vnclisten=0.0.0.0']
vncpasswd =     ''
vncviewer =     1
opengl  =       1
sdl     =       0
vncconsole =    0
stdvga  =       0
serial  =       'pty'
usbdevice="tablet"
Comment 16 Maris Ruskulis 2011-06-27 07:15:46 UTC
Seems there is problem with xsm/acm. Had the same issue, then recompiled without acm/xsm. Now everyting seems ok.
Comment 17 Ian Delaney (RETIRED) gentoo-dev 2011-07-30 15:50:28 UTC
*** Bug 376661 has been marked as a duplicate of this bug. ***
Comment 18 Ian Delaney (RETIRED) gentoo-dev 2011-07-31 16:02:09 UTC
On testing these settings, I found setting xsm not to trigger a problem.
I did find that acm triggers a problem.

from comment 14,

after 4-5 seconds - hard reboot

I am pretty certain the use flag acm merely sets ACM_SECURITY ?= y in the file Config.mk in the source.

I suggest a conclusion of withdrawing the acm use flag from the ebuilds for xen and xen-tools in matching versions can suffice to close this bug.

I have currently referred the issue to xennsource upstream.  There is where the fix appears to be required.  Cna re-post in receiving more info.
Comment 19 Ian Delaney (RETIRED) gentoo-dev 2011-08-09 16:10:17 UTC
So I have more info.  Have entered this in the xen-devel list.

Have reply that confirms the above fron the xen devs;

Yes, Flask and ACM are (were) two different security models implemented
under a common XSM security framework. Only Flask is being actively
maintained, so I deleted ACM. I would recommend Gentoo only enable xsm in
their build -- at least if that fails there are maintainers who should be
interested in helping to fix it.