Re: [libvirt] [PATCH] LXC complement PATH environment variable of a controller

2009-10-15 Thread Amy Griffis
Ryota Ozaki wrote: [Tue Oct 13 2009, 05:05:15PM EDT] Hi, lxc controller usually executes 'ip' command to control veths, however now PATH environment variable of the controller is not set (logging code resets environment variables all) and the execution will definitely fail because the controller

Re: [libvirt] [PATCH 2/7] Add accessors for logging filters and outputs

2009-10-07 Thread Amy Griffis
Daniel P. Berrange wrote: [Tue Oct 06 2009, 05:00:55AM EDT] Having looked at the wway the next patch uses these, I think it'd be nicer to change the contract to just be extern char *virLogGetFilters(void); extern char *virLogGetOutputs(void); Heh, that's how I wrote it

Re: [libvirt] [PATCH 4/7] lxc: initialize logging configuration

2009-10-07 Thread Amy Griffis
Daniel P. Berrange wrote: [Mon Oct 05 2009, 08:52:20AM EDT] ACK, although it'd need a small change for my suggested API contract change in your previous patch in the series Updated for API change... Before launching the lxc controller, have the lxc driver query the log settings and setup

Re: [libvirt] [PATCH 6/7] lxc: add driver config file lxc.conf

2009-10-07 Thread Amy Griffis
Updated for API change. Add a config file for the lxc driver, based on existing qemu.conf. There is currently one tunable log_with_libvirtd that controls whether an lxc controller will log only to the container log file, or whether it will honor libvirtd's log output configuration. This provides

Re: [libvirt] [PATCH 1/7] Add virFileAbsPath() utility

2009-10-05 Thread Amy Griffis
Paolo Bonzini wrote: [Mon Oct 05 2009, 04:54:27AM EDT] On 10/04/2009 09:28 PM, Amy Griffis wrote: Add a utility to ensure an absolute path for a potentially realtive path. Would it make sense for your usage to resolve symbolic links at the same time? If so, you can use the canonicalize

Re: [libvirt] [PATCH 2/7] Add accessors for logging filters and outputs

2009-10-05 Thread Amy Griffis
Daniel P. Berrange wrote: [Mon Oct 05 2009, 08:51:00AM EDT] On Sun, Oct 04, 2009 at 03:28:46PM -0400, Amy Griffis wrote: When configuring logging settings, keep more information about the output destination. Add accessors to retrieve the filter and output settings in the original string

[libvirt] [PATCH 0/7] Series short description

2009-10-04 Thread Amy Griffis
The following patches fix logging for the lxc controller. The lxc controller makes use of the libvirt logging module, but because it doesn't re-initialize the logging configuration the messages are currently going nowhere. There are a couple of options in fixing this. The lxc controller could use

[libvirt] [PATCH 1/7] Add virFileAbsPath() utility

2009-10-04 Thread Amy Griffis
Add a utility to ensure an absolute path for a potentially realtive path. --- src/libvirt_private.syms |1 + src/util/util.c | 36 src/util/util.h |3 +++ 3 files changed, 40 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCH 2/7] Add accessors for logging filters and outputs

2009-10-04 Thread Amy Griffis
When configuring logging settings, keep more information about the output destination. Add accessors to retrieve the filter and output settings in the original string form; this to be used to set up environment for a child process that also logs. Open output files O_APPEND so child can also write

[libvirt] [PATCH 3/7] Add debug for envp[] in virExecWithHook()

2009-10-04 Thread Amy Griffis
Some callers may have set envp[]. --- src/util/util.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index 81b743c..e5135fc 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -601,12 +601,23 @@

[libvirt] [PATCH 5/7] lxc: append container log file

2009-10-04 Thread Amy Griffis
Do we really want to overwrite the container log file every time we restart? --- src/lxc/lxc_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index c5a49f2..73cfecd 100644 --- a/src/lxc/lxc_driver.c +++

[libvirt] [PATCH 6/7] lxc: add driver config file lxc.conf

2009-10-04 Thread Amy Griffis
Add a config file for the lxc driver, based on existing qemu.conf. There is currently one tunable log_with_libvirtd that controls whether an lxc controller will log only to the container log file, or whether it will honor libvirtd's log output configuration. This provides a way to have libvirtd

[libvirt] [PATCH 7/7] lxc: add augeas support for config file

2009-10-04 Thread Amy Griffis
I've attempted to add augeas support for lxc.conf based on qemu.conf. --- libvirt.spec.in | 10 ++ src/Makefile.am | 18 -- src/lxc/libvirtd_lxc.aug | 30 ++ src/lxc/test_libvirtd_lxc.aug | 31

Re: [libvirt] [PATCH 5/5] Update logging documentation

2009-08-06 Thread Amy Griffis
Mark McLoughlin wrote: [Thu Aug 06 2009, 08:25:06AM EDT] On Fri, 2009-07-31 at 17:57 -0400, Amy Griffis wrote: +pLibvirtd does not reload its logging configuration when issued a SIGHUP. + If you want to reload the configuration, you must do a codeservice + libvirtd

Re: [libvirt] [PATCH 5/5] Update logging documentation

2009-08-06 Thread Amy Griffis
Daniel P. Berrange wrote: [Thu Aug 06 2009, 10:07:26AM EDT] I guess that should be service libvirtd restart ? (i.e. all reload does is issue a SIGHUP) Oh, I forgot I was looking at debian. :-) Their start script for libvirtd actually does a restart under the reload. Generalizing

[libvirt] [PATCH 0/5] Various logging cleanups

2009-07-31 Thread Amy Griffis
The following patches fixup libvirt's logging code, to hopefully make it a little more consistent and predictable. --- Amy Griffis (5): Tighten libvirt's parsing of logging environment variables Several fixes to libvirtd's log setup Cleanup VIR_LOG_DEBUG parsing in eventtest

[libvirt] [PATCH 1/5] Tighten libvirt's parsing of logging environment variables

2009-07-31 Thread Amy Griffis
Don't convert high priority levels to the debug level. Don't parse LIBVIRT_LOG_FILTERS and LIBVIRT_LOG_OUTPUTS when they're set to the empty string. Warn when the user specifies an invalid value (empty string remains a noop). --- src/libvirt.c | 13 - src/logging.c | 52

[libvirt] [PATCH 2/5] Several fixes to libvirtd's log setup

2009-07-31 Thread Amy Griffis
Similar as for general libvirt, don't convert high priority levels to debug level. Ignore LIBVIRT_LOG_FILTERS and LIBVIRT_LOG_OUTPUTS when they're set to the empty string, otherwise they can override a valid setting from the config file. Send all settings through the parser functions for

[libvirt] [PATCH 3/5] Cleanup VIR_LOG_DEBUG parsing in eventtest

2009-07-31 Thread Amy Griffis
Don't covert high priority levels to debug level. Consider an invalid priority level setting a setup failure. --- tests/eventtest.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/eventtest.c b/tests/eventtest.c index ff74b04..05fe3f3 100644 ---

[libvirt] [PATCH 4/5] Consolidate code for parsing the logging environment variables

2009-07-31 Thread Amy Griffis
Add two new functions to the internal API, virLogParseDefaultPriority() and virLogSetFromEnv(), as was suggested earlier by Cole Robinson. --- qemud/qemud.c| 50 ++ src/libvirt.c| 22 +---

[libvirt] [PATCH 5/5] Update logging documentation

2009-07-31 Thread Amy Griffis
Try to include a little more description about the corner cases, things someone might get hung up on on. --- docs/logging.html.in | 22 -- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/logging.html.in b/docs/logging.html.in index fcd100f..1f3085d

[libvirt] [PATCH] logging: remove unused level 0

2009-06-30 Thread Amy Griffis
Some more logging cleanup. Remove all references to log level 0, and replace with VIR_LOG_DEBUG where appropriate. Also change any hard numbers to the corresponding VirLogPriority and add VIR_LOG_DEFAULT for the starting log level. Signed-off-by: Amy Griffis amy.grif...@hp.com --- docs

[libvirt] [PATCH] Don't disable all logging with --disable-debug

2009-06-25 Thread Amy Griffis
section since either setting is effectively treated the same way in the following code. Signed-off-by: Amy Griffis amy.grif...@hp.com diff --git a/src/Makefile.am b/src/Makefile.am index f65e7ad..23a1843 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -498,10 +498,6 @@ EXTRA_DIST

[libvirt] Fix the no debug build

2009-06-24 Thread Amy Griffis
actually turns off the entire logging module instead of just the debug output. I can work on fixing that part in another patch. Signed-off-by: Amy Griffis amy.grif...@hp.com diff --git a/src/uml_driver.c b/src/uml_driver.c index 7949d4f..7aeb7bf 100644 --- a/src/uml_driver.c +++ b/src/uml_driver.c

Re: [libvirt] [PATCH] Fix logging in libvirt_lxc controller

2009-06-18 Thread Amy Griffis
Taking a second look at the log level code and documentation, there seems to be some confusion around the value of '0'. It's not one of the defined log priorities, but it is mentioned in the documentation on the website both as meaning log everything and no logging at all. In the code, there are

Re: [libvirt] [PATCH] Fix logging in libvirt_lxc controller

2009-06-17 Thread Amy Griffis
Daniel P. Berrange wrote: [Wed Jun 17 2009, 06:44:31AM EDT] On Tue, Jun 16, 2009 at 06:12:04PM -0400, Amy Griffis wrote: Cole Robinson wrote: [Tue Jun 16 2009, 02:44:28PM EDT] On 06/16/2009 01:35 PM, Amy Griffis wrote: The lxc controller can't see libvirtd's log level setting so

[libvirt] [PATCH] Fix logging in libvirt_lxc controller

2009-06-16 Thread Amy Griffis
The lxc controller can't see libvirtd's log level setting so it needs to re-query it from the environment. The parsing code has a few users now, so I added a new function to the internal API, virLogParseDefaultPriority() along the lines of the other parse functions. Signed-off-by: Amy Griffis

Re: [libvirt] [PATCH] Fix logging in libvirt_lxc controller

2009-06-16 Thread Amy Griffis
Cole Robinson wrote: [Tue Jun 16 2009, 02:44:28PM EDT] On 06/16/2009 01:35 PM, Amy Griffis wrote: The lxc controller can't see libvirtd's log level setting so it needs to re-query it from the environment. The parsing code has a few users now, so I added a new function to the internal API

[libvirt] [PATCH] lxc: use new error code in lxcDomainUndefine

2009-05-19 Thread Amy Griffis
Update lxcDomainUndefine() to use VIR_ERR_INVALID_OPERATION instead of VIR_ERR_INTERNAL_ERROR. Signed-off-by: Amy Griffis amy.grif...@hp.com diff --git a/src/lxc_driver.c b/src/lxc_driver.c index 5392af1..64c735d 100644 --- a/src/lxc_driver.c +++ b/src/lxc_driver.c @@ -329,13 +329,13 @@ static