[Bug 1050405] New: 55-scsi-sg3_id.rules scan for vpd pages on usb sticks
http://bugzilla.suse.com/show_bug.cgi?id=1050405 Bug ID: 1050405 Summary: 55-scsi-sg3_id.rules scan for vpd pages on usb sticks Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: bnc-team-screening@forge.provo.novell.com Reporter: thomas.blume@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- /usr/lib/udev/rules.d/55-scsi-sg3_id.rules contains the statement: --> # If the 'inquiry' sysfs attribute is present the kernel will already # have scanned for VPD pages, so if the vpd page attribute is not # present it is not supported (or deemed unsafe to access). # Hence we can skip the call to sg_inq and avoid I/O altogether. --< On my Leap 42.2 I have attached an usb stick that has: --> # ll /sys/block/sdd/device/inquiry -r--r--r-- 1 root root 0 Jul 25 13:06 /sys/block/sdd/device/inquiry --< but no vpd pages attributes: --> # ll /sys/block/sdd/device/vpd* ls: cannot access '/sys/block/sdd/device/vpd*': No such file or directory --< Still, the vpd enquriy is executed and the stick seems to be misidentified as harddisk: --> # udevadm test /block/sdd [...] IMPORT '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/inquiry --raw' /usr/lib/udev/rules.d/55-scsi-sg3_id.rules:14 starting '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/inquiry --raw' '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/inquiry --raw'(out) 'SCSI_IDENT_SERIAL=u' Process '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/inquiry --raw' succeeded. IMPORT '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/vpd_pg80 --raw' /usr/lib/udev/rules.d/55-scsi-sg3_id.rules:24 starting '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/vpd_pg80 --raw' '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/vpd_pg80 --raw'(err) 'unable to open binary file /sys/block/sdd/device/vpd_pg80: No such file or directory' Process '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/vpd_pg80 --raw' failed with exit code 15. IMPORT '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/vpd_pg83 --raw' /usr/lib/udev/rules.d/55-scsi-sg3_id.rules:27 starting '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/vpd_pg83 --raw' '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/vpd_pg83 --raw'(err) 'unable to open binary file /sys/block/sdd/device/vpd_pg83: No such file or directory' Process '/usr/bin/sg_inq --export --inhex=/sys/block/sdd/device/vpd_pg83 --raw' failed with exit code 15. --> Same misidentification in the multipath rules: --> PROGRAM '/sbin/multipath -u -i sdd' /usr/lib/udev/rules.d/56-multipath.rules:25 starting '/sbin/multipath -u -i sdd' Process '/sbin/multipath -u -i sdd' failed with exit code 1. LINK 'disk/by-id/scsi-S__u' /usr/lib/udev/rules.d/58-scsi-sg3_symlink.rules:12 LINK 'disk/by-id/scsi-S__u' /usr/lib/udev/rules.d/60-persistent-storage.rules:48 --< That breaks the udisks2 functionality. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1050405
Thomas Blume
http://bugzilla.suse.com/show_bug.cgi?id=1050405
Hannes Reinecke
http://bugzilla.suse.com/show_bug.cgi?id=1050405
http://bugzilla.suse.com/show_bug.cgi?id=1050405#c1
--- Comment #1 from Thomas Blume
http://bugzilla.suse.com/show_bug.cgi?id=1050405
http://bugzilla.suse.com/show_bug.cgi?id=1050405#c2
--- Comment #2 from Thomas Blume
--> # gdbus introspect --system --dest org.freedesktop.UDisks2 --object-path /org/freedesktop/UDisks2/drives node /org/freedesktop/UDisks2/drives { node HL_DT_STDVD_ROM_GDR8160B_HL_DT_STDVD_ROM_GDR8160B { }; node ST3160021A_5JS2B44K { }; node SAMSUNG_SP0812C_0693J1FX300217 { }; node drive { }; }; # --<
Maybe a little more background, udisks2 identifies the stick as: node drive { }; so it is missing the correct name and it doesn't get any properties: --> # gdbus introspect --system --dest org.freedesktop.UDisks2 --object-path /org/freedesktop/UDisks2/drives/drive node /org/freedesktop/UDisks2/drives/drive { }; # --< Comparison with a properly detected device: --> # gdbus introspect --system --dest org.freedesktop.UDisks2 --object-path /org/freedesktop/UDisks2/drives/HL_DT_STDVD_ROM_GDR8160B_HL_DT_STDVD_ROM_GDR8160B node /org/freedesktop/UDisks2/drives/HL_DT_STDVD_ROM_GDR8160B_HL_DT_STDVD_ROM_GDR8160B { interface org.freedesktop.DBus.Properties { methods: Get(in s interface_name, in s property_name, out v value); GetAll(in s interface_name, out a{sv} properties); Set(in s interface_name, in s property_name, in v value); signals: PropertiesChanged(s interface_name, a{sv} changed_properties, as invalidated_properties); properties: }; interface org.freedesktop.DBus.Introspectable { methods: Introspect(out s xml_data); signals: properties: }; interface org.freedesktop.DBus.Peer { methods: Ping(); GetMachineId(out s machine_uuid); signals: properties: }; interface org.freedesktop.UDisks2.Drive.Ata { methods: SmartUpdate(in a{sv} options); SmartGetAttributes(in a{sv} options, out a(ysqiiixia{sv}) attributes); SmartSelftestStart(in s type, in a{sv} options); SmartSelftestAbort(in a{sv} options); SmartSetEnabled(in b value, in a{sv} options); PmGetState(in a{sv} options, out y state); PmStandby(in a{sv} options); PmWakeup(in a{sv} options); SecurityEraseUnit(in a{sv} options); signals: properties: readonly b SmartSupported = false; readonly b SmartEnabled = false; readonly t SmartUpdated = 0; readonly b SmartFailing = false; readonly t SmartPowerOnSeconds = 0; readonly d SmartTemperature = 0.0; readonly i SmartNumAttributesFailing = -1; readonly i SmartNumAttributesFailedInThePast = -1; readonly x SmartNumBadSectors = 1; readonly s SmartSelftestStatus = ''; readonly i SmartSelftestPercentRemaining = -1; readonly b PmSupported = false; readonly b PmEnabled = false; readonly b ApmSupported = false; readonly b ApmEnabled = false; readonly b AamSupported = false; readonly b AamEnabled = false; readonly i AamVendorRecommendedValue = 0; readonly b WriteCacheSupported = false; readonly b WriteCacheEnabled = false; readonly i SecurityEraseUnitMinutes = 0; readonly i SecurityEnhancedEraseUnitMinutes = 0; readonly b SecurityFrozen = false; }; interface org.freedesktop.UDisks2.Drive { methods: Eject(in a{sv} options); SetConfiguration(in a{sv} value, in a{sv} options); PowerOff(in a{sv} options); signals: properties: readonly s Vendor = ''; readonly s Model = 'HL-DT-STDVD-ROM GDR8160B'; readonly s Revision = '0013'; readonly s Serial = 'HL-DT-STDVD-ROM_GDR8160B'; readonly s WWN = ''; readonly s Id = 'HL-DT-STDVD-ROM-GDR8160B-HL-DT-STDVD-ROM_GDR8160B'; readonly a{sv} Configuration = {}; readonly s Media = ''; readonly as MediaCompatibility = ['optical_cd', 'optical_dvd', 'optical_mrw', 'optical_mrw_w']; readonly b MediaRemovable = true; readonly b MediaAvailable = false; readonly b MediaChangeDetected = true; readonly t Size = 0; readonly t TimeDetected = 1501051902626842; readonly t TimeMediaDetected = 0; readonly b Optical = false; readonly b OpticalBlank = false; readonly u OpticalNumTracks = 0; readonly u OpticalNumAudioTracks = 0; readonly u OpticalNumDataTracks = 0; readonly u OpticalNumSessions = 0; readonly i RotationRate = -1; readonly s ConnectionBus = ''; readonly s Seat = 'seat0'; readonly b Removable = true; readonly b Ejectable = true; readonly s SortKey = '00coldplug/11removable/sr0'; readonly b CanPowerOff = false; readonly s SiblingId = ''; }; }; --< -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1050405
http://bugzilla.suse.com/show_bug.cgi?id=1050405#c3
Hannes Reinecke
http://bugzilla.suse.com/show_bug.cgi?id=1050405
Hannes Reinecke
http://bugzilla.suse.com/show_bug.cgi?id=1050405
http://bugzilla.suse.com/show_bug.cgi?id=1050405#c4
Thomas Blume
Should be fixed with the patch to bug#1070431. Can you retest with that patch?
Perfect, the patch fixes this issue. Instead of the unknown name: gdbus introspect --system --dest org.freedesktop.UDisks2 --object-path /org/freedesktop/UDisks2/drives node /org/freedesktop/UDisks2/drives { node QEMU_HARDDISK_QM00005 { }; node drive { }; }; and the broken symlinks, I now have the proper name back: # gdbus introspect --system --dest org.freedesktop.UDisks2 --object-path /org/freedesktop/UDisks2/drives node /org/freedesktop/UDisks2/drives { node QEMU_HARDDISK_QM00005 { }; node M_Sys_DiskOnKey { }; }; And the symlinks are correct: # ls /dev/disk/by-id/ | grep DiskOnKey usb-M-Sys_DiskOnKey_0891054150A1DBD9-0:0 usb-M-Sys_DiskOnKey_0891054150A1DBD9-0:0-part1 usb-M-Sys_DiskOnKey_0891054150A1DBD9-0:0-part2 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1050405
http://bugzilla.suse.com/show_bug.cgi?id=1050405#c5
Hannes Reinecke
participants (1)
-
bugzilla_noreply@novell.com