1. 26 8月, 2019 4 次提交
  2. 16 8月, 2019 3 次提交
  3. 15 8月, 2019 2 次提交
  4. 18 7月, 2019 2 次提交
  5. 26 6月, 2019 1 次提交
  6. 22 6月, 2019 1 次提交
  7. 12 4月, 2019 1 次提交
  8. 07 3月, 2019 1 次提交
  9. 04 3月, 2019 2 次提交
  10. 18 2月, 2019 4 次提交
  11. 14 2月, 2019 1 次提交
  12. 13 2月, 2019 2 次提交
  13. 12 2月, 2019 12 次提交
  14. 04 2月, 2019 1 次提交
  15. 02 2月, 2019 1 次提交
  16. 01 2月, 2019 2 次提交
    • J
      util: Introduce virStorageFileGetNPIVKey · 5f9e211c
      John Ferlan 提交于
      The vHBA/NPIV LUNs created via the udev processing of the
      VPORT_CREATE command end up using the same serial value
      as seen/generated by the /lib/udev/scsi_id as returned
      during virStorageFileGetSCSIKey. Therefore, in order to
      generate a unique enough key to be used when adding the
      LUN as a volume during virStoragePoolObjAddVol a more
      unique key needs to be generated for an NPIV volume.
      
      The problem is illustrated by the following example, where
      scsi_host5 is a vHBA used with the following LUNs:
      
      $ lsscsi -tg
      ...
      [5:0:4:0]    disk    fc:0x5006016844602198,0x101f00  /dev/sdh   /dev/sg23
      [5:0:5:0]    disk    fc:0x5006016044602198,0x102000  /dev/sdi   /dev/sg24
      ...
      
      Calling virStorageFileGetSCSIKey would return:
      
      /lib/udev/scsi_id --device /dev/sdh --whitelisted --replace-whitespace /dev/sdh
      350060160c460219850060160c4602198
      /lib/udev/scsi_id --device /dev/sdh --whitelisted --replace-whitespace /dev/sdi
      350060160c460219850060160c4602198
      
      Note that althrough /dev/sdh and /dev/sdi are separate LUNs, they
      end up with the same serial number used for the vol->key value.
      When virStoragePoolFCRefreshThread calls virStoragePoolObjAddVol
      the second LUN fails to be added with the following message
      getting logged:
      
          virHashAddOrUpdateEntry:341 : internal error: Duplicate key
      
      To resolve this, virStorageFileGetNPIVKey will use a similar call
      sequence as virStorageFileGetSCSIKey, except that it will add the
      "--export" option to the call. This results in more detailed output
      which needs to be parsed in order to formulate a unique enough key
      to be used. In order to be unique enough, the returned value will
      concatenate the target port as returned in the "ID_TARGET_PORT"
      field from the command to the "ID_SERIAL" value.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      5f9e211c
    • J
      storage: Rework virStorageBackendSCSISerial · 8bf89dc8
      John Ferlan 提交于
      Alter the code to use the virStorageFileGetSCSIKey helper
      to fetch the unique key for the SCSI disk. Alter the logic
      to follow the former code which would return a duplicate
      of @dev when either the virCommandRun succeeded, but returned
      an empty string or when WITH_UDEV was not true.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      8bf89dc8