Skip to content

Commit

Permalink
mogadm: include drain devices by default in summary
Browse files Browse the repository at this point in the history
drain devices are still usable to clients, so it probably makes
sense to include this in the default output of "mogadm device summary"
(especially given the drain change in 2.40)

Not including drain devices by default confused me at first, so
perhaps it may be confusing to others.
  • Loading branch information
Eric Wong authored and dormando committed Aug 8, 2013
1 parent c248e62 commit 7136abc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mogadm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ my $usage = {
des => "List the summary of devices, for each host.",
args => "[opts]",
opts => {
"--status=s" => "Devices of status A. Defaults to 'alive,readonly'",
"--status=s" => "Devices of status A. Defaults to 'alive,readonly,drain'",
"--hostname=s" => "Limit results to a given host.",
},
},
Expand Down Expand Up @@ -845,7 +845,7 @@ sub cmd_device_summary {
my $args = shift;
my $hostname = $args->{hostname};
my %show_state;
$show_state{$_} = 1 foreach split(/,/, ($args->{status} || "alive,readonly"));
$show_state{$_} = 1 foreach split(/,/, ($args->{status} || "alive,readonly,drain"));

my $hosts = hosts();
fail_text('no_hosts') unless $hosts;
Expand Down

0 comments on commit 7136abc

Please sign in to comment.