virt-manager fails if target system has no grep -q

Bug #792985 reported by Richard Laager
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Undecided
Marc Deslauriers
virt-manager (Ubuntu)
Fix Released
Undecided
Marc Deslauriers

Bug Description

The nc -q autodetection code fails if the target system's grep does not have a -q argument (quite the ironic coincidence). I believe -q is specified by POSIX, but Solaris 11's /bin/grep does not support -q. Redirecting to /dev/null works portably. (In fact, this is even recommended in favor of -q for portability by GNU grep's man page.)

This needs to be changed in virt-manager's src/virtManager/console.py (by adding a new patch) and libvirt's debian/patches/Autodetect-if-the-remote-nc-command-supports-the-q-o.patch (and the updated patch reapplied to src/remote/remote_driver.c).

BEFORE:
grep -q \"requires an argument\"
AFTER:
grep \"requires an argument\" >/dev/null

Richard Laager (rlaager)
description: updated
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

This bug needs to be reported and fixed upstream. Could you please report the bug using the following instructions:

http://virt-manager.org/page/BugReporting

Once you've done so, please link the upstream bug here. Thanks.

Changed in libvirt (Ubuntu):
status: New → Incomplete
Changed in virt-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for virt-manager (Ubuntu) because there has been no activity for 60 days.]

Changed in virt-manager (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for libvirt (Ubuntu) because there has been no activity for 60 days.]

Changed in libvirt (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Richard Laager (rlaager) wrote :

For the libvirt issue, this is coming in from a patch. Coincidentally, a patch *you* wrote. So it looks like Ubuntu *is* the upstream on that part of the issue.

Changed in libvirt (Ubuntu):
status: Expired → New
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
Changed in libvirt (Ubuntu):
assignee: nobody → Marc Deslauriers (mdeslaur)
Changed in virt-manager (Ubuntu):
assignee: nobody → Marc Deslauriers (mdeslaur)
status: Expired → Confirmed
Changed in libvirt (Ubuntu):
status: New → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for getting this upstream Richard, I'll add it to libvirt also.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virt-manager - 0.9.0-1ubuntu2

---------------
virt-manager (0.9.0-1ubuntu2) oneiric; urgency=low

  * debian/patches/fix_grep_portability.patch: support target systems where
    the grep utility has no -q option. (LP: #792985)
  * debian/patches/fix_net_stats.patch: fix broken net stats gathering.
 -- Marc Deslauriers <email address hidden> Tue, 16 Aug 2011 13:34:42 -0400

Changed in virt-manager (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.9.2-4ubuntu11

---------------
libvirt (0.9.2-4ubuntu11) oneiric; urgency=low

  * debian/patches/Autodetect-if-the-remote-nc-command-supports-the-q-o.patch:
    updated to support target systems where the grep utility has no -q
    option. (LP: #792985)
 -- Marc Deslauriers <email address hidden> Tue, 16 Aug 2011 13:30:14 -0400

Changed in libvirt (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.