Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
18de6c4e
Unverified
Commit
18de6c4e
authored
5 years ago
by
Nick Ethier
Browse files
Options
Download
Email Patches
Plain Diff
ar/bridge: use cni.IsCNINotInitialized helper
parent
b078d785
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/allocrunner/networking_bridge_linux.go
+3
-3
client/allocrunner/networking_bridge_linux.go
with
3 additions
and
3 deletions
+3
-3
client/allocrunner/networking_bridge_linux.go
+
3
-
3
View file @
18de6c4e
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment