mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
Merge pull request #20369 from cgiradkar/Issue-16759-docs
Define better error message for container name conflicts with external storage
This commit is contained in:
@ -510,6 +510,11 @@ func (c *Container) setupStorage(ctx context.Context) error {
|
||||
}
|
||||
}
|
||||
if containerInfoErr != nil {
|
||||
if errors.Is(containerInfoErr, storage.ErrDuplicateName) {
|
||||
if _, err := c.runtime.LookupContainer(c.config.Name); errors.Is(err, define.ErrNoSuchCtr) {
|
||||
return fmt.Errorf("creating container storage: %w by an external entity", containerInfoErr)
|
||||
}
|
||||
}
|
||||
return fmt.Errorf("creating container storage: %w", containerInfoErr)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user