-
Notifications
You must be signed in to change notification settings - Fork 642
Description
What would you like to be added:
The thin client provides the ability to configure whether the multus CNI config file is removed on exit. However,
the thick client does not provide this, but instead (indirectly) hardcodes it to --cleanup-config-on-exit=true here:
multus-cni/pkg/server/config/manager.go
Lines 156 to 164 in 39d6a8f
| go func() { | |
| defer wg.Done() | |
| if err := m.monitorPluginConfiguration(ctx); err != nil { | |
| _ = logging.Errorf("error watching file: %v", err) | |
| } | |
| logging.Verbosef("ConfigWatcher done") | |
| logging.Verbosef("Delete old config @ %v", multusConfigFile) | |
| os.Remove(multusConfigFile) | |
| }() |
Why is this needed:
I need to set --cleanup-config-on-exit=false because after a node reboot, my primary CNI starts before multus. This causes pods that specify a multus interface to be started before the multus config file is created, resulting in the multus-specified interfaces to not be added to the pod. To work around this, I need to have custom scripts added to each pod that check whether an interface with a certain name is present and restart (crash) the pod if not.