Page MenuHomeVyOS Platform

Prevent op mode scripts from restarting services if there's a commit in progress
Closed, ResolvedPublic

Description

Both conf mode and op mode scripts can restart services. We have a whole family of op mode commands (restart) dedicated to restarting them.

One problem is that there's an unlikely, but not an impossible situation when an op mode script tries to restart a service when a commit is in progress. It has a potential to throw the system into an inconsistent state.

With human users that situation is almost impossible because two people working on the same router uncoordinated is a very rare and even a pathological situation. However, with increased use of automation, its probability gets higher because a human may be working on a router exactly when an automation system pushes a configuration update.

I believe we should wrap all service restarts into a check and if a commit is in progress, wait until it's finished.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change
Issue type
Bug (incorrect behavior)