Skip to content

Commit

Permalink
multus: do not force delete in validation cleanup
Browse files Browse the repository at this point in the history
Do not force delete resources in validation cleanup. Force deletion can
result in CNI IP address management (IPAM) addresses not being released
cleanly, exhausting them. This can then lead to Rook cluster deploy
failure if the CNI IPAM isn't able to garbage collect the IPs quickly.

Signed-off-by: Blaine Gardner <[email protected]>
  • Loading branch information
BlaineEXE committed Oct 8, 2024
1 parent 0465908 commit 936fe60
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/daemon/multus/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,11 @@ func (vt *ValidationTest) cleanUpTestResources() (string, error) {
ctx := context.Background()

// delete the config object in the foreground so we wait until all validation test resources are
// gone before stopping, and do it now because there's no need to wait for just a test
var gracePeriodZero int64 = 0
// gone before stopping
deleteForeground := meta.DeletePropagationForeground
delOpts := meta.DeleteOptions{
PropagationPolicy: &deleteForeground,
GracePeriodSeconds: &gracePeriodZero,
PropagationPolicy: &deleteForeground,
// GracePeriodSeconds // leave at default; do not force delete, which can exhaust CNI IPAM addresses
}
err := vt.Clientset.CoreV1().ConfigMaps(vt.Namespace).Delete(ctx, ownerConfigMapName, delOpts)
if err != nil {
Expand Down

0 comments on commit 936fe60

Please sign in to comment.