deploy-ironic ramdisks do not boot: Failed to execute /init (error -28)

Bug #1311987 reported by Adam Gandelman
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Unassigned
diskimage-builder
Fix Released
Medium
Unassigned
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

The default ubuntu release for ramdisks was bumped to Trusty https://review.openstack.org/#/c/88384/ Ironic + devstack deployments stopped functioning. The ramdisk fails to run init, crashing with the following error:

[ 23.154016] Failed to execute /init (error -28)
[ 23.154909] Starting init: /sbin/init exists but couldn't execute it (error -28)
[ 23.156388] Starting init: /bin/init exists but couldn't execute it (error -28)
[ 23.157490] Starting init: /bin/sh exists but couldn't execute it (error -28)
[ 23.160313] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 23.164146] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.13.0-24-generic #46-Ubuntu
[ 23.164146] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 23.164146] 0000000000000000 ffff88001a3a9ec0 ffffffff81715a64 ffffffff81a39f38
[ 23.164146] ffff88001a3a9f38 ffffffff8170ec65 0000000000000008 ffff88001a3a9f48
[ 23.164146] ffff88001a3a9ee8 ffffffff81a39a38 0000000013981396 0000000000001396
[ 23.164146] Call Trace:
[ 23.164146] [<ffffffff81715a64>] dump_stack+0x45/0x56
[ 23.164146] [<ffffffff8170ec65>] panic+0xc8/0x1d7
[ 23.164146] [<ffffffff81703f40>] ? rest_init+0x80/0x80
[ 23.164146] [<ffffffff81704062>] kernel_init+0x122/0x130
[ 23.164146] [<ffffffff8172637c>] ret_from_fork+0x7c/0xb0
[ 23.164146] [<ffffffff81703f40>] ? rest_init+0x80/0x80
[ 23.164146] general protection fault: fff2 [#1] SMP
[ 23.164146] Modules linked in:
[ 23.164146] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.13.0-24-generic #46-Ubuntu
[ 23.164146] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 23.164146] task: ffff88001a3a0000 ti: ffff88001a3a8000 task.ti: ffff88001a3a8000
[ 23.164146] RIP: 0010:[<ffffffff8170ed30>] [<ffffffff8170ed30>] panic+0x193/0x1d7
[ 23.164146] RSP: 0000:ffff88001a3a9ed0 EFLAGS: 00000246
[ 23.164146] RAX: 0000000014a814a8 RBX: ffffffff81a39f38 RCX: 0000000000000854
[ 23.164146] RDX: 00000000000014a8 RSI: 0000000000000000 RDI: 0000000000000046

#define ENOSPC 28 /* No space left on device */

Setting DIB_RELEASE=saucy fixes the issue. A saucy ramdisk is 83M compressed, 238M decompressed. trusty ramdisk is 87M compressed, 245M decompressed.

description: updated
description: updated
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

The trusty ramdisk fails to boot on a VM /w 512MB of RAM. Increasing that to 1GB fixes the issue, tho IMO the ramdisk release shouldn't impose such memory requirements.

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

After a little experimenting, this might point to a kernel or qemu issue of some kind:

* the resulting trusty initramfs boots fine using a kernel saucy 3.12 kernel (using either a kernel resulting from a DIB run or a stock kernel from /boot).

*a saucy initramfs built with the same elements fails /w the same -28 error using a trusty kernel (from /w DIB run or stock).

* if I bump the VM's memory from 512MB to 620MB (arbitrary?) the kernel successfully execs init

I've uploaded a compressed initramfs that triggers this to http://no-carrier.net/~adam/lp1311987/ I'm able to reproduce by simply booting it with qemu using the standard Ubuntu trusty vmlinuz-3.13.0-24-generic kernel.

Worth noting that the corresponding stock initramfs initrd.img-3.13.0-24-generic has no problems booting in a VM with 512MB

Revision history for this message
Ben Nemec (bnemec) wrote :

Setting to medium for now because 512 M instances seem like kind of an edge case, but if this ends up being a blocker for moving to trusty then it should be escalated. Although it's not clear that this is a bug in dib, so we may want to open a high priority bug for whatever the broken component actually is in that case.

Changed in diskimage-builder:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

This turns out to be a kernel issue, either upstream or in Ubuntu. Bisected to the following, which was released in 3.12.

commit 16203a7a9422315bc929461503e3a046459ea5ff
Author: Rob Landley <email address hidden>
Date: Wed Sep 11 14:26:12 2013 -0700

    initmpfs: make rootfs use tmpfs when CONFIG_TMPFS enabled

    Conditionally call the appropriate fs_init function and fill_super
    functions. Add a use once guard to shmem_init() to simply succeed on a
    second call.

    (Note that IS_ENABLED() is a compile time constant so dead code
    elimination removes unused function calls when CONFIG_TMPFS is disabled.)

I agree this is an edge case for tripleO but not so much for general Ironic usage, as admins should be free to declare nodes with as little memory as they want, and DIB produced deploy-ironic ramdisks should be expected to work.

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1311987

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: trusty
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Seth Forshee (sforshee) wrote :

So there's a later commit which adds a command-line option to force use of ramfs:

commit 6e19eded3684dc184181093af3bff2ff440f5b53
Author: Rob Landley <email address hidden>
Date: Wed Sep 11 14:26:13 2013 -0700

    initmpfs: use initramfs if rootfstype= or root= specified

    Command line option rootfstype=ramfs to obtain old initramfs behavior, and
    use ramfs instead of tmpfs for stub when root= defined (for cosmetic
    reasons).

Can you try adding rootfstype=ramfs to the kernel parameters and see if this works? Would you be able to do this for cases where you really need ramfs?

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Thanks for the tip Seth.. That appears to work, thanks! I reached out to Rob and he pointed out that, when using tmpfs, the fs will fill up at 50% memory usage, so the ENOSPC is to be expected here. Now that the cause is known, I think we can get away with bumping the default and minimum required memory to 1GB for our ramdisks and we should be okay across the different kernel versions / rootfstypes.

Changed in linux (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/90821
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=74eafa4b49dcf2f76b7627739d26e457fa1775db
Submitter: Jenkins
Branch: master

commit 74eafa4b49dcf2f76b7627739d26e457fa1775db
Author: Adam Gandelman <email address hidden>
Date: Mon Apr 28 14:06:42 2014 -0700

    Bump minimum default RAM for Ironic nodes to 1GB

    Set the default RAM for Ironic BM VMs to 1GB to ensure DIB produced deployment
    ramdisks function correctly across older and newer kernels, regardless of
    rootfstype.

    Change-Id: Ifc15a4430aa63c3599e7fd76f5116dc7b728ead0
    Closes-bug: #1311987

Changed in devstack:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/100698

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/icehouse)

Reviewed: https://review.openstack.org/100698
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=cd1cf1b41753a0d05a814f2a7817522b7f7e7b91
Submitter: Jenkins
Branch: stable/icehouse

commit cd1cf1b41753a0d05a814f2a7817522b7f7e7b91
Author: Adam Gandelman <email address hidden>
Date: Mon Apr 28 14:06:42 2014 -0700

    Bump minimum default RAM for Ironic nodes to 1GB

    Set the default RAM for Ironic BM VMs to 1GB to ensure DIB produced deployment
    ramdisks function correctly across older and newer kernels, regardless of
    rootfstype.

    Change-Id: Ifc15a4430aa63c3599e7fd76f5116dc7b728ead0
    Closes-bug: #1311987
    (cherry picked from commit 74eafa4b49dcf2f76b7627739d26e457fa1775db)

tags: added: in-stable-icehouse
Revision history for this message
subair (muhsubair74) wrote :

help me to problem init not taited 3.13.0-39-generic #66-ubuntu.... boot cd I can not work with the actual. when going to reinstall will always appear (init). I also can not get into Ubuntu ...

Changed in diskimage-builder:
assignee: nobody → subair (muhsubair74)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

subair, Can you open a new bug with a full description of the problem you are having, including the steps you took to get there so we can reproduce? This one is pretty specific to booting the deploy ramdisk on machines with less than 1GB of RAM.

THANKS!

Changed in diskimage-builder:
assignee: subair (muhsubair74) → nobody
Changed in diskimage-builder:
status: Triaged → 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.