clearcontainers / osbuilder

Clear Containers guest OS building scripts
20 stars 12 forks source link

rootfs build fails under ciao-down #10

Closed grahamwhaley closed 7 years ago

grahamwhaley commented 7 years ago

Running make rootfs under ciao-down breaks with the following:

Successfully built 2883f6889231
mkdir -p /work/gwhaley/gopath/src/github.com/clearcontainers/osbuilder/workdir
docker run --runtime runc --privileged -v /dev:/dev  -i -v /work/gwhaley/gopath/src/github.com/clearcontainers/osbuilder/workdir:/osbuilder cc-osbuilder rootfs
+ SCRIPT_NAME=osbuilder.sh
+ DNF_CONF=/etc/dnf/clear-dnf.conf
+ BUILD=rootfs
++ pwd
+ ROOTFS_DIR=/osbuilder/rootfs
+ '[' -n rootfs ']'
+ case "$BUILD" in
+ build_rootfs
+ mkdir -p /osbuilder/rootfs
+ DNF='dnf --config=/etc/dnf/clear-dnf.conf -y --installroot=/osbuilder/rootfs --noplugins'
+ dnf --config=/etc/dnf/clear-dnf.conf -y --installroot=/osbuilder/rootfs --noplugins install systemd hyperstart cc-oci-runtime-extras coreutils systemd-bootchart iptables-bin
error: cannot open Packages database in /osbuilder/rootfs/var/lib/rpm
Error: Error: rpmdb open failed
Makefile:41: recipe for target 'rootfs' failed
make: *** [rootfs] Error 1

This is with runc as the default runtime (modified ciao-down CC setup), confirmed with docker info.

The command run was sudo -E make rootfs

To run up ciao-down, see: https://github.com/01org/ciao/tree/master/testutil/ciao-down and use the -vmtype clearcontainers option during the prepare phase to get a Clear Container enabled system.

A note - I had my osbuilder git repo in my $GOPATH/src/github.... under ciao-down, which is hosted on a 9pfs filesystem. I wonder if that could be an issue - let me retry this with the repo hosted inside the ciao-down VM filesystem instead...

grahamwhaley commented 7 years ago

OK, I can confirm that moving the osbuilder git repo off of the ciao-down 9pfs GOPATH mount and into the $HOME dir fixes the issue. So, this looks like a 9pfs related issue. I'll open an issue over on https://github.com/01org/ciao and link it to this one for xref.