Containerized syslog
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Jean-Philippe Menil
Hi,
I'm playing with containers under debian (squeeze, 2.6.33.3) with the lxc tools.
I'm really happy about all the features (attach veth on bridge, filter with iptables inside the containers, etc ...), and i was thinking to replace some of our vservers (and maybe some of our kvm) with this solution.But actually, i experiment a problem with the iptables logs:
i've iptables on the host to filter some container, basically a squid proxy. I've another container who act as router, and he has his own iptables inside.
All the log are deported to a dedicated syslog server.
It appear that, the iptables log of the host are also deported by the syslog container (proxy).
Quoted 8 lines
Some of our guest (container, vserver, etc ) are administer by other sys-admin, that should not have access to theses informations.
This point is blocking me today, before going into production with containers.
I've seen some patch made by Jean-Marc Pigeon about this problem, but they have not been commited.
I thing a consensus was not reach. The big deal with syslog is netfilter logs in an interrupt context where it is difficult to find the right log buffer ring as we are not in the process context making possible to identify the namespace.
IMHO, there are two parts to implement, (1) multiple instances of /dev/log with a new ring buffer each time attached to the file and (2) add an iptables rules to specify the file to log. This approach allows to get rid of namespace (in all the cases the clone flags are exhausted now), and provides a generic mechanism for other use cases (eg. separate logs for iptables) different from a container specific problem.
This is from a kernel POV, but from the userspace POV, that will means the iptables rules in the vps configuration files should be modified, I don't know if it's acceptable.
Quoted 2 lines
Is there any reason for that?
Can someone advice me to circumvent this problem?
I don't know a workaround for this problem.
Thanks
-- Daniel
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 27 lines · Daniel Lezcano
Quoted 17 lines · Jean-Philippe Menil
Hi,
I'm playing with containers under debian (squeeze, 2.6.33.3) with the lxc tools.
I'm really happy about all the features (attach veth on bridge, filter with iptables inside the containers, etc ...), and i was thinking to replace some of our vservers (and maybe some of our kvm) with this solution.But actually, i experiment a problem with the iptables logs:
i've iptables on the host to filter some container, basically a squid proxy. I've another container who act as router, and he has his own iptables inside.
All the log are deported to a dedicated syslog server.
It appear that, the iptables log of the host are also deported by the syslog container (proxy).Quoted 8 lines
Some of our guest (container, vserver, etc ) are administer by other sys-admin, that should not have access to theses informations.
This point is blocking me today, before going into production with containers.
I've seen some patch made by Jean-Marc Pigeon about this problem, but they have not been commited.
Quoted 7 lines
I thing a consensus was not reach. The big deal with syslog is netfilter logs in an interrupt context where it is difficult to find the right log buffer ring as we are not in the process context making possible to identify the namespace.
IMHO, there are two parts to implement, (1) multiple instances of
/dev/logwith a new ring buffer each time attached to the file and
Just for reference, here are some archived mailing list threads on the subject of containerized syslog:
http://www.mail-archive.com/[email protected]/msg20104.html http://thread.gmane.org/gmane.linux.kernel.containers/16526
Quoted 5 lines
(2)
add an iptables rules to specify the file to log. This approach allows to get rid of namespace (in all the cases the clone flags are exhausted now), and provides a generic mechanism for other use cases (eg. separate logs for iptables) different from a container specific problem.
(3) Security implications.
Depending on how the syslog is split off, whether the host expects to be "Cc'd", etc. there could be some security implications. More importantly, the syslog control syscalls need to be modified to at least prevent containers from changing syslog policy of the host. Serge could probably explain this much better than I can (cc'd). Here's a thread on the subject:
http://lwn.net/Articles/378472/
Cheers,
-Matt Helsley
A message that is not in the archive (sent off-list or not yet received): 20100513212139.GT31830-52DBMbEzqgQ/wnmkkaCWp/[email protected]
Quoted 50 lines · Matt Helsley
Quoted 27 lines · Daniel Lezcano
Quoted 17 lines · Jean-Philippe Menil
Hi,
I'm playing with containers under debian (squeeze, 2.6.33.3) with the lxc tools.
I'm really happy about all the features (attach veth on bridge, filter with iptables inside the containers, etc ...), and i was thinking to replace some of our vservers (and maybe some of our kvm) with this solution.But actually, i experiment a problem with the iptables logs:
i've iptables on the host to filter some container, basically a squid proxy. I've another container who act as router, and he has his own iptables inside.
All the log are deported to a dedicated syslog server.
It appear that, the iptables log of the host are also deported by the syslog container (proxy).Quoted 8 lines
Some of our guest (container, vserver, etc ) are administer by other sys-admin, that should not have access to theses informations.
This point is blocking me today, before going into production with containers.
I've seen some patch made by Jean-Marc Pigeon about this problem, but they have not been commited.
Quoted 7 lines
I thing a consensus was not reach. The big deal with syslog is netfilter logs in an interrupt context where it is difficult to find the right log buffer ring as we are not in the process context making possible to identify the namespace.
IMHO, there are two parts to implement, (1) multiple instances of
/dev/logwith a new ring buffer each time attached to the file andJust for reference, here are some archived mailing list threads on the subject of containerized syslog:
http://www.mail-archive.com/[email protected]/msg20104.html http://thread.gmane.org/gmane.linux.kernel.containers/16526Quoted 5 lines
(2)
add an iptables rules to specify the file to log. This approach allows to get rid of namespace (in all the cases the clone flags are exhausted now), and provides a generic mechanism for other use cases (eg. separate logs for iptables) different from a container specific problem.(3) Security implications.
Quoted 8 lines
Depending on how the syslog is split off, whether the host expects to be "Cc'd", etc. there could be some security implications. More importantly, the syslog control syscalls need to be modified to at least prevent containers from changing syslog policy of the host. Serge could probably explain this much better than I can (cc'd). Here's a thread on the subject:
Yes, i think that's the first step. Then, as Oren and Matt were discussing on irc, we can talk about a userspace daemon on the host forwarding either syslog or audit msgs to containers as appropriate. This leaves that policy chunk in userspace, but we'd still have to decide on a way to mark messages (which is why audit would be easier). First question then is how do we identify a container? With pidns we can point to a definitive global pid for the container init task. For netns, no such thing.
-serge
Quoted 4 lines · Daniel Lezcano
I thing a consensus was not reach. The big deal with syslog is netfilter logs in an interrupt context where it is difficult to find the right log buffer ring as we are not in the process context making possible to identify the namespace.
That's one of the BIG problems in the Linux kernel, we've recently stumbled with in another project (artificial disk bw limits):
far too much happening within interrupt context.
Interrupts were originally as _short time_ step-ins for time critical signaling. What's happening here is an abuse of that concept, w/ really bad implications (eg. arbitrary users can create loads to bring down the whole system on extreme load). A clean and more robust solution IMHO could be that the interrupt handler only loads the received l1 frames and enqueue them for an kernel thread (or multiple ones) - an containerized setup then would have separate queues and kthreads on per-container basis.
cu
Signature · 8 lines
--------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ ---------------------------------------------------------------------