Comment 13 for bug 2069059

Revision history for this message
Shantur Rathore (rathore4u) wrote (last edit ):

I have figured out a way to mitigate this issue by reducing the size of checksum when creating and referencing the kernel, initrd and squashfs file on file system.

All it does is just uses the first 16 characters of checksum for file names.
With these changes the file names are well under 140 limit that I was seeing and 24.04 happily deploys.

Can this be included in 3.5 please?

The changes are simple

1. Replace

bfile.sha256,

with

bfile.sha256[0:16],

at

https://github.com/canonical/maas/blob/de2288e04a9ad6fee7dd8954f6502d754f2ef280/src/maasserver/rpc/boot.py#L106

2. Replace

Replace

self._base_path = get_bootresource_store_path() / self.sha256

with

self._base_path = get_bootresource_store_path() / self.sha256[0:16]

https://github.com/canonical/maas/blob/de2288e04a9ad6fee7dd8954f6502d754f2ef280/src/maasserver/utils/bootresource.py#L95

I can send a merge request if needed.