Allow the actual inhibit delay to be greater than the expected inhibit delay

This commit is contained in:
Shiming Zhang 2021-06-24 13:26:28 +08:00
parent b0010c2d9e
commit 97bcfbd674

View File

@ -157,7 +157,7 @@ func (m *Manager) start() (chan struct{}, error) {
return nil, err return nil, err
} }
if updatedInhibitDelay != m.shutdownGracePeriodRequested { if m.shutdownGracePeriodRequested > updatedInhibitDelay {
return nil, fmt.Errorf("node shutdown manager was unable to update logind InhibitDelayMaxSec to %v (ShutdownGracePeriod), current value of InhibitDelayMaxSec (%v) is less than requested ShutdownGracePeriod", m.shutdownGracePeriodRequested, updatedInhibitDelay) return nil, fmt.Errorf("node shutdown manager was unable to update logind InhibitDelayMaxSec to %v (ShutdownGracePeriod), current value of InhibitDelayMaxSec (%v) is less than requested ShutdownGracePeriod", m.shutdownGracePeriodRequested, updatedInhibitDelay)
} }
} }