[hardy-backports] errors in xendomains init script

Bug #216761 reported by Carl Fooks
52
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hardy Backports
Fix Released
Undecided
Unassigned
xen-3.2 (Ubuntu)
Invalid
Undecided
Unassigned
Hardy
Fix Released
Undecided
Unassigned
Intrepid
Invalid
Undecided
Unassigned
Jaunty
Invalid
Undecided
Unassigned
xen-3.3 (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Invalid
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: xen-utils-3.2

The xendomains init script has a couple of errors.

These errors affected xen-3.3 3.3.0-1ubuntu7, which was backported to Hardy as 3.3.0-1ubuntu7~hardy1. Please backport xen-3.3 3.3.0-1ubuntu7.1 from Intrepid to Hardy to fix this problem for hardy-backports.

=====

IMPACT: These errors cause the normal migrate then save then shutdown mechanisms to fail, and instead skip straight to the "shutdown all" stage. In addition to being a major departure from the expected behavior, this could cause loss of user data, if users expect the state of their VMs to be saved instead of destroyed.

PATCH: http://launchpadlibrarian.net/20457983/xen-3.2_3.2.0-0ubuntu11.debdiff for Hardy and http://launchpadlibrarian.net/23083113/xen-3.3_3.3.0-1ubuntu7.1.debdiff for Intrepid represent the minimal patch to restore functionality.

TEST CASE:
1. Start a Xen domU
2. Run /etc/init.d/xendomains stop
3. Observe that, after several errors are spewed, the domU is not saved to /var/lib/xen/save, as is the default Ubuntu config, but is instead shutdown.

REGRESSIONS: This is a two line patch whose implications can be pretty easily observed directly. It is highly unlikely to make things any less functional than they are now.

Please note, this is not the same as bug #208300.

Revision history for this message
Carl Fooks (carl-genko) wrote :
Revision history for this message
Carl Fooks (carl-genko) wrote :

The specific errors, emitted during startup, were one to do with cut, which was just a simple typo at line 186, in the parseln function, and the second was the test at line 196 caused an error saying (something like) "test: = unary operator expected. I simply wrapped that one in quotes (not sure if that was the right thing to do.)

Revision history for this message
agent 8131 (agent-8131) wrote :

I noticed this too. I reported the change in the behavior of cut out of concern that it would affect other scripts but this was the only case I found.

https://bugs.launchpad.net/ubuntu/+source/xen-common/+bug/211262

Revision history for this message
Sandro Sigala (sandro-sigala) wrote :

Confirmed. Carl Fooks' patch works perfectly. Thanks.

Revision history for this message
Stefan Soriga (sgstefan) wrote :

Confirmed. Please include this patch in the release. Thanks.

Revision history for this message
emmanuel (emmanuel-inl) wrote :

Confirmed. Patch should be included.

Revision history for this message
Marko Steinberger (marko-steinberger) wrote :

Just wanted to create a patch for this myself, but too late :-)
Did not net test this patch, however I confirm a bug fixed by it at line 186 in xendomains script.
I vote for inclusion of this one, too.

Revision history for this message
Ian Taylor (ibtaylor) wrote :

If some of the configurable paths in /etc/default/xendomains contain spaces, then the script fails. Like the previous patch, many of the $var probably need to have double quotes around them. However, I'm no bash expert either.

Evan Broder (broder)
Changed in xen-3.2:
status: New → Confirmed
Evan Broder (broder)
description: updated
description: updated
Evan Broder (broder)
description: updated
Revision history for this message
Evan Broder (broder) wrote :

This bug still affects the xen-3.3-utils package in Jaunty

Revision history for this message
DeeKey (privateinf) wrote :

Patch works on Ubuntu 8.0.4.1 Please reassign to package maintainer to include the fix.

Revision history for this message
Evan Broder (broder) wrote :

I guess this should probably be fixed in Jaunty before I try to get an SRU for Hardy.

I've attached the debdiff that fixes this problem in xen-utils-3.3 on Jaunty.

Revision history for this message
Evan Broder (broder) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks; sponsored!

Changed in xen-3.3:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xen-3.3 - 3.3.0-1ubuntu8

---------------
xen-3.3 (3.3.0-1ubuntu8) jaunty; urgency=low

  * debian/xen-utils-3.3.xendomains.init: fix cut bug (LP: #216761).
     Patch by Carl Fooks

 -- Evan Broder <email address hidden> Sat, 13 Dec 2008 12:35:28 -0500

Changed in xen-3.3:
status: Fix Committed → Fix Released
Revision history for this message
Evan Broder (broder) wrote :

I still believe that this bug is substantial enough that it qualifies for an SRU to both Hardy and Intrepid.

Since 3.3.0-1ubuntu7 is the version in Intrepid, xen-3.3_3.3.0-1ubuntu8.debdiff posted above should still be valid for Intrepid.

I'm attaching xen-3.2_3.2.0-0ubuntu11.debdiff, which should be the equivalent diff for an SRU in Hardy.

I'd appreciate feedback from ubuntu-sru.

description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Looks fine for an SRU. Bryce, mind sponsoring those, too?

Changed in xen-3.3:
status: New → Invalid
status: New → Confirmed
Changed in xen-3.2:
status: Confirmed → Invalid
status: New → Invalid
status: New → Confirmed
Revision history for this message
Wido den Hollander (wido) wrote :

This really should be fixed in Hardy, since Hardy is a LTS i think these minor issues should be fixed!

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

Unsubscribing motu-sru team because the package is in main.

Revision history for this message
Bryce Harrington (bryce) wrote :

Martin, both uploaded to -proposed.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted xen-3.2 into hardy-proposed; please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in xen-3.2:
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Re: errors in xendomains init script

There's no xen in the intrepid-proposed queue.

Revision history for this message
Evan Broder (broder) wrote :

Here's an updated version of the SRU for Intrepid with a corrected version number

description: updated
Revision history for this message
Evan Broder (broder) wrote :

Whoops - that patch was backwards. Let's try this one instead.

description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks, upload sponsored.

Changed in xen-3.3:
status: Confirmed → Fix Committed
Steve Langasek (vorlon)
Changed in xen-3.3:
status: Fix Committed → In Progress
Revision history for this message
Evan Broder (broder) wrote :

Martin, I've tested the version in hardy-proposed and can confirm that it works for me (and didn't introduce any regressions on my system).

(Granted, I suspect that doesn't count for /too/ much since it is my patch :-P, but there it is.)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xen-3.2 - 3.2.0-0ubuntu10.1

---------------
xen-3.2 (3.2.0-0ubuntu10.1) hardy-proposed; urgency=low

  * debian/xen-utils-3.3.xendomains.init: fix cut bug (LP: #216761)
     Patch by Carl Fooks

 -- Evan Broder <email address hidden> Mon, 15 Dec 2008 22:26:49 -0500

Changed in xen-3.2:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Removed verification-done tag for initiating the xen-3.3 intrepid SRU.

Changed in xen-3.3:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed; please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Tom Inglis (tominglis) wrote : Re: errors in xendomains init script

This update has broken my Xen install on Ubuntu Server 8.04.2 with the Ubuntu Xen 2.6.18 kernel.

I am no longer able to use the Xen tools to access my instances at the console, shut them down, or start them up.

Is there a version mismatch? The update changelog has:

* debian/xen-utils-3.3.xendomains.init: fix cut bug (LP: #216761)
     Patch by Carl Fooks

which should be for version 3.2 of xen-utils?

Revision history for this message
Tom Inglis (tominglis) wrote :

I destroyed my instances and then created them again, and they seem to be working fine again now.

But I had restarted the host system several times, which I thought also restarted the guests!?

Revision history for this message
Evan Broder (broder) wrote :

Yeah, when I originally created the patch it was for Xen 3.3, and I forgot to change it for the Xen 3.2 version of the patch. It's a typo, but the package is actually for Xen 3.2

Are you sure you don't have hardy-backports turned on? If you let apt install the libxen3 from hardy-backports, that will have the behavior you describe, because libxen3 in -backports is Xen 3.3, and isn't interoperable with Xen 3.2.

If that's what happened, you should download and install <http://mirrors.kernel.org/ubuntu/pool/main/x/xen-3.2/libxen3_3.2.0-0ubuntu10.1_amd64.deb>, and then add this to /etc/apt/preferences:

 Package: libxen3
 Pin: release a=hardy-updates
 Pin-Priority: 700

Revision history for this message
Evan Broder (broder) wrote :

Oh, ok, good.

That's the point of the xendomains script - when you shutdown, it saves the guests' current state to disk (/var/lib/xen/save, I think), and when you startup, it restores any domains that are saved into that directory.

Before it would just shut them down because of the typo that the patch fixed.

If you want to change the behavior, you can edit /etc/default/xendomains - it actually lets you do a pretty rich variety of operations.

Revision history for this message
Thiago Martins (martinx) wrote :

Can anybody tell me why this bug has occurred in the first place?

It was the fault of whom?

It must be very careful before you make changes in the system.

Revision history for this message
Martin Pitt (pitti) wrote :

Tom, this SRU is for xen-3.3 in intrepid right now. xen-3.3 does not exist in hardy proper, so I take it you are using a backport.

Did anyone test the update in intrepid-proposed and can test whether it still works, and also whether it fixes this bug? Thanks!

Revision history for this message
Evan Broder (broder) wrote :

Well, I don't think many people are running Xen hosts on Intrepid, since there isn't a dom0-capable kernel. However, I hacked a test VM together using the Hardy kernel.

Since I'm already running in a VM, I can only do fairly limited testing, but I was able to install a VM using xen-tools, boot it up, and then use the /etc/init.d/xendomains script to save state instead of force powering off the VM.

As far as I can tell, the package in intrepid-proposed seems to work.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xen-3.3 - 3.3.0-1ubuntu7.1

---------------
xen-3.3 (3.3.0-1ubuntu7.1) intrepid-proposed; urgency=low

  * debian/xen-utils-3.3.xendomains.init: fix cut bug (LP: #216761).
     Patch by Carl Fooks

 -- Evan Broder <email address hidden> Tue, 24 Feb 2009 16:32:43 -0500

Changed in xen-3.3 (Ubuntu Intrepid):
status: Fix Committed → Fix Released
Revision history for this message
Evan Broder (broder) wrote :

Ok - one last fix remains, and then we're done with this bug.

xen-3.3 3.3.0-1ubuntu7~hardy1 is currently in hardy-backports. Backporting 3.3.0-1ubuntu7.1 from Intrepid to Hardy should be safe and should fix the bug in backports.

description: updated
summary: - errors in xendomains init script
+ [hardy-backports] errors in xendomains init script
agent 8131 (agent-8131)
tags: added: server virtualization xen
Revision history for this message
John Dong (jdong) wrote :

Talked to ebroder in person and saw verification that intrepid-updates's version backports cleanly and works on Hardy.

ACK from ~ubuntu-backporters for backporting xen-3.3 | 3.3.0-1ubuntu7.1 | intrepid-updates | source to hardy-backports.

John Dong (jdong)
Changed in hardy-backports:
status: New → Confirmed
Revision history for this message
James Westby (james-w) wrote :

 * Trying to backport xen-3.3...
I: Extracting xen-3.3_3.3.0-1ubuntu7.1.dsc ... done.
I: Building backport of xen-3.3 as 3.3.0-1ubuntu7.1~hardy1 ... done.

Changed in hardy-backports:
status: Confirmed → Fix Released
status: Fix Released → Fix Committed
Jonathan Riddell (jr)
Changed in hardy-backports:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.