LXD 5.21.1 LTS has been released

How did you get the earlier posted log with the dqlite error? Are you seeing a similar error now?

1 Like

It was being sudo journalctl -o cat -b -u snap.lxd.daemon.service
but at now I see that its old logs ā€¦
Because on all logs contains time
time="2024-04-16T19:23:43Z

How I can show actually logs ?

What does sudo ps aux | grep lxd show?

Also have you done sudo snap start lxd?

1 Like

wow, Iā€™m even ashamedā€¦ after I ran sudo snap start lxd, everything workedā€¦

but why is not started automatically ?

1 Like

Iā€™m not sure, LXD restarts if it stops and the snap service is enabled (by snap start lxd), but perhaps in all of the refreshing of channels snapd stopped the LXD snap service.

Glad its working though. Stick on the 5.21/stable channel.

@colemiller and I are looking into anything can be improved with LXD and dqlite to try and avoid these DB corruptions when LXD is being restarted during a snap refresh.

1 Like

Thank you for help)

I am sure that there was no damage today, I mistakenly attached old logs where the database was actually damaged. In this case, there was only a minor problem with the fact that the lxd service was disabled and did not start automatically for some reason.

Note:
After refreshing to latest/stable lxd service not autostart again.

1 Like

I still working on 20.04: actually my hardening process did not work as expected, so Iā€™m still investigating.

thx for your help.

I will post my findings.
Actually:

  • generic kernel
  • zfs from Ubuntu
  • lxd: 5.21/stable
  • snap 2.62.2

Last week

  • Ubuntu 20.04:
    with lxd 5.21/stable only build on HP Gen8 but not on my HP gen7 but this morning it seems to work ?!
  • ubuntu 22.04:
    with lxd 5.21/stable unable to build but with lxd 5.20/stable is building !?

Please can you provide your build errors?

For 22.04: lxd.daemon.log

lxd.daemon[25590]: time="2024-04-26T13:35:33-04:00" level=warning msg=" - Couldn't find the CGroup network priority controller, per-instance network priority will be ignored. Please use per-device limits.priority instead"
Apr 26 13:37:07 gueryta344119 lxd.daemon[25590]: time="2024-04-26T13:37:07-04:00" level=error msg="Unable to run feature checks during QEMU initialization: QEMU monitor connect error: dial unix /tmp/3693263421: connect: connection refused"
Apr 26 13:37:07 gueryta344119 lxd.daemon[25590]: time="2024-04-26T13:37:07-04:00" level=warning msg="Instance type not operational" driver=qemu err="QEMU failed to run feature checks" type=virtual-machine
Apr 26 13:38:22 gueryta344119 lxd.daemon[25590]: time="2024-04-26T13:38:22-04:00" level=warning msg="Dqlite: attempt 1: server 1: write handshake: write unix @->@00003: i/o timeout"

The script is doing ā€œlxc check connectivityā€ and run this command:

lst list

Bur never get answer/ouput from lxc

20.04: since last monday (2024-05-06) everything work as expected (!?)

Regards

Regards

Are you building LXD or installing it?

I tried to install it, but Magic Wednesday: 20.04 itā€™s working as expected and 22.04 work with 5.21/stable and latest/stable :slight_smile:

Thx for your help and time.

1 Like

Excellent. latest/stable works with ZFS on Ubuntu 22.04 because it has ZFS 2.1 support (and ZFS 2.2 with HWE kernel).

However keep in mind that right now because 5.21/stable and latest/stable are equivalent, you can switch from latest/stable to 5.21/stable (which is an LTS track).

So if you are looking for a non-rolling track, then this is a good opportunity to switch to 5.21/stable channel.

Iā€™m not quite clear under which conditions lxd init would require root rather than being in the lxd group. I just tested the ā€œfirst stepsā€ tutorial and you just need to be member of the lxd group for lxd init --minimal to succeed.

Since @ayomideyissa was apparently not a member of the lxd group, I clarified the ā€œfirst stepsā€ to ensure the user logs out and back in for the group membership to take effect.

https://github.com/canonical/lxd/pull/13520

I believe the last requirement we have for lxd init being run as root user is when joining a cluster as it needs to read the certificate off of the disk:

1 Like

Thanks for the clarification Tom. It seems our cluster doc already mentions sudo is needed when joining an existing cluster so I donā€™t think we/I need to clarify the doc.

1 Like

sorry, I know this might be better in a new Topic, but I just signed up here and could not find the quote in related Topic-button, or even any sort of way to create a new one here.

As my house is on fire right now I hope so,ebody might pick up on this despite that bad placement.

==================================================

I have the same forefront symptom as described here.

sysop@ubn2004LXD:~$ lxc list
Error: LXD unix socket not accessible: Get "http://unix.socket/1.0": EOF

I am not using ZFS but btrfs though.

On top I see the below which seem to indicate the repressantation of my containers on the hosts filesystem does not exist any longer. This is worrying me a bit

sysop@ubn2004LXD:~$ sudo ls -l /var/snap/lxd/common/lxd/storage-pools/pool-52G/containers/erpnext4
total 0

or

sysop@ubn2004LXD:~$ sudo du -h -d 1 /var/snap/lxd/common/lxd/storage-pools/pool-52G/containers
4.0K	/var/snap/lxd/common/lxd/storage-pools/pool-52G/containers/ubn2204
4.0K	/var/snap/lxd/common/lxd/storage-pools/pool-52G/containers/erpnext4
12K	/var/snap/lxd/common/lxd/storage-pools/pool-52G/containers

pool-52G being the btrfs backed storage pool.

Would you still recommend the same solution @tomp ?

I think this is duplicate of LXD unix socket not accessible - zfs missing even though I am using btrfs, so letā€™s keep the discussion there.

After upgrading, seems my lxc and lxd are not functioning well anymore

No Command seem to be working outside checking thier versions

When i checked the status of lxd service i see this

ā— snap.lxd.daemon.service - Service for snap application lxd.daemon
Loaded: loaded (/etc/systemd/system/snap.lxd.daemon.service; static; vendor preset: enabled)
Active: active (running) since Sun 2024-07-07 00:21:58 UTC; 1s ago
TriggeredBy: ā— snap.lxd.daemon.unix.socket
Main PID: 54401 (daemon.start)
Tasks: 0 (limit: 38287)
Memory: 4.0M
CGroup: /system.slice/snap.lxd.daemon.service
ā€£ 54401 /bin/sh /snap/lxd/28460/commands/daemon.start

Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - proc_slabinfo
Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - shared_pidns
Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - cpuview_daemon
Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - loadavg_daemon
Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - pidfds
Jul 07 00:21:59 ns3081171 lxd.daemon[54401]: => Starting LXD
Jul 07 00:22:00 ns3081171 lxd.daemon[54557]: time=ā€œ2024-07-07T00:22:00Zā€ level=warning msg=" - Couldnā€™t find the CGroup blkio.weight, disk priority will be ignored"
Jul 07 00:22:00 ns3081171 lxd.daemon[54557]: time=ā€œ2024-07-07T00:22:00Zā€ level=warning msg=" - Couldnā€™t find the CGroup memory swap accounting, swap limits will be ignored"
Jul 07 00:22:00 ns3081171 lxd.daemon[54557]: time=ā€œ2024-07-07T00:22:00Zā€ level=error msg=ā€œFailed to start the daemonā€ err=ā€œFailed to start dqlite server: raft_start(): io: closed segment 0000000000833011-0000000000833040 is past last snapshot snapshot-1-832512-36057521ā€
Jul 07 00:22:00 ns3081171 lxd.daemon[54557]: Error: Failed to start dqlite server: raft_start(): io: closed segment 0000000000833011-0000000000833040 is past last snapshot snapshot-1-832512-36057521
Jul 07 00:22:00 ns3081171 lxd.daemon[54401]: Killed
Jul 07 00:22:00 ns3081171 lxd.daemon[54401]: => LXD failed to start
Jul 07 00:22:00 ns3081171 systemd[1]: snap.lxd.daemon.service: Main process exited, code=exited, status=1/FAILURE
Jul 07 00:22:00 ns3081171 systemd[1]: snap.lxd.daemon.service: Failed with result ā€˜exit-codeā€™.

Please can you share the contents of /var/snap/lxd/common/lxd/database/ as a tarball via a private message to me. Thanks