Feature #5630: Reproducible builds
Vagrant box creation fails: can't unmount chroot that's busy
Optimizing image for compression Umounting /tmp/tmpvsGC26 EEEK! Something bad happened... command failed: ['umount', '/tmp/tmpvsGC26'] umount: /tmp/tmpvsGC26: target is busy (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1).) Cleaning up ERROR: /tmp/tmpvsGC26: Device or resource busy rake aborted!
So I can't build any ISO since the last changes to our build system were merged.
It's kept busy by
/tmp/tmpvsGC26/usr/sbin/sshd. Perhaps we need to stop the sshd service in the chroot at some point? But really, sshd should not even start in a chroot in the first place, so apparently something else is wrong, and it might be worth investigating to fix the root cause of the problem instead of workaround'ing it.
vmdebootstrap: disable daemon startup/stopping when running postinstall.sh (refs: #12530).
#1 Updated by intrigeri about 1 year ago
Indeed, I see:
Setting up openssh-server (1:6.7p1-5+deb8u3) ... Creating SSH2 RSA key; this may take some time ... 2048 59:67:84:a4:25:ab:41:e0:cc:7c:19:7c:c9:fc:bc:22 /etc/ssh/ssh_host_rsa_key.pub (RSA) Creating SSH2 DSA key; this may take some time ... 1024 21:a4:9c:2e:6e:bf:35:c8:2c:d2:9e:90:01:67:cd:9c /etc/ssh/ssh_host_dsa_key.pub (DSA) Creating SSH2 ECDSA key; this may take some time ... 256 16:a1:50:53:c6:8b:39:9f:08:20:76:7d:76:88:26:02 /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA) Creating SSH2 ED25519 key; this may take some time ... 256 3e:2b:6c:2c:0d:e8:41:52:6c:e0:2f:8b:58:97:b4:d5 /etc/ssh/ssh_host_ed25519_key.pub (ED25519) Failed to read /proc/cmdline. Ignoring: No such file or directory [ ok ] Starting OpenBSD Secure Shell server: sshd.
… which should never happen in a chroot usually. Is vmdebootstrap doing something weird that prevents detection of the chroot, or are we?
#2 Updated by intrigeri about 1 year ago
- Status changed from Confirmed to In Progress
- Assignee changed from bertagaz to intrigeri
vmdebootstrap has code to disable/enable daemons startup: see
common/jessie-arm64-hook.sh in its source tree. I think that
vagrant/definitions/tails-builder/customize.sh should call these two functions around the call to
postinstall.sh. Will try.
#4 Updated by anonym about 1 year ago
- Status changed from In Progress to Resolved
- Assignee deleted (
- % Done changed from 50 to 100
- QA Check changed from Ready for QA to Pass
Works for me! Note that one is not affected by this bug if the host has
sshd listening on the default interface/port (
*:22) since that prevents
sshd in the chroot from starting (since the port is busy). That explains why some of us experienced this, and some don't.
I cherry-picked the fix into stable and devel, and also pushed a short comment for this rather arcane workaround.