The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7633
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) === As we consume lxd/rsync from lxc-to-lxd and lxd-p2c, trying to keep dependency chain small. Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 0776b35fde2094a5bd1d3b5d9390811eae260566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Wed, 8 Jul 2020 10:41:39 -0400 Subject: [PATCH] lxd/rsync: Untangle from daemon package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As we consume lxd/rsync from lxc-to-lxd and lxd-p2c, trying to keep dependency chain small. Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/main.go | 2 ++ lxd/rsync/rsync.go | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lxd/main.go b/lxd/main.go index 83a3260ea8..f8c3f83dba 100644 --- a/lxd/main.go +++ b/lxd/main.go @@ -12,6 +12,7 @@ import ( "github.com/lxc/lxd/lxd/events" "github.com/lxc/lxd/lxd/operations" "github.com/lxc/lxd/lxd/response" + "github.com/lxc/lxd/lxd/rsync" "github.com/lxc/lxd/shared/logger" "github.com/lxc/lxd/shared/logging" "github.com/lxc/lxd/shared/version" @@ -48,6 +49,7 @@ func (c *cmdGlobal) Run(cmd *cobra.Command, args []string) error { // Set logging global variables daemon.Debug = c.flagLogDebug + rsync.Debug = c.flagLogDebug daemon.Verbose = c.flagLogVerbose // Set debug for the operations package diff --git a/lxd/rsync/rsync.go b/lxd/rsync/rsync.go index 7a7f1a118b..db22f123ef 100644 --- a/lxd/rsync/rsync.go +++ b/lxd/rsync/rsync.go @@ -12,13 +12,15 @@ import ( "github.com/pborman/uuid" - "github.com/lxc/lxd/lxd/daemon" "github.com/lxc/lxd/shared" "github.com/lxc/lxd/shared/ioprogress" "github.com/lxc/lxd/shared/logger" "github.com/lxc/lxd/shared/version" ) +// Debug controls additional debugging in rsync output. +var Debug bool + // LocalCopy copies a directory using rsync (with the --devices option). func LocalCopy(source string, dest string, bwlimit string, xattrs bool, rsyncArgs ...string) (string, error) { err := os.MkdirAll(dest, 0755) @@ -27,7 +29,7 @@ func LocalCopy(source string, dest string, bwlimit string, xattrs bool, rsyncArg } rsyncVerbosity := "-q" - if daemon.Debug { + if Debug { rsyncVerbosity = "-vi" }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel