-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Improve error message when creating a pod/ctr with the same name #7207
Improve error message when creating a pod/ctr with the same name #7207
Conversation
LGTM |
59d07af
to
25f98f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Let's wait for @mheon's head nod before merging.
Check if there is an pod or container an return the appropriate error message instead of blindly return 'container exists' with `podman create` and 'pod exists' with `podman pod create`. Signed-off-by: Paul Holzinger <[email protected]>
25f98f9
to
97b2b07
Compare
LGTM |
if allPodsBkt.Get(idExist) == nil { | ||
err = define.ErrCtrExists | ||
} | ||
return errors.Wrapf(err, "ID \"%s\" is in use", pod.ID()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference, %q
produces the same output as \"%s\"
- but since they're identical, there's no real need to change it.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Check if there is an pod or container an return
the appropriate error message instead of blindly
return 'container exists' with
podman create
and'pod exists' with
podman pod create
.Example: