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

fix: config commit --force not work #335

Closed
wants to merge 1 commit into from

Conversation

CodeRusher
Copy link

@CodeRusher CodeRusher commented Nov 9, 2023

In the following code snippet, when curveadm.ParseTopology() function returns an error, it will return err.
but if --force=1 option is set, the logic to update the config should continue to execute.

func runCommit(curveadm *cli.CurveAdm, options commitOptions) error {
	// 1) parse cluster topology
	_, err := curveadm.ParseTopology()
	if err != nil && !skipError(err) {
		return err
	}
}

Case:
(1) For example, for the following config, it has syntax errors(a=1), but the config update will still succeed.
(2) But now if you try to update the config(a: 1), it will fail, reporting a parsing error and unable to proceed the update.

chunkserver_services:
  config:
      a=1

@caoxianfei1
Copy link
Contributor

@CodeRusher Thanks your contribute. However, the original intention of this option is to skip the check, not to tolerate any configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants