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

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) ===
For those few distros that use a symlink instead of the real thing.

Closes #8185

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 4ae8fa38c7bdca69b80662e97ca199de38324bf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Tue, 24 Nov 2020 21:47:54 -0500
Subject: [PATCH] lxd/instance/qemu: Follow symlink to lxd-agent
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

For those few distros that use a symlink instead of the real thing.

Closes #8185

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/instance/drivers/driver_qemu.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lxd/instance/drivers/driver_qemu.go 
b/lxd/instance/drivers/driver_qemu.go
index 68cd144666..e0b1378f4a 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -1330,6 +1330,11 @@ func (d *qemu) generateConfigShare() error {
                logger.Warnf("lxd-agent not found, skipping its inclusion in 
the VM config drive: %v", err)
        } else {
                // Install agent into config drive dir if found.
+               path, err = filepath.EvalSymlinks(path)
+               if err != nil {
+                       return err
+               }
+
                err = shared.FileCopy(path, filepath.Join(configDrivePath, 
"lxd-agent"))
                if err != nil {
                        return err
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to