All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] for xend init script and xend python script
@ 2010-10-22 19:47 ShaunR
  2010-10-26 16:21 ` Ian Jackson
  0 siblings, 1 reply; 7+ messages in thread
From: ShaunR @ 2010-10-22 19:47 UTC (permalink / raw)
  To: xen-devel

This patch does the following, hopefully it will be added to future 
versions.

* xend init script will now send SIGINT to xenconsoled when stop is 
issued so that the xenconsoled daemon is also stopped (this is required 
if the new options below are added to /etc/sysconfig/xend

* /etc/sysconfig/xend has additional these additional cosnole options 
since the xend init script starts xenconsoled.
	XENCONSOLED_LOG=(none|guest|hv|all)
	XENCONSOLED_LOGDIR=PATH
	XENCONSOLED_TIMESTAMP=(none|guest|hv|all)
	XENCONSOLED_OVERFLOW=(discard|keep)
	XENCONSOLED_PIDFILE=PATH

* xend python script now checks for the options above and passed them to 
xenconsoled




--- tools/misc/xend.orig        2010-10-22 12:25:46.000000000 -0700
+++ tools/misc/xend     2010-10-22 12:26:12.000000000 -0700
@@ -99,9 +99,24 @@

  def start_consoled():
      XENCONSOLED_TRACE = os.getenv("XENCONSOLED_TRACE")
+    XENCONSOLED_LOG = os.getenv("XENCONSOLED_LOG")
+    XENCONSOLED_LOGDIR = os.getenv("XENCONSOLED_LOGDIR")
+    XENCONSOLED_TIMESTAMP = os.getenv("XENCONSOLED_TIMESTAMP")
+    XENCONSOLED_OVERFLOW = os.getenv("XENCONSOLED_OVERFLOW")
+    XENCONSOLED_PIDFILE = os.getenv("XENCONSOLED_PIDFILE")
      args = ""
      if XENCONSOLED_TRACE:
-        args += "--log=" + XENCONSOLED_TRACE
+        args += "--log=" + XENCONSOLED_TRACE + " "
+    elif XENCONSOLED_LOG:
+        args += "--log=" + XENCONSOLED_LOG + " "
+    if XENCONSOLED_LOGDIR:
+        args += "--log-dir=" + XENCONSOLED_LOGDIR + " "
+    if XENCONSOLED_TIMESTAMP:
+        args += "--timestamp=" + XENCONSOLED_TIMESTAMP + " "
+    if XENCONSOLED_OVERFLOW:
+        args += "--overflow=" + XENCONSOLED_OVERFLOW + " "
+    if XENCONSOLED_PIDFILE:
+        args += "--pid-file=" + XENCONSOLED_PIDFILE + " "
      start_daemon("xenconsoled", args)

  def start_blktapctrl():


--- tools/hotplug/Linux/init.d/xend.orig        2010-10-22 
12:26:50.000000000 -0700
+++ tools/hotplug/Linux/init.d/xend     2010-10-22 12:28:42.000000000 -0700
@@ -55,6 +55,11 @@
         touch /var/lock/subsys/xend
         test -z "$XENSTORED_ROOTDIR" || export XENSTORED_ROOTDIR
         test -z "$XENCONSOLED_TRACE" || export XENCONSOLED_TRACE
+   test -z "$XENCONSOLED_LOG" || export XENCONSOLED_LOG
+   test -z "$XENCONSOLED_LOGDIR" || export XENCONSOLED_LOGDIR
+   test -z "$XENCONSOLED_TIMESTAMP" || export XENCONSOLED_TIMESTAMP
+   test -z "$XENCONSOLED_OVERFLOW" || export XENCONSOLED_OVERFLOW
+   test -z "$XENCONSOLED_PIDFILE" || export XENCONSOLED_PIDFILE
         [[ "$XENSTORED_TRACE" == @(yes|on|1) ]] && export XENSTORED_TRACE
         [[ "$XENBACKENDD_DEBUG" == @(yes|on|1) ]] && export 
XENBACKENDD_DEBUG
         xend start
@@ -62,6 +67,9 @@
         ;;
    stop)
         xend stop
+       if [ -n "`pidof xenconsoled`" ]; then
+               kill -2 `pidof xenconsoled`
+       fi
         rm -f /var/lock/subsys/xend
         ;;
    status)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] for xend init script and xend python script
  2010-10-22 19:47 [PATCH] for xend init script and xend python script ShaunR
@ 2010-10-26 16:21 ` Ian Jackson
  2010-10-26 17:38   ` ShaunR
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Jackson @ 2010-10-26 16:21 UTC (permalink / raw)
  To: ShaunR; +Cc: xen-devel

ShaunR writes ("[Xen-devel] [PATCH] for xend init script and xend python script"):
> This patch does the following, hopefully it will be added to future 
> versions.
>
> * xend init script will now send SIGINT to xenconsoled when stop is 
> issued so that the xenconsoled daemon is also stopped (this is required 
> if the new options below are added to /etc/sysconfig/xend

This is handled by a new "xencommons" script in xen-unstable
I think ?

> * /etc/sysconfig/xend has additional these additional cosnole options 
> since the xend init script starts xenconsoled.
> 	XENCONSOLED_LOG=(none|guest|hv|all)
> 	XENCONSOLED_LOGDIR=PATH
> 	XENCONSOLED_TIMESTAMP=(none|guest|hv|all)
> 	XENCONSOLED_OVERFLOW=(discard|keep)
> 	XENCONSOLED_PIDFILE=PATH

Perhaps it would be better to have a single XENCONSOLED_OPTIONS
variable ?

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] for xend init script and xend python script
  2010-10-26 16:21 ` Ian Jackson
@ 2010-10-26 17:38   ` ShaunR
  2010-10-27 16:14     ` Ian Jackson
  0 siblings, 1 reply; 7+ messages in thread
From: ShaunR @ 2010-10-26 17:38 UTC (permalink / raw)
  Cc: xen-devel

On 10/26/2010 9:21 AM, Ian Jackson wrote:
 > ShaunR writes ("[Xen-devel] [PATCH] for xend init script and xend 
python script"):
 >> This patch does the following, hopefully it will be added to future
 >> versions.
 >>
 >> * xend init script will now send SIGINT to xenconsoled when stop is
 >> issued so that the xenconsoled daemon is also stopped (this is required
 >> if the new options below are added to /etc/sysconfig/xend
 >
 > This is handled by a new "xencommons" script in xen-unstable
 > I think ?

Actually looks like it, i didnt check unstable sorry.

 >
 >> * /etc/sysconfig/xend has additional these additional cosnole options
 >> since the xend init script starts xenconsoled.
 >> 	XENCONSOLED_LOG=(none|guest|hv|all)
 >> 	XENCONSOLED_LOGDIR=PATH
 >> 	XENCONSOLED_TIMESTAMP=(none|guest|hv|all)
 >> 	XENCONSOLED_OVERFLOW=(discard|keep)
 >> 	XENCONSOLED_PIDFILE=PATH
 >
 > Perhaps it would be better to have a single XENCONSOLED_OPTIONS
 > variable ?

I see in the new xencommons that there's a XENCONSOLED_ARGS env which 
could hold all this info and be set in /etc/sysconfig/xencommons but I'm 
worried about it being overwritten by some of the checks in the script.

  69         echo Starting xenconsoled...
  70         test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS=" 
--log=$XENCONSOLED_TRACE"
  71         xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
  72         test -z "$XENBACKENDD_DEBUG" || XENBACKENDD_ARGS="-d"
  73         test "`uname`" != "NetBSD" || xenbackendd $XENBACKENDD_ARGS
  74 }


Either way works i guess, i like separate options because i think it's 
easier for people to write automated scripts against to ensure the 
options they want are enabled.

Thanks!

~Shaun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] for xend init script and xend python script
  2010-10-26 17:38   ` ShaunR
@ 2010-10-27 16:14     ` Ian Jackson
  2010-10-29 17:57       ` Shaun Reitan
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Jackson @ 2010-10-27 16:14 UTC (permalink / raw)
  To: ShaunR; +Cc: xen-devel

ShaunR writes ("[Xen-devel] Re: [PATCH] for xend init script and xend python script"):
> I see in the new xencommons that there's a XENCONSOLED_ARGS env which 
> could hold all this info and be set in /etc/sysconfig/xencommons but I'm 
> worried about it being overwritten by some of the checks in the script.

Oh, yes.  It would be better if the xencommons script prepended to the
ARGS (so that settings in the /etc/default file can override) rather
than unconditionally setting, or if we had two variables.

> Either way works i guess, i like separate options because i think it's 
> easier for people to write automated scripts against to ensure the 
> options they want are enabled.

Yes.  I'd be happy to take a patch to implement separate options in
xencommons in unstable.

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] for xend init script and xend python script
  2010-10-27 16:14     ` Ian Jackson
@ 2010-10-29 17:57       ` Shaun Reitan
  2010-10-29 18:02         ` Ian Jackson
  0 siblings, 1 reply; 7+ messages in thread
From: Shaun Reitan @ 2010-10-29 17:57 UTC (permalink / raw)
  Cc: xen-devel

On 10/27/2010 9:14 AM, Ian Jackson wrote:
> ShaunR writes ("[Xen-devel] Re: [PATCH] for xend init script and xend python script"):
>> I see in the new xencommons that there's a XENCONSOLED_ARGS env which
>> could hold all this info and be set in /etc/sysconfig/xencommons but I'm
>> worried about it being overwritten by some of the checks in the script.
>
> Oh, yes.  It would be better if the xencommons script prepended to the
> ARGS (so that settings in the /etc/default file can override) rather
> than unconditionally setting, or if we had two variables.
>
>> Either way works i guess, i like separate options because i think it's
>> easier for people to write automated scripts against to ensure the
>> options they want are enabled.
>
> Yes.  I'd be happy to take a patch to implement separate options in
> xencommons in unstable.
>
> Ian.

Ian,

I'll go ahead and implement this and submit a patch, i'm alittle busy 
this week.  How long do you think i have until unstable is merged?  I 
would like to make sure this this patch included into the next version 
so trying to figure out my time line :)

--
Shaun Retian
Chief Technical Officer
Network Data Center Host, Inc.
http://www.NDCHost.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] for xend init script and xend python script
  2010-10-29 17:57       ` Shaun Reitan
@ 2010-10-29 18:02         ` Ian Jackson
  2010-10-29 18:03           ` Ian Jackson
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Jackson @ 2010-10-29 18:02 UTC (permalink / raw)
  To: Shaun Reitan; +Cc: xen-devel@lists.xensource.com

Shaun Reitan writes ("Re: [PATCH] for xend init script and xend python script"):
> I'll go ahead and implement this and submit a patch, i'm alittle busy 
> this week.  How long do you think i have until unstable is merged?  I 
> would like to make sure this this patch included into the next version 
> so trying to figure out my time line :)

xen-unstable isn't "merged"; it is forked and that will become the
next stable branch.  Not for a while yet.

But if you want your fix in 4.0-testing (which is possible if we like
it), we want

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] for xend init script and xend python script
  2010-10-29 18:02         ` Ian Jackson
@ 2010-10-29 18:03           ` Ian Jackson
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Jackson @ 2010-10-29 18:03 UTC (permalink / raw)
  To: Shaun Reitan, xen-devel@lists.xensource.com

I wrote:
> But if you want your fix in 4.0-testing (which is possible if we like
> it), we want
               it to go through xen-unstable first and will
then cherry-pick it or accept a backport, if and as appropriate.

Ian.

(sorry, hit "send" too soon)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-29 18:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 19:47 [PATCH] for xend init script and xend python script ShaunR
2010-10-26 16:21 ` Ian Jackson
2010-10-26 17:38   ` ShaunR
2010-10-27 16:14     ` Ian Jackson
2010-10-29 17:57       ` Shaun Reitan
2010-10-29 18:02         ` Ian Jackson
2010-10-29 18:03           ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.