The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7112

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Was seeing errors like this on ubuntu 18.04 VMs:

```
[    3.304595] systemd[1]: cloud-init-local.service: Found ordering cycle on lxd-agent.service/start
[    3.305700] systemd[1]: cloud-init-local.service: Found dependency on sysinit.target/start
[    3.306768] systemd[1]: cloud-init-local.service: Found dependency on cloud-init.service/start
[    3.307790] systemd[1]: cloud-init-local.service: Found dependency on systemd-networkd-wait-online.service/start
[ SKIP ] Ordering cycle found, skipping LXD - agent
```

This seems to fix it.
From 582d8c8efec4640c7ba53a3b107ac4faf8e0080b Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Tue, 31 Mar 2020 10:23:36 +0100
Subject: [PATCH 1/2] lxd/instance/drivers/driver/qemu: Restart on failure

Matches commit 
https://github.com/lxc/distrobuilder/commit/84b7e319add95e32123fc46b032eb8004c6312a0

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/instance/drivers/driver_qemu.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lxd/instance/drivers/driver_qemu.go 
b/lxd/instance/drivers/driver_qemu.go
index 506e71a0a0..00fe74fbd4 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -1277,6 +1277,10 @@ Before=cloud-init.target cloud-init.service 
cloud-init-local.service
 Type=simple
 WorkingDirectory=/run/lxd_config/9p
 ExecStart=/run/lxd_config/9p/lxd-agent
+Restart=on-failure
+RestartSec=5s
+StartLimitInterval=60
+StartLimitBurst=10
 
 [Install]
 WantedBy=multi-user.target

From 8069b457174848e55e39b893bf090d0567859782 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Tue, 31 Mar 2020 13:25:52 +0100
Subject: [PATCH 2/2] lxd/instance/drivers/driver/qemu: Fixes dependencies for
 lxd-agent

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/instance/drivers/driver_qemu.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lxd/instance/drivers/driver_qemu.go 
b/lxd/instance/drivers/driver_qemu.go
index 00fe74fbd4..eada48e064 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -1272,6 +1272,7 @@ 
ConditionPathExists=/dev/virtio-ports/org.linuxcontainers.lxd
 Requires=lxd-agent-9p.service
 After=lxd-agent-9p.service
 Before=cloud-init.target cloud-init.service cloud-init-local.service
+DefaultDependencies=no
 
 [Service]
 Type=simple
@@ -1295,6 +1296,8 @@ WantedBy=multi-user.target
 Description=LXD - agent - 9p mount
 Documentation=https://linuxcontainers.org/lxd
 ConditionPathExists=/dev/virtio-ports/org.linuxcontainers.lxd
+Before=systemd-remount-fs.service
+DefaultDependencies=no
 
 [Service]
 Type=oneshot
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to