The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6338
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 7042072addf27a31573f9d536ea09104ea876ef7 Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Tue, 22 Oct 2019 14:22:07 +0100 Subject: [PATCH 1/2] db storage pools Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- lxd/db/storage_pools.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/db/storage_pools.go b/lxd/db/storage_pools.go index ade8291d1c..b2995b23e0 100644 --- a/lxd/db/storage_pools.go +++ b/lxd/db/storage_pools.go @@ -776,7 +776,7 @@ SELECT storage_volumes.name // StoragePoolVolumeSnapshotsGetType get all snapshots of a storage volume // attached to a given storage pool of a given volume type, on the given node. -// Returns snapshots slice ordered by volume ID (i.e effectively the order they were created). +// Returns snapshots slice ordered by when they were created, oldest first. func (c *Cluster) StoragePoolVolumeSnapshotsGetType(volumeName string, volumeType int, poolID int64) ([]StorageVolumeArgs, error) { result := []StorageVolumeArgs{} regexp := volumeName + shared.SnapshotDelimiter From da12d0c10d92b12d95a52f31c860e1d11a2ef1d9 Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Tue, 22 Oct 2019 14:22:16 +0100 Subject: [PATCH 2/2] tests: Fixes zfs snapshot restore bug in tests LXD was returning snapshots not in oldest-first order in some cases, and the tests were written to expect that bug. Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- test/suites/storage_snapshots.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/suites/storage_snapshots.sh b/test/suites/storage_snapshots.sh index 37ea40c9b0..e3ea5149a2 100644 --- a/test/suites/storage_snapshots.sh +++ b/test/suites/storage_snapshots.sh @@ -53,11 +53,11 @@ test_storage_volume_snapshots() { ! lxc storage volume restore "${storage_pool}" "${storage_volume}" snap0 || false lxc stop -f c1 - lxc storage volume restore "${storage_pool}" "${storage_volume}" snap0 + lxc storage volume restore "${storage_pool}" "${storage_volume}" foo lxc start c1 lxc storage volume detach "${storage_pool}" "${storage_volume}" c1 - lxc storage volume restore "${storage_pool}" "${storage_volume}" snap0 + lxc storage volume restore "${storage_pool}" "${storage_volume}" foo lxc storage volume attach "${storage_pool}" "${storage_volume}" c1 /mnt # Validate file
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel