Unverified Commit 18de6c4e authored by Nick Ethier's avatar Nick Ethier
Browse files

ar/bridge: use cni.IsCNINotInitialized helper

parent b078d785
Showing with 3 additions and 3 deletions
+3 -3
......@@ -184,11 +184,11 @@ func (b *bridgeNetworkConfigurator) Teardown(ctx context.Context, alloc *structs
}
func (b *bridgeNetworkConfigurator) ensureCNIInitialized() error {
err := b.cni.Status()
if err == cni.ErrCNINotInitialized {
if err := b.cni.Status(); cni.IsCNINotInitialized(err) {
return b.cni.Load(cni.WithConfListBytes(b.buildNomadNetConfig()))
} else {
return err
}
return err
}
// getPortMapping builds a list of portMapping structs that are used as the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment