Hi,
I've found a problem with supermin code running in an ibm_powerkvm
ppc64le distro.
Output of libguestfs-test-tool:
$ libguestfs-test-tool
************************************************************
* IMPORTANT NOTICE
*
* When reporting bugs, include the COMPLETE, UNEDITED
* output below in your bug report.
*
************************************************************
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
LIBGUESTFS_DEBUG=1
LIBGUESTFS_TRACE=1
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/danielhb/.local/bin:/home/danielhb/bin
SELinux: Enforcing
libguestfs: trace: add_drive_scratch 104857600
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsgakCjw/scratch.1" "raw"
104857600
libguestfs: trace: disk_create = 0
libguestfs: trace: add_drive "/tmp/libguestfsgakCjw/scratch.1"
"format:raw" "cachemode:unsafe"
libguestfs: trace: add_drive = 0
libguestfs: trace: add_drive_scratch = 0
libguestfs: trace: get_append
libguestfs: trace: get_append = "NULL"
guestfs_get_append: (null)
libguestfs: trace: get_autosync
libguestfs: trace: get_autosync = 1
guestfs_get_autosync: 1
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
guestfs_get_backend: libvirt
libguestfs: trace: get_backend_settings
libguestfs: trace: get_backend_settings = []
guestfs_get_backend_settings: []
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
guestfs_get_cachedir: /var/tmp
libguestfs: trace: get_direct
libguestfs: trace: get_direct = 0
guestfs_get_direct: 0
libguestfs: trace: get_hv
libguestfs: trace: get_hv = "/usr/bin/qemu-system-ppc64"
guestfs_get_hv: /usr/bin/qemu-system-ppc64
libguestfs: trace: get_memsize
libguestfs: trace: get_memsize = 768
guestfs_get_memsize: 768
libguestfs: trace: get_network
libguestfs: trace: get_network = 0
guestfs_get_network: 0
libguestfs: trace: get_path
libguestfs: trace: get_path = "/usr/lib64/guestfs"
guestfs_get_path: /usr/lib64/guestfs
libguestfs: trace: get_pgroup
libguestfs: trace: get_pgroup = 0
guestfs_get_pgroup: 0
libguestfs: trace: get_program
libguestfs: trace: get_program = "libguestfs-test-tool"
guestfs_get_program: libguestfs-test-tool
libguestfs: trace: get_recovery_proc
libguestfs: trace: get_recovery_proc = 1
guestfs_get_recovery_proc: 1
libguestfs: trace: get_selinux
libguestfs: trace: get_selinux = 0
guestfs_get_selinux: 0
libguestfs: trace: get_smp
libguestfs: trace: get_smp = 1
guestfs_get_smp: 1
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
guestfs_get_tmpdir: /tmp
libguestfs: trace: get_trace
libguestfs: trace: get_trace = 1
guestfs_get_trace: 1
libguestfs: trace: get_verbose
libguestfs: trace: get_verbose = 1
guestfs_get_verbose: 1
host_cpu: powerpc64le
Launching appliance, timeout set to 600 seconds.
libguestfs: trace: launch
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version *>
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.28.1base=8,release=1.18.el7_1.ibm.3,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=libvirt
libguestfs: launch: tmpdir=/tmp/libguestfsgakCjw
libguestfs: launch: umask=0002
libguestfs: launch: euid=1002
libguestfs: libvirt version = 1002014 (1.2.14)
libguestfs: guest random name = guestfs-umy4uvuxvi1sxbb9
libguestfs: [00000ms] connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///session, auth =
default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x3fff88a20a30
libguestfs: qemu version (reported by libvirt) = 2003000 (2.3.0)
libguestfs: [00534ms] get libvirt capabilities
libguestfs: [00552ms] parsing capabilities XML
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_label"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_imagelabel"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "internal_libvirt_norelabel_disks"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: [00552ms] build appliance
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: [00552ms] begin building supermin appliance
libguestfs: [00553ms] run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-1002/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu powerpc64le
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-1002/appliance.d
supermin: version: 5.1.10
supermin: rpm: detected RPM version 4.11
supermin: package handler: ibm_powerkvm/rpm
supermin: acquiring lock on /var/tmp/.guestfs-1002/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type
gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz
type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles
type uncompressed excludefiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type
uncompressed hostfiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type
gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type
uncompressed packages
supermin: build: visiting
/usr/lib64/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: build: 179 packages, including dependencies
supermin: build: 29714 files
supermin: build: 16530 files, after removing unreadable files
supermin: build: 8520 files, after matching excludefiles
supermin: build: 8525 files, after adding hostfiles
supermin: build: 8561 files, after munging
supermin: kernel: picked kernel vmlinuz-4.0.0
supermin: kernel: picked modules path /lib/modules/4.0.0
supermin: kernel: kernel_version 4.0.0
supermin: kernel: modules /lib/modules/4.0.0
supermin: ext2: creating empty ext2 filesystem
'/var/tmp/.guestfs-1002/appliance.d.fas3dshe/root'
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: open: /lib64/dbus-1/dbus-daemon-launch-helper: Permission denied
supermin: *** parent directory not found ***
supermin: When reporting this error:
supermin: please include ALL the debugging information below
supermin: AND tell us what system you are running this on.
src=/opt/ibm/powerkvm-licenses
dest=/opt/ibm/powerkvm-licenses
dirname=/opt/ibm
basename=powerkvm-licenses
supermin: ext2fs_namei: parent directory not found: /opt/ibm: File not
found by ext2_lookup
supermin: failure: ext2fs_namei: parent directory not found
libguestfs: error: /usr/bin/supermin5 exited with error status 1, see
debug messages above
libguestfs: trace: launch = -1 (error)
libguestfs-test-tool: failed to launch appliance
libguestfs: trace: close
libguestfs: closing guestfs handle 0x3fff88a20250 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsgakCjw
The same problem happens when running test/test-build-bash.sh with
current supermin
upstream code. The results of make check follows:
PASS: test-basic.sh
PASS: test-execstack.sh
FAIL: test-build-bash.sh
PASS: test-binaries-exist.sh
PASS: test-harder.sh
FAIL: test-build-bash-network.sh
PASS: test-binaries-exist-network.sh
PASS: test-harder-network.sh
make[4]: Entering directory `/home/danielhb/supermin/tests'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/danielhb/supermin/tests'
============================================================================
Testsuite summary for supermin 5.1.13
============================================================================
# TOTAL: 8
# PASS: 6
# SKIP: 0
# XFAIL: 0
# FAIL: 2
# XPASS: 0
# ERROR: 0
This is how the filesystem looks like. It seems that supermin tries to
copy the contents of
powerkvm-licenses, which is a link to /usr/share(...) and then it has
problems when returning
to the parent dir /opt/ibm .
$ cd /opt/ibm
$ ls -lah
total 16K
drwxr-xr-x. 4 root root 4.0K Jun 12 07:06 .
drwxr-xr-x. 3 root root 4.0K Mar 19 09:35 ..
drwxr-xr-x. 9 root root 4.0K May 7 14:33 powerkvm
lrwxrwxrwx. 1 root root 36 May 7 14:32 powerkvm-licenses ->
/usr/share/doc/pkvm/licenses
drwxr-xr-x. 6 root root 4.0K May 7 14:33 seprovider
I've tracked the problem down to the function 'ext2_copy_file' in
src/ext2fs-c.c
Thanks,
Daniel