4.21 can't start containers mapping /tmp/.X11-unix/X0

snap just updated lxd to 4.21 and lxc start responds with:
Error: Failed to start device “X0”: Failed opening source path “/var/lib/snapd/hostfs/tmp/.X11-unix/X0”: open /var/lib/snapd/hostfs/tmp/.X11-unix/X0: no such device or address

The device X0 is defined in the container’s profile like so:

X0:
path: /tmp/.X11-unix/X0
source: /tmp/.X11-unix/X0
type: disk

Other containers without this mapping start w/out issues.

1 Like

We’ve merged a fix for that this morning and it will be rolling out to folks shortly.

thanks so much. You guys never sleep.

1 Like

I forgot to mention that I did try reverting the snap back to 4.20 when things worked, but after doing so ‘lxc list’ returned:

Error: Get “http://unix.socket/1.0”: read unix @->/var/snap/lxd/common/lxd/unix.socket: read: connection reset by peer

You cant revert back because there are DB schema changes.

Ah. OK. shouldn’t the version be bumped to 5.x then? Thanks again for the quick fix.

No. Only the LTS (4.0.x) releases can always be downgraded and have the commitment of no schema changes, the 4.x series are feature releases and are only supported until the next feature release (approximately monthly), and may have schema changes that prevent downgrades.

See Managing the LXD snap

Seeing the same issue, looking forward to the fix.

Its been merged and cherry picked so should be in the edge snap channel soon.