RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1306557 - Running 'git clone' in virt-builder or virt-customize results in an error message
Summary: Running 'git clone' in virt-builder or virt-customize results in an error mes...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On: 1218766
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-11 09:48 UTC by Barak Korren
Modified: 2016-11-03 17:57 UTC (History)
3 users (show)

Fixed In Version: libguestfs-1.32.2-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 17:57:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1280029 0 unspecified CLOSED libguestfs can run commands with stdin not open (or worse still, connected to arbitrary guest-chosen random devices) 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2016:2576 0 normal SHIPPED_LIVE Moderate: libguestfs and virt-p2v security, bug fix, and enhancement update 2016-11-03 12:06:51 UTC

Internal Links: 1280029

Description Barak Korren 2016-02-11 09:48:41 UTC
Description of problem:
Running 'git clone' in virt-builder or virt-customize results in the following error message:

  Error reading command stream

This happens regardless of the git repo used.
This was tested for both RHEL and CentOS guest images, the host is RHEL7.2

Version-Release number of selected component (if applicable):
  libguestfs-tools-c-1.28.1-1.18.el7.x86_64

How reproducible:
  virt-builder centos-7.2  \
    --install git \
    --run-command 'git clone https://github.com/ifireball/scripts'

Actual results:
  Error message

Expected results:
  git repo cloned into VM image

Comment 1 Pino Toscano 2016-02-11 13:32:45 UTC
This is due to the fact that we're not providing an open stdin when running commands in the appliance, as reported in bug #1280029.

This can be reproduced on a RHEL/CentOS 7.2 host with the following command:

  $ git clone https://github.com/ifireball/scripts <&-
  Cloning into 'scripts'...
  Error reading command stream

(the <&- tells bash to close the file descriptor 0, which is stdin)

This has been fixed upstream since 1.31.28, and it will be fixed by the rebase (bug #1218766) for RHEL 7.3.

Comment 2 Richard W.M. Jones 2016-02-11 13:39:58 UTC
To the reporter, please try the preview packages here which
should already fix this issue:
https://people.redhat.com/~rjones/libguestfs-RHEL-7.3-preview/

Comment 3 Xianghua Chen 2016-05-31 04:59:27 UTC
Verified with the packages:
libguestfs-1.32.4-3.el7.x86_64
libguestfs-tools-c-1.32.4-3.el7.x86_64

Verify steps:
1. # virt-builder centos-7.2      --install git     --run-command 'git clone https://github.com/ifireball/scripts'
[   4.6] Downloading: http://libguestfs.org/download/builder/centos-7.2.xz
[   5.5] Planning how to build this image
[   5.5] Uncompressing
[  16.5] Opening the new disk
[  20.2] Setting a random seed
[  20.2] Installing packages: git
[  44.8] Running: git clone https://github.com/ifireball/scripts
[  48.2] Setting passwords
virt-builder: Setting random password of root to 4yK3APSs3jSbb5g4
[  49.7] Finishing off
                   Output file: centos-7.2.img
                   Output size: 6.0G
                 Output format: raw
            Total usable space: 4.8G
                    Free space: 3.8G (78%)


The command finished successfully, and the following error didn't occurred:
Cloning into 'scripts'...
Error reading command stream
libguestfs: trace: download = 0
virt-builder: git clone https://github.com/ifireball/scripts: command exited with an error


So Verified.

Comment 5 errata-xmlrpc 2016-11-03 17:57:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2576.html


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