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

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 an issue with the agent on Fedora and also fixes storage on ZFS.
From 597d0d86144d393b2c671a26764460f28fabcd71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Wed, 4 Mar 2020 22:17:59 +0100
Subject: [PATCH 1/2] lxd-agent: Load vhost module
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-agent/main_agent.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lxd-agent/main_agent.go b/lxd-agent/main_agent.go
index e5961ec694..3d959c7f33 100644
--- a/lxd-agent/main_agent.go
+++ b/lxd-agent/main_agent.go
@@ -15,6 +15,7 @@ import (
        "golang.org/x/sys/unix"
 
        "github.com/lxc/lxd/lxd/instance/instancetype"
+       "github.com/lxc/lxd/lxd/util"
        "github.com/lxc/lxd/lxd/vsock"
        "github.com/lxc/lxd/shared"
        "github.com/lxc/lxd/shared/logger"
@@ -98,6 +99,12 @@ func (c *cmdAgent) Run(cmd *cobra.Command, args []string) 
error {
        // Mount shares from host.
        c.mountHostShares()
 
+       // Load the kernel driver.
+       err = util.LoadModule("vsock")
+       if err != nil {
+               return errors.Wrap(err, "Unable to load the vsock kernel 
module")
+       }
+
        // Setup the listener.
        l, err := vsock.Listen(8443)
        if err != nil {

From 76aa1e268f9b899950caef01dede7733bbcd5110 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Wed, 4 Mar 2020 22:30:36 +0100
Subject: [PATCH 2/2] lxd/storage/zfs: Fix default VM size
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/storage/drivers/driver_zfs_volumes.go | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lxd/storage/drivers/driver_zfs_volumes.go 
b/lxd/storage/drivers/driver_zfs_volumes.go
index d31ff2447f..9b374521c6 100644
--- a/lxd/storage/drivers/driver_zfs_volumes.go
+++ b/lxd/storage/drivers/driver_zfs_volumes.go
@@ -762,8 +762,12 @@ func (d *zfs) GetVolumeUsage(vol Volume) (int64, error) {
 }
 
 func (d *zfs) SetVolumeQuota(vol Volume, size string, op 
*operations.Operation) error {
-       if size == "" {
-               size = "0"
+       if size == "" || size == "0" {
+               if vol.contentType == ContentTypeBlock {
+                       size = defaultBlockSize
+               } else {
+                       size = "0"
+               }
        }
 
        // Convert to bytes.
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to