I’ve DM’d you my email address.
I’m not sure how to specify this for a brand store as the docs aren’t clear.
… but the device is already able to get the serial assertion. Does snap known serial
print anything? Does it have the same brand-id
as “$OUR_BRANDSTORE_ID”?
In the meantime, I’m looking at what has changed since 244.
Charlee
October 1, 2024, 11:06am
22
@st3v3nmw I sent you the logs over email.
I definitely have a known serial already:
charlee@b40e85f8-1173-11ea-87ce-24418c038a3b:~$ snap known serial
type: serial
authority-id: $BRAND_ID
revision: 23
brand-id: $BRAND_ID
model: $MODEL
serial: b40e85f8-1173-11ea-87ce-24418c038a3b
...
I checked again now and broker is still in some sort of registration loop.
mikecw
October 3, 2024, 3:04pm
23
Fix is in the pipeline…
canonical:main
← st3v3nmw:fix-registration-on-snap-3
opened 03:00PM - 03 Oct 24 UTC
After the [landscape-config refactor](https://github.com/canonical/landscape-cli… ent/pull/262/files), registering on new revisions of the snap fails since the `config` app cannot read files in `/sys/bus/xen/devices` & `/sys/class/dmi/id`.
To reproduce:
- `snap install landscape-client --edge`
- `sudo landscape-client.config ...` fails with the following error:
```
Traceback (most recent call last):
File "/snap/landscape-client/294/usr/bin/landscape-config", line 16, in <module>
main(sys.argv[1:])
File "/snap/landscape-client/294/usr/lib/python3.10/site-packages/landscape/client/configuration.py", line 914, in main
exit_code = attempt_registration(identity, config)
File "/snap/landscape-client/294/usr/lib/python3.10/site-packages/landscape/client/configuration.py", line 739, in attempt_registration
client_info = ClientRegistrationInfo.from_identity(identity)
File "/snap/landscape-client/294/usr/lib/python3.10/site-packages/landscape/client/registration.py", line 61, in from_identity
vm_info=get_vm_info(),
File "/snap/landscape-client/294/usr/lib/python3.10/site-packages/landscape/lib/vm_info.py", line 23, in get_vm_info
if _is_vm_xen(root_path):
File "/snap/landscape-client/294/usr/lib/python3.10/site-packages/landscape/lib/vm_info.py", line 56, in _is_vm_xen
return os.path.isdir(sys_xen_path) and os.listdir(sys_xen_path)
PermissionError: [Errno 13] Permission denied: '/sys/bus/xen/devices'
```
---
Fix:
Added the `hardware-observe` interface to the `landscape-client.config` app which gives it access to the necessary folders.
The [`hardware-observe` ](https://snapcraft.io/docs/hardware-observe-interface) interface will grant read access to these paths:
> - For tools like lspci -A linux-sysfs to get information on files in /sys:
> /sys/{block,bus,class,devices,firmware}/{,**}
> - For container information:
> /run/systemd/container
The `landscape-client` app is already connected to `hardware-observe` so no more auto-connection requests are required.
Will let you know when it’s approved, built and on the Edge channel
mikecw
October 4, 2024, 7:47am
24
Hi @Charlee , the fix should now be available in the edge and beta channels.
Your other issue of generating clones is pending but not quite ready yet.
If you could give the latest builds a go and let us know if that resolves your issue that would be great.
Thanks
PS: Ah might have spoken too soon…
@mikecw do you still want me to test this?
FYI we don’t use landscape-client.config
, we do everything through defaults in our gadget snap, but possible the issue is the same in that case?
mikecw
October 8, 2024, 9:30am
26
Hi @charlee , sorry I know I am being a bit all over the place at the moment. Busy week.
Right - I wouldn’t test that one and hold off for a few days if I where you. We now have PRs that should resolve all your issues. They just need approving and building - then your clones and devices not coming up should all be good. I’ll let you know as soon as those have gone through the system.
Sorry it took so long.
Michael
1 Like
Dear Michael,
No worries, and thanks a lot for keeping me updated.
1 Like
mikecw
October 11, 2024, 7:25am
28
Hi Charlee, can you give the latest/edge build a test - that should resolve all the issues with your devices not coming up.
As for your issue with cloned devices, we think we have a fix, but it is not super clean at the moment so it will be a little longer I am afraid.
If this edge build resolves your issues, we can get that oen to stable so you can have all your annotations stuff sooner rather than later.
Thanks
Charlee
October 11, 2024, 3:36pm
29
Dear Mike,
Didn’t have much time to test this today, but our very basic test that the image comes online on Landscape works! Tested with revision 314.
I did not test changing the exchange intervals or annotations yet, but coming online is a very good start
Charlee
October 11, 2024, 3:37pm
30
ALso thanks a lot for releasing this before being ready with the cloned stuff.
I think we will be able to manage the cloning for now, the benefits of the other changes are too big!
Also, since I know it only happens with Landscape update it is a little more predictable when it will happen.