NetBSD Problem Report #49346

From t.hash425@gmail.com  Fri Oct 31 13:30:06 2014
Return-Path: <t.hash425@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E65EFA667A
	for <gnats-bugs@gnats.netbsd.org>; Fri, 31 Oct 2014 13:30:05 +0000 (UTC)
Message-Id: <54538ED9.4030803@gmail.com>
Date: Fri, 31 Oct 2014 22:30:01 +0900
From: Takahiro HAYASHI <t.hash425@gmail.com>
To: gnats-bugs@gnats.NetBSD.org
Subject: sysutils/xentools42: xendomains startup script should run after xend

>Number:         49346
>Category:       pkg
>Synopsis:       sysutils/xentools42: xendomains startup script should run after xend
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 31 13:35:00 +0000 2014
>Closed-Date:    Sat Nov 22 19:53:50 +0000 2014
>Last-Modified:  Sat Nov 22 19:53:50 +0000 2014
>Originator:     Takahiro HAYASHI
>Release:        NetBSD 6.1_STABLE
>Organization:
>Environment:
System: NetBSD 6.1_STABLE amd64 as Xen Dom0
Architecture: x86_64
Machine: amd64
Xen-version: 4.2.5nb1
>Description:
	Xen domains start up script /etc/rc.d/xendomains shall be
	executed after xend, otherwise disk ops on DomU may fails
	at boot.

>How-To-Repeat:
	Add names of your DomUs to xendomain variable in /etc/rc.conf
	and restart system.

>Fix:
	xentools42/files/xendomains.sh should be like xentools41 is:

--- xendomains.sh.orig	2014-06-27 20:04:23.000000000 +0900
+++ xendomains.sh	2014-10-31 10:16:56.000000000 +0900
@@ -1,7 +1,7 @@
  #!@RCD_SCRIPTS_SHELL@
  #
  # PROVIDE: xendomains
-# REQUIRE: xencommons
+# REQUIRE: xend
  # KEYWORD: shutdown
  #
  # xendomains		This required variable is a whitespace-separated


-- 
t-hash

>Release-Note:

>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/49346: sysutils/xentools42: xendomains startup script should
 run after xend
Date: Mon, 3 Nov 2014 19:35:16 +0100

 On Fri, Oct 31, 2014 at 01:35:00PM +0000, Takahiro HAYASHI wrote:
 > >Description:
 > 	Xen domains start up script /etc/rc.d/xendomains shall be
 > 	executed after xend, otherwise disk ops on DomU may fails
 > 	at boot.

 no, because the xendomains script provided with xentools42 is
 using xl and not xm, and so doesn't need xend.

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

From: Takahiro HAYASHI <t.hash425@gmail.com>
To: Manuel Bouyer <bouyer@antioche.eu.org>, gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, 
 pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/49346: sysutils/xentools42: xendomains startup script should
 run after xend
Date: Tue, 04 Nov 2014 21:08:59 +0900

 On 11/04/14 03:35, Manuel Bouyer wrote:
 > On Fri, Oct 31, 2014 at 01:35:00PM +0000, Takahiro HAYASHI wrote:
 >>> Description:
 >> 	Xen domains start up script /etc/rc.d/xendomains shall be
 >> 	executed after xend, otherwise disk ops on DomU may fails
 >> 	at boot.
 >
 > no, because the xendomains script provided with xentools42 is
 > using xl and not xm, and so doesn't need xend.

 Ah, I mean 'xend' is '/etc/rc.d/xend.sh', it spawns xend and
 xenbackendd.
 I'm not sure what xend and xenbackendd do, but it's sure that
 domUs wont't boot as shown below when xendomains.sh is executed
 before xend.sh (as far as /var/run/rc.log is correct).
 Sorry for forgetting detail information.

 > boot device: xbd0
 > root on xbd0a dumps on xbd0b
 > root file system type: ffs
 > Tue Nov  4 19:50:53 JST 2014
 > Starting root file system check:
 > /dev/rxbd0a: file system is clean; not checking
 > Starting file system checks:
 > rm: dmesg.boot: Input/output error
 > rm: lvm: Directory not empty
 > rm: ntpd.pid: Input/output error
 > rm: powerd.pid: Input/output error
 > eval: mkdir: I/O error
 > eval: chown: I/O error
 > eval: chmod: I/O error
 > /etc/rc.d/mountcritlocal exited with code 1
 > uid 0, pid 11, command sh, on /: out of inodes
 >
 > /: create/symlink failed, no inodes free
 > uid 0, pid 11, command sh, on /: out of inodes
 >
 > /: create/symlink failed, no inodes free
 > init: _getttyent: Input/output error
 > init: fatal signal: Segmentation fault

 This is tail of bootlog for my NetBSD/amd64 6.1_STABLE DomU.
 Once I destroy this domu and re-create again, it
 starts to boot normally.


 -- 
 t-hash

From: Manuel Bouyer <bouyer@antioche.eu.org>
To: Takahiro HAYASHI <t.hash425@gmail.com>
Cc: gnats-bugs@NetBSD.org, pkg-manager@NetBSD.org, gnats-admin@NetBSD.org,
        pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/49346: sysutils/xentools42: xendomains startup script should
 run after xend
Date: Tue, 4 Nov 2014 19:26:57 +0100

 On Tue, Nov 04, 2014 at 09:08:59PM +0900, Takahiro HAYASHI wrote:
 > Ah, I mean 'xend' is '/etc/rc.d/xend.sh', it spawns xend and
 > xenbackendd.

 you shouldn't start xend and xenbackendd if you're using xl.
 If you're running xenbackendd with xl I guess devices may be attached
 twice.

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

From: Takahiro HAYASHI <t.hash425@gmail.com>
To: Manuel Bouyer <bouyer@antioche.eu.org>, 
 Takahiro HAYASHI <t.hash425@gmail.com>
Cc: gnats-bugs@NetBSD.org, pkg-manager@NetBSD.org, 
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/49346: sysutils/xentools42: xendomains startup script should
 run after xend
Date: Wed, 05 Nov 2014 09:02:52 +0900

 On 11/05/14 03:26, Manuel Bouyer wrote:
 > On Tue, Nov 04, 2014 at 09:08:59PM +0900, Takahiro HAYASHI wrote:
 >> Ah, I mean 'xend' is '/etc/rc.d/xend.sh', it spawns xend and
 >> xenbackendd.
 >
 > you shouldn't start xend and xenbackendd if you're using xl.
 > If you're running xenbackendd with xl I guess devices may be attached
 > twice.

 I didn't know Xen works without that 2 daemons, oops.
 Thank you for pointing out about it.

 I revert my patched xendomains.sh, turn off XEND in rc.conf, and
 I can boot DomUs normally.
 Please close this PR.


 Thanks,
 -- 
 t-hash

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 22 Nov 2014 19:53:50 +0000
State-Changed-Why:
Withdrawn by submitter.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.