Skip to content

Commit

Permalink
Add basic relay support to Pbench Agent (#3460)
Browse files Browse the repository at this point in the history
* Add basic relay support to Pbench Agent

PBENCH-1142

This changes the Pbench Agent `results` mechanism to support a new mode,
refactoring the `CopyResults` class into a hierarchy with `CopyResultToServer`
and `CopyResultToRelay` and an overloaded `push` to do the work. The `--token`
option is now required only when `--relay` is not specified.

In addition to `--relay <relay>` to push a manifest and tarball to a Relay, I
added a `--server <server>` to override the default config file value, which
should allow us to deploy a containerized Pbench Agent without needing to map in
a customized config file just to set the Pbench Server URI.

The agent "man pages" have been updated with the new options, and some general
cleanup left over from #3442.

_NOTE_: with this change we have a full end-to-end relay mechanism, but it's
simplistic. You need to start a relay server manually from the file relay repo
at `distributed-system-analysis/file-relay`, and supply that URI to the
`pbench-results-move --relay <relay>` command. In the future we'd like to
package the relay and allow management and hosting through Pbench Agent
commands within a standard container.
  • Loading branch information
dbutenhof authored Jun 21, 2023
1 parent b091da3 commit c2b7472
Show file tree
Hide file tree
Showing 12 changed files with 861 additions and 392 deletions.
2 changes: 1 addition & 1 deletion agent/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jinja2
python-daemon
python-pidfile
redis
requests
requests>=2.27.0 # JSONDecodeError, TODO CVE-2023-32681 (2.31)
sh
state-signals>=1.0.1
8 changes: 4 additions & 4 deletions agent/util-scripts/gold/pbench-results-move/test-23.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Options:
-m, --metadata TEXT list of metadata keys to be sent on PUT.
Option may need to be specified multiple
times for multiple values. Format: key:value
--show-server TEXT Display information about the pbench server
where the result(s) will be moved (Not
implemented)
--relay TEXT Specify a relay server as
http[s]://host[:port]
--server TEXT Specify the Pbench Server as
https://host[:port]
--token TEXT pbench server authentication token
[required]
--xz-single-threaded Use single threaded compression with 'xz'
--help Show this message and exit.
--- Finished test-23 pbench-results-move (status=0)
Expand Down
5 changes: 4 additions & 1 deletion agent/util-scripts/gold/pbench-results-push/test-24.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ Options:
-m, --metadata TEXT list of metadata keys to be sent on PUT.
Option may need to be specified multiple
times for multiple values. Format: key:value
--relay TEXT Specify a relay server as
http[s]://host[:port]
--server TEXT Specify the Pbench Server as
https://host[:port]
--token TEXT pbench server authentication token
[required]
--help Show this message and exit.
--- Finished test-24 pbench-results-push (status=0)
+++ pbench tree state
Expand Down
Loading

0 comments on commit c2b7472

Please sign in to comment.