mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
CNI: add warning log for CNI check command failures (#25581)
In #24658 we fixed a bug around client restarts where we would not assert network namespaces existed and were properly configured when restoring allocations. We introduced a call to the CNI `Check` method so that the plugins could report correct config. But when we get an error from this call, we don't log it unless the error is fatal. This makes it challenging to debug the case where the initial check fails but we tear down the network and try again (as described in #25510). Add a noisy log line here. Ref: https://github.com/hashicorp/nomad/pull/24658 Ref: https://github.com/hashicorp/nomad/issues/25510
This commit is contained in:
3
.changelog/25581.txt
Normal file
3
.changelog/25581.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
cni: Add a warning log when CNI check commands fail
|
||||
```
|
||||
@@ -157,6 +157,7 @@ CREATE:
|
||||
// ErrCNICheckFailed. We'll try to recover from this one time by
|
||||
// recreating the netns from scratch before giving up
|
||||
if errors.Is(err, ErrCNICheckFailed) && !checkedOnce {
|
||||
h.logger.Warn("network configuration check failed", "error", err)
|
||||
checkedOnce = true
|
||||
destroyErr := h.manager.DestroyNetwork(h.alloc.ID, spec)
|
||||
if destroyErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user