Skip to content

Commit

Permalink
Ignore additionalstore images when deciding to use netavark or CNI
Browse files Browse the repository at this point in the history
We are using CNI for systems that have run podman system reset, if
storage is setup with additional stores.  This change will ignore
additional store images and will use netarvark on clean systems.

[NO NEW TESTS NEEDED]

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2124887

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Sep 7, 2022
1 parent 0fe9ce2 commit c0c996b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libnetwork/network/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,18 @@ func defaultNetworkBackend(store storage.Store, conf *config.Config) (backend ty
return "", err
}
if len(cons) == 0 {
imgs, err := store.Images()
allImages, err := store.Images()
if err != nil {
return "", err
}
var imgs []storage.Image
// ignore ReadOnly images
for _, i := range allImages {
if i.ReadOnly {
continue
}
imgs = append(imgs, i)
}
if len(imgs) == 0 {
cniInterface, err := getCniInterface(conf)
if err == nil {
Expand Down

0 comments on commit c0c996b

Please sign in to comment.