storagenode: fix lazyfilewalker failing with SIGPIPE

Lazyfilewalker was failing with SIGPIPE which was quite
misleading. The command was failing because the
the value of the --lower-io-priority flag was assumed
to be an arguement since it was passed as
"--lower-io-priority true" instead "--lower-io-priority=true"

Resolves https://github.com/storj/storj/issues/5900

Change-Id: Icf79fcce76dafee21659d76ee0ce19d8520c8f1d
This commit is contained in:
Clement Sam 2023-05-24 14:37:23 +00:00 committed by Storj Robot
parent 919278dbf9
commit c6f67d4799

View File

@ -4,7 +4,7 @@
package lazyfilewalker package lazyfilewalker
import ( import (
"strconv" "fmt"
"storj.io/storj/storagenode/blobstore/filestore" "storj.io/storj/storagenode/blobstore/filestore"
) )
@ -37,6 +37,6 @@ func (config *Config) Args() []string {
// use the json formatter in the subprocess, so we could read lines and re-log them in the main process // use the json formatter in the subprocess, so we could read lines and re-log them in the main process
// with all the fields intact. // with all the fields intact.
"--log.encoding", "json", "--log.encoding", "json",
"--lower-io-priority", strconv.FormatBool(config.LowerIOPriority), fmt.Sprintf("--lower-io-priority=%v", config.LowerIOPriority),
} }
} }