libvirt: find-storage-pool-sources work unexpected

Bug #1264955 reported by Royce Lv
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

1. how to reproduce:
    virsh find-storage-pool-sources-as netfs localhost

2. frequency:
    100%

3. expected result:
    list export paths of localhost

4. Actul result:
    virsh # find-storage-pool-sources-as netfs localhost
error: Failed to find any netfs pool sources
error: Cannot find '' in path: No such file or directory

5. Source code trace:
    In src/storage/storage_ backend_fs.c:

        if (source->nhost != 1) {
        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                       _("Expected exactly 1 host for the storage pool"));
        goto cleanup;
    }

    state.host = source->hosts[0].name;

    cmd = virCommandNewArgList(SHOWMOUNT,
                               "--no-headers",
                               "--exports",
                               source->hosts[0].name,
                               NULL);

6. diagnose suggestion:
    It may because the build machine does not has a nfs-common installed, so SHOWMOUNT during configure, is configured as empty.
   So when running find-source cmd, SHOWMOUNT cannot be found so report error.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: libvirt-bin 1.0.2-0ubuntu11.13.04.4
ProcVersionSignature: Ubuntu 3.8.0-32.47-generic 3.8.13.10
Uname: Linux 3.8.0-32-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.5
Architecture: amd64
Date: Mon Dec 30 17:05:07 2013
InstallationDate: Installed on 2013-10-06 (84 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: libvirt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Royce Lv (lvroyce-4) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1264955] [NEW] libvirt: find-storage-pool-sources work unexpected

Thanks, adding nfs-common to build-deps seems reasonable.
 status: triaged
 priority: wishlist

Changed in libvirt (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Royce Lv (lvroyce-4) wrote :

Thanks or providing feedback, as this bug affect multiple Ubuntu version and easy to fix, would you pls tell me when it will be available? So that we can adjust our product feature release plan.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

As this is a new feature, it will not be enabled for prior versions. However it should be fixed today in trusty.

Revision history for this message
Royce Lv (lvroyce-4) wrote :

Thanks for your quick response Serge.
By "new feature" do you mean find-storage-pool-source?
As I went through libvirt git log and find it was supported by libvirt early in 2008:
39c9354c src/storage_backend_fs.c (Daniel P. Berrange 2008-08-27 20:05:58 +0000 1304) .findPoolSources = virStorageBackendFileSystemNetFindPoolSources,

So I think ealier Ubuntu libvirt version also be affected, even earlier than my 13.04.

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

This bug was fixed in the package libvirt - 1.2.1-0ubuntu3

---------------
libvirt (1.2.1-0ubuntu3) trusty; urgency=medium

  * d/control: add nfs-common to build-deps (LP: #1264955)
 -- Serge Hallyn <email address hidden> Wed, 22 Jan 2014 08:56:01 -0600

Changed in libvirt (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1264955] Re: libvirt: find-storage-pool-sources work unexpected

Quoting Royce Lv (<email address hidden>):
> Thanks for your quick response Serge.
> By "new feature" do you mean find-storage-pool-source?
> As I went through libvirt git log and find it was supported by libvirt early in 2008:
> 39c9354c src/storage_backend_fs.c (Daniel P. Berrange 2008-08-27 20:05:58 +0000 1304) .findPoolSources = virStorageBackendFileSystemNetFindPoolSources,
>
> So I think ealier Ubuntu libvirt version also be affected, even earlier
> than my 13.04.

Enabling a new feature in a stable release isn't usually allowed
regardless of whether upstream had support for it or not.

We could try for an exception if it is important to you - please
see https://wiki.ubuntu.com/StableReleaseUpdates.

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.