Skip to content

Commit

Permalink
Remove pbench-generate-token agent CLI functionality
Browse files Browse the repository at this point in the history
- Since we moved away from the internal user management in
  Pbench-server, we can no longer use username and password
  to create new tokens.
- The new functionality to generate long-lasting tokens
  will be available via new server API call and the dashboard.

PBENCH-948
  • Loading branch information
npalaska committed Apr 13, 2023
1 parent 6c8bb0a commit cfbddc9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 118 deletions.
1 change: 0 additions & 1 deletion agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ util-scripts = \
# Scripts based on the Python Click package, which are generated during
# installation.
click-scripts = \
pbench-generate-token \
pbench-cleanup \
pbench-clear-results \
pbench-clear-tools \
Expand Down
9 changes: 0 additions & 9 deletions contrib/containerized-pbench/gen-token.sh

This file was deleted.

10 changes: 6 additions & 4 deletions contrib/containerized-pbench/pbench_demo
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ export PB_AGENT_IMAGE_NAME=quay.io/pbench/pbench-agent-all-fedora-36:main

mkdir -p ${FIOTEST}

# Before we run the demo, we need a Pbench authentication token. The token
# location need to be supplied to this script as an argument.
token_location=$1
token=$(< ${token_location})
#+
# Run the demo!
#-
pbench pbench-generate-token --output=/var/lib/pbench-agent/.token
pbench pbench-register-tool-set light
pbench pbench-list-tools
pbench pbench-user-benchmark --config example-workload -- \
fio --directory=/fiotest --name fio_test_file --direct=1 --rw=randread \
--bs=16k --size=100M --numjobs=8 --time_based --runtime=5s \
--group_reporting --norandommap
# Note that the token file location below is evaluated -outside- the container,
# unlike in the pbench-generate-token command above.
pbench pbench-results-move --token=$(< /var/tmp/${USER}/pbench-agent/run/.token)
# Note that the token file location below is evaluated -outside- the container.
pbench pbench-results-move --token=token
95 changes: 0 additions & 95 deletions lib/pbench/cli/agent/commands/generate_token.py

This file was deleted.

11 changes: 3 additions & 8 deletions server/pbenchinacan/load-canned-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,9 @@ then
exit 2
fi

if [[ $# == 1 ]]
then
token=$1
else
username=${1:-pbench_user}
password=${2:-pbench}
token=$(pbench-generate-token --username $username --password $password)
fi
# Get the Pbench authentication token
token_location=$1
token=$(< ${token_location})

# We skip test-7.8, test-7.12, and test-7.15, which have controllers that are
# not legal nodenames, so the server refuses to accept them. We skip test-7.14,
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ console_scripts =
pbench-clear-tools = pbench.cli.agent.commands.tools.clear:main
pbench-config = pbench.cli.agent.commands.conf:main
pbench-tree-manage = pbench.cli.server.tree_manage:tree_manage
pbench-generate-token = pbench.cli.agent.commands.generate_token:main
pbench-is-local = pbench.cli.agent.commands.is_local:main
pbench-list-tools = pbench.cli.agent.commands.tools.list:main
pbench-list-triggers = pbench.cli.agent.commands.triggers.list:main
Expand Down

0 comments on commit cfbddc9

Please sign in to comment.