Bug#549083: Not working with 3.0.3-2

2009-11-09 Thread M G Berberich
Hello,

Am Montag, den 09. November schrieb martin f krafft:
> unmerge 549083
> retitle 549083 initramfs hook introduces single quotes into homehost name
> reopen 549083
> notfixed 549083
> tags 549083 patch
> thanks
> 
> also sprach Neil Brown  [2009.11.09.0534 +0100]:
> >   [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost='$MD_HOMEHOST'"
> >   if $MDADM --assemble --scan --run --auto=yes $extra_args; then
> > 
> > That is wrong.
> > It will cause the --homehost string given to mdadm to have single
> > quotes around it.  It should be
> > 
> >   [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost=$MD_HOMEHOST"
> >   if $MDADM --assemble --scan --run --auto=yes 
> > ${extra_args:+"$MD_HOMEHOST"}; then
> 
> Will be in next upload. Does this work for you?

No, does not change the behaviour at all. Still works without names
does not work with names.

MfG
bmg

-- 
„Des is völlig wurscht, was heut beschlos- | M G Berberich
 sen wird: I bin sowieso dagegn!“  | berbe...@fmi.uni-passau.de
(SPD-Stadtrat Kurt Schindler; Regensburg)  | www.fmi.uni-passau.de/~berberic



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



Bug#549083: Not working with 3.0.3-2

2009-11-08 Thread martin f krafft
unmerge 549083
retitle 549083 initramfs hook introduces single quotes into homehost name
reopen 549083
notfixed 549083
tags 549083 patch
thanks

also sprach Neil Brown  [2009.11.09.0534 +0100]:
>   [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost='$MD_HOMEHOST'"
>   if $MDADM --assemble --scan --run --auto=yes $extra_args; then
> 
> That is wrong.
> It will cause the --homehost string given to mdadm to have single
> quotes around it.  It should be
> 
>   [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost=$MD_HOMEHOST"
>   if $MDADM --assemble --scan --run --auto=yes ${extra_args:+"$MD_HOMEHOST"}; 
> then

Will be in next upload. Does this work for you?

diff --git a/debian/initramfs/script.local-top 
b/debian/initramfs/script.local-top
index 0148f24..0458e17 100644
--- a/debian/initramfs/script.local-top
+++ b/debian/initramfs/script.local-top
@@ -75,9 +75,8 @@ echo 1 > /sys/module/md_mod/parameters/start_ro
 if [ "$MD_DEVS" = all ]; then
 
   verbose && log_begin_msg "Assembling all MD arrays"
-  extra_args=''
-  [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost='$MD_HOMEHOST'"
-  if $MDADM --assemble --scan --run --auto=yes $extra_args; then
+  [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost=$MD_HOMEHOST"
+  if $MDADM --assemble --scan --run --auto=yes${extra_args:+ $extra_args}; then
 verbose && log_success_msg "assembled all arrays."
   else
 log_failure_msg "failed to assemble all arrays."

-- 
 .''`.   martin f. krafft   Related projects:
: :'  :  proud Debian developer   http://debiansystem.info
`. `'`   http://people.debian.org/~madduckhttp://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Bug#549083: Not working with 3.0.3-2

2009-11-08 Thread Neil Brown
On Sunday November 8, berbe...@fmi.uni-passau.de wrote:
> hello,
> 
> Am Sonntag, den 08. November schrieb M G Berberich:
> > still not working with mdadm 3.0.3-2. During boot it failes with:
> > 
> > Begin: Assemble all MD arrays ... Failure: failed to assemble all arrays
> > 
> > and then can't mount the root-fs. Downgrading to mdadm 2.6.7.2-3 makes
> > it work again, but breaks a lot of dependies in dpkg/apt.
> 
> I found out that the problem was that the $,1r|(Bmdadm --assemble 
> $,1s&r}(B-call
> failed because of the names of the arrays. For root:
> 
>sda2 has wrong name
> 
> So I tried to remove the $,1r|(Bname='hermione':2$,1r}(B (and all the 
> others) from
> /etc/mdadm/mdadm.conf and now it boots.
> 
> Result: This does not boot:
> 
>   ARRAY /dev/md/2 level=raid1 metadata=1.0 num-devices=2 
> UUID=edc699ab:86dacff1:4b646c0c:73e9f59e name='hermione':2
> 
> this does:
> 
>   ARRAY /dev/md/2 level=raid1 metadata=1.0 num-devices=2 
> UUID=edc699ab:86dacff1:4b646c0c:73e9f59e
> 
> calling $,1r|(Bmdadm --detail --scan$,1r}(B still gives the same names:
> 
>   $,1s&
(B>   ARRAY /dev/md/2 metadata=1.00 name='hermione':2 
UUID=edc699ab:86dacff1:4b646c0c:73e9f59e
>   $,1s&(B
> 

I wonder where those "'" characters are coming from.
Presumably it should be 
   . name=hermione:2 

Looking around the initrd someone else posted I find in
   scripts/local-top/mdadm
the code:

  [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost='$MD_HOMEHOST'"
  if $MDADM --assemble --scan --run --auto=yes $extra_args; then

That is wrong.
It will cause the --homehost string given to mdadm to have single
quotes around it.  It should be

  [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost=$MD_HOMEHOST"
  if $MDADM --assemble --scan --run --auto=yes ${extra_args:+"$MD_HOMEHOST"}; 
then

so that spaces in MD_HOMEHOST will be protected, but quotes won't
be passed through (isn't Bourne-Shell a wonderful programming
language!!).

I cannot see how that bug would cause the current problem, but it
should still be fixed.

Actually, having spaces in the hostname would break lots of things, so
all that extra quoting really is pointless.  So this would be
adequate.

  [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost=$MD_HOMEHOST"
  if $MDADM --assemble --scan --run --auto=yes $extra_args ; then


NeilBrown



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



Bug#549083: Not working with 3.0.3-2

2009-11-08 Thread M G Berberich
hello,

Am Sonntag, den 08. November schrieb M G Berberich:
> still not working with mdadm 3.0.3-2. During boot it failes with:
> 
> Begin: Assemble all MD arrays ... Failure: failed to assemble all arrays
> 
> and then can't mount the root-fs. Downgrading to mdadm 2.6.7.2-3 makes
> it work again, but breaks a lot of dependies in dpkg/apt.

I found out that the problem was that the “mdadm --assemble …”-call
failed because of the names of the arrays. For root:

   sda2 has wrong name

So I tried to remove the “name='hermione':2” (and all the others) from
/etc/mdadm/mdadm.conf and now it boots.

Result: This does not boot:

  ARRAY /dev/md/2 level=raid1 metadata=1.0 num-devices=2 
UUID=edc699ab:86dacff1:4b646c0c:73e9f59e name='hermione':2

this does:

  ARRAY /dev/md/2 level=raid1 metadata=1.0 num-devices=2 
UUID=edc699ab:86dacff1:4b646c0c:73e9f59e

calling “mdadm --detail --scan” still gives the same names:

  …
  ARRAY /dev/md/2 metadata=1.00 name='hermione':2 
UUID=edc699ab:86dacff1:4b646c0c:73e9f59e
  …

MfG
bmg

-- 
„Des is völlig wurscht, was heut beschlos- | M G Berberich
 sen wird: I bin sowieso dagegn!“  | berbe...@fmi.uni-passau.de
(SPD-Stadtrat Kurt Schindler; Regensburg)  | www.fmi.uni-passau.de/~berberic



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