-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CA-395554 Improve fairlocking reliability
Under some circumstances (when the listen queue is short enough) a process's blocking connect() to a UNIX-domain stream socket can return success even when the server side has not yet called accept(). To work around this, we have the server portion write a small fixed blob of data to each new connection and require the client to read it before it considers itself to have the lock; merely being connected successfully is no longer sufficient. Signed-off-by: Tim Smith <[email protected]>
- Loading branch information
1 parent
be6922f
commit ab45ca5
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,5 +237,14 @@ Manager and some other packages | |
%{_unitdir}/[email protected] | ||
%{_libexecdir}/fairlock | ||
|
||
%posttrans fairlock | ||
## On upgrade, shut down existing lock services so new ones will | ||
## be started. There should be no locks held during upgrade operations | ||
## so this is safe. | ||
if [ $1 -gt 1 ]; | ||
then | ||
systemctl stop $(systemctl list-units fairlock@* --all --no-legend | cut -d' ' -f1) | ||
fi | ||
|
||
%changelog | ||
|