Image_cache_size documentation suggestion

When looking for how to change the size of the image cache on rack controllers, I first found all of these documents which say that it is possible but don’t say how to do it:

MAAS | About images
MAAS | Reference: Release notes MAAS 3.5
Reference: Release notes MAAS 3.5 - Docs - Canonical MAAS | Discourse
Boot resources redesign - Docs - Canonical MAAS | Discourse
About images - Docs - Canonical MAAS | Discourse

I finally found it here:

How to use standard images (3.5-aware draft) - Docs - Canonical MAAS | Discourse

Searching for image_cache_size in the docs gives no results, suggesting that it’s not documented there at all:

MAAS Search “image_cache_size”

Would it be possible to add the explanation of how to change it somewhere in the docs, and maybe link to it from the “About images” and “Boot resource redesign” pages?

Thanks.

It would also be good to have an explanation of how to do it with the snap install of MAAS.

Hi @andrew-boatrocker
This configuration parameter is indeed not very well documented, because we are not 100% sure if it will stay of will be removed.

In the future MAAS Agent will come with it’s own configuration file, but currently it is supervised by Rack Controller. Hence some of the configuration options that you can see here /var/snap/maas/current/agent.yaml can be modified through /var/snap/maas/current/rackd.conf

Maybe this code will help you a bit.

Should I be modifying /var/snap/maas/current/rackd.conf on the rack server or on the region server?

Will the service on the rack and/or region server need a restart after changing the file?

Thanks.

/var/snap/maas/current/rackd.conf on the Rack Controller server.
Yes, restart of rackd will be required.

Thanks. Currently /var/snap/maas/current/rackd.conf just has this in it:

maas_url: https://<dns name of our region server>:5443/MAAS

I assume I copy these bits over from /var/snap/maas/current/agent.yaml into rackd.conf and change them in order to override what’s in agent.yaml:

httpproxy:
  cache_dir: /var/snap/maas/common/maas/cache/httpproxy
  cache_size: 40426971955.2

@andrew-boatrocker sorry for a long response.

You should just add httpproxy_cache_size into /var/snap/maas/current/rackd.conf and restart MAAS. During restart a proper agent.yaml will be populated

1 Like