Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing white spaces from provided values #2922

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

cniackz
Copy link
Collaborator

@cniackz cniackz commented Jul 5, 2023

To fix: #2755

Explanation:

All I am doing is to trim the spaces introduced by the user so that we avoid an invalid configuration:

API: SYSTEM()
Time: 14:05:47 UTC 06/30/2023
DeploymentID: ad79aacc-3ffb-4726-9ff3-6cc7ca58b27a
Error: Invalid site configuration: region ' us-west-rack-2' is invalid, expected simple characters such as [us-east-1, myregion...] (*fmt.wrapError)
       7: internal/logger/logger.go:258:logger.LogIf()
       6: cmd/config-current.go:493:cmd.lookupConfigs()
       5: cmd/config.go:218:cmd.initConfig()
       4: cmd/config.go:189:cmd.(*ConfigSys).Init()
       3: cmd/server-main.go:452:cmd.initConfigSubsystem()
       2: cmd/server-main.go:423:cmd.initServerConfig()
       1: cmd/server-main.go:662:cmd.serverMain()

I think this can be generic as in non of our configurations we need leading or trailing spaces to work, so trim seems to be the solution here.

@cniackz cniackz self-assigned this Jul 5, 2023
@cniackz cniackz added the bug this needs to be fixed label Jul 5, 2023
@cniackz cniackz requested a review from bexsoft July 5, 2023 17:26
Copy link
Contributor

@reivaj05 reivaj05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

harshavardhana
harshavardhana previously approved these changes Jul 20, 2023
@cniackz cniackz force-pushed the remove-trailing-spaces-from-region branch from 570600b to ec2682b Compare July 31, 2023 20:31
@cniackz cniackz changed the title removing white spaces from provided values Removing white spaces from provided values Jul 31, 2023
@bexsoft bexsoft merged commit 0d628f5 into minio:master Aug 1, 2023
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug this needs to be fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using web console to set server location adds space before value making it invalid
5 participants