All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH OSSTEST] ts-hosts-allocate-Standalone: abort if the host to use has changed
@ 2014-02-12 11:10 Ian Campbell
  2014-03-17 11:19 ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2014-02-12 11:10 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

When a job has been run once then the selected host is stored in a runvar and
used from then on. This means that if you try to run on a different host (by
changing the config or by changing OSSTEST_HOST_HOST) then you may be
surprised when things happen to the original host and not the new one.

Abort when this is detected.

Changing host requires you to run:
    ./cs-adjust-flight -v $flight runvar-del $job host
$flight = standalone by default
$job = test-x-y-z or build-x etc
host = the literal string host (not either of the host names)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 ts-hosts-allocate-Standalone | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ts-hosts-allocate-Standalone b/ts-hosts-allocate-Standalone
index 4ce0c0d..88a5d28 100755
--- a/ts-hosts-allocate-Standalone
+++ b/ts-hosts-allocate-Standalone
@@ -31,5 +31,13 @@ foreach my $ident (@ARGV) {
     $host ||= $c{"TestHost_$ident"};
     $host ||= $c{TestHost};
     $host || die "need host setting for $ident";
+
+    my $expected = $ENV{'OSSTEST_HOST_'.uc $ident}
+                   || $c{"TestHost_$ident"}
+                   || $c{TestHost};
+
+    die "$ident configuration mismatch $r{$ident} != $expected"
+	if $r{$ident} && $r{$ident} ne $expected;
+
     store_runvar($ident, $host);
 }
-- 
1.8.5.2

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

* Re: [PATCH OSSTEST] ts-hosts-allocate-Standalone: abort if the host to use has changed
  2014-02-12 11:10 [PATCH OSSTEST] ts-hosts-allocate-Standalone: abort if the host to use has changed Ian Campbell
@ 2014-03-17 11:19 ` Ian Campbell
  2014-03-17 11:32   ` Ian Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2014-03-17 11:19 UTC (permalink / raw)
  To: ian.jackson; +Cc: xen-devel

Ping?

(TBH, I thought you had replied to this, but I can't find any mails,
sorry if I've just misplaced them)

On Wed, 2014-02-12 at 11:10 +0000, Ian Campbell wrote:
> When a job has been run once then the selected host is stored in a runvar and
> used from then on. This means that if you try to run on a different host (by
> changing the config or by changing OSSTEST_HOST_HOST) then you may be
> surprised when things happen to the original host and not the new one.
> 
> Abort when this is detected.
> 
> Changing host requires you to run:
>     ./cs-adjust-flight -v $flight runvar-del $job host
> $flight = standalone by default
> $job = test-x-y-z or build-x etc
> host = the literal string host (not either of the host names)
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  ts-hosts-allocate-Standalone | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/ts-hosts-allocate-Standalone b/ts-hosts-allocate-Standalone
> index 4ce0c0d..88a5d28 100755
> --- a/ts-hosts-allocate-Standalone
> +++ b/ts-hosts-allocate-Standalone
> @@ -31,5 +31,13 @@ foreach my $ident (@ARGV) {
>      $host ||= $c{"TestHost_$ident"};
>      $host ||= $c{TestHost};
>      $host || die "need host setting for $ident";
> +
> +    my $expected = $ENV{'OSSTEST_HOST_'.uc $ident}
> +                   || $c{"TestHost_$ident"}
> +                   || $c{TestHost};
> +
> +    die "$ident configuration mismatch $r{$ident} != $expected"
> +	if $r{$ident} && $r{$ident} ne $expected;
> +
>      store_runvar($ident, $host);
>  }

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

* Re: [PATCH OSSTEST] ts-hosts-allocate-Standalone: abort if the host to use has changed
  2014-03-17 11:19 ` Ian Campbell
@ 2014-03-17 11:32   ` Ian Jackson
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2014-03-17 11:32 UTC (permalink / raw)
  To: Ian Campbell; +Cc: ian.jackson, xen-devel

Ian Campbell writes ("Re: [PATCH OSSTEST] ts-hosts-allocate-Standalone: abort if the host to use has changed"):
> Ping?
> 
> (TBH, I thought you had replied to this, but I can't find any mails,
> sorry if I've just misplaced them)
> 
> On Wed, 2014-02-12 at 11:10 +0000, Ian Campbell wrote:
> > When a job has been run once then the selected host is stored in a runvar and
> > used from then on. This means that if you try to run on a different host (by
> > changing the config or by changing OSSTEST_HOST_HOST) then you may be
> > surprised when things happen to the original host and not the new one.
> > 
> > Abort when this is detected.
> > 
> > Changing host requires you to run:
> >     ./cs-adjust-flight -v $flight runvar-del $job host

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

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

end of thread, other threads:[~2014-03-17 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 11:10 [PATCH OSSTEST] ts-hosts-allocate-Standalone: abort if the host to use has changed Ian Campbell
2014-03-17 11:19 ` Ian Campbell
2014-03-17 11:32   ` 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.