xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 3/4] PDU: ipmi: Only log the first cmd run
Date: Wed, 11 Jul 2018 15:54:06 +0100	[thread overview]
Message-ID: <1531320847-10243-3-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1531320847-10243-1-git-send-email-ian.jackson@eu.citrix.com>

This quietens the output again.

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

diff --git a/Osstest/PDU/ipmi.pm b/Osstest/PDU/ipmi.pm
index f3a50c9..b6621db 100644
--- a/Osstest/PDU/ipmi.pm
+++ b/Osstest/PDU/ipmi.pm
@@ -50,11 +50,12 @@ sub pdu_power_state {
     my $onoff= $on ? "on" : "off";
 
     my @cmd = (qw(ipmitool -H), $mo->{Mgmt},
-               '-U',$mo->{User}, '-P',$mo->{Pass});
+
+    my $cmd_logged;
 
     my $getstatus = sub {
         my @scmd = (@cmd, qw(power status));
-        logm("PDU IMPI: @scmd");
+        logm("PDU IMPI: @scmd") unless $cmd_logged++;
         open IPMI, "-|", @scmd or die $!;
         my $status = do { local $/=undef; <IPMI>; };
         $?=0; $!=0;
-- 
2.1.4


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

  parent reply	other threads:[~2018-07-11 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 14:54 [OSSTEST PATCH 1/4] PDU: ipmi: Use arrays rather than strings for cmd Ian Jackson
2018-07-11 14:54 ` [OSSTEST PATCH 2/4] PDU: pause: Honour OSSTEST_PDU_NOPAUSE Ian Jackson
2018-07-11 14:54 ` Ian Jackson [this message]
2018-07-11 14:54 ` [OSSTEST PATCH 4/4] PDU: ipmi: Pass further options to ipmitool Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1531320847-10243-3-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).