On Ubuntu 18.04 virt-copy-out fails with "tar: This does not look like a tar archive"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libguestfs (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Low
|
Unassigned | ||
virt-manager (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
[Impact]
* When building the virtual appliance for Ubuntu it fails to run
almost any internal commands due to missing /bin/sh. Due to that any
user facing action requireing those like the reported tar-copy will
fail.
* backport upstream fix that will make dash available
[Test Case]
* Install target release (not well testable in VMs [needs working nesting] or Containers [mounts and virt permissions])
$ sudo apt install libguestfs-tools qemu-utils
$ qemu-img create -f qcow2 test.img 10M
$ sudo guestfish -a test.img
(guestfish) run
(guestfish) tar-out / - | tar tf -
[Regression Potential]
* The change effectively "only" installs another package in the virtual
appliance it uses to make up the environments. It currently is not
working at all for anything subcommand that needs this as /bin/sh is
missing.
Due to that sub-functions of libguestfs-tools are either
a) not using this part of it and not affected
b) using the packagelist but broken as of today
I can't see much of a regression risk as we only change those (fix
actually) who are broken today.
[Other Info]
* Cosmic had the change for quite a while as it was backported to 1.38.1
and I heard no bad reports on it.
----
Version-Release number of selected component (if applicable):
Tested with:
- libguestfs 1.36.13 (Ubuntu 18.04)
- tar v1.29 (Ubuntu 18.04)
How reproducible: 100%
Steps to Reproduce:
1. # virt-builder debian-8 -o deb8.img --no-network
2. # mkdir ~/deb8fs
3. # virt-copy-out -a deb8.img / ~/deb8fs
Actual results:
libguestfs: error: file receive cancelled by daemon
libguestfs: error: tar subprocess failed: tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
See attached debug.txt log that was produced by using "export LIBGUESTFS_DEBUG=1 and LIBGUESTFS_TRACE=1" before running
**Note**
I have downloaded 1.39.9 from github/libguestfs and this version works without an error in my build directory.
It appears that the actual problem is not with "virt-copy-out" specifically, but with the 'guestfish' which it relies on.
Running this on 1.36.13 (Ubuntu) fails:
# guestfish
><fs> add-drive deb8.img
><fs> run
><fs> tar-out / - | tar tf -
libguestfs: error: file receive cancelled by daemon
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Whereas running the above on guestfish 1.39.9 from git does not produce that error.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libguestfs-tools 1:1.36.
ProcVersionSign
Uname: Linux 4.15.0-34-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.3
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Sep 17 23:06:00 2018
InstallationDate: Installed on 2018-09-10 (7 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
ProcEnviron:
LANG=en_US.UTF-8
TERM=xterm-
SHELL=/bin/bash
XDG_RUNTIME_
PATH=(custom, user)
SourcePackage: libguestfs
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Robie Basak: Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 60 lines (+38/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/lp-1793056-fix-internal-bin-sh.patch (+30/-0)
debian/patches/series (+1/-0)
Changed in virt-manager (Ubuntu): | |
importance: | Undecided → Low |
Changed in libguestfs (Ubuntu): | |
importance: | Undecided → Low |
no longer affects: | virt-manager (Ubuntu Bionic) |
no longer affects: | virt-manager (Ubuntu Cosmic) |
description: | updated |
I've been playing with this on an Ubuntu 18.04 machine this morning. Firstly I can confirm the bug with libguestfs0 1:1.36. 13-1ubuntu3. 1. Secondly I can confirm this does NOT affect libguestfs 1.39.9 built from source (from git).