The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5869
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) === A couple of fixes I got while working on the CEPHFS backend.
From 76b7db6e38ee3dbc114ded2ce8d5170e7e4cd5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Fri, 21 Jun 2019 19:10:05 -0400 Subject: [PATCH 1/2] lxd/storage/dir: Fix quotas on dir 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_dir.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lxd/storage_dir.go b/lxd/storage_dir.go index 9763f6395d..818ad9e479 100644 --- a/lxd/storage_dir.go +++ b/lxd/storage_dir.go @@ -448,6 +448,24 @@ func (s *storageDir) StoragePoolVolumeUpdate(writable *api.StorageVolumePut, cha return updateStoragePoolVolumeError(unchangeable, "dir") } + if shared.StringInSlice("size", changedConfig) { + if s.volume.Type != storagePoolVolumeTypeNameCustom { + return updateStoragePoolVolumeError([]string{"size"}, "dir") + } + + if s.volume.Config["size"] != writable.Config["size"] { + size, err := shared.ParseByteSizeString(writable.Config["size"]) + if err != nil { + return err + } + + err = s.StorageEntitySetQuota(storagePoolVolumeTypeCustom, size, nil) + if err != nil { + return err + } + } + } + logger.Infof(`Updated DIR storage volume "%s"`, s.volume.Name) return nil } From e244b6eba7d0e9c7ecaafdacba4556e06ae65a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Fri, 21 Jun 2019 23:09:30 -0400 Subject: [PATCH 2/2] lxd/rsync: Filter out ceph xattrs 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/rsync.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lxd/rsync.go b/lxd/rsync.go index e4af344557..87f2ccaa94 100644 --- a/lxd/rsync.go +++ b/lxd/rsync.go @@ -42,6 +42,8 @@ func rsyncLocalCopy(source string, dest string, bwlimit string) (string, error) "--checksum", "--numeric-ids", "--xattrs", + "--filter=-x system.*", + "--filter=-x ceph.*", "--bwlimit", bwlimit, rsyncVerbosity, shared.AddSlash(source), @@ -280,6 +282,8 @@ func rsyncFeatureArgs(features []string) []string { args := []string{} if shared.StringInSlice("xattrs", features) { args = append(args, "--xattrs") + args = append(args, "--filter=-x system.*") + args = append(args, "--filter=-x ceph.*") } if shared.StringInSlice("delete", features) {
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel