Bug 1655305 - virt-bootstrap fails to create filesystem
Summary: virt-bootstrap fails to create filesystem
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-bootstrap
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabiano Fidêncio
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-02 15:23 UTC by verslyap
Modified: 2019-11-02 10:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-06 06:56:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description verslyap 2018-12-02 15:23:52 UTC
Description of problem:
When I run sudo virt-bootstrap docker://fedora ~/fedora after upgrading to Fedora 29 the command fails.

Version-Release number of selected component (if applicable):
virt-bootstrap.noarch 1.1.0-4.fc29

How reproducible:
It happens every time I run the virt-boostrap command

Steps to Reproduce:
1. install virt-bootstrap (sudo dnf install virt-bootstrap)
2. run virt-boostrap docker://fedora /path/to/folder/
3.

Actual results:
sudo virt-bootstrap docker://fedora /home/mitch/fedora
INFO    : Checking cached layers
INFO    : Extracting container layers
INFO    : Extracting layer (1/1) with size: 83.23 MiB
Traceback (most recent call last):
  File "/usr/bin/virt-bootstrap", line 11, in <module>
    load_entry_point('virt-bootstrap==1.1.0', 'console_scripts', 'virt-bootstrap')()
  File "/usr/lib/python3.7/site-packages/virtBootstrap/virt_bootstrap.py", line 334, in main
    progress_cb=args.status_only)
  File "/usr/lib/python3.7/site-packages/virtBootstrap/virt_bootstrap.py", line 148, in bootstrap
    progress=prog).unpack(dest)
  File "/usr/lib/python3.7/site-packages/virtBootstrap/sources/docker_source.py", line 307, in unpack
    utils.untar_layers(self.layers, dest, self.progress)
  File "/usr/lib/python3.7/site-packages/virtBootstrap/utils.py", line 344, in untar_layers
    safe_untar(tar_file, dest_dir)
  File "/usr/lib/python3.7/site-packages/virtBootstrap/utils.py", line 287, in safe_untar
    execute(virt_sandbox + params)
  File "/usr/lib/python3.7/site-packages/virtBootstrap/utils.py", line 264, in execute
    raise subprocess.CalledProcessError(proc.returncode, cmd_str)
subprocess.CalledProcessError: Command 'virt-sandbox -c lxc:/// --name=bootstrap_8383 -m host-bind:/mnt=/home/mitch/fedora -- /bin/tar xf /var/cache/virt-bootstrap/docker_images/d0483bd5a55488f5ba6383a5cc8553d5101864f03acd07eabc5df7563c3692cf -C /mnt --exclude dev/* --overwrite --absolute-names --acls --xattrs --selinux' returned non-zero exit status 1.

Expected results:
A container filesystem built in the source directory

Additional info:
When I take and run the virt-sandbox command from the virt-bootstrap error output I get
sudo  virt-sandbox -c lxc:/// --name=bootstrap_7664 -m host-bind:/mnt=/home/mitch/fedora -- /bin/tar xf /var/cache/virt-bootstrap/docker_images/d0483bd5a55488f5ba6383a5cc8553d5101864f03acd07eabc5df7563c3692cf -C /mnt --exclude dev/* --overwrite --absolute-names --acls --xattrs --selinux
2018-12-02 15:20:36.410+0000: 1: error : virCommandExec:2190 : cannot execute binary /etc/libvirt-sandbox/scratch/.libs/libvirt-sandbox-init-lxc: Permission denied
Failure in libvirt_lxc startup: cannot execute binary /etc/libvirt-sandbox/scratch/.libs/libvirt-sandbox-init-lxc: Permission denied

Comment 1 Fabiano Fidêncio 2018-12-02 21:02:55 UTC
Adding danpb (libvirt-sandbox maintainer) to the loop as it seems more like a libvirt-sandbox issue with SELinux than anything else.

Daniel, would you mind to take a look at this one?

Comment 2 verslyap 2018-12-02 21:55:24 UTC
So, I did just run setenforce 0 really quick and it worked.  If that's helpful or not.

Comment 3 Radostin Stoyanov 2019-07-06 06:56:33 UTC
Thank you for reporting this issue. It should be fixed in the next release.


Note You need to log in before you can comment on or make changes to this bug.