Bug 908321

Summary: virt-cat fails on directory names "/dev/stdout: error in chunked encoding"
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bfan, dyasny, leiwang, mbooth, moli, qguan, wshi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 908255 Environment:
Last Closed: 2013-02-06 13:41:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 908255    

Description Richard W.M. Jones 2013-02-06 12:35:18 UTC
+++ This bug was initially created as a clone of Bug #908255 +++

Description of problem:

[root@hp-z220-01 images]# virt-cat  RHEL-Server-6.0-32-hvm.raw /etc                                                    
libguestfs: error: file receive cancelled by daemon
libguestfs: error: /dev/stdout: error in chunked encoding

Note it's wrong to use virt-cat with a directory name, but the
problem is that the real error message is lost.

Simple reproducer from within the libguestfs source tree:

$ ./run ./cat/virt-cat -a ./tests/guests/fedora.img /etc
libguestfs: error: file receive cancelled by daemon
libguestfs: error: /dev/stdout: error in chunked encoding

Comment 1 Richard W.M. Jones 2013-02-06 13:41:08 UTC
The following upstream fix:

https://github.com/libguestfs/libguestfs/commit/f9bafde5e7f1302ce7c5ea304e51a8d90a323b58

adds an extra check that the download file is not a directory,
and gives the following error:

$ ./run ./cat/virt-cat -a ./tests/guests/fedora.img /etc 
libguestfs: error: download: /etc: is a directory