Skip to content

Conversation

@lynnemorrison
Copy link
Collaborator

If system-controller or podman socket endpoint is not installed and user issued a "skupper system uninstall" command
the error message is confusing. This fix simplifies the error message and provides help on what user should do.

fixes #2281

@lynnemorrison lynnemorrison force-pushed the v2_uninstall branch 3 times, most recently from d7874ce to 93b018b Compare October 10, 2025 13:14
Copy link
Member

@fgiorgetti fgiorgetti left a comment

Choose a reason for hiding this comment

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

The message is much clearer now.

But I recommend validating that the error is a *net.OpError, before advising
user to run the skupper system install command, as if something else happend,
the recommendation can be incorrect.

Thoughts?

if err != nil {
return fmt.Errorf("failed to create container client: %v", err)
errMsg := fmt.Errorf("failed to create container client: %v", err)
netErr := &net.OpError{
Copy link
Member

Choose a reason for hiding this comment

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

I think it is safer to just wrap the error by switching %v by %w, with no need to force returning a net.OpError. This way, the validation you're using with errors.As still works fine if the actual error is not a net.OpError.

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.

Display a friendly message on system uninstall with podman endpoint and controller not installed

2 participants