Skip to content

fix: concurrent update-core and update-module runs#1176

Open
DavidePrincipi wants to merge 1 commit into
mainfrom
bug-7877
Open

fix: concurrent update-core and update-module runs#1176
DavidePrincipi wants to merge 1 commit into
mainfrom
bug-7877

Conversation

@DavidePrincipi
Copy link
Copy Markdown
Member

Software update procedures must be protected from concurrent runs to avoid unexpected behaviors, like sudden service restarts.

Use fcntl flock to ensure only one action runs at a time. If the lock cannot be acquired, the action fails immediately with a validation-failed status.

The lock is enforced by the kernel and is implicitly released when the process terminates, no matter its exit code. The rendez-vous file is created only if it not exists (O_CREAT flag).

Refs NethServer/dev#7877

Software update procedures must be protected from concurrent runs to
avoid unexpected behaviors, like sudden service restarts.

Use fcntl flock to ensure only one action runs at a time. If the lock
cannot be acquired, the action fails immediately with a
validation-failed status.

The lock is enforced by the kernel and is implicitly released when the
process terminates, no matter its exit code. The rendez-vous file is
created only if it not exists (O_CREAT flag).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent restart failed after concurrent update-core runs

1 participant