Re: [Vserver] Samba and Vserver Best Practices

2006-02-04 Thread Grzegorz Nosek
2006/2/3, Michael S. Zick <[EMAIL PROTECTED]>:
> > I've thought about using named pipes that will automatically spit out
> > log files into multiple places, but I haven't taken the time yet to
> > persue this.
> >
> You mean like: /dev/log (syslog socket)?
>
> >
> > I envision a daemon process that watches the named pipe and (in my
> > case) spit out a full log file, like normal, then grab "interesting"
> > log entries and spit them out as separate files into a share that can
> > be accessed elsewhere.
> >
> Perhaps name the daemon syslogd?
> Try: man syslogd
>
> You can specify selected information to be remotely logged.
>
> That is the 'common' syslogd on Linux systems, if using one of the
> alternatives, remote logging might not be supported.
>
>

Have a look at syslog-ng

http://www.balabit.com/products/syslog_ng/

It's like a swiss-army knife for logging. It can listen for messages
on various socket types (unix stream/dgram, udp, tcp), filter and
route them to different outputs (files, sockets).

You might e.g. set up syslog-ng on the guests to listen on /dev/log
(for syslog compatibility) and send the messages via udp to some
designated server (also vanilla syslog or syslog-ng), which then
places the logs in the right files (e.g. based on the source host
name, contents, etc.).

As for the original question of where to put the samba server, I'd put
it in the guest. My policy regarding host--guests interaction is that
it should only happen via vserver exec (i.e. no messing in /vservers/
from the host unless it's really needed). It comes with some overhead
but having managed some chroot() based mess (where nobody can tell
what process is creating file x or how do chrooted and non-chrooted
tasks interact), I'm opting for maximum isolation.

HTH,
 Grzegorz Nosek
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Samba and Vserver Best Practices

2006-02-03 Thread Michael S. Zick
On Fri February 3 2006 12:49, Matt Nuzum wrote:
> On 2/3/06, Charles Baker <[EMAIL PROTECTED]> wrote:
> > I'm setting up a host server and several vservers that developers in my
> > organization will use to test bug fixes of our software. They will
> > occasionally need access to certain directories on the vservers to check
> > logs, etc.
> >
> > For convenience sake samba shares to the needed directories would be the
> > thing to have. Is the best practice to set up samba on the host server
> > and share directories within the /vservers/$SERVERNAME/path/to/log/dir
> > or set up samba w/in the vserver itself and share it that way?
> 
> I've pondered this question myself and haven't come to a definite
> conclusion. I've had some problems with locking, although that was an
> older version of Samba and I here the problem I had has been resolved.
> 
> No matter what I try, I keep coming back to SSH and tail -f and some
> other custom tools I've written.
> 
> I've thought about using named pipes that will automatically spit out
> log files into multiple places, but I haven't taken the time yet to
> persue this.
>
You mean like: /dev/log (syslog socket)?

> 
> I envision a daemon process that watches the named pipe and (in my
> case) spit out a full log file, like normal, then grab "interesting"
> log entries and spit them out as separate files into a share that can
> be accessed elsewhere. 
>
Perhaps name the daemon syslogd?
Try: man syslogd

You can specify selected information to be remotely logged.

That is the 'common' syslogd on Linux systems, if using one of the
alternatives, remote logging might not be supported.


Mike

> For me, debugging log files containe snippets 
> of XML and SQL and it would be nice if those XML snippets are saved
> out as *.xml files so that they open in XML spy with just a double
> click and the sql is saved as *.sql files.
> 
> The only doubt I have about this working is the challenge of keeping
> the daemon running. I realize this problem has probably been solved,
> but I still wonder how it will work in a named pipe scenario.
> 
> Just food for thought and mindless rambling...
> 
> --
> Matthew Nuzum <[EMAIL PROTECTED]>
> www.followers.net - Makers of "Elite Content Management System"
> View samples of Elite CMS in action by visiting
> http://www.followers.net/portfolio/
> ___
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
> 
> 
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Samba and Vserver Best Practices

2006-02-03 Thread Matt Nuzum
On 2/3/06, Charles Baker <[EMAIL PROTECTED]> wrote:
> I'm setting up a host server and several vservers that developers in my
> organization will use to test bug fixes of our software. They will
> occasionally need access to certain directories on the vservers to check
> logs, etc.
>
> For convenience sake samba shares to the needed directories would be the
> thing to have. Is the best practice to set up samba on the host server
> and share directories within the /vservers/$SERVERNAME/path/to/log/dir
> or set up samba w/in the vserver itself and share it that way?

I've pondered this question myself and haven't come to a definite
conclusion. I've had some problems with locking, although that was an
older version of Samba and I here the problem I had has been resolved.

No matter what I try, I keep coming back to SSH and tail -f and some
other custom tools I've written.

I've thought about using named pipes that will automatically spit out
log files into multiple places, but I haven't taken the time yet to
persue this.

I envision a daemon process that watches the named pipe and (in my
case) spit out a full log file, like normal, then grab "interesting"
log entries and spit them out as separate files into a share that can
be accessed elsewhere. For me, debugging log files containe snippets
of XML and SQL and it would be nice if those XML snippets are saved
out as *.xml files so that they open in XML spy with just a double
click and the sql is saved as *.sql files.

The only doubt I have about this working is the challenge of keeping
the daemon running. I realize this problem has probably been solved,
but I still wonder how it will work in a named pipe scenario.

Just food for thought and mindless rambling...

--
Matthew Nuzum <[EMAIL PROTECTED]>
www.followers.net - Makers of "Elite Content Management System"
View samples of Elite CMS in action by visiting
http://www.followers.net/portfolio/
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] Samba and Vserver Best Practices

2006-02-03 Thread Charles Baker
I'm setting up a host server and several vservers that developers in my
organization will use to test bug fixes of our software. They will
occasionally need access to certain directories on the vservers to check
logs, etc.

For convenience sake samba shares to the needed directories would be the
thing to have. Is the best practice to set up samba on the host server
and share directories within the /vservers/$SERVERNAME/path/to/log/dir
or set up samba w/in the vserver itself and share it that way?
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver