Bug 1151897
Summary: | virt-ls --checksum: checksum for soft link is wrong, the soft link have no checksum value output | |||
---|---|---|---|---|
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: | low | |||
Version: | 7.1 | CC: | leiwang, mbooth, ptoscano, 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: | ||||
: | 1151898 (view as bug list) | Environment: | ||
Last Closed: | 2014-10-20 09:32:41 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: | 1151898 |
Description
Lingfei Kong
2014-10-13 02:28:06 UTC
Checksum is currently done only for regular files, and symlinks are not regular files. I do not think we should dereference them, since a) if the symlink target exists in the guest, its checksum would be calculated more than once (once for the file itself, plus once for every symlink pointing to it) b) if the symlink target does not exists, then there would be a mismatch in the output (one field less) between such kind of symlink and those pointing to existing files Another case is that you might list just a subdirectory of a guest, with a symlink in it pointing to a file outside that subdirectory; say: $ virt-ls ... /etc [...] l 0777 10 /etc/vmlinuz -> ../vmlinuz then I think it still might be correct to not look at anything outout the subdirectory requested. (In reply to Pino Toscano from comment #1) > Checksum is currently done only for regular files, and symlinks are not > regular files. > > I do not think we should dereference them, since > a) if the symlink target exists in the guest, its checksum would be > calculated more than once (once for the file itself, plus once for every > symlink pointing to it) > b) if the symlink target does not exists, then there would be a mismatch in > the output (one field less) between such kind of symlink and those pointing > to existing files > > Another case is that you might list just a subdirectory of a guest, with a > symlink in it pointing to a file outside that subdirectory; say: > $ virt-ls ... /etc > [...] > l 0777 10 /etc/vmlinuz -> ../vmlinuz > then I think it still might be correct to not look at anything outout the > subdirectory requested. Thanks for your explanation. I agree with you to close it as NOTABUG. |