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

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) ===

From 0726acde89727f2e4f605604f5e3c79032ead164 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Mon, 20 Feb 2017 16:29:10 -0500
Subject: [PATCH 1/2] config: Always use "simplestreams" for images:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

We switched to simplestreams by default as the protocol for the images
remote a while back, yet we're still seeing a majority of users use the
LXD protocol.

This will update existing user configuration to use the right protocol
for that remote and hopefully let us one day deprecate the LXD protocol
from images.linuxcontainers.org.

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 config.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/config.go b/config.go
index 9492740..7217648 100644
--- a/config.go
+++ b/config.go
@@ -111,6 +111,14 @@ func LoadConfig(path string) (*Config, error) {
                c.Remotes[k] = v
        }
 
+       // NOTE: Remove this once we only see a small fraction of 
non-simplestreams users
+       // Upgrade users to the "simplestreams" protocol
+       images, ok := c.Remotes["images"]
+       if ok && images.Protocol != ImagesRemote.Protocol && images.Addr == 
ImagesRemote.Addr {
+               c.Remotes["images"] = ImagesRemote
+               SaveConfig(&c, path)
+       }
+
        return &c, nil
 }
 

From ea2a056f0435e5a7cc3c7d30299b282d71f482c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Mon, 20 Feb 2017 22:01:15 -0500
Subject: [PATCH 2/2] lvm: Don't hide errors
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_lvm.go | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lxd/storage_lvm.go b/lxd/storage_lvm.go
index 4333f23..227494f 100644
--- a/lxd/storage_lvm.go
+++ b/lxd/storage_lvm.go
@@ -672,12 +672,19 @@ func (s *storageLvm) ContainerDelete(container container) 
error {
                snapshotMntPointSymlinkTarget := 
shared.VarPath("storage-pools", s.pool.Name, "snapshots", sourceName)
                snapshotMntPointSymlink := shared.VarPath("snapshots", 
sourceName)
                err = deleteSnapshotMountpoint(containerMntPoint, 
snapshotMntPointSymlinkTarget, snapshotMntPointSymlink)
+               if err != nil {
+                       return err
+               }
        } else {
                err = tryUnmount(containerMntPoint, 0)
+               if err != nil {
+                       return err
+               }
+
                err = deleteContainerMountpoint(containerMntPoint, 
container.Path(), s.GetStorageTypeName())
-       }
-       if err != nil {
-               return err
+               if err != nil {
+                       return err
+               }
        }
 
        return nil
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to