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

refactor: remove engine binary path check #435

Merged

Conversation

ChanYiLin
Copy link
Contributor

ref: longhorn/longhorn#8094

The original check limit the pattern of the engine binary path.
But there is no need to check the engine binary path.
Even the path is wrong, we catch the error and show the error message.

@ChanYiLin ChanYiLin requested a review from innobead March 12, 2024 04:47
@ChanYiLin ChanYiLin self-assigned this Mar 12, 2024
@ChanYiLin ChanYiLin requested a review from a team as a code owner March 12, 2024 04:47
@ChanYiLin ChanYiLin force-pushed the LH8094_remove_engine_binary_path_check branch from f0d829b to 9e9db8a Compare March 12, 2024 05:16
ref: longhorn/longhorn 8094

Signed-off-by: Jack Lin <jack.lin@suse.com>
@ChanYiLin ChanYiLin force-pushed the LH8094_remove_engine_binary_path_check branch from 9e9db8a to 1722335 Compare March 12, 2024 05:28
@ChanYiLin
Copy link
Contributor Author

ChanYiLin commented Mar 12, 2024

Copy link
Member

@innobead innobead left a comment

Choose a reason for hiding this comment

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

LGTM.

@innobead innobead requested a review from derekbit March 12, 2024 06:57
@innobead
Copy link
Member

Out of PR, I noticed that when a process fails to create, it is not unregistered. Could you please create a ticket to address this issue, @ChanYiLin? Thanks.

/pkg/process/process_manager.go#L254-L268

	if err := pm.registerProcess(p); err != nil {
		return nil, err
	}

	p.UpdateCh <- p
	if err := p.Start(); err != nil {
		// initializing failed so we sent event about the failed state, but still return the process rpc below
		// this is to be consistent with the prior implementation
		logrus.WithError(err).Errorf("Process Manager: failed to init new process %v", req.Spec.Name)
		p.UpdateCh <- p
	} else {
		logrus.Infof("Process Manager: created process %v", req.Spec.Name)
	}

	return p.RPCResponse(), nil

Copy link
Member

@derekbit derekbit left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot merged commit a09d9dd into longhorn:master Mar 12, 2024
6 checks passed
@innobead
Copy link
Member

@mergify backport v1.6.x

Copy link

mergify bot commented Mar 12, 2024

backport v1.6.x

✅ Backports have been created

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.

3 participants