Bug 1591617
Summary: | virt-make-fs fails with: "libguestfs: error: tar_in: write error on directory: /:" | ||||||
---|---|---|---|---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Ciro Santilli <ciro.santilli> | ||||
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||
Status: | CLOSED UPSTREAM | QA Contact: | |||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | unspecified | CC: | ptoscano, rbalakri | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-06-15 09:00:39 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Ciro Santilli
2018-06-15 06:21:29 UTC
The without sudo thing is probably because of the usual Ubuntu kernel bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 See also the libguestfs FAQ. The error reported here seems to be a bug in the tar command. We're running: tar -C /sysroot/ -xf - 2> /tmp/tarLvFy1o and tar prints: write error on directory: /: but doesn't say what the actual error is. In fact the message: write error on directory: /: comes from libguestfs, but what's after the second colon is supposed to be the output from the failed tar command. Unfortunately tar prints nothing at all so I'm still no closer to understanding what the actual error message is. Suggest varying the type of the filesystem, contents you want to upload, etc until you can get it to work to see what the confounding factor is. This is because the appliance does not contain dash. This was fixed upstream with - https://github.com/libguestfs/libguestfs/commit/0cca7f9061455d29a7f893e715028cd3e75c19fd (in libguestfs >= 1.39.1) - https://github.com/libguestfs/libguestfs/commit/e2e3248377e52314ce9ac60a9cb1fed9ec209ad4 (in libguestfs >= 1.38.1) The workaround is to manually include dash: # echo dash > /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/zz-dash-packages then remove the cache: $ rm -rf /var/cache/.guestfs-$UID The commit above must be backported in Ubuntu (good luck, since it has no maintainer there). Thanks Pino and Richard, As a good member of the Ubuntu community, I will immediately... revert back to dd with random image size and losetup :-) @Richard: the sudo thing was exactly what you mentioned, thanks. If you want to become even more famous through your awesome library, I would recommend that you maintain the Ubuntu package :-) I wonder if you can legally do that as a Red Hat employee, but I suppose yes? Also, get a more modern website design. Current one scared me when I first saw it :-) Partly due to the 2009-2014 Fish thing :-) libguestfs is just awesome, shame it has so many system dependencies that Debian can't get it to work :-( Ubuntu and Fedora should just merge into a single distro :-( (In reply to Ciro Santilli from comment #5) > Thanks Pino and Richard, > > As a good member of the Ubuntu community, I will immediately... revert back > to dd with random image size and losetup :-) Why? I even wrote down a working workaround, which has no drawbacks. Did you test it? > libguestfs is just awesome, shame it has so many system dependencies that > Debian can't get it to work :-( The Debian maintainer of libguestfs, Hilko Bengen, does a good job in maintaining it, and as Debian user I can assure that it works fine there. > Why? I even wrote down a working workaround, which has no drawbacks.
> Did you test it?
Thanks, for the workarounds,
I didn't have the time to test them yet (changed to work computer :-)), but I'm writing what I hope will be highly stable and automated image generation scripts for other people to use, so I'd rather not rely on workarounds.
The workaround works on Ubuntu 18.04: The workaround is to manually include dash: # echo dash > /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/zz-dash-packages then remove the cache: $ rm -rf /var/cache/.guestfs-$UID |