Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-77974

[virtio-win][virtiofs] Permission denied when writing to virtiofs volume on top of nfs backend

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • rhel-virt-windows
    • ssg_virtualization
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?
      Running an automation test loop for virtiofs functionality, there are always some cases failed on nfs backend. It showed permission denied when creating a folder/file to virtio fs.

      Please provide the package NVR for which bug is seen:
      virtiofsd-1.13.0-1.el10.x86_64
      qemu-kvm-9.1.0-11.el10.x86_64
      edk2-ovmf-20241117-1.el10.noarch
      seabios-bin-1.16.3-7.el10.noarch
      kernel-6.12.0-39.el10.x86_64
      kernel-6.12.0-41.el10.x86_64
      swtpm-0.9.0-4.el10.x86_64
      virtio-win-prewhql-0.1-271

      How reproducible:
      It always happened in an automation test loop, even when restarting virtiofs service or restart windows os or restart nfs service, it still failed to write.

      Steps to reproduce
      1. Run a virtiofs function test loop with automation.
      2. virtiofsd info:
      root 962798 0.0 0.0 5264 3312 pts/16 S+ 02:36 0:00 /usr/libexec/virtiofsd --socket-path=/var/tmp/avocado_vpzpoo88/avocado-vt-vm1-fs-virtiofsd.sock --shared-dir /tmp/virtio_fs_test --log-level debug -o cache=auto
      root 962800 0.0 0.0 30532112 3240 pts/16 Sl+ 02:36 0:00 /usr/libexec/virtiofsd --socket-path=/var/tmp/avocado_vpzpoo88/avocado-vt-vm1-fs-virtiofsd.sock --shared-dir /tmp/virtio_fs_test --log-level debug -o cache=auto

      3. nfs info:

      1. exportfs -v
        /mnt/virtio_fs_test_nfs
        <world>(async,wdelay,hide,no_subtree_check,sec=sys,rw,insecure,no_root_squash,no_all_squash)

      127.0.0.1:/mnt/virtio_fs_test_nfs on /tmp/virtio_fs_test type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1)

      Actual results
      Some nfs backend related cases failed with "Permission Denied".
      http://virtqetools.lab.eng.pek2.redhat.com/kvm_autotest_job_log/?jobid=10583815

      Expected results
      Virtiofs works on nfs.

      Others:
      1. Permission denied info was captured in virtiofsd log.
      2025-02-04 23:11:55: [2025-02-05T04:11:55Z DEBUG virtiofsd::server] Replying OK, header: OutHeader

      { len: 144, error: 0, unique: 303 }

      2025-02-04 23:11:55: [2025-02-05T04:11:55Z DEBUG virtiofsd::vhost_user] QUEUE_EVENT
      2025-02-04 23:11:55: [2025-02-05T04:11:55Z DEBUG virtiofsd::server] Received request: opcode=Mkdir (9), inode=1, unique=304, pid=4708
      2025-02-04 23:11:55: [2025-02-05T04:11:55Z DEBUG virtiofsd::server] Replying ERROR, header: OutHeader

      { error: -13 (Permission denied), unique: 304, len: 16 }

      2025-02-04 23:11:55: [2025-02-05T04:11:55Z DEBUG virtiofsd::vhost_user] QUEUE_EVENT
      2025-02-04 23:11:55: [2025-02-05T04:11:55Z DEBUG virtiofsd::server] Received request: opcode=Lookup (1), inode=1, unique=305, pid=4708
      2025-02-04 23:11:55: [2025-02-05T04:11:55Z DEBUG virtiofsd::server] Replying ERROR, header: OutHeader

      { error: -2 (No such file or directory), unique: 305, len: 16 }

      2. Attach the virtiofs service debug log from the guest.

      3. After re-install a new image, this issue disappeared, and then start os with the original image, it appeared.

      Reporting this issue as I have no idea how to workaroud/fix this issue on the issue image.

      4. This issue also happened on 247, so it's not a regression for 271.

              yvugenfi@redhat.com Yan Vugenfirer
              rhn-support-xiagao Xiaoling Gao
              Virt Windows SST Bugs Virt Windows SST Bugs
              Xiaoling Gao Xiaoling Gao
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: