Bug 2055537

Summary: [virtiofs] support for remote POSIX locks
Product: Red Hat Enterprise Linux 9 Reporter: yalzhang <yalzhang>
Component: virtiofsdAssignee: Sergio Lopez <slopezpa>
Status: CLOSED DEFERRED QA Contact: xiagao
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: coli, lizhu, slopezpa, smitterl, virt-maint, yafu
Target Milestone: rcKeywords: FutureFeature, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2057882 (view as bug list) Environment:
Last Closed: 2022-08-05 07:47:03 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description yalzhang@redhat.com 2022-02-17 07:52:29 UTC
Description of problem:
VM with virtio filesystem can not start successfully with virtiofsd

Version-Release number of selected component (if applicable):
virtiofsd-1.1.0-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. On a rhel 9 host, install libvirt and qemu-kvm package, virtiofsd will be installed as dependency;

2. Start a vm with filesystem setting, it will fail:
# mkdir /path1
# virsh dumpxml rhel9
...
<filesystem type='mount' accessmode='passthrough'>
      <driver type='virtiofs'/>
      <binary path='/usr/libexec/virtiofsd' xattr='on'>
        <cache mode='none'/>
        <lock posix='on' flock='on'/>
      </binary>
      <source dir='/path1'/>
      <target dir='mount_tag'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </filesystem>
...

# virsh start rhel9
error: Failed to start domain 'rhel9'
error: internal error: virtiofsd died unexpectedly

# cat rhel9-fs0-virtiofsd.log
error: Invalid compat argument '-o flock'

(Refer to bug 2055284#c5, remote locks is not properly supported in virtiofsd.)

Actual results:
VM with virtio filesystem setting can not start with virtiofsd

Expected results:
virtiofsd process should drop '-o flock' or reject enabling it, and VM should start successfully

Additional info:

Comment 1 CongLi 2022-02-17 07:55:59 UTC

*** This bug has been marked as a duplicate of bug 2055284 ***

Comment 3 xiagao 2022-02-21 09:11:09 UTC
From the talk in https://bugzilla.redhat.com/show_bug.cgi?id=2022710#c9 , it's a 'FutureFeature'.
Feel free to correct me.

Comment 7 yalzhang@redhat.com 2022-02-23 03:35:25 UTC
Hi Sergio, do we plan to support remote POSIX locks in rhel 9.0? If it is a future feature and not in the 9.0 plan, we may need to do another direction: 1) to remove the compat argument '-o flock' when start virtiofsd process; 2) let virtiofsd works as qemu-virtiofsd to ignore it and to ahead to start the process anyway.
As currently we have transfered from qemu-virtiofsd to virtifsd already(virtiofsd will be installed automatically instead of qemu-virtiofsd), and it caused the regression in comment 0. Please help to evaluate it, Thank you!

Comment 8 yalzhang@redhat.com 2022-02-24 08:19:41 UTC
I found the virtiofsd process is generated by libvirt, file Bug 2057882 on libvirt to track this regression issue. Libvirt can drop the '-o flock' option since it can not support.

Comment 15 Sergio Lopez 2022-08-05 07:47:03 UTC
I'm closing this BZ as don't have plans for it in the short term. We'll keep track of the progress of this feature upstream:

https://gitlab.com/virtio-fs/virtiofsd/-/issues/53