Bug 1967666
| Summary: | Unify length limits of serial number for SCSI disks | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Peter Krempa <pkrempa> |
| Component: | qemu-kvm | Assignee: | Virtualization Maintenance <virt-maint> |
| qemu-kvm sub component: | virtio-blk,scsi | QA Contact: | qing.wang <qinwang> |
| Status: | CLOSED MIGRATED | Docs Contact: | |
| Severity: | low | ||
| Priority: | low | CC: | afaria, aliang, coli, jinzhao, juzhang, kwolf, virt-maint |
| Version: | 9.0 | Keywords: | MigratedToJIRA, RFE, Triaged |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-08-16 07:27:41 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: | |||
|
Description
Peter Krempa
2021-06-03 14:53:35 UTC
Hi,Peter, i have some questions for the issue?
1.How long the Unify length limits of serial number
2.What is the expected result if Serial number exceeding length? refuse to run or give a warning message?
3.How to handle the virtio device, (virtio-blk-pci), they should follow same rule of the serial number
Current test result:
1.create images
qemu-img create -f qcow2 /home/kvm_autotest_root/images/data1.qcow2 1G
qemu-img create -f qcow2 /home/kvm_autotest_root/images/data2.qcow2 2G
qemu-img create -f qcow2 /home/kvm_autotest_root/images/data3.qcow2 3G
2.boot vm with long serial number of data images
/usr/libexec/qemu-kvm \
-name testvm \
-machine q35 \
-m 8G \
-smp 8 \
-cpu host,vmx,+kvm_pv_unhalt \
-device qemu-xhci,id=usb1 \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
\
-device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x3,chassis=1 \
-device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x3.0x1,bus=pcie.0,chassis=2 \
-device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x3.0x2,bus=pcie.0,chassis=3 \
-device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x3.0x3,bus=pcie.0,chassis=4 \
-device pcie-root-port,id=pcie-root-port-4,port=0x4,addr=0x3.0x4,bus=pcie.0,chassis=5 \
-device pcie-root-port,id=pcie-root-port-5,port=0x5,addr=0x3.0x5,bus=pcie.0,chassis=6 \
-device pcie-root-port,id=pcie-root-port-6,port=0x6,addr=0x3.0x6,bus=pcie.0,chassis=7 \
-device pcie-root-port,id=pcie-root-port-7,port=0x7,addr=0x3.0x7,bus=pcie.0,chassis=8 \
-device virtio-scsi-pci,id=scsi0,bus=pcie-root-port-5 \
-device virtio-scsi-pci,id=scsi1,bus=pcie-root-port-6 \
-blockdev driver=qcow2,file.driver=file,cache.direct=off,cache.no-flush=on,file.filename=/home/kvm_autotest_root/images/rhel840-64-virtio-scsi.qcow2,node-name=drive_image1 \
-device scsi-hd,id=os,drive=drive_image1,bus=scsi0.0,bootindex=0,serial=OS_DISK \
\
-blockdev driver=qcow2,file.driver=file,file.filename=/home/kvm_autotest_root/images/data1.qcow2,node-name=data_image1 \
-device scsi-hd,id=data1,drive=data_image1,bus=scsi0.0,bootindex=1,serial=0-1234567890-123456789-1234567890-abcdefg \
-blockdev driver=qcow2,file.driver=file,file.filename=/home/kvm_autotest_root/images/data2.qcow2,node-name=data_image2 \
-device scsi-hd,id=data2,drive=data_image2,bus=scsi0.0,bootindex=2,device_id=1-1234567890-123456789-1234567890-abcdefg \
-blockdev driver=qcow2,file.driver=file,file.filename=/home/kvm_autotest_root/images/data3.qcow2,node-name=data_image3 \
-device virtio-blk-pci,id=data3,drive=data_image3,bus=pcie-root-port-3,bootindex=3,serial=2-1234567890-123456789-1234567890-abcdefg \
-vnc :5 \
-monitor stdio \
-qmp tcp:0:5955,server=on,wait=off \
-device virtio-net-pci,mac=9a:b5:b6:b1:b2:b7,id=idMmq1jH,vectors=4,netdev=idxgXAlm,bus=pcie-root-port-7 \
-netdev tap,id=idxgXAlm \
-chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/monitor-qmp7.log,server=on,wait=off \
-mon chardev=qmp_id_qmpmonitor1,mode=control \
-chardev file,path=/var/tmp/monitor-serial7.log,id=serial_id_serial0 \
-device isa-serial,chardev=serial_id_serial0 \
-D debug.log \
-boot menu=on,reboot-timeout=1000 \
\
3.login guest
check vpd
[root@localhost home]# lsblk -nd
sda 8:0 0 20G 0 disk
sdb 8:16 0 1G 0 disk
sdc 8:32 0 2G 0 disk
vda 252:0 0 3G 0 disk
[root@localhost home]# sg_vpd /dev/sdb --page=0x80;sg_vpd /dev/sdb --page=0x83
Unit serial number VPD page:
Unit serial number: 0-1234567890-123456789-1234567890-ab
Device Identification VPD page:
Addressed logical unit:
designator type: vendor specific [0x0], code set: ASCII
vendor specific: 0-1234567890-1234567
[root@localhost home]#
[root@localhost home]#
[root@localhost home]# sg_vpd /dev/sdc --page=0x80;sg_vpd /dev/sdc --page=0x83
fetching VPD page failed: Numerical argument out of domain
sg_vpd failed: Numerical argument out of domain
Device Identification VPD page:
Addressed logical unit:
designator type: vendor specific [0x0], code set: ASCII
vendor specific: 1-1234567890-123456789-1234567890-abcdefg
[root@localhost home]# udevadm info /dev/sdb|grep ID_SERIAL
E: ID_SERIAL=0QEMU_QEMU_HARDDISK_0-1234567890-1234567
E: ID_SERIAL_SHORT=0-1234567890-1234567
[root@localhost home]# udevadm info /dev/sdc|grep ID_SERIAL
E: ID_SERIAL=0QEMU_QEMU_HARDDISK_1-1234567890-123456789-1234567890-abcdefg
E: ID_SERIAL_SHORT=1-1234567890-123456789-1234567890-abcdefg
[root@localhost home]# udevadm info /dev/vda|grep ID_SERIAL
E: ID_SERIAL=2-1234567890-1234567
(In reply to qing.wang from comment #1) > Hi,Peter, i have some questions for the issue? > > 1.How long the Unify length limits of serial number For SCSI disks it should be unified to the technical limit of 248 characters, it doesn't make sense to pick arbitrary values. > 2.What is the expected result if Serial number exceeding length? refuse to > run or give a warning message? Ideally qemu would reject startup or hotplug if the serial number can't be honoured. This is a question for https://bugzilla.redhat.com/show_bug.cgi?id=1967668 > 3.How to handle the virtio device, (virtio-blk-pci), they should follow same > rule of the serial number Unless there's a technical limit on the serial number lenght such as in case of IDE disks limiting it arbitrarily to 20 characters is wrong especially since at least some users want to use UUIDs which are 36 characters. (In reply to Peter Krempa from comment #2) > (In reply to qing.wang from comment #1) > > Hi,Peter, i have some questions for the issue? > > > > 1.How long the Unify length limits of serial number > > For SCSI disks it should be unified to the technical limit of 248 > characters, it doesn't make sense to pick arbitrary values. > > > 2.What is the expected result if Serial number exceeding length? refuse to > > run or give a warning message? > > Ideally qemu would reject startup or hotplug if the serial number can't be > honoured. This is a question for > https://bugzilla.redhat.com/show_bug.cgi?id=1967668 > > > > 3.How to handle the virtio device, (virtio-blk-pci), they should follow same > > rule of the serial number > > Unless there's a technical limit on the serial number lenght such as in case > of IDE disks limiting it arbitrarily to 20 characters is wrong especially > since at least some users want to use UUIDs which are 36 characters. yes, according to test in comment 1. so it will extent support 36 for virtio-blk-pci ? (In reply to qing.wang from comment #3) > (In reply to Peter Krempa from comment #2) > > (In reply to qing.wang from comment #1) [...] > > > 3.How to handle the virtio device, (virtio-blk-pci), they should follow same > > > rule of the serial number > > > > Unless there's a technical limit on the serial number lenght such as in case > > of IDE disks limiting it arbitrarily to 20 characters is wrong especially > > since at least some users want to use UUIDs which are 36 characters. > > yes, according to test in comment 1. so it will extent support 36 for > virtio-blk-pci ? The limit should not be arbitrary as the 36 characters for UUID in case of the SCSI disk was. Limits should be picked based on technical limits of the device interface. Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release. Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug. This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there. To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like: "Bugzilla Bug" = 1234567 In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. |