Skip to content

Commit

Permalink
pool: Fix filtering of options in script HSM driver
Browse files Browse the repository at this point in the history
Motivation:

The script HSM driver filters a number of options before calling the script as
these options are used internall by the driver. A regression in 2.13 broke this
filtering.

Modification:

When filtering on a map, we have to remember to filter on the key, not the entire
entry.

Result:

Fixed a regression introduced in 2.13 in which internal options like -c:puts were
erroneously included to the call out to the HSM script.

Target: trunk
Request: 2.15
Request: 2.14
Request: 2.13
Require-notes: yes
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: https://rb.dcache.org/r/9103/
(cherry picked from commit 5f7ac60)
  • Loading branch information
gbehrmann committed Mar 7, 2016
1 parent 542d7ad commit dd01e17
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -259,7 +259,7 @@ private String buildCommand(Map<String, String> properties)
private List<String> buildOptions(Map<String, String> properties)
{
return properties.entrySet().stream()
.filter(property -> !PROPERTIES.contains(property))
.filter(entry -> !PROPERTIES.contains(entry.getKey()))
.map(entry -> "-" + entry.getKey() + (Strings.isNullOrEmpty(entry.getValue()) ? "" : "="+entry.getValue()))
.collect(Collectors.toList());
}
Expand Down

0 comments on commit dd01e17

Please sign in to comment.