Use serial instead of SCSI ID for USB devices#107
Conversation
6727526 to
9946f5e
Compare
|
Hi! Thank you for your contribution. Could you please sign-off your commit after taking the suggestions into account? |
|
Also IMHO a commit like |
e464d66 to
9802153
Compare
| except CommandException: | ||
| usb_device_with_serial = False |
There was a problem hiding this comment.
| except CommandException: | |
| usb_device_with_serial = False | |
| except Exception as e: | |
| usb_device_with_serial = False | |
| SMlog(f"Unable to check if device is USB: {e}") |
There was a problem hiding this comment.
I'm not a big fan of broad exception catch but ok. Regarding the log, just using f-string interpolation on exception is often not very helpful. Would it be ok for you to do the log like this:
| except CommandException: | |
| usb_device_with_serial = False | |
| except: | |
| usb_device_with_serial = False | |
| SMlog("Unable to check if device is USB:") | |
| SMlog(traceback.format_exc()) |
There was a problem hiding this comment.
You can commit your suggestion, not a blocking point I guess.
9802153 to
ce6361c
Compare
66c7c8e to
aaaab27
Compare
|
Can you rebase a last time on 3.2.12-8.3 please? We just rebased our branch on upstream changes. Otherwise I think we can release your modification in our next release, probably this month. Thanks again. |
Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
ce6361c to
64e1a47
Compare
|
The branch has been rebased on 3.2.12-8.3. Thank you for your guidance and for reviewing the PR :) |
Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
Adding SRs on multiple usb devices may fail because /usr/lib/udev/scsi_id returns the same device id for all the usb devices. This change fixes this by checking the drive type and using the device serial number if correctly read. Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
Adding SRs on multiple usb devices may fail because /usr/lib/udev/scsi_id returns the same device id for all the usb devices. This change fixes this by checking the drive type and using the device serial number if correctly read. Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
Adding SRs on multiple usb devices may fail because /usr/lib/udev/scsi_id returns the same device id for all the usb devices. This change fixes this by checking the drive type and using the device serial number if correctly read. Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
|
Upstream PR: xapi-project#784 |
Adding SRs on multiple usb devices may fail because /usr/lib/udev/scsi_id returns the same device id for all the usb devices. This change fixes this by checking the drive type and using the device serial number if correctly read. Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr> Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.tech>
Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
Adding SRs on multiple usb devices may fail because /usr/lib/udev/scsi_id returns the same device id for all the usb devices. This change fixes this by checking the drive type and using the device serial number if correctly read. Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
Adding SRs on multiple usb devices may fail because /usr/lib/udev/scsi_id returns the same device id for all the usb devices. This change fixes this by checking the drive type and using the device serial number if correctly read. Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
Adding SRs on multiple usb devices may fail because /usr/lib/udev/scsi_id returns the same device id for all the usb devices. This change fixes this by checking the drive type and using the device serial number if correctly read. Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
Adding SRs on multiple usb devices may fail because /usr/lib/udev/scsi_id returns the same device id for all the usb devices. This change fixes this by checking the drive type and using the device serial number if correctly read. Signed-off-by: Frederic Bor <frederic.bor@wanadoo.fr>
adding SRs on multiple usb devices may fail because /usr/lib/udev/scsi_id returns the same device id for all the usb devices.
This PR fixes this by checking the drive type and using the device serial number if correctly read.