diff --git a/cmd/frostfs-adm/internal/modules/morph/config/config.go b/cmd/frostfs-adm/internal/modules/morph/config/config.go index bfcd4ac00..ba6e515c1 100644 --- a/cmd/frostfs-adm/internal/modules/morph/config/config.go +++ b/cmd/frostfs-adm/internal/modules/morph/config/config.go @@ -137,6 +137,8 @@ func SetConfigCmd(cmd *cobra.Command, args []string) error { return wCtx.AwaitTx() } +const maxECSum = 256 + func validateConfig(args map[string]any, forceFlag bool) error { var sumEC int64 _, okData := args[netmap.MaxECDataCountConfig] @@ -172,9 +174,9 @@ func validateConfig(args map[string]any, forceFlag bool) error { } } - if sumEC > 256 && !forceFlag { - return fmt.Errorf("the sum of %s and %s must be <= 256, got %d", - netmap.MaxECDataCountConfig, netmap.MaxECParityCountConfig, sumEC) + if sumEC > maxECSum && !forceFlag { + return fmt.Errorf("the sum of %s and %s must be <= %d, got %d", + netmap.MaxECDataCountConfig, netmap.MaxECParityCountConfig, maxECSum, sumEC) } return nil }