When running Ubuntu as an Eucalyptus VM instance, module acpiphp is not available to be loaded, complicating the use EBS volume

Bug #364916 reported by Etienne Goyer
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
eucalyptus (Ubuntu)
Invalid
Undecided
Unassigned
Jaunty
Invalid
Undecided
Unassigned
Karmic
Invalid
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Tim Gardner
Jaunty
Fix Released
Wishlist
Stefan Bader
Karmic
Fix Released
Undecided
Tim Gardner

Bug Description

SRU justification:

Impact: When an Ubuntu AMI is being run as an instance in Eucalyptus, using an EBS volume requires that the acpiphp module be loaded. Unfortunately, the kernel and modules are not installed in the root filesystem, which mean the acpiphp module is not available to be loaded in the first place.

Fix: Add the module to the list of modules for the virtual package.

Testcase: See below

---

I can think of two ways to work-around the problem:

- Install linux-image-$(uname -r) inside the instance, and load acpiphp in /etc/modules or somesuch. The drawback is that doing this have a pretty important footprint in term of disk (115 MB) and network download.

- Upload to the cloud an initramfs image that have the acpiphp module in it. The drawback is that doing so needs to be documented, and it make creating/uploading/registering the image more complicated, and non-orthogonal with creating an image for EC2.

Having the kernel built with CONFIG_HOTPLUG_PCI_ACPI=y would also resolve the problem nicely. Or maybe there would be a more elegant work-around, which I would love to hear about.

Just to clarify, this is not a problem on EC2, or when running as an instance on an Eucalyptus cloud that use the Xen hypervisor. This problem is specific to running Eucalyptus with KVM, which is the default on Ubuntu. In that case, EBS volumes show up as block devices attached through virtual SCSI controller being hot-plugged, and that is why we need to have the acpiphp module loaded (or a kernel compiled with CONFIG_HOTPLUG_PCI_ACPI=y) in the first place.

Revision history for this message
Scott Moser (smoser) wrote :

I found this also to be a problem simply when running jaunty as a qemu or kvm guest. Note, that the config for linux-image-virtual (linux-image-2.6.28-11-virtual) does have CONFIG_HOTPLUG_PCI_ACPI=m, the module is just not included in the -virtual package.

Revision history for this message
Scott Moser (smoser) wrote :

just a link, http://www.linux-kvm.org/page/Hotadd_pci_devices#Use_QEMU_monitor_to_hot_add_devices documents that acpiphp.ko is needed for hotplug of block devices to work in kvm.

Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

That is pretty much my point: if acpiphp is available as a module, then you need some mechanism to get it into the image somehow (a plugin to vmbuilder, perhaps?), and keep it in sync with the kernel being used. Having it built into the kernel (CONFIG_HOTPLUG_PCI_ACPI=y) would make life much easier, but I am not sure if it is possible to do that. In short, I have no idea how this could possibly be fixed.

Revision history for this message
Scott Moser (smoser) wrote :

if acpiphp.ko were collected by the -virtual kernel image, wouldn't it "just work" for you (except for loading the module)

Ie, if
a. debian/sub-flavours/virtual.list had 'drivers/pci/hotplug/*', then acpiphp.ko would make its way into the -virtual image.
b. That is the kernel image that is installed by vmbuilder, so your suggestion of loading via /etc/modules would work, and be easily enough enabled by a --execscript program in to vmbuilder.

I think that 'a' definitely needs to be done, a "virtual" kernel should support hotplug.
I dont know exactly what the best way to get the module loaded would be.

Scott Moser (smoser)
Changed in eucalyptus (Ubuntu):
status: New → Confirmed
Revision history for this message
Scott Moser (smoser) wrote :

The -virtual kernel package should contain the acpiphp module. The intent of
that package is to be used by virtual machines, and those machines should be
able to use kvm's pci hotplug. That can be accomplished as I described in
comment 4. Can we please have that done?

The documentation on setting up Eucalyptus right now
(https://help.ubuntu.com/community/Eucalyptus) suggests using
/boot/vmlinuz-2.6.. and /boot/initrd.img-... for guest kernel and initrd
respectively. The problem is that on a ubuntu system that will not result in
functional pci hotplug support in the guest.

Etienne suggested changing CONFIG_HOTPLUG_PCI_ACPI to 'y' in kernel config.

The other solution would be to get acpiphp.ko into the initrd that the user is
told to use. That can be accomplished by adding it to
/etc/initramfs-tools/modules and running update-initramfs prior to 'ec2-bundle-image' and 'ec2-upload-bundle'.

Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote : Re: [Bug 364916] Re: When running Ubuntu as an Eucalyptus VM instance, module acpiphp is not available to be loaded, complicating the use EBS volume

Scott Moser wrote:
> The other solution would be to get acpiphp.ko into the initrd that the user is
> told to use. That can be accomplished by adding it to
> /etc/initramfs-tools/modules and running update-initramfs prior to 'ec2-bundle-image' and 'ec2-upload-bundle'.

But then, we would also need to force-load the module before init
pivot_root, otherwise the module would still be unavailable (since the
initramfs is not accessible after system boot, AIUI).

Revision history for this message
Scott Moser (smoser) wrote : Re: [Bug 364916] Re: When running Ubuntu as an Eucalyptus VM instance, module acpiphp is not available to be loaded, complicating the use EBS volume

> But then, we would also need to force-load the module before init
> pivot_root, otherwise the module would still be unavailable (since the
> initramfs is not accessible after system boot, AIUI).

Sorry, should have stated that explicitly. Presence in
/etc/initramfs-tools/modules gets the module modprobed before pivot_root.

from mkinitramfs(8):
   /etc/initramfs-tools/modules
     Specified modules will be put in the generated image and loaded
     when the system boots. The format - one per line - is identical
     to that of /etc/modules, which is described in modules(5).

Stefan Bader (smb)
description: updated
Changed in linux (Ubuntu):
status: New → In Progress
Changed in linux (Ubuntu Jaunty):
assignee: nobody → Stefan Bader (stefan-bader-canonical)
importance: Undecided → Wishlist
status: New → Fix Committed
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Karmic):
assignee: nobody → Tim Gardner (timg-tpi)
milestone: none → karmic-alpha-5
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.31-8.28

---------------
linux (2.6.31-8.28) karmic; urgency=low

  [ Ike Panhc ]

  * [Config] Let nic-shared-modules depends on crypto-modules
    - LP: #360966

  [ Leann Ogasawara ]

  * [Upstream] (drop after 2.6.31) drm/i915: increase default latency
    constant
    - LP: #412492

  [ Mario Limonciello ]

  * [Upstream]: (drop after 2.6.31) dell-laptop: don't change softblock
    status if HW switch is disabled
    - LP: #418721
  * [Upstream]: (drop after 2.6.31) compal-laptop: Add support for known
    Compal made Dell laptops
  * [Upstream]: (drop after 2.6.31) compal-laptop: Replace sysfs support
    with rfkill support

  [ Tim Gardner ]

  * [Config] Add acpiphp to virtual sub-flavour
    - LP: #364916
  * Drop KSM patch set for now because of instabilities with encrypted swap.
    - LP: #418781

 -- Tim Gardner <email address hidden> Wed, 26 Aug 2009 08:14:26 -0600

Changed in linux (Ubuntu Karmic):
status: In Progress → Fix Released
Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

The recipe to create an AMI at https://help.ubuntu.com/community/Eucalyptus would also need to be modified. As it stands, it would result in an AMI that cannot make use of EBS.

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

Accepted linux into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Steve Langasek (vorlon) wrote :

what other changes are needed on the eucalyptus package for this?

Revision history for this message
Scott Moser (smoser) wrote :

On Thu, 10 Sep 2009, Steve Langasek wrote:

> what other changes are needed on the eucalyptus package for this?

bug 426438 ( https://bugs.launchpad.net/vmbuilder/+bug/426438 )

Revision history for this message
Scott Moser (smoser) wrote :

> what other changes are needed on the eucalyptus package for this?

Sorry for the incomplete thought. I was trying to say that
a.) we need to document how to get acpiphp in ramdisk if the user makes
their own. https://help.ubuntu.com/community/Eucalyptus mentions how to
do this (add it to /etc/initramfs-tools/modules)
b.) we need to provide kernel and ramdisk (bug 426438)

Revision history for this message
Thierry Carrez (ttx) wrote :

Please see bug 426438

Changed in eucalyptus (Ubuntu Karmic):
status: Confirmed → Invalid
Changed in eucalyptus (Ubuntu Jaunty):
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.28-15.52

---------------
linux (2.6.28-15.52) jaunty-proposed; urgency=low

  [ Stefan Bader ]

  * Revert "SAUCE: ACPI: Populate DIDL before registering ACPI video device
    on Intel"
    - LP: #423296
  * SAUCE: Allow less restrictive acpi video detection
    - LP: #333386

  [ Upstream Kernel Changes ]

  * include drivers/pci/hotplug/* in -virtual package
    - LP: #364916
  * ext4: don't call jbd2_journal_force_commit_nested without journal
    - LP: #418197
  * ext4: fix ext4_free_inode() vs. ext4_claim_inode() race
    - LP: #418197
  * ext4: fix bogus BUG_ONs in in mballoc code
    - LP: #418197
  * ext4: fix typo which causes a memory leak on error path
    - LP: #418197
  * ext4: Fix softlockup caused by illegal i_file_acl value in on-disk
    inode
    - LP: #418197
  * ext4: Fix sub-block zeroing for writes into preallocated extents
    - LP: #418197
  * jbd2: Call journal commit callback without holding j_list_lock
    - LP: #418197
  * ext4: Print the find_group_flex() warning only once
    - LP: #367065
  * ext4: really print the find_group_flex fallback warning only once
    - LP: #367065

linux (2.6.28-15.51) jaunty-proposed; urgency=low

  [ Colin Ian King ]

  * SAUCE: wireless: hostap, fix oops due to early probing interrupt
    - LP: #254837

  [ Leann Ogasawara ]

  * Add the atl1c driver to support Atheros AR8132
    - LP: #415358
  * Updating configs to enable the atl1c driver
    - LP: #415358

  [ Stefan Bader ]

  * Revert "SAUCE: input: Blacklist digitizers from joydev.c"
    - LP: #300143
  * SAUCE: Fix the exported name for e1000e-next
    - LP: #402890
  * SAUCE: Fix incorrect stable backport to bas_gigaset
    - LP: #417732
  * SAUCE: Remove the atl2 driver from the ubuntu subdirectory
    - LP: #419438

linux (2.6.28-15.50) jaunty-proposed; urgency=low

  [ Colin Ian King ]

  * SAUCE: radio-maestro: fix panics on probe failure
    - LP: #357724
  * SAUCE: HDA Intel, sigmatel: Enable speakers on HP Mini 1000
    - LP: #318942

  [ Jerone Young ]

  * SAUCE: Fix Soltech TA12 volume hotkeys not sending key release in
    Jaunty
    - LP: #397499

  [ John Johansen ]

  * SAUCE: remove AppArmor debug check for calls from interrupt context
    - LP: #350789

  [ Manoj Iyer ]

  * SAUCE: Fix kernel panic when SELinux is enabled.
    - LP: #395219

  [ Matthew Garrett ]

  * SAUCE: ACPI: Populate DIDL before registering ACPI video device on
    Intel

  [ Michael Frey (Senior Manager, MID ]

  * SAUCE: Fix for internal microphone for Dell Mini10V
    - LP: #394793

  [ Tim Gardner ]

  * SAUCE: Added e1000e from sourceforge.
    - LP: #402890

  [ Upstream Kernel Changes ]

  * Input: synaptics - report multi-taps only if supported by the device
    - LP: #399787
  * ftdi_sio: fix kref leak
    - LP: #396930, #376128
  * IPv6: add "disable" module parameter support to ipv6.ko
    - LP: #351656

 -- Stefan Bader <email address hidden> Thu, 27 Aug 2009 15:09:06 +0200

Changed in linux (Ubuntu Jaunty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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