mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
FIX: Don't log that hooks is being removed if it is not
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
8db287af8b
commit
e6730fd0f0
@ -42,12 +42,16 @@ func (m nvidiaContainerRuntimeHookRemover) Modify(spec *specs.Spec) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(spec.Hooks.Prestart) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var updateRequired bool
|
||||
newPrestart := make([]specs.Hook, 0, len(spec.Hooks.Prestart))
|
||||
|
||||
for _, hook := range spec.Hooks.Prestart {
|
||||
if isNVIDIAContainerRuntimeHook(&hook) {
|
||||
m.logger.Infof("Removing hook %v", hook)
|
||||
m.logger.Warnf("Found existing NVIDIA Container Runtime Hook: %v", hook)
|
||||
updateRequired = true
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user