juju assumes lxd always available on machine nodes

Bug #1986877 reported by Ian Booth
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Joseph Phillips

Bug Description

When the machine agent starts up, it records in state the supported containers (lxd, kvm). This is used by the container broker worker to determine if the lxd infrastructure should be initialised.

It seems we are hard coding that lxd is always supported

supportsContainers := container.ContainersSupported()
if supportsContainers {
  supportedContainers = append(supportedContainers, instance.LXD)
}

^^^ ContainersSupported() is true for vm machines.

This we always attempt to start the LXD broker. But if LXD is not installed, we get an error

ERROR juju.worker.dependency engine.go:693 "broker-tracker" manifold worker returned unexpected error: cannot create instance broker: creating LXD container manager: Get "http://unix.socket/1.0": dial unix /var/lib/lxd/unix.socket: connect: no such file or directory

Over and over again in the logs. Not sure without looking deeper if this bounces the whole agent or not. But if it does, it would disrupt everything.

See bug 1984060. There's symptoms of leadership claims erroring out - maybe the agent bounce leads to leadership churn which can't keep up. Needs investigation.

We should not claim lxd support for a machine unless lxd is installed.

Changed in juju:
status: Triaged → In Progress
assignee: nobody → Joseph Phillips (manadart)
Changed in juju:
status: In Progress → Incomplete
Revision history for this message
Joseph Phillips (manadart) wrote :

I believe this should be fixed with:
https://bugs.launchpad.net/juju/+bug/1934176

If you look at:
https://github.com/juju/juju/pull/14381

You see that the error annotation no longer exists.

There will however be problems if someone attempts to provision a LXD container on such a host, as HasSupport will still return true. I will look into this part.

Changed in juju:
status: Incomplete → In Progress
Revision history for this message
Joseph Phillips (manadart) wrote :
Revision history for this message
Haw Loeung (hloeung) wrote :

I think you mean https://github.com/juju/juju/pull/14484 rather than linking to this bug itself ;)

Revision history for this message
Joseph Phillips (manadart) wrote :

Indeed. Thanks.

Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.