The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6412
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) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From d19d1a052cd9e48c66249f5df200d0f1635fbcdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Wed, 6 Nov 2019 15:43:50 -0500 Subject: [PATCH] lxd/storage: Switch Mount to new logic 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.go | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/lxd/storage.go b/lxd/storage.go index 6a3aa7cf7d..7b50d49119 100644 --- a/lxd/storage.go +++ b/lxd/storage.go @@ -772,17 +772,30 @@ func SetupStorageDriver(s *state.State, forceCheck bool) error { } - for _, pool := range pools { - logger.Debugf("Initializing and checking storage pool \"%s\"", pool) - s, err := storagePoolInit(s, pool) - if err != nil { - logger.Errorf("Error initializing storage pool \"%s\": %s, correct functionality of the storage pool cannot be guaranteed", pool, err) - continue - } + for _, poolName := range pools { + logger.Debugf("Initializing and checking storage pool \"%s\"", poolName) - err = s.StoragePoolCheck() - if err != nil { - return err + pool, err := storagePools.GetPoolByName(s, poolName) + if err != storageDrivers.ErrUnknownDriver { + if err != nil { + return err + } + + _, err = pool.Mount() + if err != nil { + return err + } + } else { + s, err := storagePoolInit(s, poolName) + if err != nil { + logger.Errorf("Error initializing storage pool \"%s\": %s, correct functionality of the storage pool cannot be guaranteed", pool, err) + continue + } + + err = s.StoragePoolCheck() + if err != nil { + return err + } } }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel