Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for user-tool #3440

Merged
merged 7 commits into from
Jun 1, 2023
Merged

Conversation

ndokos
Copy link
Member

@ndokos ndokos commented May 30, 2023

The tool meister was treating tools options as a concatenated string that was passed as a single argument to pbench-start/stop-tools. They are now split into separate arguments, allowing the scripts to work correctly.

pbench-postprocess-tools was being called without any tool options. Instead of burrowing even deeper into the filesystem to grab the options, we get rid of most of that by rewriting it to use pbench-list-tools -g <group> -o and parsing the output of that script. The parsing is ugly but is arguably less ugly than the file system ad-hockery that we used to go through.

This has undergone some "field" testing but could certainly use more. All the tests are now passing in Jenkins (although see the last commit for some problems).

PBENCH-1172

@ndokos ndokos added this to the v0.72 milestone May 30, 2023
@ndokos ndokos self-assigned this May 30, 2023
The tool meister was treating tools options as a concatenated string that
was passed as a single argument to `pbench-install/start/stop-tools`.
They are now split into separate arguments, allowing the scripts to work
correctly.

`pbench-postprocess-tools` was being called without empty tool options.
Instead of burrowing even deeper into the filesystem to grab the options,
we get rid of most of that by rewriting it to use `pbench-list-tools -g
<group> -o` and parsing the output of that script. The parsing is ugly
but is arguably less ugly than the file system ad-hockery that we used to
go through.

This is a draft for now: I've done some "field" testing but I have not
run/fixed the tests and it certainly could use more field testing by the
original reporter to make sure it addresses the reported problems

PBENCH-1172
webbnh
webbnh previously approved these changes May 30, 2023
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the absence of a common underpinning, parsing the output of pbench-list-tools seems like an excellent idea, and I'm pleased that it leads to simpler code.

You should probably replace the hard-tabs, and I have a few other suggestions, but it looks good.

lib/pbench/agent/tool_meister.py Show resolved Hide resolved
agent/util-scripts/pbench-postprocess-tools Outdated Show resolved Hide resolved
agent/util-scripts/pbench-postprocess-tools Outdated Show resolved Hide resolved
agent/util-scripts/pbench-postprocess-tools Show resolved Hide resolved
agent/util-scripts/pbench-postprocess-tools Show resolved Hide resolved
ndokos added 3 commits May 30, 2023 17:07
- Inline the functions and fix leading white space issues
- Fix trap
- Redirect stderr of pbench-list-tools to /dev/null.
`test_install` was using a NullObject for a logger, but the `install`
method now logs its command. So we set up a basic logger to satisfy
that need.

Two other tests (`test_start` and `test_stop`) failed on an `is`
test. We now test for equality, rather than identity and the tests
pass. I'm not sure what caused these two failures, but the cause is
probably the breakup of the options into separate arguments.
Tests -51, -52 and -61 were failing because of the additional `install`
logging.

There are three more (-53, -56 and -57) that are failing, probably for
the same reason, but I don't quite understand the output differences
yet: TBD.
@ndokos
Copy link
Member Author

ndokos commented May 31, 2023

This forced push was necessitated by my changing the commit message of the first commit (to add the issue ID and reword slightly). The code in that first commit should be identical. There are three more commits: one to address review comments, one to fix the three broken python tests and one to fix three of the six broken legacy tests. The other three are still broken, so still in draft mode.

Tests -53, -56 and -57 now pass: the new output looks correct to me and
the old output looks wrong.

The util-scripts also pass in the CI container (run locally with
`jenkins/run tox -- agent util-scripts`), except for -51 and -52 which
fail with identical errors:

- pbench-tool-meister-stop: waiting for tool-data-sink (#####) to exit

The line is missing for some reason - I hope that the real Jenkins will
pass them, but it's not clear to me why they fail locally. OTOH, they do
pass locally when run with `tox -- agent util-scripts`.
Explanations/theories/guesses are welcome.
@ndokos ndokos marked this pull request as ready for review May 31, 2023 04:20
dbutenhof
dbutenhof previously approved these changes May 31, 2023
@ndokos ndokos requested a review from webbnh May 31, 2023 15:29
webbnh
webbnh previously approved these changes May 31, 2023
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noted one nit which is probably not worth fixing, and I've some comments/thoughts.

agent/util-scripts/pbench-postprocess-tools Show resolved Hide resolved
agent/util-scripts/pbench-postprocess-tools Outdated Show resolved Hide resolved
agent/util-scripts/pbench-postprocess-tools Show resolved Hide resolved
@webbnh
Copy link
Member

webbnh commented May 31, 2023

I noted one nit which is probably not worth fixing, and I've some comments/thoughts.

I've "pre-resolved" them, since merging b0.72 requires all conversations to be resolved.

@ndokos ndokos dismissed stale reviews from webbnh and dbutenhof via 6f09a95 June 1, 2023 18:07
@ndokos ndokos requested review from webbnh and dbutenhof June 1, 2023 18:52
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ndokos
Copy link
Member Author

ndokos commented Jun 1, 2023

Area 51 strikes again... I'll rebase to pick up the latest and start the tests again.

@ndokos ndokos merged commit 5fe6a7b into distributed-system-analysis:b0.72 Jun 1, 2023
@ndokos ndokos deleted the user-tool branch June 1, 2023 21:14
ndokos added a commit to ndokos/pbench that referenced this pull request Jun 7, 2023
* Fixes for user-tool

The tool meister was treating tools options as a concatenated string that
was passed as a single argument to `pbench-install/start/stop-tools`.
They are now split into separate arguments, allowing the scripts to work
correctly.

`pbench-postprocess-tools` was being called without empty tool options.
Instead of burrowing even deeper into the filesystem to grab the options,
we get rid of most of that by rewriting it to use `pbench-list-tools -g
<group> -o` and parsing the output of that script. The parsing is ugly
but is arguably less ugly than the file system ad-hockery that we used to
go through.

* Fix failures in the python tests

`test_install` was using a NullObject for a logger, but the `install`
method now logs its command. So we set up a basic logger to satisfy
that need.

Two other tests (`test_start` and `test_stop`) failed on an `is`
test. We now test for equality, rather than identity and the tests
pass. I'm not sure what caused these two failures, but the cause is
probably the breakup of the options into separate arguments.

* Fix  legacy util-scripts tests

Tests -51, -52 and -61 were failing because of the additional `install`
logging.

Tests -53, -56 and -57 now pass: the new output looks correct to me and
the old output looks wrong.

The util-scripts also pass in the CI container (run locally with
`jenkins/run tox -- agent util-scripts`), except for -51 and -52 which
fail with identical errors:

- pbench-tool-meister-stop: waiting for tool-data-sink (#####) to exit

The line is missing for some reason - I hope that the real Jenkins will
pass them, but it's not clear to me why they fail locally. OTOH, they do
pass locally when run with `tox -- agent util-scripts`.
Explanations/theories/guesses are welcome.

PBENCH-1172
ndokos added a commit to ndokos/pbench that referenced this pull request Jun 15, 2023
* Fixes for user-tool

The tool meister was treating tools options as a concatenated string that
was passed as a single argument to `pbench-install/start/stop-tools`.
They are now split into separate arguments, allowing the scripts to work
correctly.

`pbench-postprocess-tools` was being called without empty tool options.
Instead of burrowing even deeper into the filesystem to grab the options,
we get rid of most of that by rewriting it to use `pbench-list-tools -g
<group> -o` and parsing the output of that script. The parsing is ugly
but is arguably less ugly than the file system ad-hockery that we used to
go through.

* Fix failures in the python tests

`test_install` was using a NullObject for a logger, but the `install`
method now logs its command. So we set up a basic logger to satisfy
that need.

Two other tests (`test_start` and `test_stop`) failed on an `is`
test. We now test for equality, rather than identity and the tests
pass. I'm not sure what caused these two failures, but the cause is
probably the breakup of the options into separate arguments.

* Fix  legacy util-scripts tests

Tests -51, -52 and -61 were failing because of the additional `install`
logging.

Tests -53, -56 and -57 now pass: the new output looks correct to me and
the old output looks wrong.

The util-scripts also pass in the CI container (run locally with
`jenkins/run tox -- agent util-scripts`), except for -51 and -52 which
fail with identical errors:

- pbench-tool-meister-stop: waiting for tool-data-sink (#####) to exit

The line is missing for some reason - I hope that the real Jenkins will
pass them, but it's not clear to me why they fail locally. OTOH, they do
pass locally when run with `tox -- agent util-scripts`.
Explanations/theories/guesses are welcome.

PBENCH-1172
ndokos added a commit to ndokos/pbench that referenced this pull request Jun 15, 2023
* Fixes for user-tool

The tool meister was treating tools options as a concatenated string that
was passed as a single argument to `pbench-install/start/stop-tools`.
They are now split into separate arguments, allowing the scripts to work
correctly.

`pbench-postprocess-tools` was being called with empty tool options.
Instead of burrowing even deeper into the filesystem to grab the options,
we get rid of most of that by rewriting it to use `pbench-list-tools -g
<group> -o` and parsing the output of that script. The parsing is ugly
but is arguably less ugly than the file system ad-hockery that we used to
go through.

* Fix failures in the python tests

`test_install` was using a NullObject for a logger, but the `install`
method now logs its command. So we set up a basic logger to satisfy
that need.

Two other tests (`test_start` and `test_stop`) failed on an `is`
test. We now test for equality, rather than identity and the tests
pass. I'm not sure what caused these two failures, but the cause is
probably the breakup of the options into separate arguments.

* Fix  legacy util-scripts tests

Tests -51, -52 and -61 were failing because of the additional `install`
logging.

Tests -53, -56 and -57 now pass: the new output looks correct to me and
the old output looks wrong.

The util-scripts also pass in the CI container (run locally with
`jenkins/run tox -- agent util-scripts`), except for -51 and -52 which
fail with identical errors:

- pbench-tool-meister-stop: waiting for tool-data-sink (#####) to exit

The line is missing for some reason - I hope that the real Jenkins will
pass them, but it's not clear to me why they fail locally. OTOH, they do
pass locally when run with `tox -- agent util-scripts`.
Explanations/theories/guesses are welcome.

PBENCH-1172
ndokos added a commit to ndokos/pbench that referenced this pull request Jun 26, 2023
* Fixes for user-tool

The tool meister was treating tools options as a concatenated string that
was passed as a single argument to `pbench-install/start/stop-tools`.
They are now split into separate arguments, allowing the scripts to work
correctly.

`pbench-postprocess-tools` was being called with empty tool options.
Instead of burrowing even deeper into the filesystem to grab the options,
we get rid of most of that by rewriting it to use `pbench-list-tools -g
<group> -o` and parsing the output of that script. The parsing is ugly
but is arguably less ugly than the file system ad-hockery that we used to
go through.

* Fix failures in the python tests

`test_install` was using a NullObject for a logger, but the `install`
method now logs its command. So we set up a basic logger to satisfy
that need.

Two other tests (`test_start` and `test_stop`) failed on an `is`
test. We now test for equality, rather than identity and the tests
pass. I'm not sure what caused these two failures, but the cause is
probably the breakup of the options into separate arguments.

* Fix  legacy util-scripts tests

Tests -51, -52 and -61 were failing because of the additional `install`
logging.

Tests -53, -56 and -57 now pass: the new output looks correct to me and
the old output looks wrong.

The util-scripts also pass in the CI container (run locally with
`jenkins/run tox -- agent util-scripts`), except for -51 and -52 which
fail with identical errors:

- pbench-tool-meister-stop: waiting for tool-data-sink (#####) to exit

The line is missing for some reason - I hope that the real Jenkins will
pass them, but it's not clear to me why they fail locally. OTOH, they do
pass locally when run with `tox -- agent util-scripts`.
Explanations/theories/guesses are welcome.

PBENCH-1172
ndokos added a commit that referenced this pull request Jun 27, 2023
* Fixes for user-tool

The tool meister was treating tools options as a concatenated string that
was passed as a single argument to `pbench-install/start/stop-tools`.
They are now split into separate arguments, allowing the scripts to work
correctly.

`pbench-postprocess-tools` was being called with empty tool options.
Instead of burrowing even deeper into the filesystem to grab the options,
we get rid of most of that by rewriting it to use `pbench-list-tools -g
<group> -o` and parsing the output of that script. The parsing is ugly
but is arguably less ugly than the file system ad-hockery that we used to
go through.

* Fix failures in the python tests

`test_install` was using a NullObject for a logger, but the `install`
method now logs its command. So we set up a basic logger to satisfy
that need.

Two other tests (`test_start` and `test_stop`) failed on an `is`
test. We now test for equality, rather than identity and the tests
pass. I'm not sure what caused these two failures, but the cause is
probably the breakup of the options into separate arguments.

* Fix  legacy util-scripts tests

Tests -51, -52 and -61 were failing because of the additional `install`
logging.

Tests -53, -56 and -57 now pass: the new output looks correct to me and
the old output looks wrong.

The util-scripts also pass in the CI container (run locally with
`jenkins/run tox -- agent util-scripts`), except for -51 and -52 which
fail with identical errors:

- pbench-tool-meister-stop: waiting for tool-data-sink (#####) to exit

The line is missing for some reason - I hope that the real Jenkins will
pass them, but it's not clear to me why they fail locally. OTOH, they do
pass locally when run with `tox -- agent util-scripts`.
Explanations/theories/guesses are welcome.

PBENCH-1172
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants