From 59de20fbbac11ba760978b7adcc558e8bb2d98e6 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 20 Sep 2022 16:29:09 +0300 Subject: [PATCH] [#1764] neofs-node: Allow to check configuration Signed-off-by: Evgenii Stratonikov --- CHANGELOG.md | 1 + cmd/neofs-node/main.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e048ff093..0578b3097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Changelog for NeoFS Node - Changelog updates CI step (#1808) - Validate storage node configuration before node startup (#1805) +- `neofs-node -check` command to check the configuration file (#1805) ### Changed diff --git a/cmd/neofs-node/main.go b/cmd/neofs-node/main.go index 28bc32083..bb4827bb8 100644 --- a/cmd/neofs-node/main.go +++ b/cmd/neofs-node/main.go @@ -37,6 +37,7 @@ func fatalOnErrDetails(details string, err error) { func main() { configFile := flag.String("config", "", "path to config") versionFlag := flag.Bool("version", false, "neofs node version") + dryRunFlag := flag.Bool("check", false, "validate configuration and exit") flag.Parse() if *versionFlag { @@ -50,6 +51,10 @@ func main() { err := validateConfig(appCfg) fatalOnErr(err) + if *dryRunFlag { + return + } + c := initCfg(appCfg) initApp(c)