From: Ian Campbell Subject: Re: [PATCH 3/5] xl: migration: pass -t to xl migrate-receive Date: Tue, 18 Mar 2014 17:33:04 +0000 Message-ID: <1395163984.11824.48.camel@kazak.uk.xensource.com> References: <1395072199-326-1-git-send-email-ian.jackson@eu.citrix.com> <1395072199-326-4-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1395072199-326-4-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Olaf Hering , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, 2014-03-17 at 16:03 +0000, Ian Jackson wrote: > If we ourselves are using cr-based overwriting for logging to stderr, > pass -t to the migration receiver so that it knows to do the same > (since its stderr is normally the pipe from sshd). > > This requires, of course, that the receiver support that option. This > is OK from a compatibility point of view because we support migration > to newer, but not necessarily to older, versions. (If unsupported > backwards migration is still desired the use of -s "" allows the > remote invocation rune to be overridden by a command of one's choice.) > > This fixes a regression introduced in 2f80ac9c0e8f, where migration > messages from the receiver would not use of the overwriting protocol. Ah, here's the motivation for the series! > > CC: Olaf Hering Acked-by: Ian Campbell Is there any desire to have an opposite to -t? > Signed-off-by: Ian Jackson > --- > tools/libxl/xl_cmdimpl.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 6b1ebfa..d52b933 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -4110,11 +4110,14 @@ int main_migrate(int argc, char **argv) > domid = find_domain(argv[optind]); > host = argv[optind + 1]; > > + bool pass_tty_arg = progress_use_cr || (isatty(2) > 0); > + > if (!ssh_command[0]) { > rune= host; > } else { > - if (asprintf(&rune, "exec %s %s xl migrate-receive%s%s", > + if (asprintf(&rune, "exec %s %s xl%s migrate-receive%s%s", > ssh_command, host, > + pass_tty_arg ? " -t" : "", > daemonize ? "" : " -e", > debug ? " -d" : "") < 0) > return 1;