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

v0.72.0: Fix handling of labeled hosts by pbench-postprocess-tools #3456

Merged
merged 8 commits into from
Jun 9, 2023

Conversation

ndokos
Copy link
Member

@ndokos ndokos commented Jun 7, 2023

Fixes #3454

pbench-postprocess-tools mishandles hosts with labels (added by tool registration commands): it ignores the label and complains that it cannot find the tool output directory. The tool output directory path contains <label>:<host> as one element in the path but pbench-postprocess-tools looks for a <host> element.

pbench-postprocess-tools parses the output of pbench-list-tools to get the tool info it needs, but pbench-list-tools omits the label from its output.

The first commit fixes pbench-list-tools to add the label to its output and pbench-postprocess-tools to parse that output, derive the label and use it to construct the path of the tool output directory.

The second commit deals with tests.

PBENCH-1178

@ndokos ndokos added bug Agent tools Of and related to the operation and behavior of various tools (iostat, sar, etc.) labels Jun 7, 2023
@ndokos ndokos added this to the v0.72 milestone Jun 7, 2023
@ndokos ndokos requested review from webbnh, riya-17 and dbutenhof June 7, 2023 18:43
@ndokos ndokos self-assigned this Jun 7, 2023
ndokos added 2 commits June 7, 2023 14:50
Fixes distributed-system-analysis#3454

pbench-postprocess-tools mishandles hosts with labels (added by
tool registration commands): it ignores the label and complains
that it cannot find the tool output directory. The tool output
directory path contains '<label>:<host>' as one element in the path
but pbench-postprocess-tools looks for a '<host>' element.

pbench-postprocess-tools parses the output of pbench-list-tools to
get the tool info it needs, but pbench-list-tools omits the label
from its output.

This commit fixes pbench-list-tools to add the label to its output
and pbench-postprocess-tools to parse that output, derive the label
and use it to construct the path of the tool output directory.

The next commit deals with tests.

PBENCH-1178
This commit adds a "functional" test for pbench-list-tools to verify
the output when labeled hosts have registered tools.

It also fixes an incorrect legacy test (test-07) for
pbench-postprocess-tools: the test was using a labeled host, but it
was testing the wrong tool output directory (without the label).

It adds a similar legacy test (test-07.1) to test the unlabeled host
case.
dbutenhof
dbutenhof previously approved these changes Jun 7, 2023
Copy link
Member

@dbutenhof dbutenhof left a comment

Choose a reason for hiding this comment

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

OK, I think this makes sense... although trying to follow legacy tests (especially the agent, which is even weirder than the server was) makes my head hurt ...

dbutenhof
dbutenhof previously approved these changes Jun 7, 2023
Copy link
Member

@dbutenhof dbutenhof left a comment

Choose a reason for hiding this comment

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

OK; the apparent React fix (which I won't mention here as I don't really want the "mention" to show up in the React PR) has an approval but hasn't been submitted. Still, we might be able to retract the workaround soon ... but leaving it on the b0.72 branch is probably fine anyway.

@ndokos
Copy link
Member Author

ndokos commented Jun 7, 2023

I saw the breakage and figured I'd backport it (in the modified form that @webbnh mentioned in #3455). It worked, so yeah, maybe we can just keep it. Or I can back it out if necessary , although I hope to leave b0.72 behind very soon after the release is out 😄

webbnh
webbnh previously approved these changes Jun 7, 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.

Looks good, but I have a bunch of suggestions, particularly the two requests for better comments.

agent/util-scripts/pbench-postprocess-tools Outdated Show resolved Hide resolved
agent/util-scripts/pbench-postprocess-tools Show resolved Hide resolved
lib/pbench/cli/agent/commands/tools/list.py Outdated Show resolved Hide resolved
lib/pbench/cli/agent/commands/tools/list.py Outdated Show resolved Hide resolved
lib/pbench/cli/agent/commands/tools/list.py Outdated Show resolved Hide resolved
@ndokos ndokos dismissed stale reviews from webbnh and dbutenhof via 6bf71c5 June 7, 2023 23:59
@ndokos ndokos requested review from webbnh and dbutenhof June 8, 2023 01:20
webbnh
webbnh previously approved these changes Jun 8, 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.

Sorry, I fell into a GitHub pitfall and my review ended up being submitted before I was ready.

Approved!

dashboard/package.json Outdated Show resolved Hide resolved
dbutenhof
dbutenhof previously approved these changes Jun 9, 2023
Copy link
Member

@dbutenhof dbutenhof left a comment

Choose a reason for hiding this comment

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

Looks OK; although, as I pointed out, we might not need the React workaround anymore...

@ndokos
Copy link
Member Author

ndokos commented Jun 9, 2023

I dropped the React commit (that's the only change). We'll see what Jenkins thinks.

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 ndokos merged commit 7d727fe into distributed-system-analysis:b0.72 Jun 9, 2023
@ndokos ndokos deleted the v0.72.1 branch June 12, 2023 20:58
ndokos added a commit to ndokos/pbench that referenced this pull request Jun 26, 2023
…rt of distributed-system-analysis#3456)

Fixes distributed-system-analysis#3454

pbench-postprocess-tools mishandles hosts with labels (added by
tool registration commands): it ignores the label and complains
that it cannot find the tool output directory. The tool output
directory path contains '<label>:<host>' as one element in the path
but pbench-postprocess-tools looks for a '<host>' element.

pbench-postprocess-tools parses the output of pbench-list-tools to
get the tool info it needs, but pbench-list-tools omits the label
from its output.

This PR fixes pbench-list-tools to add the label to its output
and pbench-postprocess-tools to parse that output, derive the label
and use it to construct the path of the tool output directory.

It also adds a "functional" test for pbench-list-tools to verify
the output when labeled hosts have registered tools and
fixes an incorrect legacy test (test-07) for pbench-postprocess-tools:
the test was using a labeled host, but it was testing the wrong
tool output directory (without the label). It adds a similar legacy test
(test-07.1) to test the unlabeled host case.

Bump the version to 0.72.1

PBENCH-1178
ndokos added a commit to ndokos/pbench that referenced this pull request Jun 27, 2023
…rt of distributed-system-analysis#3456)

Fixes distributed-system-analysis#3454

pbench-postprocess-tools mishandles hosts with labels (added by
tool registration commands): it ignores the label and complains
that it cannot find the tool output directory. The tool output
directory path contains '<label>:<host>' as one element in the path
but pbench-postprocess-tools looks for a '<host>' element.

pbench-postprocess-tools parses the output of pbench-list-tools to
get the tool info it needs, but pbench-list-tools omits the label
from its output.

This PR fixes pbench-list-tools to add the label to its output
and pbench-postprocess-tools to parse that output, derive the label
and use it to construct the path of the tool output directory.

It also adds a "functional" test for pbench-list-tools to verify
the output when labeled hosts have registered tools and
fixes an incorrect legacy test (test-07) for pbench-postprocess-tools:
the test was using a labeled host, but it was testing the wrong
tool output directory (without the label). It adds a similar legacy test
(test-07.1) to test the unlabeled host case.

Bump the version to 0.72.1

PBENCH-1178
ndokos added a commit that referenced this pull request Jul 3, 2023
…#3456) (#3472)

* Fix handling of labeled hosts by pbench-postprocess-tools (forward port of #3456)

Fixes #3454

pbench-postprocess-tools mishandles hosts with labels (added by
tool registration commands): it ignores the label and complains
that it cannot find the tool output directory. The tool output
directory path contains '<label>:<host>' as one element in the path
but pbench-postprocess-tools looks for a '<host>' element.

pbench-postprocess-tools parses the output of pbench-list-tools to
get the tool info it needs, but pbench-list-tools omits the label
from its output.

This PR fixes pbench-list-tools to add the label to its output
and pbench-postprocess-tools to parse that output, derive the label
and use it to construct the path of the tool output directory.

It also adds a "functional" test for pbench-list-tools to verify
the output when labeled hosts have registered tools and
fixes an incorrect legacy test (test-07) for pbench-postprocess-tools:
the test was using a labeled host, but it was testing the wrong
tool output directory (without the label). It adds a similar legacy test
(test-07.1) to test the unlabeled host case.

Bump the version to 1.0

PBENCH-1178
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agent bug tools Of and related to the operation and behavior of various tools (iostat, sar, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants