From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: XSA-180 follow-up: repurpose xenconsoled for logging
Date: Fri, 3 Jun 2016 18:38:39 +0100 [thread overview]
Message-ID: <5751C09F.6030706@citrix.com> (raw)
In-Reply-To: <20160601140014.GH5160@citrix.com>
On 01/06/16 15:00, Wei Liu wrote:
> Hi all
>
> During the discussion of XSA-180 Ian came up with the idea that we
> repurpose xenconsoled to handle logging. I've done some research (and
> some coding as well!).
>
> In my reply to George the other day:
>
>> I just read the code of virtlogd and xenconsoled.
>>
>> I think xenconsoled is missing at least things.
>>
>> From a higher level:
>>
>> 1. Abstraction of rotating file.
>> 2. Abstraction of client.
>> 3. IPC interface to libxl -- presumably we need to create a socket.
>>
> I've done #1 and port existing code to use that -- would be useful in
> general.
>
> #2 is not too hard because xenconsoled already has concept of a domain.
> I suspect some refactoring will be fine.
>
> #3 requires a bit more thinking. Virtlogd has an RPC interface -- I'm
> pretty sure we *don't* want that for xenconsoled. So I spent some time
> this morning and write up a draft for a xenstore based protocol. See
> below.
>
> Also there is an implication here: we put xenconsoled in a really
> critical path. If for some reason it doesn't work all guests are
> blocked. Do we really want to do this?
Sorry to be late to this thread, but I think all my Xen 4.7 tasks are
now done.
Architecturally, this is a bad idea, and -1 from me.
First of all, you are making the assumption that xenconsoled and all
qemus are in the same domain. This is not necessarily the case,
although I suppose that `xl console` does depend on xl and xenconsoled
being in the same domain.
At the moment, if xenconsoled crashes, the worst that happens is that
you cant interact with guest consoles, and the guests will notice that
their console rings aren't being drained. This is a safe, albeit
suboptimal, situation which allows guests to continue running unimpeeded.
If qemu is connected via xenconsoled, and xenconsoled crashes, qemu will
block. Once qemu blocks, the VM is for all intents and purposes, dead.
As you identify, there is a security implication here, where a guest
which can crash xenconsoled can also DoS all other HVM domains in the
system.
From the scalability side, XenServer supports running 1000 windows VMs
on a single host (subject to sufficient RAM), and xenstored is a big
monlithic single point of failure. We would like to avoid adding a second.
Managing logging is a hard problem. However, managing logging is a
system level problem, and needs to fall to the distro package maintainer
to integrate suitably with the distro's expectations, and to use
logrotation/other as applicable. Introducing custom, project-specific
configuration makes it harder to integrate sensibly, not easier.
I think the best solution here is to manage expectations, not to follow
the kneejerk reaction and hack up a solution.
If someone builds Xen from source and finds later that their disks are
full up with logs, then tough. If someone installs Xen from a distro,
they should reasonably expect logging, and log management, to be
consistent with other packages from the same distro.
Perhaps providing a default logrotate config file would make things
easier for distro packagers (after all, we provide default
sysvinit/systemd configuration files), and perhaps a written statement
of what gets logged where under which circumstances would make it easier
for people who don't use logrotate, but I think that we shouldn't go any
further than that.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-06-03 17:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 14:00 XSA-180 follow-up: repurpose xenconsoled for logging Wei Liu
2016-06-03 10:57 ` George Dunlap
2016-06-03 13:30 ` Wei Liu
2016-06-03 14:10 ` George Dunlap
2016-06-03 14:21 ` Wei Liu
2016-06-03 16:57 ` Ian Jackson
2016-06-06 15:56 ` Wei Liu
2016-06-03 17:38 ` Andrew Cooper [this message]
2016-06-06 10:12 ` George Dunlap
2016-06-06 13:03 ` Andrew Cooper
2016-06-06 15:48 ` Wei Liu
2016-06-07 9:57 ` George Dunlap
2016-06-07 10:18 ` Wei Liu
2016-06-06 20:47 ` Doug Goldstein
2016-06-07 11:43 ` Wei Liu
2016-06-21 14:46 ` Wei Liu
2016-06-21 15:10 ` Juergen Gross
2016-06-21 15:23 ` Ian Jackson
2016-06-21 15:11 ` Ian Jackson
2016-06-21 15:53 ` George Dunlap
2016-06-21 16:04 ` Ian Jackson
2016-06-21 16:17 ` George Dunlap
2016-06-22 0:58 ` Jim Fehlig
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=5751C09F.6030706@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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).