Bug 1256831 - Cannot install @'Fedora Workstation" on F22 image
Cannot install @'Fedora Workstation" on F22 image
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: libguestfs (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-25 10:33 EDT by Jan Sedlák
Modified: 2015-08-26 02:47 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-26 02:47:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Jan Sedlák 2015-08-25 10:33:57 EDT
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 10:34:31 EDT
Created attachment 1066888 [details]
stdout and stderr output with -x -v args
Comment 2 Pino Toscano 2015-08-25 10:58:35 EDT
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 12:40:47 EDT
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 12:41:54 EDT
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 02:47:28 EDT
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.