Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 798924 - app-containers/lxd: virtfs-proxy-helper couldn't be found
Summary: app-containers/lxd: virtfs-proxy-helper couldn't be found
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Joonas Niilola
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-27 14:48 UTC by Ogelpre
Modified: 2022-03-21 09:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix virtfs-proxy-helper path (0001-app-emulation-lxd-fix-virtfs-proxy-helper-path.patch,956 bytes, patch)
2021-06-27 14:58 UTC, Ogelpre
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ogelpre 2021-06-27 14:48:54 UTC
I am trying to share a folder between host and a VM. When starting the VM I get the following message:

Error: Failed to start device "shared": Required binary 'virtfs-proxy-helper' couldn't be found 

Reproducible: Always

Steps to Reproduce:
1. share folder with VM:
devices:
  shared:
    path: /tmp/shared
    source: /tmp/shared
    type: disk
2. try to start VM
Actual Results:  
Error: Failed to start device "shared": Required binary 'virtfs-proxy-helper' couldn't be found

Expected Results:  
Should work.

I have analyzed the code. LXD ist looking in PATH for virtfs-proxy-helper. [0]
In gentoo the file is installed to /usr/libexec/virtfs-proxy-helper which is not in PATH.

There is an alternative hardcoded PATH where LXD is looking for the executable, but it assumes running on a Debian based distribution. [1]

Changing the hardcoded path fixes the issue for gentoo:

sed -i \
    -e "s:/usr/lib/qemu/virtfs-proxy-helper:/usr/libexec/virtfs-proxy-helper:g" \
    lxd/device/disk.go || die "Failed to fix virtfs-proxy-helper path."

I will attach a patch for the ebuild.

[0] https://github.com/lxc/lxd/blob/lxd-4.0.6/lxd/device/disk.go#L572
[1] https://github.com/lxc/lxd/blob/lxd-4.0.6/lxd/device/disk.go#L574
Comment 1 Ogelpre 2021-06-27 14:58:41 UTC
Created attachment 719607 [details, diff]
Patch to fix virtfs-proxy-helper path
Comment 2 Larry the Git Cow gentoo-dev 2021-06-30 04:48:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41765dab645acb31174d787d8d7c4288ae8bce18

commit 41765dab645acb31174d787d8d7c4288ae8bce18
Author:     Benedikt Neuffer <gentoo@itfriend.de>
AuthorDate: 2021-06-27 14:55:09 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-06-30 04:39:29 +0000

    app-emulation/lxd: fix virtfs-proxy-helper path
    
    Closes: https://bugs.gentoo.org/798924
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-emulation/lxd/lxd-4.0.6.ebuild | 5 +++++
 1 file changed, 5 insertions(+)
Comment 3 Joonas Niilola gentoo-dev 2021-06-30 04:49:23 UTC
Thanks for the patch, much appreciated! 

xen also installs virtfs-proxy-helper but I see lxd was meant for it to be used with qemu.
Comment 4 Larry the Git Cow gentoo-dev 2022-02-02 08:53:13 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd04ef5dc1514fe99e65550f7e72bcf7ab993eb

commit 5bd04ef5dc1514fe99e65550f7e72bcf7ab993eb
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-02-02 08:45:41 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-02-02 08:53:06 +0000

    app-containers/lxd: add 4.0.9
    
     - inherit go-module.eclass; upstream uses go.mod now,
     - new documentation offered by upstream, e.g. a handy cheatsheet,
     - openrc init file and systemd service file now manages the log
       directory (#817287),
     - virtfs-proxy-helper bin path isn't hardcoded anymore (#798924),
     - -Werror patch turned into sed for easier maintainability.
    
    Bug: https://bugs.gentoo.org/798924
    Closes: https://bugs.gentoo.org/817287
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-containers/lxd/Manifest                |   2 +
 app-containers/lxd/files/lxd-4.0.9.initd   |  49 ++++++++
 app-containers/lxd/files/lxd-4.0.9.service |  25 +++++
 app-containers/lxd/lxd-4.0.9.ebuild        | 174 +++++++++++++++++++++++++++++
 4 files changed, 250 insertions(+)
Comment 5 Joonas Niilola gentoo-dev 2022-03-21 09:03:17 UTC
https://github.com/lxc/lxd/issues/10092
Comment 6 Larry the Git Cow gentoo-dev 2022-03-21 09:31:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88557686e5382ac1e164f61c72bb63a7a076a240

commit 88557686e5382ac1e164f61c72bb63a7a076a240
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-03-21 09:26:12 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-03-21 09:31:12 +0000

    app-containers/lxd: fix finding virtfs-proxy-helper, again
    
     - the code has been divided amongst different files.
    
    Closes: https://bugs.gentoo.org/798924
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-containers/lxd/{lxd-4.0.9-r2.ebuild => lxd-4.0.9-r3.ebuild} | 5 +++++
 1 file changed, 5 insertions(+)