Bug 1153411
| Summary: | copy-in and copy-out copy symbolic link file problems, it only copy the link property not the real file | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Lingfei Kong <lkong> | |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | |
| Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> | |
| Severity: | low | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 7.1 | CC: | leiwang, mbooth, ptoscano, rjones, wshi, yuliu | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1153412 (view as bug list) | Environment: | ||
| Last Closed: | 2014-10-21 07:00:46 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: | 1153412 | |||
|
Description
Lingfei Kong
2014-10-16 02:44:22 UTC
><fs> trace 1 ><fs> copy-in soft_hosts /boot/ libguestfs: trace: is_dir "/boot/" libguestfs: trace: is_dir = 1 libguestfs: trace: tar_in "/dev/fd/10" "/boot/" libguestfs: trace: tar_in = 0 ><fs> ll /boot/soft_hosts libguestfs: trace: ll "/boot/soft_hosts" libguestfs: trace: ll = "lrwxrwxrwx 1 root root 5 Oct 16 03:11 /sysroot/boot/soft_hosts -> hosts\n" lrwxrwxrwx 1 root root 5 Oct 16 03:11 /sysroot/boot/soft_hosts -> hosts ><fs> help copy-in NAME copy-in - copy local files or directories into an image DESCRIPTION copy-in local [local ...] /remotedir "copy-in" copies local files or directories recursively into the disk image, placing them in the directory called "/remotedir" (which must exist). This guestfish meta-command turns into a sequence of "tar-in" and other commands as necessary. ...... It use tar_in to copy the symbolic links, i found the following line in 'help copy-in': This guestfish meta-command turns into a sequence of "tar-in" and other commands as necessary. When it copy ordinary files maybe upload is best for it. Copying just the symbolic link (not the pointed at content) is the correct behaviour. (In reply to Richard W.M. Jones from comment #2) > Copying just the symbolic link (not the pointed at content) > is the correct behaviour. If so, this bug can be closed as NOTABUG, thanks. (In reply to Richard W.M. Jones from comment #2) > Copying just the symbolic link (not the pointed at content) > is the correct behaviour. Hi Rich copy-in and copy-out's behavior is different with user's expect when they deal with symbolic links and there is no text to explain it. Do you think it is necessary to add some text to 'help copy-in' and 'help copy-out' to explain that the two API just copy the symbolic link (not the pointed at content)? In 'help copy-in' i can see that copy-in turns into a sequence of "tar-in" and other commands as necessary. That is to say 'other commands' make it different from tar-in, when copy-in and copy-out will use 'other commands'? This can hlep to improve our test case for copy-in/copy-out. :-) Thanks and Best Regards So no. The rules are quite complex. For example, downloading a file will dereference the symbolic link, but uploading one won't. I don't want to paint us into a corner by documenting the current behaviour, since it might change in future. (In reply to Richard W.M. Jones from comment #6) > So no. The rules are quite complex. For example, downloading a > file will dereference the symbolic link, but uploading one won't. > > I don't want to paint us into a corner by documenting the current > behaviour, since it might change in future. Thanks very much! |