All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [OSSTEST PATCH 00/26] Reduce hard power cycles
@ 2019-01-24 18:45 Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 01/26] power: Osstest::PDU::*: drop Exporter blocks Ian Jackson
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

We have been having trouble with PDU port relays sticking.  We vaguely
suspect that this is happening in Massachusetts due to the
lower-voltage (120V, and therefore higher-current) electricity
(compared to Cambridge, 240V, where the PDUs remain reliable).

To mitigate this issue (and generally prolong hardware life), try to
avoid hard power cycling test boxes when we can.  Specifically, try a
reboot with ssh first, and if that fails try the IMPI if provided.  If
the IMPI doesn't work either or is not provided, hard power cycle.

Patches 01-25 are ready I think, and have been tested.  There is a
difficulty with the FreeBSD host install, which is discussed in patch
26 which is definitely not ready in this form.

Ian Jackson (26):
  power: Osstest::PDU::*: drop Exporter blocks
  power: Osstest::PDU::*: use parent ::unsupported
  power: ipmi_try: Use `use parent' instead of Exporter
  power: Osstest::PDU::*: reuse default new method where applicable
  power handling: Break out power_cycle_parse_method
  power handling: Introduce power_reboot_attempts
  power: PowerApproaches replaces $ho->{PowerMethobjs}
  power: power_reboot_attempts: Try multiple approaches
  power: Provide `try_off' pdu method; deprecate ipmi_try
  power: New ILOM/PDU arrangements - try just IPMI
  power: Do not sleep between power off and power on if not needed
  power: Provide `ssh' power method
  power: Try rebooting hosts with ssh first
  power: Document Power* host properties and power methods
  power: Honour approach_re in power_cycle and mg-hosts power
  ts-host-powercycle: Use a lighter-weight method if available
  power: Rename target_reboot_force from target_reboot_hard
  power: power_reboot_attempts: Honour an $approach_re
  ts-logs-capture: power: try ILOM first
  power: Use `Combined' as Name for PDU+ILOM approach
  power: Record approach used for power cycles in runvars
  Executive: Break out span_colour
  Executive: Export $grey_* with :colours
  sg-report-host-history: Move SET LOCAL into transaction
  sg-report-host-history: Show used power approach(es)
  DO NOT APPLY power: ts-freebsd-host-install: Use power_reboot_attempts

 Osstest/Executive.pm       |  11 +++-
 Osstest/PDU/eth008.pm      |  11 +---
 Osstest/PDU/guest.pm       |  16 ++---
 Osstest/PDU/ipmi.pm        |  11 +---
 Osstest/PDU/ipmi_try.pm    |  14 +----
 Osstest/PDU/ipmiextra.pm   |  11 +---
 Osstest/PDU/manual.pm      |  16 +----
 Osstest/PDU/msw.pm         |  11 +---
 Osstest/PDU/pause.pm       |  11 +---
 Osstest/PDU/ssh.pm         |  74 ++++++++++++++++++++++
 Osstest/PDU/statedb.pm     |   2 +
 Osstest/PDU/try_off.pm     |  70 +++++++++++++++++++++
 Osstest/PDU/unsupported.pm |  16 ++---
 Osstest/PDU/xenuse.pm      |  16 +----
 Osstest/TestSupport.pm     | 154 +++++++++++++++++++++++++++++++++++++++------
 README                     |  77 +++++++++++++++++++++++
 README.dev                 |   4 +-
 mg-hosts                   |  14 +++--
 sg-report-host-history     |  67 ++++++++++++++++++--
 ts-freebsd-host-install    |  16 ++---
 ts-host-install            |  19 +++---
 ts-host-powercycle         |   6 +-
 ts-logs-capture            |   2 +-
 23 files changed, 482 insertions(+), 167 deletions(-)
 create mode 100644 Osstest/PDU/ssh.pm
 create mode 100644 Osstest/PDU/try_off.pm

-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 01/26] power: Osstest::PDU::*: drop Exporter blocks
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 02/26] power: Osstest::PDU::*: use parent ::unsupported Ian Jackson
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

This is all very obsolete.  These that we are removing are all empty,
and nowadays perl has `use parent'.  These changes are all textually
identical.

We will do ipmi_try in a moment: that one is special as it actually
has a parent module.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/PDU/eth008.pm      | 11 -----------
 Osstest/PDU/guest.pm       | 11 -----------
 Osstest/PDU/ipmi.pm        | 11 -----------
 Osstest/PDU/ipmiextra.pm   | 11 -----------
 Osstest/PDU/manual.pm      | 11 -----------
 Osstest/PDU/msw.pm         | 11 -----------
 Osstest/PDU/pause.pm       | 11 -----------
 Osstest/PDU/unsupported.pm | 11 -----------
 Osstest/PDU/xenuse.pm      | 11 -----------
 9 files changed, 99 deletions(-)

diff --git a/Osstest/PDU/eth008.pm b/Osstest/PDU/eth008.pm
index 12f0bfb6..bd57edbb 100644
--- a/Osstest/PDU/eth008.pm
+++ b/Osstest/PDU/eth008.pm
@@ -23,17 +23,6 @@ use Osstest;
 use Osstest::TestSupport;
 use LWP::UserAgent;
 
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
-
 sub new {
     my ($class, $ho, $methname, $pdu, $user, $pass, $port, @opts) = @_;
     return bless { Host => $ho,
diff --git a/Osstest/PDU/guest.pm b/Osstest/PDU/guest.pm
index b708af5e..61d9dcd5 100755
--- a/Osstest/PDU/guest.pm
+++ b/Osstest/PDU/guest.pm
@@ -25,17 +25,6 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
-
 sub new {
     my ($class, $ho) = @_;
     return bless { Target => $ho }, $class;
diff --git a/Osstest/PDU/ipmi.pm b/Osstest/PDU/ipmi.pm
index d411d970..ceb4cf03 100644
--- a/Osstest/PDU/ipmi.pm
+++ b/Osstest/PDU/ipmi.pm
@@ -23,17 +23,6 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
-
 sub new {
     my ($class, $ho, $methname, $mgmt, $user, $pass, @opts) = @_;
     $user ||= get_host_property($ho, 'IpmiUser') || 'ADMIN';
diff --git a/Osstest/PDU/ipmiextra.pm b/Osstest/PDU/ipmiextra.pm
index a10cd4d0..d4515e34 100644
--- a/Osstest/PDU/ipmiextra.pm
+++ b/Osstest/PDU/ipmiextra.pm
@@ -23,17 +23,6 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
-
 sub new {
     my ($class, $ho, $methname, $when, $mgmt, $user, $pass, @opts) = @_;
     return bless { Host => $ho,
diff --git a/Osstest/PDU/manual.pm b/Osstest/PDU/manual.pm
index 505b9b6b..28d0b8a1 100644
--- a/Osstest/PDU/manual.pm
+++ b/Osstest/PDU/manual.pm
@@ -23,17 +23,6 @@ use warnings;
 use Osstest;
 use IO::File;
 
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
-
 our $tty;
 
 sub new {
diff --git a/Osstest/PDU/msw.pm b/Osstest/PDU/msw.pm
index c159cc3c..1645b5f6 100644
--- a/Osstest/PDU/msw.pm
+++ b/Osstest/PDU/msw.pm
@@ -22,17 +22,6 @@ use warnings;
 
 use Osstest;
 
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
-
 sub new {
     my ($class, $ho, $methname, @args) = @_;
 
diff --git a/Osstest/PDU/pause.pm b/Osstest/PDU/pause.pm
index b5f0322f..aaa77c30 100644
--- a/Osstest/PDU/pause.pm
+++ b/Osstest/PDU/pause.pm
@@ -23,17 +23,6 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
-
 sub new {
     my ($class, $ho, $methname, $on, $off) = @_;
     if (!defined $on) {
diff --git a/Osstest/PDU/unsupported.pm b/Osstest/PDU/unsupported.pm
index 9f44aab5..8627f452 100644
--- a/Osstest/PDU/unsupported.pm
+++ b/Osstest/PDU/unsupported.pm
@@ -22,17 +22,6 @@ use warnings;
 
 use Osstest;
 
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
-
 our $tty;
 
 sub new {
diff --git a/Osstest/PDU/xenuse.pm b/Osstest/PDU/xenuse.pm
index 6b0503fa..3071b663 100644
--- a/Osstest/PDU/xenuse.pm
+++ b/Osstest/PDU/xenuse.pm
@@ -24,17 +24,6 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
-
 sub new {
     my ($class, $ho) = @_;
     return bless { Host => $ho }, $class;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 02/26] power: Osstest::PDU::*: use parent ::unsupported
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 01/26] power: Osstest::PDU::*: drop Exporter blocks Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 03/26] power: ipmi_try: Use `use parent' instead of Exporter Ian Jackson
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

This will allow us to introduce default methods, which everyone
inherits unless overridden.  These changes are all textually
identical.

We will do ipmi_try in a moment: that one is special as it actually
has a parent module.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/PDU/eth008.pm    | 2 ++
 Osstest/PDU/guest.pm     | 2 ++
 Osstest/PDU/ipmi.pm      | 2 ++
 Osstest/PDU/ipmi_try.pm  | 2 ++
 Osstest/PDU/ipmiextra.pm | 2 ++
 Osstest/PDU/manual.pm    | 2 ++
 Osstest/PDU/msw.pm       | 2 ++
 Osstest/PDU/pause.pm     | 2 ++
 Osstest/PDU/statedb.pm   | 2 ++
 Osstest/PDU/xenuse.pm    | 2 ++
 10 files changed, 20 insertions(+)

diff --git a/Osstest/PDU/eth008.pm b/Osstest/PDU/eth008.pm
index bd57edbb..61eb420a 100644
--- a/Osstest/PDU/eth008.pm
+++ b/Osstest/PDU/eth008.pm
@@ -23,6 +23,8 @@ use Osstest;
 use Osstest::TestSupport;
 use LWP::UserAgent;
 
+use parent qw(Osstest::PDU::unsupported);
+
 sub new {
     my ($class, $ho, $methname, $pdu, $user, $pass, $port, @opts) = @_;
     return bless { Host => $ho,
diff --git a/Osstest/PDU/guest.pm b/Osstest/PDU/guest.pm
index 61d9dcd5..779ba6c2 100755
--- a/Osstest/PDU/guest.pm
+++ b/Osstest/PDU/guest.pm
@@ -25,6 +25,8 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
+use parent qw(Osstest::PDU::unsupported);
+
 sub new {
     my ($class, $ho) = @_;
     return bless { Target => $ho }, $class;
diff --git a/Osstest/PDU/ipmi.pm b/Osstest/PDU/ipmi.pm
index ceb4cf03..98e8957f 100644
--- a/Osstest/PDU/ipmi.pm
+++ b/Osstest/PDU/ipmi.pm
@@ -23,6 +23,8 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
+use parent qw(Osstest::PDU::unsupported);
+
 sub new {
     my ($class, $ho, $methname, $mgmt, $user, $pass, @opts) = @_;
     $user ||= get_host_property($ho, 'IpmiUser') || 'ADMIN';
diff --git a/Osstest/PDU/ipmi_try.pm b/Osstest/PDU/ipmi_try.pm
index 172f4ec5..64b43dd2 100644
--- a/Osstest/PDU/ipmi_try.pm
+++ b/Osstest/PDU/ipmi_try.pm
@@ -24,6 +24,8 @@ use Osstest::TestSupport;
 use IO::File;
 use Osstest::PDU::ipmi;
 
+use parent Osstest::PDU::unsupported;
+
 BEGIN {
     use Exporter ();
     our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
diff --git a/Osstest/PDU/ipmiextra.pm b/Osstest/PDU/ipmiextra.pm
index d4515e34..b17f6320 100644
--- a/Osstest/PDU/ipmiextra.pm
+++ b/Osstest/PDU/ipmiextra.pm
@@ -23,6 +23,8 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
+use parent qw(Osstest::PDU::unsupported);
+
 sub new {
     my ($class, $ho, $methname, $when, $mgmt, $user, $pass, @opts) = @_;
     return bless { Host => $ho,
diff --git a/Osstest/PDU/manual.pm b/Osstest/PDU/manual.pm
index 28d0b8a1..78f24db9 100644
--- a/Osstest/PDU/manual.pm
+++ b/Osstest/PDU/manual.pm
@@ -23,6 +23,8 @@ use warnings;
 use Osstest;
 use IO::File;
 
+use parent qw(Osstest::PDU::unsupported);
+
 our $tty;
 
 sub new {
diff --git a/Osstest/PDU/msw.pm b/Osstest/PDU/msw.pm
index 1645b5f6..19d9f56b 100644
--- a/Osstest/PDU/msw.pm
+++ b/Osstest/PDU/msw.pm
@@ -22,6 +22,8 @@ use warnings;
 
 use Osstest;
 
+use parent qw(Osstest::PDU::unsupported);
+
 sub new {
     my ($class, $ho, $methname, @args) = @_;
 
diff --git a/Osstest/PDU/pause.pm b/Osstest/PDU/pause.pm
index aaa77c30..33327d47 100644
--- a/Osstest/PDU/pause.pm
+++ b/Osstest/PDU/pause.pm
@@ -23,6 +23,8 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
+use parent qw(Osstest::PDU::unsupported);
+
 sub new {
     my ($class, $ho, $methname, $on, $off) = @_;
     if (!defined $on) {
diff --git a/Osstest/PDU/statedb.pm b/Osstest/PDU/statedb.pm
index 1c9d16e0..0a445b1b 100644
--- a/Osstest/PDU/statedb.pm
+++ b/Osstest/PDU/statedb.pm
@@ -24,6 +24,8 @@ use Osstest;
 use Osstest::Executive;
 use Osstest::TestSupport;
 
+use parent qw(Osstest::PDU::unsupported);
+
 sub power_state_await ($$$) {
     my ($sth, $want, $msg) = @_;
     poll_loop(30,1, "power: $msg $want", sub {
diff --git a/Osstest/PDU/xenuse.pm b/Osstest/PDU/xenuse.pm
index 3071b663..2ce0dd22 100644
--- a/Osstest/PDU/xenuse.pm
+++ b/Osstest/PDU/xenuse.pm
@@ -24,6 +24,8 @@ use Osstest;
 use Osstest::TestSupport;
 use IO::File;
 
+use parent qw(Osstest::PDU::unsupported);
+
 sub new {
     my ($class, $ho) = @_;
     return bless { Host => $ho }, $class;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 03/26] power: ipmi_try: Use `use parent' instead of Exporter
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 01/26] power: Osstest::PDU::*: drop Exporter blocks Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 02/26] power: Osstest::PDU::*: use parent ::unsupported Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 04/26] power: Osstest::PDU::*: reuse default new method where applicable Ian Jackson
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

This module already has a superclass, `ipmi'.  Import it with `use
parent' instead of Exporter.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/PDU/ipmi_try.pm | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/Osstest/PDU/ipmi_try.pm b/Osstest/PDU/ipmi_try.pm
index 64b43dd2..cf851d21 100644
--- a/Osstest/PDU/ipmi_try.pm
+++ b/Osstest/PDU/ipmi_try.pm
@@ -22,20 +22,8 @@ use warnings;
 use Osstest;
 use Osstest::TestSupport;
 use IO::File;
-use Osstest::PDU::ipmi;
 
-use parent Osstest::PDU::unsupported;
-
-BEGIN {
-    use Exporter ();
-    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-    $VERSION     = 1.00;
-    @ISA         = qw(Exporter Osstest::PDU::ipmi);
-    @EXPORT      = qw();
-    %EXPORT_TAGS = ( );
-
-    @EXPORT_OK   = qw();
-}
+use parent qw(Osstest::PDU::ipmi);
 
 sub pdu_power_state {
     my ($mo, $on) = @_;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 04/26] power: Osstest::PDU::*: reuse default new method where applicable
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (2 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 03/26] power: ipmi_try: Use `use parent' instead of Exporter Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 05/26] power handling: Break out power_cycle_parse_method Ian Jackson
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

These two modules both had the same `new' as `unsupported'.  Now that
we have `use parent' they can be removed.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/PDU/manual.pm | 5 -----
 Osstest/PDU/xenuse.pm | 5 -----
 2 files changed, 10 deletions(-)

diff --git a/Osstest/PDU/manual.pm b/Osstest/PDU/manual.pm
index 78f24db9..7f955b90 100644
--- a/Osstest/PDU/manual.pm
+++ b/Osstest/PDU/manual.pm
@@ -27,11 +27,6 @@ use parent qw(Osstest::PDU::unsupported);
 
 our $tty;
 
-sub new {
-    my ($class, $ho) = @_;
-    return bless { Host => $ho }, $class;
-}
-
 sub pdu_power_state {
     my ($mo, $on) = @_;
     my $onoff= $on ? "on" : "off";
diff --git a/Osstest/PDU/xenuse.pm b/Osstest/PDU/xenuse.pm
index 2ce0dd22..981b6cd9 100644
--- a/Osstest/PDU/xenuse.pm
+++ b/Osstest/PDU/xenuse.pm
@@ -26,11 +26,6 @@ use IO::File;
 
 use parent qw(Osstest::PDU::unsupported);
 
-sub new {
-    my ($class, $ho) = @_;
-    return bless { Host => $ho }, $class;
-}
-
 sub pdu_power_state {
     my ($mo, $on) = @_;
     my $onoff= $on ? "on" : "off";
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 05/26] power handling: Break out power_cycle_parse_method
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (3 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 04/26] power: Osstest::PDU::*: reuse default new method where applicable Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 06/26] power handling: Introduce power_reboot_attempts Ian Jackson
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 29108423..68b51728 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -917,10 +917,10 @@ sub serial_fetch_logs ($) {
 
 #---------- power cycling ----------
 
-sub power_cycle_host_setup ($) {
-    my ($ho) = @_;
+sub power_cycle_parse_method ($$) {
+    my ($ho, $spec) = @_;
     my $methobjs = [ ];
-    foreach my $meth (split /\;\s*/, ($ho->{Power} // 'unsupported')) {
+    foreach my $meth (split /\;\s*/, $spec) {
         if ($meth eq 'nest') {
             push @$methobjs, $meth;
         } elsif ($meth =~ m{^(\d+)(?:/(\d+))$}) {
@@ -930,7 +930,13 @@ sub power_cycle_host_setup ($) {
             push @$methobjs, get_host_method_object($ho,'PDU',$meth);
         }
     }
-    $ho->{PowerMethobjs} = $methobjs;
+    return $methobjs;
+}
+
+sub power_cycle_host_setup ($) {
+    my ($ho) = @_;
+    $spec = ($ho->{Power} // 'unsupported');
+    $ho->{PowerMethobjs} = power_cycle_parse_method($ho,$spec);
 }
 
 sub power_cycle_sleep ($) {
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 06/26] power handling: Introduce power_reboot_attempts
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (4 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 05/26] power handling: Break out power_cycle_parse_method Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 07/26] power: PowerApproaches replaces $ho->{PowerMethobjs} Ian Jackson
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson, Roger Pau Monné

This is going to be the new preferred interface for rebooting a host.

Introduce the first two call sites in ts-host-install and
ts-freebsd-host-install.  power_cycle_sleep is an internal function
now.

No overall functional change, since currently power_reboot_attempts
only ever tries one method.

Do not adjust ts-freebsd-host-install yet as we have a problem there,
which will be discussed in a moment.

CC: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 23 ++++++++++++++++++++++-
 ts-host-install        | 19 +++++++------------
 2 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 68b51728..fb6a407c 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -81,7 +81,7 @@ BEGIN {
                       selecthost get_hostflags get_host_property
                       get_target_property get_host_native_linux_console
                       hostnamepath hostnamepath_list set_runtime_hostflag
-                      power_state power_cycle power_cycle_sleep
+                      power_state power_cycle power_reboot_attempts
                       serial_fetch_logs set_host_property
                       propname_massage propname_check
                       hostprop_putative_record
@@ -939,6 +939,27 @@ sub power_cycle_host_setup ($) {
     $ho->{PowerMethobjs} = power_cycle_parse_method($ho,$spec);
 }
 
+sub power_reboot_attempts ($$$) {
+    my ($ho, $setup, $await) = @_;
+    # Power cycles $ho, calling $setup->() while it is (supposedly) off.
+    # Then, just after turning $ho on, calls $await->().
+    # If $await->() succeeds, great: returns.
+    #
+    # If it fails (dies), power_reboot_attempts will attempt to power
+    # cycle $ho using a more certain method and call $fn again.  This
+    # may occur multiple times.
+    #
+    # All but the last method used for power cycling are not certain
+    # to work.  $setup and $await should tolerate this situation; in
+    # particular $await must only succeed if the host really did reboot
+    # into the boot environment that $await expects.
+    power_state($ho, 0);
+    $setup->();
+    power_cycle_sleep($ho);
+    power_state($ho, 1);
+    $await->();
+}
+
 sub power_cycle_sleep ($) {
     my ($ho) = @_;
     my $to = get_host_property($ho, 'power-cycle-time', 5);
diff --git a/ts-host-install b/ts-host-install
index c5b92b8d..068242eb 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -56,8 +56,6 @@ our %timeout= qw(ReadPreseed  350
                  Sshd        2400);
 
 sub install () {
-    power_state($ho, 0);
-
     my ($ps_url,$ps_file)= preseed_create
         ($ho, '',
          DiskDevice => $ho->{DiskDevice},
@@ -67,19 +65,16 @@ d-i netcfg/get_hostname string $ho->{Name}
 d-i netcfg/get_ipaddress string $ho->{Ip}
 END
 
-    setup_netboot_firstboot($ps_url);
-    power_cycle_sleep($ho);
-
-    my $logtailer= Osstest::Logtailer->new($c{WebspaceLog});
-    power_state($ho, 1);
-
-    await_webspace_fetch_byleaf(get_timeout($ho,'reboot',$timeout{ReadPreseed})
-                                , 1,
-                                $logtailer, $ho, $ps_url);
+    power_reboot_attempts($ho, sub {
+        setup_netboot_firstboot($ps_url);
+    }, sub {
+	my $logtailer= Osstest::Logtailer->new($c{WebspaceLog});
+	my $timeout = get_timeout($ho,'reboot',$timeout{ReadPreseed});
+	await_webspace_fetch_byleaf($timeout, 1, $logtailer, $ho, $ps_url);
+    });
 
     if ($poweron_test_only) {
 	logm("Hooray, power on worked.");
-	power_state($ho, 0);
 	exit 0;
     }
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 07/26] power: PowerApproaches replaces $ho->{PowerMethobjs}
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (5 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 06/26] power handling: Introduce power_reboot_attempts Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 08/26] power: power_reboot_attempts: Try multiple approaches Ian Jackson
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

This new variable contains a list of different approaches to try.

* Move the meat of power_state into power_approach_invoke.
* power_state now looks for a single approach to try.
* The default for power_state is to pick the last approach in
  the list, which by definition is supposed to be the most reliable.
* Currently there will only be one approach, `Only'.

No overall functional change other than to log messages.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index fb6a407c..fa7c36e1 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -935,8 +935,15 @@ sub power_cycle_parse_method ($$) {
 
 sub power_cycle_host_setup ($) {
     my ($ho) = @_;
-    $spec = ($ho->{Power} // 'unsupported');
-    $ho->{PowerMethobjs} = power_cycle_parse_method($ho,$spec);
+    my $spec = ($ho->{Power} // 'unsupported');
+    # $ho->{PowerApproaches}[]{Name}        see below
+    # $ho->{PowerApproaches}[]{MethObjs}[]  each has ->pdu_power_state($on)
+    # `Name's are:
+    #    Only   Host only supports one method and this is it
+    $ho->{PowerApproaches} = {
+        Name => 'Only',
+        MethObjs => power_cycle_parse_method($ho, $spec),
+    };
 }
 
 sub power_reboot_attempts ($$$) {
@@ -978,10 +985,10 @@ sub power_cycle ($) {
     power_state($ho, 1);
 }
 
-sub power_state ($$) {
-    my ($ho, $on) = @_;
-    logm("power: setting $on for $ho->{Name}");
-    my @methobjs = @{ $ho->{PowerMethobjs} };
+sub power_approach_invoke ($$$) {
+    my ($ho, $approach, $on) = @_;
+    logm("power: setting $on (using $approach->{Name}) for $ho->{Name}");
+    my @methobjs = @{ $approach->{MethObjs} };
     if ($methobjs[0] eq 'nest') {
         shift @methobjs;
         @methobjs = reverse @methobjs if !$on;
@@ -991,6 +998,22 @@ sub power_state ($$) {
     }
 }
 
+sub power_state ($$;$) {
+    my ($ho, $on, $approach_re) = @_;
+    my @approaches = @{ $ho->{PowerApproaches} };
+    my $approach;
+    if (defined $approach_re) {
+	($approach) = grep { $_->{Name} =~ qr{$approach_re} } @approaches
+	    or die ("No matching power approach for $ho->{Name}".
+		    " (wanted $approach_re) (available: ".
+		    join(' ', map { $_->{Name} } @approaches).
+		    ")\n");
+    } else {
+	$approach = $approaches[-1];
+    }
+    power_approach_invoke($ho,$approach,$on);
+}
+
 #---------- host selection and properties ----------
 
 sub selecthost ($);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 08/26] power: power_reboot_attempts: Try multiple approaches
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (6 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 07/26] power: PowerApproaches replaces $ho->{PowerMethobjs} Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 09/26] power: Provide `try_off' pdu method; deprecate ipmi_try Ian Jackson
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Actually iterate over PowerApproaches, rather than calling power_state
with no approach selector regexp.

No overall functional change right now because nothing puts more
than one entry in PowerApproaches.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index fa7c36e1..d1b7ad66 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -960,11 +960,22 @@ sub power_reboot_attempts ($$$) {
     # to work.  $setup and $await should tolerate this situation; in
     # particular $await must only succeed if the host really did reboot
     # into the boot environment that $await expects.
-    power_state($ho, 0);
-    $setup->();
-    power_cycle_sleep($ho);
-    power_state($ho, 1);
-    $await->();
+    foreach my $approach (@{ $ho->{PowerApproaches} }) {
+	logm("power: rebooting $ho->{Name} (using $approach->{Name})");
+	if (eval {
+	    power_approach_invoke($ho, $approach, 0);
+	    $setup->();
+	    power_cycle_sleep($ho);
+	    power_approach_invoke($ho, $approach, 1);
+	    $await->();
+	    1;
+	}) {
+	    logm("power: rebooted $ho->{Name} (using $approach->{Name})");
+	    return;
+	}
+	logm("power: failed to reboot (using $approach->{Name}): $@");
+    }
+    die "power: all approaches to rebooting $ho->{Name} failed!\n";
 }
 
 sub power_cycle_sleep ($) {
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 09/26] power: Provide `try_off' pdu method; deprecate ipmi_try
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (7 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 08/26] power: power_reboot_attempts: Try multiple approaches Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 10/26] power: New ILOM/PDU arrangements - try just IPMI Ian Jackson
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

We are going to want to use this magically, in our new approach.  Make
a general version, and deprecate ipmi_try (which will be obsoleted by
the new approach and which has probably not been used very much).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/PDU/ipmi_try.pm |  2 ++
 Osstest/PDU/try_off.pm  | 65 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 Osstest/PDU/try_off.pm

diff --git a/Osstest/PDU/ipmi_try.pm b/Osstest/PDU/ipmi_try.pm
index cf851d21..17eb504e 100644
--- a/Osstest/PDU/ipmi_try.pm
+++ b/Osstest/PDU/ipmi_try.pm
@@ -14,6 +14,8 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# NOTE: this method is deprecated.  Use try_off instead.
+
 package Osstest::PDU::ipmi_try;
 
 use strict;
diff --git a/Osstest/PDU/try_off.pm b/Osstest/PDU/try_off.pm
new file mode 100644
index 00000000..aa73c854
--- /dev/null
+++ b/Osstest/PDU/try_off.pm
@@ -0,0 +1,65 @@
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2014 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package Osstest::PDU::try_off;
+
+use strict;
+use warnings;
+
+use Osstest;
+use Osstest::TestSupport;
+use IO::File;
+
+use parent qw(Osstest::PDU::unsupported);
+
+our $default_attempts = 3;
+
+sub new {
+    my ($class, $ho, $methname, @opts) = @_;
+    my $attempts;
+    if ($opts[0] =~ m/^\d+$/) {
+	$attempts = shift @opts;
+    }
+    return bless { Attempts => $attempts,
+		   Then => get_host_method_object($ho, 'PDU', "@opts"),
+		 }, $class;
+}
+
+sub new_from_mo {
+    my ($class, $mo, $attempts) = @_;
+    return bless { Attempts => $attempts,
+		   Then => $mo
+		 }, $class;
+}
+
+sub pdu_power_state {
+    my ($mo, $on) = @_;
+
+    if ($on) {
+	$mo->{Then}->pdu_power_state($on);
+    } else {
+	my $attempts = ($mo->{Attempts} // $default_attempts);
+	foreach my $attempt (1..$attempts) {
+	    eval {
+		$mo->{Then}->pdu_power_state($on);
+	    };
+	    last unless $@;
+	    warn "(attempt $attempt/$attempts) $@";
+	}
+    }
+}
+
+1;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 10/26] power: New ILOM/PDU arrangements - try just IPMI
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (8 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 09/26] power: Provide `try_off' pdu method; deprecate ipmi_try Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 11/26] power: Do not sleep between power off and power on if not needed Ian Jackson
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

We honour two new host properties PowerPDU and PowerILOM, in
preference to PowerMethod.  The semantics are going to be properly
documented in a later patch, but, briefly:

If only one of these is supplied, it works like PowerMethod, except
that `nest' is applied by default.

If both are supplied, we make two approaches: one is just ILOM.  The
other is to use ILOM and PDU together, with pause in between, and with
try_off applied to ILOM.

The current configuration in Massachusetts is, for hosts with IPMI, to
provide a PowerMethod specifying ad hoc to use PDU and then IPMI, and
also to provide both PowerPDU and PowerILOM.

The overall result of this patch, with that configuration, is to avoid
using the PDU at all if an IPMI-requested reboot is successful.  This
should significantly reduce the number of hard power cycles for hosts
with IMPI.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 42 +++++++++++++++++++++++++++++++++++++-----
 1 file changed, 37 insertions(+), 5 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index d1b7ad66..5e2fb488 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -935,15 +935,47 @@ sub power_cycle_parse_method ($$) {
 
 sub power_cycle_host_setup ($) {
     my ($ho) = @_;
-    my $spec = ($ho->{Power} // 'unsupported');
     # $ho->{PowerApproaches}[]{Name}        see below
     # $ho->{PowerApproaches}[]{MethObjs}[]  each has ->pdu_power_state($on)
     # `Name's are:
     #    Only   Host only supports one method and this is it
-    $ho->{PowerApproaches} = {
-        Name => 'Only',
-        MethObjs => power_cycle_parse_method($ho, $spec),
-    };
+    #    ILOM   Try to use just the ILOM
+    #    PDU    Try to use the PDU (but also turn off/on ILOM if provided)
+    my @approaches;
+    my $pdu_s = get_host_property($ho,'PowerPDU');
+    my $ilom_s = get_host_property($ho,'PowerILOM');
+    if ($pdu_s || $ilom_s) {
+	my $ilom_m;
+	if ($ilom_s) {
+	    $ilom_m = power_cycle_parse_method($ho, $ilom_s);
+	    push @approaches, {
+		Name => 'ILOM',
+		MethObjs => ['nest', @$ilom_m ],
+	    };
+	}
+	if ($pdu_s) {
+	    my $pdu_m = power_cycle_parse_method($ho, $pdu_s);
+	    if ($ilom_m) {
+		require Osstest::PDU::try_off;
+		$pdu_m = [
+		    @$pdu_m,
+		    get_host_method_object($ho, 'PDU', 'pause'),
+		    map { Osstest::PDU::try_off->new_from_mo($_) } @$ilom_m,
+		];
+	    }
+	    push @approaches, {
+		Name => 'PDU',
+		MethObjs => ['nest', @$pdu_m ],
+	    };
+	}
+    } else {		
+	my $spec = ($ho->{Power} // 'unsupported');
+	push @approaches, {
+	    Name => 'Only',
+	    MethObjs => power_cycle_parse_method($ho, $spec),
+        };
+    }
+    $ho->{PowerApproaches} = \@approaches;
 }
 
 sub power_reboot_attempts ($$$) {
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 11/26] power: Do not sleep between power off and power on if not needed
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (9 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 10/26] power: New ILOM/PDU arrangements - try just IPMI Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:45 ` [OSSTEST PATCH 12/26] power: Provide `ssh' power method Ian Jackson
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

This is controlled by a new query method on power method objects.  If
every power method says it is instananeous then we do not sleep.

This is going to be most useful when we introduce the new SSH
approach, which should not sleep for the power off time.

But we do it for guests (ie, L1 nested hosts) too.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/PDU/guest.pm       | 5 +++++
 Osstest/PDU/try_off.pm     | 5 +++++
 Osstest/PDU/unsupported.pm | 5 +++++
 Osstest/TestSupport.pm     | 9 ++++++++-
 4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/Osstest/PDU/guest.pm b/Osstest/PDU/guest.pm
index 779ba6c2..7bed724c 100755
--- a/Osstest/PDU/guest.pm
+++ b/Osstest/PDU/guest.pm
@@ -56,4 +56,9 @@ sub pdu_power_state {
     }
 }
 
+sub instantaneous {
+    my ($mo) = @_;
+    return 1;
+}
+
 1;
diff --git a/Osstest/PDU/try_off.pm b/Osstest/PDU/try_off.pm
index aa73c854..37e34301 100644
--- a/Osstest/PDU/try_off.pm
+++ b/Osstest/PDU/try_off.pm
@@ -62,4 +62,9 @@ sub pdu_power_state {
     }
 }
 
+sub instantaneous {
+    my ($mo) = @_;
+    return $mo->{Then}->instantaneous();
+}
+
 1;
diff --git a/Osstest/PDU/unsupported.pm b/Osstest/PDU/unsupported.pm
index 8627f452..c914defd 100644
--- a/Osstest/PDU/unsupported.pm
+++ b/Osstest/PDU/unsupported.pm
@@ -35,4 +35,9 @@ sub pdu_power_state {
     die "power switch request for $mo->{Host}{Name} ($on) not supported\n";
 }
 
+sub instantaneous {
+    my ($mo) = @_;
+    return 0;
+}
+
 1;
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 5e2fb488..c3b2fb7b 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -997,7 +997,14 @@ sub power_reboot_attempts ($$$) {
 	if (eval {
 	    power_approach_invoke($ho, $approach, 0);
 	    $setup->();
-	    power_cycle_sleep($ho);
+	    my $need_sleep = 0;
+	    foreach my $mo (@{ $approach->{MethObjs} }) {
+		next if $mo eq 'nest';
+		next if $mo->instantaneous();
+		$need_sleep = 1;
+		last;
+	    }
+	    power_cycle_sleep($ho) if $need_sleep;
 	    power_approach_invoke($ho, $approach, 1);
 	    $await->();
 	    1;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 12/26] power: Provide `ssh' power method
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (10 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 11/26] power: Do not sleep between power off and power on if not needed Ian Jackson
@ 2019-01-24 18:45 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 13/26] power: Try rebooting hosts with ssh first Ian Jackson
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:45 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

This is not really a power method but it can pretend to be one.  On
power off, it does nothing.  On power on it logs into the host to ask
it to do a hard reboot.

This is rather best effort, but it is eminently suitable for our new
approach/attempts arrangements because those will try another approach
if ssh didn't work.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/PDU/ssh.pm | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 Osstest/PDU/ssh.pm

diff --git a/Osstest/PDU/ssh.pm b/Osstest/PDU/ssh.pm
new file mode 100644
index 00000000..ac1eb919
--- /dev/null
+++ b/Osstest/PDU/ssh.pm
@@ -0,0 +1,74 @@
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2013 Citrix Inc.
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+# 
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+package Osstest::PDU::ssh;
+
+# This power method is used automatically, even when not configured.
+
+use strict;
+use warnings;
+
+use Osstest;
+use Osstest::TestSupport;
+
+use parent qw(Osstest::PDU::unsupported);
+
+our $tty;
+
+sub pdu_sleep_required {
+    return 0;
+}
+
+sub pdu_power_state {
+    my ($mo, $on) = @_;
+
+    if (!$on) {
+	logm("power: request to turn off via SSH method, ignored");
+	return;
+    }
+
+    # These games with ( )& are needed because the command to request
+    # a hard reboot request will not return, so the tcp connection
+    # carrying our ssh command request would just hang.
+
+    my $delay = 5;
+
+    target_cmd_root($mo->{Host}, <<'END', 60);
+ set -e
+ type reboot
+ exec >>/var/log/osstest-reboot.log
+ date
+ exec </dev/null 2>&1
+ set -x
+ (
+    set +e
+    sleep $delay
+    reboot -f -n -d   # Linux sysvinit/systemd
+    reboot -nq        # FreeBSD (rejects above due to -f)
+ )&
+END
+
+    sleep($delay);
+}
+
+sub instantaneous {
+    my ($mo) = @_;
+    # This does not need any more sleep, if it worked.
+    return 1;
+}
+
+1;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 13/26] power: Try rebooting hosts with ssh first
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (11 preceding siblings ...)
  2019-01-24 18:45 ` [OSSTEST PATCH 12/26] power: Provide `ssh' power method Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 14/26] power: Document Power* host properties and power methods Ian Jackson
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Before we try anything with IPMI (if provided) or the PDU, try
rebooting with ssh.

I think this will dramatically reduce the rate at which we power cycle
our test hosts.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index c3b2fb7b..8101b739 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -992,8 +992,12 @@ sub power_reboot_attempts ($$$) {
     # to work.  $setup and $await should tolerate this situation; in
     # particular $await must only succeed if the host really did reboot
     # into the boot environment that $await expects.
-    foreach my $approach (@{ $ho->{PowerApproaches} }) {
-	logm("power: rebooting $ho->{Name} (using $approach->{Name})");
+    my $ssh = {
+	Name => 'SSH',
+	MethObjs => power_cycle_parse_method($ho, 'ssh'),
+    };
+    foreach my $approach ($ssh, @{ $ho->{PowerApproaches} }) {
+	logm("power: trying to reboot $ho->{Name} (using $approach->{Name})");
 	if (eval {
 	    power_approach_invoke($ho, $approach, 0);
 	    $setup->();
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 14/26] power: Document Power* host properties and power methods
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (12 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 13/26] power: Try rebooting hosts with ssh first Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 15/26] power: Honour approach_re in power_cycle and mg-hosts power Ian Jackson
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 README     | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.dev |  4 ++--
 2 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/README b/README
index bb9dc18e..91793795 100644
--- a/README
+++ b/README
@@ -631,6 +631,83 @@ Username
     User name on this host.  Defaults to the output of `whoami'.
     Should not normally be changed.
 
+HostProp_<host>_PowerPDU
+HostProp_<host>_PowerILOM
+    How to power cycle this host.  Each item is a ;-separated
+    list of method specifications.  When power is to be removed
+    or applied, the methods in the list are operated in order
+    (when powering on) or reverse order (when powering off).
+
+    If both PDU and ILOM are supplied, osstest tries first to just use
+    ILOM.  If that is not successful, it tries again using PDU and
+    ILOM together.  In this case: they are done in the appropriate
+    order (PDU first, on power on); it is if `pause' were specified in
+    between PDU and ILOM; and it is as if try_off were specified
+    before each ILOM.
+
+    A method specification has a keyword at the front, and 
+    is in one of these forms:
+
+        Any of the Osstest::PDU::* modules in Osstest/PDU/*.pm.  See
+        the individual modules.  We document here, particularly:
+
+        manual          Asks the user on the controlling terminal
+        unsupported     Fails whenever a power operation is needed
+
+        msw [--apc6] <pdu> <port-name-regexp|port-num>
+             Control and APC masterswitch via SNMP.  The SNMP
+             community is `private'.  See the `pdu-msw' script.
+
+        ipmi <mgmt> [<user> [<pass> [<ipmitool options...>]]]
+             Use IPMI by (by running ipmitool).  <mgmt> is the name or
+             address of the management port.  <user> and <pass>
+             default to the IpmiUser and IpmiPassword host properties.
+
+        ipmiextra on|off|both <mgmt> <user> <pass> [<ipmitool options...>]
+             Does nothing if `on|off|both' is inapplicable, and has
+             less error checking and less defaulting than ipmi.
+
+        Supported specially are:
+
+        <delay>
+        <ondelay>/<offdelay>
+        pause <delay>
+        pause <ondelay> <offdelay>
+             Pause for the specified time(s) (in seconds).
+
+        pause
+             Pause for <ondelay> (defaulting to the PowerOnTime host
+             property) on power on, and for 10 seconds on power off.
+             Normally it is not necessary to specify this explicitly,
+             as it is implied by providing both PowerPDU and
+             PowerILOM.
+
+        try_off [<attempts>] <method...>
+             Use <method>.  However, on powering off: make <attempts>
+             attempts (default=3), and if that fails, only warn rather
+             than failing.
+
+HostProp_<host>_PowerOnTime
+    Length of time it takes this host to wake up from cold power on,
+    until the ILOM is working.  (Used if both PowerPDU and PowerILOM
+    are set, or if `pause' appears in a power method pspecification.)
+    Default is 120 seconds.
+
+HostProp_<host>_PowerCycleTime
+    Length of time this host must be powered off to ensure that it
+    reboots properly.  (This should be the longer value of the values
+    for PDU and ILOM, if applicable.)  Default is 5 seconds.
+
+HostProp_<host>_PowerMethod
+    Older specification for how to power cycle this host.  Only used
+    if neither PowerPDU or PowerILOM is provided.
+
+    Syntax and semantics are the same as those, except that the order
+    of operation is forwards through the list for both power on and
+    power off, unless the first `method' is the pseudo-method `nest'.
+
+    This host property is honoured for backward compatibility.
+
 ========================================
 
 Host-specific config settigs
diff --git a/README.dev b/README.dev
index eff82350..e32889b7 100644
--- a/README.dev
+++ b/README.dev
@@ -38,8 +38,8 @@ Firstly, arrange that it is hooked up to network, serial, and pdu.
 (In the Xen Project Massachusetts test lab, make sure that ansible
 playbook hosts/ has the wiring information; running `make install'
 will then arrange for /root/osstest-hosts-config to contain the Ether,
-Serial and PowerMethod configuration, and also configure the DNS and
-the DHCP server.)
+Serial and PowerILOM/PowerHard/PowerCycleTime configuration, and also
+configure the DNS and the DHCP server.)
 
 Go through the BIOS set up, using the serial console.  Check that:
  - After AC power loss, machine is set to turn on
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 15/26] power: Honour approach_re in power_cycle and mg-hosts power
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (13 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 14/26] power: Document Power* host properties and power methods Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 16/26] ts-host-powercycle: Use a lighter-weight method if available Ian Jackson
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm |  8 ++++----
 mg-hosts               | 14 +++++++++-----
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 8101b739..e45f54b2 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1028,15 +1028,15 @@ sub power_cycle_sleep ($) {
     sleep($to);
 }
 
-sub power_cycle ($) {
-    my ($ho) = @_;
+sub power_cycle ($;$) {
+    my ($ho, $approach_re) = @_;
     $mjobdb->host_check_allocated($ho);
     die "refusing to set power state for host $ho->{Name}".
 	" possibly shared with other jobs\n"
 	if $ho->{SharedMaybeOthers};
-    power_state($ho, 0);
+    power_state($ho, 0, $approach_re);
     power_cycle_sleep($ho);
-    power_state($ho, 1);
+    power_state($ho, 1, $approach_re);
 }
 
 sub power_approach_invoke ($$$) {
diff --git a/mg-hosts b/mg-hosts
index 5361eb63..2edf1216 100755
--- a/mg-hosts
+++ b/mg-hosts
@@ -24,12 +24,16 @@
 #               of osstest.  Will use "sudo". The HOST(s) must be
 #               allocated (via mg-allocate HOST).
 #
-#  ./mg-hosts power HOST ACTION
+#  ./mg-hosts power HOST ACTION [APPROACH_RE]
 #               Power cycles the host. Host must be allocated to the current
 #               user.  Actions are:
 #                "0" or "on"    : power on
 #                "1" or "off"   : power off
 #                "c" or "r"     : reboot
+#               APPROACH_RE is a regexp specifying which method to
+#               use.  Methods are:  Only ILOM PDU SSH
+#               and the lightest method which matches will be used.
+#               If not specified, the most reliable method will be used.
 #
 #  ./mg-hosts create-like SOURCE-HOST NEW-HOST[,NEW-HOST...]
 #               Create new host(s).  This does NOT copy the
@@ -151,15 +155,15 @@ END
 }
 
 sub cmd_power () {
-    die unless @ARGV==2;
-    my ($host,$power) = @ARGV;
+    die unless @ARGV==2 || @ARGV==3;
+    my ($host,$power,$approach_re) = @ARGV;
     $_ = $power;
     $power = m/^1|^on/ ? 1 : m/^0|^off/ ? 0 : m/^r|^c/ ? -1 : die;
     my $ho= selecthost("host=$host");
     if ($power >= 0) {
-	power_state($ho, $power);
+	power_state($ho, $power, $approach_re);
     } else {
-	power_cycle($ho);
+	power_cycle($ho, $approach_re);
     }
 }
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 16/26] ts-host-powercycle: Use a lighter-weight method if available
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (14 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 15/26] power: Honour approach_re in power_cycle and mg-hosts power Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 17/26] power: Rename target_reboot_force from target_reboot_hard Ian Jackson
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-host-powercycle | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ts-host-powercycle b/ts-host-powercycle
index 5c1698c7..79a3b711 100755
--- a/ts-host-powercycle
+++ b/ts-host-powercycle
@@ -33,8 +33,10 @@ our ($whhost) = @ARGV;
 $whhost ||= 'host';
 our $ho= selecthost($whhost);
 
+my $approach_re = qr{(?!.*SSH)};
+
 if (defined $only) {
-    power_state($ho, $only);
+    power_state($ho, $only, $approach_re);
 } else {
-    power_cycle($ho);
+    power_cycle($ho, $approach_re);
 }
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 17/26] power: Rename target_reboot_force from target_reboot_hard
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (15 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 16/26] ts-host-powercycle: Use a lighter-weight method if available Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 18/26] power: power_reboot_attempts: Honour an $approach_re Ian Jackson
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

We are going to make this try softer methods first.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 4 ++--
 ts-logs-capture        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index e45f54b2..96ddbc3c 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -98,7 +98,7 @@ BEGIN {
                       sshopts authorized_keys known_hosts
                       cfg_tftp_di_version controller_ipaddr
                       remote_perl_script_open remote_perl_script_done
-                      host_reboot target_reboot target_reboot_hard            
+                      host_reboot target_reboot target_reboot_force
                       target_choose_vg target_umount_lv target_await_down
                       host_get_free_memory
 
@@ -1437,7 +1437,7 @@ sub target_reboot ($) {
     await_tcp(get_timeout($ho,'reboot',$timeout{RebootUp}), 5,$ho);
 }
 
-sub target_reboot_hard ($) {
+sub target_reboot_force ($) {
     my ($ho) = @_;
     power_cycle($ho);
     await_tcp(get_timeout($ho,'reboot',$timeout{HardRebootUp}), 5, $ho);
diff --git a/ts-logs-capture b/ts-logs-capture
index ebf40721..fe3b0813 100755
--- a/ts-logs-capture
+++ b/ts-logs-capture
@@ -175,7 +175,7 @@ sub fetch_logs_host () {
     if (!try_fetch_logs($ho, $logs)) {
         logm("log fetching failed, trying hard host reboot...");
         if (!eval {
-            target_reboot_hard($ho);
+            target_reboot_force($ho);
             1;
         }) {
             logm("host reboot failed, abandoning log fetches: $@");
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 18/26] power: power_reboot_attempts: Honour an $approach_re
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (16 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 17/26] power: Rename target_reboot_force from target_reboot_hard Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 19/26] ts-logs-capture: power: try ILOM first Ian Jackson
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

The semantics are slightly different here: not specifying it means to
try everything rather than only the hardest.  But the effect is
similar: not specifying $approach_re means we must succeed.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 96ddbc3c..4e1192d4 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -978,8 +978,8 @@ sub power_cycle_host_setup ($) {
     $ho->{PowerApproaches} = \@approaches;
 }
 
-sub power_reboot_attempts ($$$) {
-    my ($ho, $setup, $await) = @_;
+sub power_reboot_attempts ($$$;$) {
+    my ($ho, $setup, $await, $approach_re) = @_;
     # Power cycles $ho, calling $setup->() while it is (supposedly) off.
     # Then, just after turning $ho on, calls $await->().
     # If $await->() succeeds, great: returns.
@@ -997,6 +997,7 @@ sub power_reboot_attempts ($$$) {
 	MethObjs => power_cycle_parse_method($ho, 'ssh'),
     };
     foreach my $approach ($ssh, @{ $ho->{PowerApproaches} }) {
+	next if defined $approach_re && $approach->{Name} !~ qr{$approach_re};
 	logm("power: trying to reboot $ho->{Name} (using $approach->{Name})");
 	if (eval {
 	    power_approach_invoke($ho, $approach, 0);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 19/26] ts-logs-capture: power: try ILOM first
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (17 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 18/26] power: power_reboot_attempts: Honour an $approach_re Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 20/26] power: Use `Combined' as Name for PDU+ILOM approach Ian Jackson
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

If ILOM is provided, and the host is not responding when we try logs
capture, try the ILOM before hard power cycling the host.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 4e1192d4..886e95d4 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1440,8 +1440,9 @@ sub target_reboot ($) {
 
 sub target_reboot_force ($) {
     my ($ho) = @_;
-    power_cycle($ho);
-    await_tcp(get_timeout($ho,'reboot',$timeout{HardRebootUp}), 5, $ho);
+    power_reboot_attempts($ho, sub { }, sub {
+        await_tcp(get_timeout($ho,'reboot',$timeout{HardRebootUp}), 5, $ho);
+    }, qr{(?!.*SSH)});
 }
 
 sub tcpconnect ($$) {
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 20/26] power: Use `Combined' as Name for PDU+ILOM approach
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (18 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 19/26] ts-logs-capture: power: try ILOM first Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 21/26] power: Record approach used for power cycles in runvars Ian Jackson
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 11 +++++++----
 mg-hosts               |  2 +-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 886e95d4..fb14c4b3 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -938,9 +938,10 @@ sub power_cycle_host_setup ($) {
     # $ho->{PowerApproaches}[]{Name}        see below
     # $ho->{PowerApproaches}[]{MethObjs}[]  each has ->pdu_power_state($on)
     # `Name's are:
-    #    Only   Host only supports one method and this is it
-    #    ILOM   Try to use just the ILOM
-    #    PDU    Try to use the PDU (but also turn off/on ILOM if provided)
+    #    Only     Host only supports one method and this is it
+    #    ILOM     Try to use just the ILOM
+    #    PDU      Try to use the PDU (no ILOM provided)
+    #    Combined Try to use the PDU and ILOM tohether
     my @approaches;
     my $pdu_s = get_host_property($ho,'PowerPDU');
     my $ilom_s = get_host_property($ho,'PowerILOM');
@@ -955,8 +956,10 @@ sub power_cycle_host_setup ($) {
 	}
 	if ($pdu_s) {
 	    my $pdu_m = power_cycle_parse_method($ho, $pdu_s);
+	    my $pdu_name = 'PDU';
 	    if ($ilom_m) {
 		require Osstest::PDU::try_off;
+		$pdu_name = 'Combined';
 		$pdu_m = [
 		    @$pdu_m,
 		    get_host_method_object($ho, 'PDU', 'pause'),
@@ -964,7 +967,7 @@ sub power_cycle_host_setup ($) {
 		];
 	    }
 	    push @approaches, {
-		Name => 'PDU',
+		Name => $pdu_name,
 		MethObjs => ['nest', @$pdu_m ],
 	    };
 	}
diff --git a/mg-hosts b/mg-hosts
index 2edf1216..58b4acc3 100755
--- a/mg-hosts
+++ b/mg-hosts
@@ -31,7 +31,7 @@
 #                "1" or "off"   : power off
 #                "c" or "r"     : reboot
 #               APPROACH_RE is a regexp specifying which method to
-#               use.  Methods are:  Only ILOM PDU SSH
+#               use.  Methods are:  Only Combined ILOM PDU SSH
 #               and the lightest method which matches will be used.
 #               If not specified, the most reliable method will be used.
 #
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 21/26] power: Record approach used for power cycles in runvars
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (19 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 20/26] power: Use `Combined' as Name for PDU+ILOM approach Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 22/26] Executive: Break out span_colour Ian Jackson
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 17 +++++++++++++----
 ts-host-install        |  2 +-
 ts-logs-capture        |  2 +-
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index fb14c4b3..334cc2cb 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -981,12 +981,15 @@ sub power_cycle_host_setup ($) {
     $ho->{PowerApproaches} = \@approaches;
 }
 
-sub power_reboot_attempts ($$$;$) {
-    my ($ho, $setup, $await, $approach_re) = @_;
+sub power_reboot_attempts ($$$;$$) {
+    my ($ho, $setup, $await, $approach_re, $record_runvar_tail) = @_;
     # Power cycles $ho, calling $setup->() while it is (supposedly) off.
     # Then, just after turning $ho on, calls $await->().
     # If $await->() succeeds, great: returns.
     #
+    # Records the method used in the synth runvar IDENT_power_TAIL
+    # (a comma-separated list)
+    #
     # If it fails (dies), power_reboot_attempts will attempt to power
     # cycle $ho using a more certain method and call $fn again.  This
     # may occur multiple times.
@@ -1018,6 +1021,12 @@ sub power_reboot_attempts ($$$;$) {
 	    1;
 	}) {
 	    logm("power: rebooted $ho->{Name} (using $approach->{Name})");
+	    if (defined $record_runvar_tail) {
+		my $rv = "$ho->{Ident}_power_${record_runvar_tail}";
+		my $newval = $r{$rv}.(!!length($r{$rv}) and ',')
+		    .$approach->{Name};
+		store_runvar($rv, $newval);
+	    }
 	    return;
 	}
 	logm("power: failed to reboot (using $approach->{Name}): $@");
@@ -1441,8 +1450,8 @@ sub target_reboot ($) {
     await_tcp(get_timeout($ho,'reboot',$timeout{RebootUp}), 5,$ho);
 }
 
-sub target_reboot_force ($) {
-    my ($ho) = @_;
+sub target_reboot_force ($;$) {
+    my ($ho, $record_runvar_tail) = @_;
     power_reboot_attempts($ho, sub { }, sub {
         await_tcp(get_timeout($ho,'reboot',$timeout{HardRebootUp}), 5, $ho);
     }, qr{(?!.*SSH)});
diff --git a/ts-host-install b/ts-host-install
index 068242eb..292733ba 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -71,7 +71,7 @@ END
 	my $logtailer= Osstest::Logtailer->new($c{WebspaceLog});
 	my $timeout = get_timeout($ho,'reboot',$timeout{ReadPreseed});
 	await_webspace_fetch_byleaf($timeout, 1, $logtailer, $ho, $ps_url);
-    });
+    }, undef, "install");
 
     if ($poweron_test_only) {
 	logm("Hooray, power on worked.");
diff --git a/ts-logs-capture b/ts-logs-capture
index fe3b0813..a429bb76 100755
--- a/ts-logs-capture
+++ b/ts-logs-capture
@@ -175,7 +175,7 @@ sub fetch_logs_host () {
     if (!try_fetch_logs($ho, $logs)) {
         logm("log fetching failed, trying hard host reboot...");
         if (!eval {
-            target_reboot_force($ho);
+            target_reboot_force($ho, 'recover');
             1;
         }) {
             logm("host reboot failed, abandoning log fetches: $@");
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 22/26] Executive: Break out span_colour
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (20 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 21/26] power: Record approach used for power cycles in runvars Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 23/26] Executive: Export $grey_* with :colours Ian Jackson
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Executive.pm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index 0be27b64..1b1cdc36 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -59,7 +59,8 @@ BEGIN {
                       db_pg_dsn opendb opendb_state
                       db_schema_updates_applied db_schema_updates_intree
                       );
-    %EXPORT_TAGS = ( colours => [qw($green $red $yellow $purple $blue)] );
+    %EXPORT_TAGS = ( colours => [qw($green $red $yellow $purple $blue
+				    span_colour)] );
 
     @EXPORT_OK   = @{ $EXPORT_TAGS{colours} };
 }
@@ -306,6 +307,11 @@ our $grey_pale= '#666666';
 our $grey_mid=  '#888888';
 our $grey_dark= '#cccccc';
 
+sub span_colour ($) {
+    my ($colour) = @_;
+    "<span style=\"background-color: $colour\">"
+}
+
 sub report_run_getinfo ($) {
     # $f is a joined flight/job row, must contain at least
     #    flight job status
@@ -345,7 +351,7 @@ END
 		$summary .= " $fs->{status}";
 		$colour = $failcolour;
 	    }
-	    push @content, "<span style=\"background-color: $colour\">".
+	    push @content, span_colour($colour).
 		encode_entities($summary)."</span>";
         }
 	if (!@content) {
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 23/26] Executive: Export $grey_* with :colours
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (21 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 22/26] Executive: Break out span_colour Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 24/26] sg-report-host-history: Move SET LOCAL into transaction Ian Jackson
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

No functional change with existing callers.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Executive.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index 1b1cdc36..0d8502b5 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -60,6 +60,7 @@ BEGIN {
                       db_schema_updates_applied db_schema_updates_intree
                       );
     %EXPORT_TAGS = ( colours => [qw($green $red $yellow $purple $blue
+                                    $grey_pale $grey_mid $grey_dark
 				    span_colour)] );
 
     @EXPORT_OK   = @{ $EXPORT_TAGS{colours} };
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 24/26] sg-report-host-history: Move SET LOCAL into transaction
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (22 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 23/26] Executive: Export $grey_* with :colours Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 25/26] sg-report-host-history: Show used power approach(es) Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 26/26] DO NOT APPLY power: ts-freebsd-host-install: Use power_reboot_attempts Ian Jackson
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Gets rid of this warning:
  WARNING:  SET LOCAL can only be used in transaction blocks

This suggests that this code was previously not effective...

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 sg-report-host-history | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sg-report-host-history b/sg-report-host-history
index 871ad5fe..51814534 100755
--- a/sg-report-host-history
+++ b/sg-report-host-history
@@ -266,15 +266,16 @@ db_retry($dbh_tests, [], sub {
     computeflightsrange();
 });
 
-$dbh_tests->do("SET LOCAL enable_seqscan=false");
-# Otherwise the PostgreSQL query planner likes to do a complete scan
-# of the runvars table, rather than walking backwards through the
-# flights until it has what we've told it is enough.
-
 foreach my $host (@ARGV) {
     if ($host =~ m/^flight:/) {
 	my $flight=$'; #';
 	db_retry($dbh_tests, [], sub {
+            $dbh_tests->do("SET LOCAL enable_seqscan=false");
+            # Otherwise the PostgreSQL query planner likes to do a
+            # complete scan of the runvars table, rather than walking
+            # backwards through the flights until it has what we've
+            # told it is enough.
+
 	    our $hostsinflightq //= db_prepare(<<END);
 	        SELECT DISTINCT val
 		  FROM runvars
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 25/26] sg-report-host-history: Show used power approach(es)
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (23 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 24/26] sg-report-host-history: Move SET LOCAL into transaction Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  2019-01-24 18:46 ` [OSSTEST PATCH 26/26] DO NOT APPLY power: ts-freebsd-host-install: Use power_reboot_attempts Ian Jackson
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 sg-report-host-history | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/sg-report-host-history b/sg-report-host-history
index 51814534..18b538e9 100755
--- a/sg-report-host-history
+++ b/sg-report-host-history
@@ -161,6 +161,7 @@ sub reporthost ($) {
     print H "<th>branch</th><th>intended</th><th>blessing</th>\n";
 
     print H "<th>job</th><th>failure</th>\n";
+    print H "<th>power</th>\n";
 
     print H "</tr>\n";
 
@@ -188,6 +189,16 @@ END
 	 LIMIT 1
 END
 
+    # the final AND is just to reduce the data flow
+    our $jrunvarq //= db_prepare(<<END);
+	SELECT name, val
+	  FROM runvars
+	 WHERE flight=? AND job=?
+           AND (
+               name LIKE (? || '_power_%')
+           )
+END
+
     my $inrows = $hosts{$hostname};
     print DEBUG "FOUND ", (scalar @$inrows), " ROWS for $hostname\n";
 
@@ -213,6 +224,12 @@ END
     foreach my $jr (@rows) {
 	my $ir = jobquery($infoq, $jr);
 	my $ar = jobquery($allocdq, $jr);
+	my $ident = $jr->{name};
+	$jrunvarq->execute($jr->{flight}, $jr->{job}, $ident);
+        my %runvars;
+        while (my ($n, $v) = $jrunvarq->fetchrow_array()) {
+            $runvars{$n} = $v;
+        }
 
 	my $altcolour = report_altcolour($alternate);
 	print H "<tr $altcolour>";
@@ -252,6 +269,45 @@ END
 	my $ri = report_run_getinfo({ %$jr, %$ir });
 	print H "<td $ri->{ColourAttr}>$ri->{Content}</td>\n";
 
+	my %powers;
+	foreach my $r (sort keys %runvars) {
+	    next unless $r =~ m{^\Q${ident}\E_power_};
+	    $powers{$'} = $runvars{$r};
+	}
+	my $skipped = 0;
+        my $any_power = 0;
+        my $pr_power_colour = sub {
+            my ($colour, $contents) = @_;
+            if ($any_power++) {
+                print H span_colour($colour), $contents, '</span>';
+            } else {
+                print H "<td bgcolor=\"$colour\">", $contents;
+            }
+        };
+	my $pr_power = sub {
+	    my ($wh) = @_;
+	    for (; $skipped; $skipped--) {
+		$pr_power_colour->($grey_mid, " - ");
+	    }
+	    my $how = $powers{$wh};
+	    my $colour =
+		$how =~ /PDU/      ? $yellow :
+		$how =~ /Combined/ ? $yellow :
+		$how eq 'SSH'      ? $green  :
+		                     $grey_pale ;
+            $pr_power_colour->($colour, " $how ");
+	};
+	foreach my $wh (qw(install recover)) {
+	    $skipped++, next unless exists $powers{$wh};
+	    $pr_power->($wh);
+	    delete $powers{$wh};
+	}
+	foreach my $wh (sort keys %powers) {
+	    $pr_power->($wh);
+	}
+        print H "<td>" if !$any_power;
+	print H "</td>\n";
+
 	print H "</tr>\n\n";
 	$alternate ^= 1;
     }
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [OSSTEST PATCH 26/26] DO NOT APPLY power: ts-freebsd-host-install: Use power_reboot_attempts
  2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
                   ` (24 preceding siblings ...)
  2019-01-24 18:46 ` [OSSTEST PATCH 25/26] sg-report-host-history: Show used power approach(es) Ian Jackson
@ 2019-01-24 18:46 ` Ian Jackson
  25 siblings, 0 replies; 27+ messages in thread
From: Ian Jackson @ 2019-01-24 18:46 UTC (permalink / raw
  To: xen-devel; +Cc: Ian Jackson, Roger Pau Monné

RFC.  Needs input on how to
 | check that this is the installer environment
as requested by the comment
 | in particular $await must only succeed if the host really did
 | reboot into the boot environment that $await expects.
near the top of power_reboot_attempts

CC: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-freebsd-host-install | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/ts-freebsd-host-install b/ts-freebsd-host-install
index 53daeefc..21f3b5a2 100755
--- a/ts-freebsd-host-install
+++ b/ts-freebsd-host-install
@@ -259,14 +259,14 @@ END
 }
 
 # Switch off, setup PXE and switch on to the installer
-power_state($ho, 0);
-setup_netboot_installer();
-power_cycle_sleep($ho);
-power_state($ho, 1);
-
-# Wait for the host to finish booting
-logm("Waiting for the installer to boot");
-await_tcp(get_timeout($ho,'reboot',$timeout), 5, $ho);
+power_reboot_attempts($ho, sub {
+    setup_netboot_installer();
+}, sub {
+    # Wait for the host to finish booting
+    logm("Waiting for the installer to boot");
+    await_tcp(get_timeout($ho,'reboot',$timeout), 5, $ho);
+    xxx check that this is the installer environment
+}, undef, 'install');
 
 if ($bootonly) {
     hostprop_putative_record($ho, "MemdiskAppend", $memdisk_append)
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-01-24 18:47 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-24 18:45 [OSSTEST PATCH 00/26] Reduce hard power cycles Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 01/26] power: Osstest::PDU::*: drop Exporter blocks Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 02/26] power: Osstest::PDU::*: use parent ::unsupported Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 03/26] power: ipmi_try: Use `use parent' instead of Exporter Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 04/26] power: Osstest::PDU::*: reuse default new method where applicable Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 05/26] power handling: Break out power_cycle_parse_method Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 06/26] power handling: Introduce power_reboot_attempts Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 07/26] power: PowerApproaches replaces $ho->{PowerMethobjs} Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 08/26] power: power_reboot_attempts: Try multiple approaches Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 09/26] power: Provide `try_off' pdu method; deprecate ipmi_try Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 10/26] power: New ILOM/PDU arrangements - try just IPMI Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 11/26] power: Do not sleep between power off and power on if not needed Ian Jackson
2019-01-24 18:45 ` [OSSTEST PATCH 12/26] power: Provide `ssh' power method Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 13/26] power: Try rebooting hosts with ssh first Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 14/26] power: Document Power* host properties and power methods Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 15/26] power: Honour approach_re in power_cycle and mg-hosts power Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 16/26] ts-host-powercycle: Use a lighter-weight method if available Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 17/26] power: Rename target_reboot_force from target_reboot_hard Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 18/26] power: power_reboot_attempts: Honour an $approach_re Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 19/26] ts-logs-capture: power: try ILOM first Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 20/26] power: Use `Combined' as Name for PDU+ILOM approach Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 21/26] power: Record approach used for power cycles in runvars Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 22/26] Executive: Break out span_colour Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 23/26] Executive: Export $grey_* with :colours Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 24/26] sg-report-host-history: Move SET LOCAL into transaction Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 25/26] sg-report-host-history: Show used power approach(es) Ian Jackson
2019-01-24 18:46 ` [OSSTEST PATCH 26/26] DO NOT APPLY power: ts-freebsd-host-install: Use power_reboot_attempts 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.