Bug 1072062
| Summary: | Ruby bindings for libguestfs throws an error periodically | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Timothy Williams <tiwillia> | ||||||||
| Component: | libguestfs | Assignee: | Pino Toscano <ptoscano> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 6.5 | CC: | huzhan, leiwang, lkong, mbooth, ptoscano, rjones, wshi, yuliu | ||||||||
| Target Milestone: | rc | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | x86_64 | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | libguestfs-1.20.11-3.el6 | Doc Type: | Bug Fix | ||||||||
| Doc Text: | Cause: The Guestfs.new constructor in the Ruby binding was not implemented properly.
Consequence: Creating a new Guestfs instance in Ruby would often result in an error.
Fix: Rework the implementation of Guestfs.new
Result: Guestfs.new works correctly. | Story Points: | --- | ||||||||
| Clone Of: | |||||||||||
| : | 1072079 (view as bug list) | Environment: | |||||||||
| Last Closed: | 2014-10-14 06:35:09 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: | 1046509 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: | 
 | ||||||||||
| 
        
          Description
        
        
          Timothy Williams
        
        
        
        
        
          2014-03-03 19:58:29 UTC
        
       Reproducer: while ! echo 'Guestfs::Guestfs.new' | irb -rguestfs | grep -sq ArgumentError; do echo -n .; done (That command is all on a single line) If you see a line of dots being printed, then everything is working OK. If you see a few dots and then it stops, then you have hit the bug. On RHEL 6 it exits after a few dots. Upstream (Fedora 20) it keeps printing dots. I thought I'd seen this before, and it is in fact fixed upstream by this commit which fixes bug 1046509. https://github.com/libguestfs/libguestfs/commit/ee4ce2a0298d012bd8c500c35dc50e1f53e88c8b Actually 3 commits are required to make the tests work properly. I will attach them, rebased on RHEL 6.5. Created attachment 870129 [details]
0001-ruby-Fix-.new-method-RHBZ-1046509.patch
Created attachment 870130 [details]
0002-run-Use-timeout-foreground-option.patch
Created attachment 870131 [details]
0003-run-Actually-use-timeout-foreground-option-RHBZ-1025.patch
Reproduced with libguestfs-1.20.11-2.el6.x86_64 It can print a few dots and then stops, sometimes there's no output [root]# while ! echo 'Guestfs::Guestfs.new' | irb -rguestfs | grep -sq ArgumentError; do echo -n .; done [root]# while ! echo 'Guestfs::Guestfs.new' | irb -rguestfs | grep -sq ArgumentError; do echo -n .; done .[root]#while ! echo 'Guestfs::Guestfs.new' | irb -rguestfs | grep -sq ArgumentError; do echo -n .; done [root]# while ! echo 'Guestfs::Guestfs.new' | irb -rguestfs | grep -sq ArgumentError; do echo -n .; done .[root]# while ! echo 'Guestfs::Guestfs.new' | irb -rguestfs | grep -sq ArgumentError; do echo n .; done ......[root@amd-1216-8-3 home] Verified with libguestfs-1.20.11-3.el6.x86_64 # while ! echo 'Guestfs::Guestfs.new' | irb -rguestfs | grep -sq ArgumentError; do echo -n .; done .................................................................................................................................................................................................................................. Can see a line of dots be printed, match the expect result 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. http://rhn.redhat.com/errata/RHBA-2014-1458.html |