The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6534
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) === This fixes handling of an RBAC server not being online during startup, especially hits when running RBAC in a LXD container.
From 8381471efe0c6878968e8391de7d406624f20cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Sun, 1 Dec 2019 23:52:06 -0500 Subject: [PATCH 1/2] lxd/seccomp: Fix golint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/seccomp/seccomp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/seccomp/seccomp.go b/lxd/seccomp/seccomp.go index 28ff87a1bc..b9695b792a 100644 --- a/lxd/seccomp/seccomp.go +++ b/lxd/seccomp/seccomp.go @@ -1216,7 +1216,7 @@ var mountFlagsToOptMap = map[C.ulong]string{ } func mountFlagsToOpts(flags C.ulong) string { - var currentBit C.ulong = 0 + var currentBit C.ulong opts := "" var msRec C.ulong = (flags & C.MS_REC) From c14d02abe3565fc41f82cd04920d3f5f6fee06be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Mon, 2 Dec 2019 00:15:56 -0500 Subject: [PATCH 2/2] lxd/daemon: Don't block on RBAC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/daemon.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lxd/daemon.go b/lxd/daemon.go index a1d09b2b24..0e58df8b5d 100644 --- a/lxd/daemon.go +++ b/lxd/daemon.go @@ -1253,11 +1253,18 @@ func (d *Daemon) setupRBACServer(rbacURL string, rbacKey string, rbacExpiry int6 return result, err } - // Perform full sync - err = server.SyncProjects() - if err != nil { - return err - } + // Perform full sync when online + go func() { + for { + err = server.SyncProjects() + if err != nil { + time.Sleep(time.Minute) + continue + } + + break + } + }() server.StartStatusCheck()
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel