Skip to content

Commit

Permalink
Fix #10012 - empty string as a parameter in etcd extra args
Browse files Browse the repository at this point in the history
Signed-off-by: Jordano Celestrini <jordanorc@gmail.com>
  • Loading branch information
jordanorc committed Apr 24, 2024
1 parent 94e29e2 commit a0a4885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/daemons/executor/executor.go
Expand Up @@ -103,7 +103,7 @@ func (e ETCDConfig) ToConfigFile(extraArgs []string) (string, error) {
} else if time, err := time.ParseDuration(extraArg[1]); err == nil && (strings.Contains(lowerKey, "time") || strings.Contains(lowerKey, "duration") || strings.Contains(lowerKey, "interval") || strings.Contains(lowerKey, "retention")) {
// auto-compaction-retention is either a time.Duration or int, depending on version. If it is an int, it will be caught above.
s[key] = time
} else if err := yaml.Unmarshal([]byte(extraArg[1]), &stringArr); err == nil {
} else if err := yaml.Unmarshal([]byte(extraArg[1]), &stringArr); err == nil && (len(extraArg[1]) > 0) {
s[key] = stringArr
} else {
switch strings.ToLower(extraArg[1]) {
Expand Down

0 comments on commit a0a4885

Please sign in to comment.