Bug 1256831 - Cannot install @'Fedora Workstation" on F22 image
Summary: Cannot install @'Fedora Workstation" on F22 image
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: libguestfs
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-25 14:33 UTC by Jan Sedlák
Modified: 2015-08-26 06:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-26 06:47:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
stdout and stderr output with -x -v args (393.93 KB, text/plain)
2015-08-25 14:34 UTC, Jan Sedlák
no flags Details

Description Jan Sedlák 2015-08-25 14:33:57 UTC
Description of problem:
When I try to create F22 image with Gnome installed with:
virt-builder fedora-22 -o disk_f22_desktop_64bit.img --size 20G --run-command "dnf -y remove firewalld*; dnf -y update; dnf install @'Fedora Workstation'" --root-password password:weakpassword

it fails with:

Total download size: 999 M
Installed size: 2.6 G
[Errno 9] Bad file descriptor
Is this ok [y/N]: virt-builder: error: dnf -y remove firewalld*; dnf -y update; dnf install 
@'Fedora Workstation': command exited with an error

Version-Release number of selected component (if applicable):
virt-builder 1.30.0fedora=22,release=1.fc22,libvirt

Comment 1 Jan Sedlák 2015-08-25 14:34:31 UTC
Created attachment 1066888 [details]
stdout and stderr output with -x -v args

Comment 2 Pino Toscano 2015-08-25 14:58:35 UTC
I can reproduce the issue, will debug further what is going on.

On the other hand, splitting the dnf invocation in separate virt-builder operations seems to work properly:

$ virt-builder fedora-22 \
  -o disk_f22_desktop_64bit.img \
  --size 20G \
  --run-command "dnf -y remove firewalld*" \
  --update \
  --install "@Fedora Workstation" \
  --root-password password:weakpassword

Comment 3 Richard W.M. Jones 2015-08-25 16:40:47 UTC
Also if you really want to use a single --run-command for some reason,
then you should use && instead of ; to separate the commands:

  --run-command 'cmd1 && cmd2 && cmd3'

otherwise you don't know if cmd1 or cmd2 failed.

Comment 4 Richard W.M. Jones 2015-08-25 16:41:54 UTC
Actually, I see now why the original command fails.  You needed
to use 'dnf -y ...', since otherwise dnf will try to interactively
prompt, and will fail or hang since there is no tty.

Comment 5 Jan Sedlák 2015-08-26 06:47:28 UTC
Yes, it seems that this was it. I got confused by "[Errno 9] Bad file descriptor" error.

As a side-note, I cannot use --update and --install because I want to run "setarch i686" before commands, see 1256405.


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