I provisioned bunch of devices, interestingly one of them has 64 character length UUID whereas others has 32. All of the were provisioned with same image, in latest openBalena and balenaOS 2.46.1+rev3 rpi4 image.
Why does the UUID length differ between devices? This makes it difficult to write other applications when I can’t trust it being same length.
Hi. UUIDs are always represented as 32 hexadecimal digits, so a 64-digit UUID is definitely not valid. Just to confirm, only one device has a 64-digit UUID, correct? Is the device working at all? Can you interact with it?
@Ereski yeah, I tried it only briefly, it worked. Deleted it already, I didn’t like it, I want to use standard UUID so I can use them in my own database:
Okay here is what is happening, each time I provision a device, it creates another device that does not come online, but when another one comes online it creates second device with long UUID.
Just to clarify, when you say “I provisioned one device” what is the exact process you followed? I’m assuming you simply mean that you burned the image to an SD card with Etcher and booted up the device?
It happened three times in a row with one specific SD Card, now that we tried with a new card it worked fine. Very odd. Do you people seed the UUID with some hardware ID in the SD Card?
Nope, it literally runs openssl rand -hex 16 when it first boots and discovers there’s no device ID in the config.json. The only thing I can think of is that something else is also writing to the config.json.
Does it continue to happen if you reflash the problematic SD card?
Just to keep you up to date, it seems that there are two bugs here:
When we changed the generated key length in the host OS we didn’t update the corresponding library that the supervisor uses. PR opened
For some reason the supervisor is deciding that the device needs to be registered again, even though the host OS already registered it. Issue opened
One of the supervisor team may be in touch with you to get more information about the circumstances. Additionally, any information you can give us about the SD card in question would be good.
If that is the only code that touches the key I’m baffled. (Edit I see you added another comment as I was writing! Thanks)
Flash the SD with configured balena.img.
Insert to the Raspberry Pi 4
Wait… and first device appears in the balena devices it has a short UUID
Wait more… and second device with long UUID appears in the balena devices it comes online
The first short UUID never came online, it was just hanging there it can be identified in my above logs as the devices 334b928 and 17b8226 these are the devices that appeared but never came online. However the devices with long UUID did came online.
Hi,
We have identified what causes this issue and are working on getting a fix for this released in the next balenaOS release.
Thanks for letting us know. We will give you a notice once this becomes available.