Skip to content

Commit

Permalink
fix(datadomain-cleaning):fixed issue when cleaning is running
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucie Dubrunfaut authored and Lucie Dubrunfaut committed Dec 12, 2024
1 parent eb7ae7f commit e58da7b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/storage/emc/datadomain/snmp/mode/cleaning.pm
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,14 @@ sub manage_selection {
if ($self->{global}->{lastExecSeconds} == -1 || $self->{global}->{lastExecSeconds} > $lastExecSeconds) {
$self->{global}->{lastExecSeconds} = $lastExecSeconds;
}
}elsif($snmp_result->{$oid} =~ /Cleaning: phase (\d+) of (\d+) \(copy\)/){
$self->{global}->{lastExecHuman} = "running (phase $1 of $2 (copy))";
$self->{global}->{lastExecSeconds} = 0;
}
}

if ($self->{global}->{lastExecSeconds} != -1) {
# If there is a lastExecSeconds set (if above in the looop) and this is not a cleaning running (elsif above)
if ($self->{global}->{lastExecSeconds} != -1 && ($self->{global}->{lastExecSeconds} == 0 && $self->{global}->{lastExecHuman} eq "never")) {
$self->{global}->{lastExecHuman} = centreon::plugins::misc::change_seconds(
value => $self->{global}->{lastExecSeconds}
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.1.3.6.1.4.1.19746.1.3.5.1.1.2.0 = STRING: Cleaning: phase 5 of 6 (copy)
2 changes: 1 addition & 1 deletion tests/storage/emc/datadomain/snmp/slim-datadomain.snmpwalk
Original file line number Diff line number Diff line change
Expand Up @@ -14972,7 +14972,7 @@
.1.3.6.1.4.1.19746.1.3.2.1.1.9.3 = STRING: Anonymized 098
.1.3.6.1.4.1.19746.1.3.2.1.1.9.4 = STRING: Anonymized 136
.1.3.6.1.4.1.19746.1.3.2.1.1.9.5 = STRING: Anonymized 207
.1.3.6.1.4.1.19746.1.3.5.1.1.2.0 = STRING: Anonymized 176
.1.3.6.1.4.1.19746.1.3.5.1.1.2.0 = STRING: "Cleaning finished at 2024/08/27 13:58:59."
.1.3.6.1.4.1.19746.1.4.1.1.1.2.1 = STRING: Anonymized 018
.1.3.6.1.4.1.19746.1.4.1.1.1.2.2 = STRING: Anonymized 005
.1.3.6.1.4.1.19746.1.4.1.1.1.2.3 = STRING: Anonymized 122
Expand Down

0 comments on commit e58da7b

Please sign in to comment.