Landscape-client on Ubuntu Core 22 duplicate computers

Hey there,

I am trying to connect Ubuntu Core 22 devices to Landscape and it mostly seems to work, except that the UI is giving me errors that I have duplicate computers (and subsequently other functionality is not working as expected).

What is Landscape using as unique identifier for this? I get a duplicate error for two devices that are on different hardware, have different serials and different computer titles…

The two devices on Landscape UI look like this:

and the error looks like this (notice filter for alert:computer-duplicate on the left):

Regards, Charlee

I wonder if @mikecw has an idea (perhaps there is even already a bug open ?)

Hi,

Yes, so the duplicate check is based on the Hostname, which I agree is a little too simplistic. From your screenshot we can see that both are using Ubuntu.

For now, can you please try a different hostname for each device. I will raise a ticket to get that check made a little more robust in the future.

Thanks,

Michael

Ok, where do you think is the best place to set the hostname if I want CLI-free startup?

Either a config snap (if you have one) or perhaps the gadget (from a hook) … The hostname-control interface should give you access to hostnamectl…

We are now using guids in the gadget’s prepare-device hook to set the serial.

Could I set the hostname in the prepare-device hook too? And does it make sense to just set it to the guid? (although not very user friendly, it has to be unique so…)

sure, you just need to add the plug to its definition in your snapcraft.yaml (and indeed make sure it is connected)

Awesome, and thanks for the reminder that I need to enable the interface in the UI!