[Openstack-devel] cloud-initramfs-tools growroot bug in Debian

Thomas Goirand zigo at debian.org
Thu May 23 18:04:16 UTC 2013


Hi Scott!

I'm continuing my work to build Debian cloud images. Doing so, I've been
using cloud-initramfs-tools which Julien Danjou packaged. Unfortunately,
it didn't work, so I investigated and tried to debug it.

So I started adding some debug things, and here's what I saw:
http://thomas.goirand.fr/growpart.png

First of all, there is this:

"GROWROOT: unexpected output: trap: EXIT: bad trap

This seem to happen when the --dry-run test is happening. I have no idea
why. Any idea?

Of course, this is breaking what's after (eg: the check of the output).
But also, in Debian, it isn't "CHANGE:" but "CHANGED:", so even if the
test was running ok, it would still fail.

So, what I did was disabling the test, and it always worked. I think
that having such output testing is quite dangerous, and I see no reason
why you would do it. Why don't you just let it run if the return value
of the test is zero?

I've seen that in your latest version (we still run with version 0.18 in
Debian Sid), you've changed from:

case "${out}" in
	CHANGE:*) :;;
	*) exit 0;;

to:

case "$ret:$out" in
	0:CHANGE:*) :;;
	[01]:NOCHANGE:*) exit 0;;
	*) msg "exited '$ret'" "${out}"; exit 1;;

While this has a better change to work, this would still fail in Debian,
because of the "CHANGED:" with the added D char.

Another problem I have found is that in Debian, the sed and awk utility
aren't present. So I added them in your growroot initramfs hook.

I have attached the patch for you to see, but that's quite trivial, if
you know the above.

Your thoughts?

Cheers,

Thomas Goirand (zigo)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cloud-initramfs-tools_0.18.debian1.debdiff
URL: <http://lists.alioth.debian.org/pipermail/openstack-devel/attachments/20130524/14cc5fea/attachment-0001.ksh>


More information about the Openstack-devel mailing list