Building ubuntu images on debian host fails because of tmpdir

Bug #1330290 reported by Monty Taylor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
High
Ghe Rivero

Bug Description

On a current debian host (testing/unstable) debian defaults to per-user temp dirs. Mine are, for instance:

TMPDIR=/tmp/user/1000
TEMP=/tmp/user/1000
TEMPDIR=/tmp/user/1000
TMP=/tmp/user/1000

When doing the early things, such as "apt-get remove grub" - mkinitramfs gets called in the chroot, and this fails because the tempdir vars are leaking through - turns out, /tmp/user/0 (root's tempdir) doesn't exist in the guest.

In any case, dib should block the passthrough of TMP* env vars.

Changed in diskimage-builder:
status: New → Triaged
importance: Undecided → High
Ghe Rivero (ghe.rivero)
Changed in diskimage-builder:
assignee: nobody → Ghe Rivero (ghe.rivero)
Revision history for this message
Ghe Rivero (ghe.rivero) wrote :

This is only a problem when limpam-tmpdir module is enabled, not something very common. Testing a possible solution.

Changed in diskimage-builder:
status: Triaged → In Progress
Ghe Rivero (ghe.rivero)
no longer affects: ubuntu
Revision history for this message
Ghe Rivero (ghe.rivero) wrote :

Patch proposed: (dib-utils) https://review.openstack.org/#/c/128653

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/128696

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/128696
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=d3c89d85b6492432b37c6cbec68662613da8178e
Submitter: Jenkins
Branch: master

commit d3c89d85b6492432b37c6cbec68662613da8178e
Author: Ghe Rivero <email address hidden>
Date: Wed Oct 15 15:58:47 2014 +0000

    Force empty $TMPDIR inside the chroot

    There are some situations (use of libpam-tmpdir) where the $TMPDIR is
    defined per user, so any sudo call will define an specific $TMPDIR for
    the root user which doesn't exist inside the chroot.

    Change-Id: I866651fed520007506c7be83837d3791ed9f2235
    Closes-Bug: #1330290

Changed in diskimage-builder:
status: In Progress → Fix Committed
Jay Dobies (jdob)
Changed in diskimage-builder:
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.