[PATCH] discover/udev.c: Added warning in system status log

Lulu_Su at wistron.com Lulu_Su at wistron.com
Wed Jul 14 01:09:36 AEST 2021


Hi Jeremy,

> > Forward user description:
> > " Tester has found during the Virtual media Install when he mounted 
> > USB and VIrtual Media only 1 USB option is visible in the petitboot 
> > for install.

> OK, so the test involved adding a USB device with some filesystem image, plus a virtual media device providing the exact same filesystem image then, is that correct?

Yes!

> Is there an expectation that both devices appear?

Under normal circumstances, yes. 
But I think this time they forgot to confirm if they installed the file with the same UUID, so they said "Same was showing earlier properly looks like there was some change which has caused this."

> [For a bit of background: the UUID check prevents multiple devices appearing in multipath setups; where it's actually the same physical filesystem being added under separate Linux block devices. It's also fairly important that the UUIDs are unique, as they're commonly referenced in bootloader configurations, so we really should ignore the second instance of a duplicated FS UUID]

Thank you very much for sharing knowledge.

> I'm OK with the message, but to look at the bigger picture here:
>
> 1) is the presence of only one device in the list actually a problem? Is
   it stopping the user from achieving a particular goal? and:

They didn’t mention this part, but I think they just wondered why the list didn't respond after mounting the file.

> 2) does the message help with that?

They agreed to add a warning message to let users know that a file with the same UUID is installed to make it clearer.

> > When a device using the UUID already exists, but the device name is 
> > different (e.g. Already exists device1: sda, New device2:sdc )

> Yep, but my point is that the device name will always be different
> - otherwise the kernel has created two block devices with identical names. So, the conditional in the if statement will always evaluate to true. Unless we have a bug elsewhere?

Sorry, correct the previous description, this condition is to prevent sda1 from displaying a warning.

In pb-discover.log:
[09:12:05] SKIP: sda1 UUID [2020-04-04-04-38-27-00] already present (as sda)
[09:15:50] SKIP: sdc UUID [2020-04-04-04-38-27-00] already present (as sda)

> Just include the device name in the string that you're generating.
> There's nothing special about the _dev_info function over the plain _info version, just that the former adds the device name prefix.
>
> OK, great!
>
> If you wanted to keep it really simple, you could just change the
> pb_log() call there to a device_handler_status_info(); it's already giving an indication of the duplicate UUID.

Thanks for your suggestions, I will try these and upload the patch again.

Regards,
-Lulu Su

---------------------------------------------------------------------------------------------------------------------------------------------------------------
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. 
Any unauthorized review, use, copying or distribution of this email or the content of this email is strictly prohibited.
If you are not the intended recipient, you may reply to the sender and should delete this e-mail immediately.
---------------------------------------------------------------------------------------------------------------------------------------------------------------



More information about the Petitboot mailing list