All of lore.kernel.org
 help / color / mirror / Atom feed
* [OSSTEST PATCH 1/2] mg-hosts: Allow spaces in setflagexpr exprs
@ 2014-06-25 14:06 Ian Jackson
  2014-06-25 14:06 ` [OSSTEST PATCH 2/2] mg-hosts: Usage documentation Ian Jackson
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Jackson @ 2014-06-25 14:06 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 mg-hosts |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mg-hosts b/mg-hosts
index d7223a1..c116688 100755
--- a/mg-hosts
+++ b/mg-hosts
@@ -321,7 +321,7 @@ END
 	my ($dst,$section) = @_;
 	die unless @$section == 2;
 	my ($dstflag, $expr) = @$section;
-	die "$expr $& ?" if $expr =~ m/[^-0-9a-z_&|()!~]/;
+	die "$expr $& ?" if $expr =~ m/[^-0-9a-z_&|()!~ \t]/;
 
 	my %inputs;
 	$expr =~ s{[-0-9a-z_]+}{
-- 
1.7.10.4

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

* [OSSTEST PATCH 2/2] mg-hosts: Usage documentation.
  2014-06-25 14:06 [OSSTEST PATCH 1/2] mg-hosts: Allow spaces in setflagexpr exprs Ian Jackson
@ 2014-06-25 14:06 ` Ian Jackson
  2014-06-25 14:12   ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Jackson @ 2014-06-25 14:06 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 mg-hosts |   65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/mg-hosts b/mg-hosts
index c116688..0e889f5 100755
--- a/mg-hosts
+++ b/mg-hosts
@@ -17,6 +17,71 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
+# Usages:
+#
+#  ./mg-hosts mkpxedir HOST...
+#               Create directories for pxeboot as expected by the rest
+#               of osstest.  Will use "sudo".
+#
+#  ./mg-hosts create-like SOURCE-HOST NEW-HOST[,NEW-HOST...]
+#               Create new host(s).  This does NOT copy the
+#               flags and properties (!)
+#
+#  ./mg-hosts manual-task-create USER@NODENAME
+#  ./mg-hosts manual-task-create REFKEY
+#               Creates a static manual (ie, permanent) task with
+#               the specified REFKEY.  The usual format of REFKEY
+#               is USER@NODENAME.
+#
+#  ./mg-hosts previoustasks [--clear]
+#               Lists all ownd (ie, transient) tasks which are from
+#               previous instances of ms-ownerdaemon (normally, this
+#               means tasks from previous boots of the osstest
+#               controller).  Also lists those tasks' resources.
+#
+#               With --clear, marks the tasks as dead, which will
+#               allow their resources to be reclaimed.  NB that this
+#               is dangerous if there might still be tasks running
+#               which started before the current ms-ownerdaemon: the
+#               old tasks might still mess about with the resources,
+#               interfering with whatever new tasks allocate them.
+#
+#  ./mg-hosts showprops [HOST...]
+#               Prints the resource properties of all or specified hosts.
+#
+#  ./mg-hosts setprops HOSTGLOB... [- PROP [OLD] NEW ...] -|-- PROP [OLD] NEW
+#               Updates resource properties of the specified hosts.
+#               If OLD is specified, the property will be set to NEW
+#               iff its value is currently OLD.  (The use of -- rather
+#               than - as the delimiter allows the last OLD or NEW
+#               to start with - without ambiguity in the command line.)
+#
+#  HOSTGLOB is a host name, or a glob pattern which may contain *.
+#  (? and [] are not supported in HOSTGLOB.)
+#
+#  ./mg-hosts showflags
+#               Print a table showing the flags of all hosts.
+#
+#  ./mg-hosts setflags HOSTGLOB... -|-- !FLAG|-FLAG|FLAG...
+#               Updates some flags of the specified hosts.  !FLAG and
+#               -FLAG both clear the flag; FLAG sets it.
+#
+#  ./mg-hosts setflagexpr HOSTGLOB... - FLAG EXPR [-|-- FLAG EXPR...]
+#               Sets or clears some flags of the specified hosts,
+#               according to a boolean expression involving other
+#               flags.  Each EXPR is evaluated for each host and
+#               the flag set or cleared accordingly.
+#
+#               In EXPR, the following constructs are allowed (in
+#               decreasing order of precedence):
+#                   (EXPR)       override precedence
+#                   !EXPR        boolean negation } alternative
+#                   ~EXPR        boolean negation }  equivalent syntax
+#                   EXPR|EXPR    boolean disjunction
+#                   EXPR&EXPR    boolean disjunction
+#                   FLAG         true iff FLAG is set for the host
+#               Spaces and tabs are disregarded (outside FLAG names).
+
 use strict qw(vars refs);
 use DBI;
 use Osstest;
-- 
1.7.10.4

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

* Re: [OSSTEST PATCH 2/2] mg-hosts: Usage documentation.
  2014-06-25 14:06 ` [OSSTEST PATCH 2/2] mg-hosts: Usage documentation Ian Jackson
@ 2014-06-25 14:12   ` Ian Campbell
  2014-06-25 14:22     ` Ian Jackson
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-06-25 14:12 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Wed, 2014-06-25 at 15:06 +0100, Ian Jackson wrote:
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
> ---
>  mg-hosts |   65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
> 
> diff --git a/mg-hosts b/mg-hosts
> index c116688..0e889f5 100755
> --- a/mg-hosts
> +++ b/mg-hosts
> @@ -17,6 +17,71 @@
>  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
>  
> 
> +# Usages:
> +#
> +#  ./mg-hosts mkpxedir HOST...
> +#               Create directories for pxeboot as expected by the rest
> +#               of osstest.  Will use "sudo".
> +#
> +#  ./mg-hosts create-like SOURCE-HOST NEW-HOST[,NEW-HOST...]
> +#               Create new host(s).  This does NOT copy the
> +#               flags and properties (!)
> +#
> +#  ./mg-hosts manual-task-create USER@NODENAME
> +#  ./mg-hosts manual-task-create REFKEY
> +#               Creates a static manual (ie, permanent) task with
> +#               the specified REFKEY.  The usual format of REFKEY
> +#               is USER@NODENAME.
> +#
> +#  ./mg-hosts previoustasks [--clear]
> +#               Lists all ownd (ie, transient) tasks which are from

"owned" or did you mean pwnd? ;-)

> +#               previous instances of ms-ownerdaemon (normally, this
> +#               means tasks from previous boots of the osstest
> +#               controller).  Also lists those tasks' resources.
> +#
> +#               With --clear, marks the tasks as dead, which will
> +#               allow their resources to be reclaimed.  NB that this
> +#               is dangerous if there might still be tasks running
> +#               which started before the current ms-ownerdaemon: the
> +#               old tasks might still mess about with the resources,
> +#               interfering with whatever new tasks allocate them.
> +#
> +#  ./mg-hosts showprops [HOST...]
> +#               Prints the resource properties of all or specified hosts.
> +#
> +#  ./mg-hosts setprops HOSTGLOB... [- PROP [OLD] NEW ...] -|-- PROP [OLD] NEW
> +#               Updates resource properties of the specified hosts.
> +#               If OLD is specified, the property will be set to NEW
> +#               iff its value is currently OLD.  (The use of -- rather
> +#               than - as the delimiter allows the last OLD or NEW
> +#               to start with - without ambiguity in the command line.)

This one always took me ages to figure out, thanks ;-)

> +#
> +#  HOSTGLOB is a host name, or a glob pattern which may contain *.
> +#  (? and [] are not supported in HOSTGLOB.)
> +#
> +#  ./mg-hosts showflags
> +#               Print a table showing the flags of all hosts.
> +#
> +#  ./mg-hosts setflags HOSTGLOB... -|-- !FLAG|-FLAG|FLAG...
> +#               Updates some flags of the specified hosts.  !FLAG and
> +#               -FLAG both clear the flag; FLAG sets it.
> +#
> +#  ./mg-hosts setflagexpr HOSTGLOB... - FLAG EXPR [-|-- FLAG EXPR...]
> +#               Sets or clears some flags of the specified hosts,
> +#               according to a boolean expression involving other
> +#               flags.  Each EXPR is evaluated for each host and
> +#               the flag set or cleared accordingly.
> +#
> +#               In EXPR, the following constructs are allowed (in
> +#               decreasing order of precedence):
> +#                   (EXPR)       override precedence
> +#                   !EXPR        boolean negation } alternative
> +#                   ~EXPR        boolean negation }  equivalent syntax
> +#                   EXPR|EXPR    boolean disjunction
> +#                   EXPR&EXPR    boolean disjunction

One of those disjunction should be conjunction or something.

> +#                   FLAG         true iff FLAG is set for the host
> +#               Spaces and tabs are disregarded (outside FLAG names).
> +
>  use strict qw(vars refs);
>  use DBI;
>  use Osstest;

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

* Re: [OSSTEST PATCH 2/2] mg-hosts: Usage documentation.
  2014-06-25 14:12   ` Ian Campbell
@ 2014-06-25 14:22     ` Ian Jackson
  2014-06-25 14:25       ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Jackson @ 2014-06-25 14:22 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("Re: [OSSTEST PATCH 2/2] mg-hosts: Usage documentation."):
> On Wed, 2014-06-25 at 15:06 +0100, Ian Jackson wrote:
> > +#  ./mg-hosts previoustasks [--clear]
> > +#               Lists all ownd (ie, transient) tasks which are from
> 
> "owned" or did you mean pwnd? ;-)

No, they have a field in the database with value "ownd", short for
"owner daemon".

> > +#  ./mg-hosts setflagexpr HOSTGLOB... - FLAG EXPR [-|-- FLAG EXPR...]
> > +#               Sets or clears some flags of the specified hosts,
> > +#               according to a boolean expression involving other
> > +#               flags.  Each EXPR is evaluated for each host and
> > +#               the flag set or cleared accordingly.
> > +#
> > +#               In EXPR, the following constructs are allowed (in
> > +#               decreasing order of precedence):
> > +#                   (EXPR)       override precedence
> > +#                   !EXPR        boolean negation } alternative
> > +#                   ~EXPR        boolean negation }  equivalent syntax
> > +#                   EXPR|EXPR    boolean disjunction
> > +#                   EXPR&EXPR    boolean disjunction
> 
> One of those disjunction should be conjunction or something.

Oh yes.  Will fix.

Thanks,
Ian.

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

* Re: [OSSTEST PATCH 2/2] mg-hosts: Usage documentation.
  2014-06-25 14:22     ` Ian Jackson
@ 2014-06-25 14:25       ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2014-06-25 14:25 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Wed, 2014-06-25 at 15:22 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [OSSTEST PATCH 2/2] mg-hosts: Usage documentation."):
> > On Wed, 2014-06-25 at 15:06 +0100, Ian Jackson wrote:
> > > +#  ./mg-hosts previoustasks [--clear]
> > > +#               Lists all ownd (ie, transient) tasks which are from
> > 
> > "owned" or did you mean pwnd? ;-)
> 
> No, they have a field in the database with value "ownd", short for
> "owner daemon".

Aha, ok then.

> 
> > > +#  ./mg-hosts setflagexpr HOSTGLOB... - FLAG EXPR [-|-- FLAG EXPR...]
> > > +#               Sets or clears some flags of the specified hosts,
> > > +#               according to a boolean expression involving other
> > > +#               flags.  Each EXPR is evaluated for each host and
> > > +#               the flag set or cleared accordingly.
> > > +#
> > > +#               In EXPR, the following constructs are allowed (in
> > > +#               decreasing order of precedence):
> > > +#                   (EXPR)       override precedence
> > > +#                   !EXPR        boolean negation } alternative
> > > +#                   ~EXPR        boolean negation }  equivalent syntax
> > > +#                   EXPR|EXPR    boolean disjunction
> > > +#                   EXPR&EXPR    boolean disjunction
> > 
> > One of those disjunction should be conjunction or something.
> 
> Oh yes.  Will fix.
> 
> Thanks,
> Ian.

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

end of thread, other threads:[~2014-06-25 14:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25 14:06 [OSSTEST PATCH 1/2] mg-hosts: Allow spaces in setflagexpr exprs Ian Jackson
2014-06-25 14:06 ` [OSSTEST PATCH 2/2] mg-hosts: Usage documentation Ian Jackson
2014-06-25 14:12   ` Ian Campbell
2014-06-25 14:22     ` Ian Jackson
2014-06-25 14:25       ` Ian Campbell

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.