Closed alfonsosanchezbeato closed 2 months ago
Draft for the moment, please do not merge - This will need to wait for snapd 2.63 to be in stable
@valentindavid @Meulengracht this is ready for review now.
@alfonsosanchezbeato Could we have a reference of what PR from snapd will expect this?
@alfonsosanchezbeato Could we have a reference of what PR from snapd will expect this?
This change enables using (mounting) a kernel drivers tree when created by snapd. All the needed changes in snapd were already merged. The ways this works is:
/var/lib/snapd/kernel/...
exists/lib/{firmware,modules}
if the drivers tree exists/lib/{firmware,modules}
Hopefully this answers your question.
I suppose this was this one: https://github.com/snapcore/snapd/pull/13923
I suppose this was this one: snapcore/snapd#13923
And https://github.com/snapcore/snapd/pull/13563 and possibly others.
@valentindavid I now check for kernel snap name / revision, I think that should handle most corner case situations. And hopefully the change guarantees that you will have a drivers tree compatible with the loaded kernel, and any core24/hybrid 24.10 system has in theory the right generator for these mounts.
I have tested the change for UC24 and hybrid in different scenarios, and seems to work as expected.
The tests-snapd tests seem to fail because no eth device is created in the VM. This looks as the same as https://github.com/snapcore/core-initrd/pull/246 , so the issue does not seem directly related to the PR.
I'd like to set snapd.debug=1
in the kernel command line, but we need https://github.com/snapcore/snapd/pull/14077 to land first. Otherwise the tests should pass now.
Do not mount /lib/{modules,firmware} in case snapd created a drivers tree for our kernel snap, as in that case these mounts will be created by snapd-generator from the base or from the snapd deb package for hybrid systems. This situation is expected to happen only for UC24+.