forked from distributed-system-analysis/pbench
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct
pbench-tool-meister-client
& -stop
Prior to this commit, `pbench-tool-meister-start` was the only CLI interface which was using the two forms for specifying the Redis server and Tool Data Sink host/port for binding and connecting. Both the CLI commands for stopping the Tool Meister sub-system and communicating with it incorrectly expected the presence of the `PBENCH_REDIS_SERVER` to only specify a `<host>:<port>`, and also indicate that instance was not managed by CLI commands on this controller. This commit corrects that where both `pbench-tool-meister-client` and `pbench-tool-meister-stop` now properly handle both forms of host/port specification, and `-stop` determines whether or not the CLI is in charge of orchestrating the server components by looking for the local pid files. This was accomplished via a series of refactorings to share code across those three CLI commands: * Add and use `BaseReturnCode` in `lib/pbench/agent/utils.py` * Move BaseServer to `.../agent/utils.py` * Add a `RedisServer` class for `pbench-tool-meister-stop` to take advantage of the common parameter handling of the Redis server specification * In `pbench-tool-meister-client`, we use the new `RedisServerCommon` class shared with `-start` and `-stop` * We fix the new `BaseServer.kill()` to exit immediately after posting a `SIGKILL` * Add unit tests for all common code moved to `.../agent/utils.py`
- Loading branch information
Showing
7 changed files
with
506 additions
and
266 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
Oops, something went wrong.