"Unknown key" when updating config

This is an oddity, and may be a hangover from this machine having been migrated from lxd to incus, but I’d be interested in understanding what’s going on.

When I change a config setting, e.g.

incus config set loki.instance=nuc1

I get the following logged (seen in journalctl -eu incus, /var/log/incus/incusd.log and also in loki):

Apr 17 11:10:05 nuc1 incusd[3453486]: time="2024-04-17T11:10:05+01:00" level=error msg="Invalid configuration key: unknown key" key=storage.lvm_fstype
Apr 17 11:10:05 nuc1 incusd[3453486]: time="2024-04-17T11:10:05+01:00" level=error msg="Invalid configuration key: unknown key" key=storage.lvm_mount_options
Apr 17 11:10:05 nuc1 incusd[3453486]: time="2024-04-17T11:10:05+01:00" level=error msg="Invalid configuration key: unknown key" key=storage.lvm_thinpool_name
Apr 17 11:10:05 nuc1 incusd[3453486]: time="2024-04-17T11:10:05+01:00" level=error msg="Invalid configuration key: unknown key" key=storage.lvm_volume_size

I don’t know where these storage.lvm* options are coming from: I don’t even have any LVM storage configured on this machine.

root@nuc1:~# incus config show | grep lvm
root@nuc1:~# incus storage list
+---------+--------+---------+-------------+---------+---------+
|  NAME   | DRIVER | SOURCE  | DESCRIPTION | USED BY |  STATE  |
+---------+--------+---------+-------------+---------+---------+
| default | zfs    | zfs/lxd |             | 34      | CREATED |
+---------+--------+---------+-------------+---------+---------+
root@nuc1:~# incus storage show default | grep lvm
root@nuc1:~# incus list --format csv --fast | cut -f1 -d, | while read a; do incus config show $a | grep lvm; done
root@nuc1:~# incus profile list --format csv | cut -f1 -d, | while read a; do incus profile show $a | grep lvm; done
root@nuc1:~#

If I do incus config set loki.instance=nuc1 --debug I see some LVM api extensions, then the final PUT transaction, but no mention of those settings:

...
DEBUG  [2024-04-17T11:03:41+01:00] Sending request to Incus                      etag="\"fb36240ff73ab1b54fa11cff0ed3ec0807e3779fdb445722f9f5d9fa1e525dd2\"" method=PUT url="http://unix.socket/1.0"
DEBUG  [2024-04-17T11:03:41+01:00]
	{
		"config": {
			"core.https_address": "[::]:8443",
			"core.metrics_address": ":8444",
			"core.metrics_authentication": "false",
			"loki.api.url": "http://loki.example.net:3100",
			"loki.instance": "nuc1"
		}
	}

Any ideas where else to look?

Those are extremely old config keys that should have long been removed by LXD…

Can you show incus admin sql global "SELECT * FROM config"?

root@nuc1:~# incus admin sql global "SELECT * from config"
+----+-----------------------------+-----------------------------------+
| id |             key             |               value               |
+----+-----------------------------+-----------------------------------+
| 4  | storage.lvm_volume_size     | 10GiB                             |
| 5  | storage.lvm_fstype          | ext4                              |
| 6  | storage.lvm_mount_options   | discard                           |
| 7  | storage.lvm_thinpool_name   | LXDThinPool                       |
| 9  | core.metrics_authentication | false                             |
| 10 | loki.api.url                | http://loki.XXXXXXXXXXXX.net:3100 |
| 11 | loki.instance               | nuc1                              |
+----+-----------------------------+-----------------------------------+
root@nuc1:~#

OK, there they are :slight_smile: Is it safe to delete them using SQL?

Another machine which was migrated doesn’t have them:

root@nuc2:~# incus admin sql global "SELECT * from config"
+----+-----------------------------+-----------------------------------+
| id |             key             |               value               |
+----+-----------------------------+-----------------------------------+
| 4  | core.metrics_authentication | false                             |
| 5  | loki.api.url                | http://loki.XXXXXXXXXXXX.net:3100 |
| 6  | loki.instance               | nuc2                              |
+----+-----------------------------+-----------------------------------+

Yeah, as you noticed, they’re completely ignored by Incus so it’s safe to delete them.