LXD UI deleting config settings

Hi all,

I have created a new container for Prometheus and Grafana, following the instructions in the LXD documentation and setting a static IP and two forwards so I can access the UI’s from outside the host:

bhills@turlough:~$ lxc config device list metrics

All is working great; however, I have found that if I use LXD UI to update the container resources and set a memory limit, eth0 and grafananat settings are deleted and the container no longer starts. If I restore the settings and set the memory resources via the command line using limits.memory, the settings are not lost and the container starts.

This looks to be an issue with LXD UI, but I am fairly new to LXD and I’ve been unable to find any logs that can back this up. I am using the snap version of LXD (v 5.17) and have looked in the logs under the container directory /var/snap/lxd/common/lxd/logs/ and the container logs, but this shows nothing.

Are setting updates logged or audited?

Many thanks,


1 Like

@edlerd please can you take a look at this?

1 Like

Hello @amugofjava,

thank you for reaching out to us.

I can’t reproduce the problem with the information provided. I assume it might be due to a custom network configuration, that the UI does not handle correctly yet. Can you please post the output of the command below?

lxc config device show metrics

This shows the full device configuration for that instance, which I hope will give a clue as to what went wrong on the config update from the UI.

As for the logging question, I am not aware of a way that LXD is logging configuration changes on instances.

Thanks again,

Hi @edlerd,

Thanks for the quick response. The output shows:

bhills@turlough:~$ lxc config device show metrics
  name: eth0
  network: lxdbr0
  type: nic
  connect: tcp:
  listen: tcp:
  nat: "true"
  type: proxy
  connect: tcp:
  listen: tcp:
  nat: "true"
  type: proxy

LXD UI not yet supporting custom network config makes a lot of sense. I’ll try and reproduce the issue with a new container - see if I can get it down to a specific set of steps.



1 Like

@edlerd does the ui use PUT or PATCH?

@amugofjava thank you for providing more information and sorry for the inconvenience we caused for you. This was indeed a bug in handling custom devices in the UI. When reducing the devices from the html form for the api call, it would forget previous devices whenever a custom device is encountered. And the proxies in your config are custom devices. This PR will fix it. It should be part of the next LXD 5.18 release.

@tomp we use the PUT endpoint

1 Like

Thanks @edlerd for the update. No problem. I’m still new to LXD, and working through issues and problems is a great way to learn.

I look forward to 5.18.

1 Like