From: Gerd Hoffmann <kraxel@redhat.com>
To: minyard@acm.org
Cc: Huangweidong <weidong.huang@huawei.com>,
mst@redhat.com, qemu-devel@nongnu.org, bcketchum@gmail.com,
arei.gonglei@huawei.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH] qemu-char: Allow a chardev to reconnect if disconnected
Date: Fri, 11 Apr 2014 09:08:03 +0200 [thread overview]
Message-ID: <1397200083.22291.14.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <5346B123.3070606@acm.org>
Hi,
> > This patch is modified according to corey's patch. Some changes below:
> > 1. IMO it's unnecessary that chardev reconnect if it fails to connect at startup.
> > Qemu exit in this scene. In this way the patch does not change interface of chardev.
> > It would be much more simple.
>
> I believe that it should not stop qemu if it fails at startup.
> Otherwise you constrain the start order and you can prevent a server
> from coming up because of a missing resource that may not be that
> critical at the moment.
With reconnect being implemented (and active, guess we should add a
option for it) it we might rethink this indeed.
> With the current implementation, client sockets
> really aren't that useful for a critical system. Reconnecting makes it
> usable in a critical system.
I consider client sockets not very useful at all, I always put my
sockets into server mode. YMMV though.
> > 2. I set the reconnect timer one second, just like pty.
>
> I'm not too picky about the time. A couple of things about this:
Well, sockets and pty are different. pty is a local thing. sockets (at
least tcp) goes out to the network. After each failed reconnect the
time to retry should be increased a bit so you don't flood the
non-responding server with connect requests.
> With this patch, the default behavior changes to reconnect. That might
> cause issues for some users. Adding a configurable timeout is easy if
> you have to specify something on the command line, that's why I did it.
Specifying the timeout (best with min+max) could enable reconnect at the
same time, i.e. something like
-chardev socket,host=1.2.3.4,port=5678,reconnect=1-300
would turn on reconnect, with 1 second min and 300 seconds (5min) max
delay.
cheers,
Gerd
prev parent reply other threads:[~2014-04-11 7:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 11:43 [Qemu-devel] [PATCH] qemu-char: Allow a chardev to reconnect if disconnected arei.gonglei
2014-04-10 14:56 ` Corey Minyard
2014-04-11 7:08 ` Gerd Hoffmann [this message]
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=1397200083.22291.14.camel@nilsson.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=afaerber@suse.de \
--cc=arei.gonglei@huawei.com \
--cc=bcketchum@gmail.com \
--cc=minyard@acm.org \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=weidong.huang@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).