This repository has been archived by the owner on Dec 19, 2019. It is now read-only.
Support communicating with multiple admin sockets when nbprocs>1 #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is rebased on top of PR #29
This code is provided as is with no guarantees.
librhapr breaking changes:
rhapr interface has changed,
send(message)
is nowsend(message, process=1)
so it can pass on which process id to try to look up for a socket.in rhapr environment module:
socket_path
is renamed tosocket_paths
and now returns an hash for socket paths , keyed on process id's. It still throws an runtime exception if no socket is found. A future enhancement might be to let it return an empty hash and let the client code which uses the library figure out what to do if it doesn't find any admin sockets.socket
now accepts an argument for the parameter process.haproxyctl binary accepts the parameter
-p
where the argument has to be numeric identifier for the process id. if nbprocs > 1 , 0 means talking to every socket it finds.Known bugs:
Regex doesn't skip #comments in file, so if you "redefine" the admin socket in a comment below the original comment, it will sadly overwrite it in the internal hash map.
Example outputs:
with nbprocs > 1
With nbprocs < 2