Bug 673477
Summary: | Add a grep-friendly string to LIBGUESTFS_TRACE output | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Matthew Booth <mbooth> | |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 6.1 | CC: | leiwang, mshao | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libguestfs-1.7.17-12.el6 | Doc Type: | Bug Fix | |
Doc Text: |
Separating libguestfs trace output from debug output was difficult. A string (libguestfs: trace:) is now added to the beginning of each line of the trace output so that it can be easily distinguished and filtered out of logs with the grep command or similar.
|
Story Points: | --- | |
Clone Of: | ||||
: | 673479 (view as bug list) | Environment: | ||
Last Closed: | 2011-05-19 11:44:15 UTC | Type: | --- | |
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: | 673479 | |||
Bug Blocks: |
Description
Matthew Booth
2011-01-28 10:58:36 UTC
To test this: $ guestfish -x -N fs exit is_config = 1 add_drive "test1.img" = 0 is_config = 1 launch = 0 part_disk "/dev/sda" "mbr" = 0 mkfs "ext2" "/dev/sda1" = 0 umount_all = 0 sync = 0 kill_subprocess = 0 Notice that each trace line just has the command. When we patch libguestfs, we will add some (undecided) prefix to each line, so in the output above each line would have a prefix. Also note that 'guestfish -x -N fs exit' won't work at all in the RHEL 6.0 libguestfs. This is the output when patched: $ guestfish -x -N fs exit libguestfs: trace: is_config = 1 libguestfs: trace: add_drive "test1.img" = 0 libguestfs: trace: is_config = 1 libguestfs: trace: launch = 0 libguestfs: trace: part_disk "/dev/sda" "mbr" = 0 libguestfs: trace: mkfs "ext2" "/dev/sda1" = 0 libguestfs: trace: umount_all = 0 libguestfs: trace: sync = 0 libguestfs: trace: kill_subprocess = 0 Ignore comment 2. The final patch upstream makes the output look like this which each call having a call and return value on separate lines: libguestfs: trace: is_config libguestfs: trace: is_config = 1 libguestfs: trace: add_drive "test1.img" libguestfs: trace: add_drive = 0 libguestfs: trace: is_config libguestfs: trace: is_config = 1 libguestfs: trace: launch libguestfs: trace: launch = 0 libguestfs: trace: part_disk "/dev/sda" "mbr" libguestfs: trace: part_disk = 0 etc. Note to self: The following patches are required to fully fix this: (1) http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=1d999540bddd7aea7c2d0fef8b15223d4acc645f Add a prefix to output when tracing (RHBZ#673479). (2) http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=b6c70b3f50472e20a33320e7d76887b011f33c64 Fix test-guestfish-a.sh regression test for new trace format. (3) http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=f2a4020caf0bc3dd63e9eae95dfc1814f051f87e regressions: Fix rhbz557655.sh so it works with tracing enabled. Unfortunately we screwed up and only (1) and (2) are applied to the RHEL 6.1 package. I'm not going to rebuild this again now, so (3) will need to be added in RHEL 6.2. Test with libguestfs-1.7.17-10.el6: # guestfish -x -N fs exit is_config = 1 add_drive "test1.img" = 0 is_config = 1 launch = 0 part_disk "/dev/sda" "mbr" = 0 mkfs "ext2" "/dev/sda1" = 0 umount_all = 0 sync = 0 kill_subprocess = 0 with libguestfs-1.7.17-12.el6: # guestfish -x -N fs exit libguestfs: trace: is_config libguestfs: trace: is_config = 1 libguestfs: trace: add_drive "test1.img" libguestfs: trace: add_drive = 0 libguestfs: trace: is_config libguestfs: trace: is_config = 1 libguestfs: trace: launch libguestfs: trace: launch = 0 libguestfs: trace: part_disk "/dev/sda" "mbr" libguestfs: trace: part_disk = 0 ... So move to VERIFIED. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Separating libguestfs trace output from debug output was difficult. A string (libguestfs: trace:) is now added to the beginning of each line of the trace output so that it can be easily distinguished and filtered out of logs with the grep command or similar. This is fine, thanks. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0586.html An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0586.html |