forked from TrueCloudLab/frostfs-node
[#1764] neofs-node: Allow to check configuration
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
0fb5c51ac9
commit
59de20fbba
2 changed files with 6 additions and 0 deletions
|
@ -7,6 +7,7 @@ Changelog for NeoFS Node
|
||||||
|
|
||||||
- Changelog updates CI step (#1808)
|
- Changelog updates CI step (#1808)
|
||||||
- Validate storage node configuration before node startup (#1805)
|
- Validate storage node configuration before node startup (#1805)
|
||||||
|
- `neofs-node -check` command to check the configuration file (#1805)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ func fatalOnErrDetails(details string, err error) {
|
||||||
func main() {
|
func main() {
|
||||||
configFile := flag.String("config", "", "path to config")
|
configFile := flag.String("config", "", "path to config")
|
||||||
versionFlag := flag.Bool("version", false, "neofs node version")
|
versionFlag := flag.Bool("version", false, "neofs node version")
|
||||||
|
dryRunFlag := flag.Bool("check", false, "validate configuration and exit")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if *versionFlag {
|
if *versionFlag {
|
||||||
|
@ -50,6 +51,10 @@ func main() {
|
||||||
err := validateConfig(appCfg)
|
err := validateConfig(appCfg)
|
||||||
fatalOnErr(err)
|
fatalOnErr(err)
|
||||||
|
|
||||||
|
if *dryRunFlag {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
c := initCfg(appCfg)
|
c := initCfg(appCfg)
|
||||||
|
|
||||||
initApp(c)
|
initApp(c)
|
||||||
|
|
Loading…
Reference in a new issue