[Bug 1327221] Re: Changing TMPDIR causes ~ inside the container to be owned by root
Robie Basak
1327221 at bugs.launchpad.net
Fri Jun 6 14:13:32 UTC 2014
I should add that moving /tmp is useful on cloud instances, where
there's often a smaller system disk but much more space available on
/mnt.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to autopkgtest in Ubuntu.
https://bugs.launchpad.net/bugs/1327221
Title:
Changing TMPDIR causes ~ inside the container to be owned by root
Status in “autopkgtest” package in Ubuntu:
New
Bug description:
I ran short of space on /tmp, so wanted to use the local directory
instead. So I did:
mkdir tmp
TMPDIR="$PWD/tmp" adt-run ...
However, this then changed the test environment. ~ became unwriteable
to my tests. On investigation, it appears that ~ (ie. /home/ubuntu in
my case) has become owned by root inside the container for some reason
(I'm using adt-virt-lxc).
I tried chown root. test && chmod 1777 test, but this didn't work. I
tried using /mnt/tmp instead (root:root, 1777) and this does appear to
be a workaround.
I have reproduced on a fresh Utopic cloud instance (utopic server
daily image 20140606) using autopkgtest 2.17.1 as installed from
Utopic.
Full steps to reproduce on a fresh Utopic cloud instance:
sudo apt-get update
sudo apt-get install autopkgtest lxc
sudo apt-get install --no-install-recommends ubuntu-dev-tools fakeroot
pull-lp-source hello trusty
cd hello-2.8
sed -i "/^Homepage:/aXS-Testsuite: autopkgtest" debian/control
mkdir debian/tests
cat > debian/tests/control <<EOT
Tests: foo
Restrictions: allow-stderr
EOT
cat > debian/tests/foo <<EOT
#!/bin/sh
stat ~
test -w ~
EOT
debuild -us -uc -nc -S
cd ..
sudo lxc-create -t ubuntu-cloud -n utopic -- -r utopic -s daily -F
# Workaround for needing entropy
sudo rm /dev/random
sudo ln -s urandom /dev/random
# Successful case
# adt-run hello_2.8-4.dsc --- adt-virt-lxc -es utopic
# Failure case
mkdir tmp
TMPDIR="$PWD/tmp" adt-run hello_2.8-*.dsc --- adt-virt-lxc -es utopic
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1327221/+subscriptions
More information about the foundations-bugs
mailing list