Fix #15499 already connected network

Compat: Treat already attached networks as a no-op
Applies only to containers in created state. Maintain error in running state.

Co-authored-by: Alessandro Rossi <al.rossi87@gmail.com>
Co-authored-by: Brent Baude <bbaude@redhat.com>
Co-authored-by: Jason T. Greene <jason.greene@redhat.com>
Signed-off-by: Alessandro Rossi <al.rossi87@gmail.com>
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
This commit is contained in:
Alessandro Rossi
2022-08-27 18:28:24 +02:00
committed by Jason T. Greene
parent 03e51a058d
commit 78aec21302
4 changed files with 19 additions and 3 deletions

View File

@ -179,6 +179,9 @@ var (
// ErrNetworkInUse indicates the requested operation failed because the network was in use
ErrNetworkInUse = errors.New("network is being used")
// ErrNetworkConnected indicates that the required operation failed because the container is already a network endpoint
ErrNetworkConnected = errors.New("network is already connected")
// ErrStoreNotInitialized indicates that the container storage was never
// initialized.
ErrStoreNotInitialized = errors.New("the container storage was never initialized")