frostfs-adm panics on negative values #1067

Closed
opened 2024-04-01 10:58:44 +00:00 by achuprov · 0 comments
Member

Expected Behavior

 ./bin/frostfs-adm --config /home/achuprov/Documents/work/frostfs-dev-env/frostfs-adm.yml morph set-policy ExecFeeFactor=-1
Error: can't parse parameter value 'ExecFeeFactor=-1': strconv.ParseUint: parsing "-1": invalid syntax

Current Behavior

 ./bin/frostfs-adm --config /home/achuprov/Documents/work/frostfs-dev-env/frostfs-adm.yml morph set-policy ExecFeeFactor=-1
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/policy.SetPolicyCmd(0xc000500d00?, {0xc000514210, 0x1, 0xfed327?})
        git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/policy/policy.go:51 +0x4e5
github.com/spf13/cobra.(*Command).execute(0x19e6280, {0xc0003453c0, 0x3, 0x4})
        github.com/spf13/cobra@v1.8.0/command.go:983 +0xabc
github.com/spf13/cobra.(*Command).ExecuteC(0x19dd5a0)
        github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.8.0/command.go:1039
git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules.Execute(...)
        git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/root.go:50
main.main()
        git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/main.go:10 +0x1a
<!-- Provide a general summary of the issue in the Title above --> ## Expected Behavior ``` ./bin/frostfs-adm --config /home/achuprov/Documents/work/frostfs-dev-env/frostfs-adm.yml morph set-policy ExecFeeFactor=-1 Error: can't parse parameter value 'ExecFeeFactor=-1': strconv.ParseUint: parsing "-1": invalid syntax ``` ## Current Behavior ``` ./bin/frostfs-adm --config /home/achuprov/Documents/work/frostfs-dev-env/frostfs-adm.yml morph set-policy ExecFeeFactor=-1 panic: runtime error: index out of range [1] with length 1 goroutine 1 [running]: git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/policy.SetPolicyCmd(0xc000500d00?, {0xc000514210, 0x1, 0xfed327?}) git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/policy/policy.go:51 +0x4e5 github.com/spf13/cobra.(*Command).execute(0x19e6280, {0xc0003453c0, 0x3, 0x4}) github.com/spf13/cobra@v1.8.0/command.go:983 +0xabc github.com/spf13/cobra.(*Command).ExecuteC(0x19dd5a0) github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/cobra@v1.8.0/command.go:1039 git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules.Execute(...) git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/root.go:50 main.main() git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/main.go:10 +0x1a ```
achuprov added the
bug
frostfs-adm
good first issue
triage
labels 2024-04-01 10:58:44 +00:00
fyrchik changed title from frostfs-adm panics on negative values to `frostfs-adm` panics on negative values 2024-04-01 10:59:19 +00:00
fyrchik added this to the v0.39.0 milestone 2024-04-04 08:02:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1067
No description provided.