All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: Kurt Garloff <garloff@suse.de>,
	xen-devel <xen-devel@lists.sourceforge.net>,
	ian.pratt@cl.cam.ac.uk
Subject: Re: [PATCH] xen-2.0: privileged port connections
Date: Wed, 23 Mar 2005 13:27:16 -0600	[thread overview]
Message-ID: <4241C314.4030902@us.ibm.com> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3822@liverpoolst.ad.cl.cam.ac.uk>

Ian Pratt wrote:

>There are a couple of other issues that we should consider at the same
>time. I've heard a couple of users complain that they find our model of
>exporting serial consoles confusing: when they quit a console session
>and reconnect they find that they are still logged in. Worse, if they
>were running vi when they quit the session they get very confused when
>connecting back in. I guess if you're not used to a serial console then
>you would find the behaviour confusing. Should we be doing some more
>complex terminal emulation?
>  
>
Perhaps we could export the console via a pty and then create a screen 
session by executing the equivalent of "screen vm-console domid".

Clients can then connect to it by executing screen -x (instead of 
connecting directly to the pty) and our client could translate C-] to 
C-a C-d to detach from the screen.  Any reconnects will perserve the 
screen of the previous session.

This way, we can still have minimalistic toolchains that provide serial 
style consoles.

>The other issue we need to consider is VM migration. Ideally, it should
>be completely transparent to someone with a console connection open
>(just like it is to someone with an ssh connection open). There are two
>ways to do this, either have a console server machine for all the nodes
>in a cluster, or hide the disconnect/reconnect in the client terminal
>program. If we are using a 'standard' program on the client side (e.g.
>ssh in an xterm), then the former is preferable. If for some reason we
>choose to use a custom program (e.g. son-of-xencons) then we could
>reasonably hide the relocation.
>  
>
One solution would be to do console-forwarding underneath the pty.

If you're migrating from system A to system B and you are using ptys, 
your daemon that's exposing the pty on A simply connects to system B via 
TCP and forwards any data from system B's pty to system A's pty.  This 
forwarding chains nicely (albiet naively) if the vm hops across multiple 
machines in a cluster without closing a console.  You could also be 
smarter and have system B signal system A to reconnect to system C if 
the vm is migrated from system B to system C.

Of course, the naive chaining allows your hopping to cross networks such 
that if system A and B are on one network, and B and C are on a 
different network, it all still works.

A cluster-aware toolchain could forward any new console requests 
directly to system B and the forwarded console would disappear once any 
clients still connected to A disconnect.

This is just one idea.  There may be a better way.

Regards,
Anthony Liguori

>I'd like to see a decent discussion of how best to do consoles before
>changing the status quo. 
>
>Thanks,
>Ian 
>
>
> 
>
>  
>



-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click

  reply	other threads:[~2005-03-23 19:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23 18:51 [PATCH] xen-2.0: privileged port connections Ian Pratt
2005-03-23 19:27 ` Anthony Liguori [this message]
2005-03-23 21:37   ` Christian Limpach
2005-03-23 23:58     ` Kurt Garloff
2005-03-23 21:39 ` Kurt Garloff
  -- strict thread matches above, loose matches on Subject: below --
2005-03-23 17:43 Ian Pratt
2005-03-23 17:59 ` Ryan Harper
2005-03-24 19:06 ` Tommi Virtanen
2005-03-24 19:56   ` Anthony Liguori
2005-03-23 12:36 Kurt Garloff
2005-03-23 15:41 ` Anthony Liguori
2005-03-23 16:57   ` Kurt Garloff
2005-03-23 17:03     ` Anthony Liguori
2005-03-23 17:23       ` Kurt Garloff
2005-03-23 17:45         ` Anthony Liguori
2005-03-23 18:06         ` Rik van Riel
2005-03-23 17:36     ` Nivedita Singhvi
2005-03-24  7:31 ` David Hopwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4241C314.4030902@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=garloff@suse.de \
    --cc=ian.pratt@cl.cam.ac.uk \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.