Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2011327

Summary: Add support for FibreChannel VMID
Product: Red Hat Enterprise Linux 8 Reporter: Pavel Hrdina <phrdina>
Component: virt-managerAssignee: Jonathon Jongsma <jjongsma>
Status: CLOSED ERRATA QA Contact: Hongzhou Liu <hongzliu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: hongzliu, jjongsma, jsuchane, juzhou, tyan, tzheng, virt-maint, xiaodwan
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-3.2.0-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 13:54:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1839070    
Bug Blocks:    

Description Pavel Hrdina 2021-10-06 12:40:22 UTC
Description of problem:

The FC SAN can provide various QOS levels, access control depending on the VMID. Also it can collect telemetry data at per-VM level which can be used to enhance the IO performance of the VM. To execute these, the FC SAN needs a mechanism to identify the VMID from where the frame originated. So, embedded the VMID in every FC frame would be of great use.

Comment 1 Pavel Hrdina 2021-10-06 12:48:41 UTC
Upstream commit:

0953e1ae cli: introduce --resource fibrechannel.appid option

Comment 5 Hongzhou Liu 2021-12-01 08:09:54 UTC
Try to verify the bug with Package:
4.18.0-353.el8.x86_64
virt-manager-3.2.0-1.el8.noarch
virt-install-3.2.0-1.el8.noarch
libvirt-7.9.0-1.module+el8.6.0+13150+28339563.x86_64

Step 1. check the rng file
# cat /usr/share/libvirt/schemas/domaincommon.rng | grep fibrechannel -a10
>>
...
  <define name="fibrechannel">
    <element name="fibrechannel">
      <attribute name="appid">
        <data type="string">
          <!-- All printable characters -->
          <param name="pattern">[&#x20;-&#x7E;]{1,128}</param>
        </data>
      </attribute>
    </element>
  </define>
...
  </define>

  <define name="respartition">
    <element name="resource">
      <optional>
        <element name="partition">
          <ref name="absFilePath"/>
        </element>
      </optional>
      <optional>
        <ref name="fibrechannel"/>
      </optional>
    </element>
  </define>
...

Step 2. Create a vm by using --resource fibrechannel.appid=just_an_app_id parameter
#virt-install \
 --name t1 --memory 4096 \
 --disk path=/home/t2.img,size=10 \
 --location
http://download.eng.pek2.redhat.com/rhel-9/nightly/RHEL-9-Beta/latest-RHEL-9.0/compose/BaseOS/x86_64/os/ \
 --resource fibrechannel.appid=just_an_app_id
>>
Starting install...
Retrieving file vmlinuz...                                                                                                 |  10 MB  00:00:00     
Retrieving file initrd.img...                                                                                              |  76 MB  00:00:00     
Allocating 't2.img'                                                                                                        |  10 GB  00:00:00     
Removing disk 't2.img'                                                                                                     |    0 B  00:00:00     
ERROR    Unable to write '879:just_an_app_id' to '/sys/class/fc/fc_udev_device/appid_store': Invalid argument
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start t1
otherwise, please restart your installation.

Test result: vm created failed because kernel has not support this feature

Step 3. Check privilege for /sys/class/fc/fc_udev_device/appid_store
# ls -l /sys/class/fc/fc_udev_device/appid_store
--w-------. 1 root root 4096 Dec  1 01:38 /sys/class/fc/fc_udev_device/appid_store

Comment: this step is make sure user has write permission for this file

Summary: RHEL8.6 have not support /sys/class/fc/fc_udev_device/appid_store yet. 


@jjongsma : Do we need more test for this bug or this is enough? I think we can just do a simple negative test before this feature released.

Comment 6 Jonathon Jongsma 2021-12-02 17:25:30 UTC
It seems that the virt-install portion is working correctly and passing the fibrechannel appid to libvirt/qemu. I'm not entirely sure what additional testing might be necessary here. What do you mean by "simple negative test"? 

Pavel, What testing did you do when developing this feature upstream?

Comment 7 Hongzhou Liu 2021-12-03 04:52:07 UTC
By "simple negative test" I was meaning set up an environment that do not support FibreChannel VMID and see if we can get a clear error message.

Comment 8 Hongzhou Liu 2021-12-13 02:07:54 UTC
Confirmed with Pavel offline, there will be no more test actions until this feature is available on RHEL8.6, comment 5 is enough for verifying this bug. So, I move it to VERIFIED status, thanks.

Comment 10 errata-xmlrpc 2022-05-10 13:54:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virt-manager bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1862