Performance profile render command integration#324
Performance profile render command integration#324openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Conversation
|
@jmencak Hi, this PR introduces cobra to the main.go file. PAO has the dependency anyway, but I changed the way flags are parsed. Would this approach be acceptable? The render command is then executed as podman run -it cluster-node-tuning-operator:4.11 render --help When no subcommand is used, NTO starts as usual. |
jmencak
left a comment
There was a problem hiding this comment.
Thank you for the PR. I think this approach is acceptable even though I'm far from thrilled by the cobra usage. But as you say, we already have the dependency. The PR needs cleaning though:
- Can we have back the help for both
cluster-node-tuning-operatorandopenshift-tunedthat would show it can be used with the-voptions? -voptions should work!- Also, some comments about the usage for
openshift-tunedwould be welcome as you already added them forcluster-node-tuning-operator
|
/retest |
|
/retest |
jmencak
left a comment
There was a problem hiding this comment.
Thank you for the PR and the changes. While the e2e tests pass, the -v=<number> option for the operator itself doesn't work. This needs to be fixed prior the merge.
$ ./cluster-node-tuning-operator -v=2
Error: invalid argument "2" for "-v, --version" flag: strconv.ParseBool: parsing "2": invalid syntax
Usage:
cluster-node-tuning-operator [flags]
cluster-node-tuning-operator [command]
Available Commands:
completion generate the autocompletion script for the specified shell
help Help about any command
render Render performance-addon-operator manifests
Flags:
--enable-leader-election Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager. (default true)
-h, --help help for cluster-node-tuning-operator
-v, --version Show program version and exit.
Use "cluster-node-tuning-operator [command] --help" for more information about a command.
| operand: | ||
| debug: false | ||
| tunedConfig: | ||
| reapply_sysctl: null |
There was a problem hiding this comment.
reapply_sysctl is a Boolean, why does it have null value?
There was a problem hiding this comment.
You tell me :) This is the value the test is seeing, I only updated the expected value for it to pass as PAO does not care about this part.
There was a problem hiding this comment.
I might tell you, but I have no idea about the test you're talking about. :) I guess it is null because tunedConfig was not specified at all? Good to know it was manually updated by you.
There was a problem hiding this comment.
This is the expected value of Tuned when PerfProfile is processed by the render stage. If you check couple of lines above this, we mostly care about the generated tuned profile. The rest is just what NTO structures serialize to by default.
| done | ||
|
|
||
| .PHONY: test-e2e-local | ||
| test-e2e-local: |
There was a problem hiding this comment.
Should we make the make target more specific as in
cluster-node-tuning-operator/Makefile
Line 202 in 1316041
There was a problem hiding this comment.
I was wondering if we can have more tests that are e2e in nature, but do not require a running cluster.. but the name is not important obviously.
There was a problem hiding this comment.
if we are planing to add a render lane in openshift/release then it should correspond to the make target
There was a problem hiding this comment.
@MarSik we currently have https://github.com/openshift/cluster-node-tuning-operator/blob/master/hack/run-render-command-functests.sh under this repo. If this target comes to replace the invocation of this script like we did in PAO then we can remove the script (although the script contains some additional decorations)
|
@MarSik please make sure to also update this section: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MarSik The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| Build and invoke the binary | ||
| ``` | ||
| build/_output/bin/performance-addon-operators render (FIXME) | ||
| _output/cluster-node-tuning-operator render (FIXME) |
There was a problem hiding this comment.
we can remove the (FIXME) part, I placed it specifically for this PR
jmencak
left a comment
There was a problem hiding this comment.
The -v options seem to work now. Once the nits:
(FIXME)s/tuned/TuneD/
are addressed and the commits squashed, this is good to go from my side.
This integrates the render mode for offline processing of the PerformanceProfile. Part of this change is the move of command line processing code to the cobra library.
|
/retest |
|
@MarSik: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
looks good to me. |
|
/lgtm |
This integrates the render mode for offline processing of the PerformanceProfile. Part of this change is the move of command line processing code to the cobra library.
This integrates the render mode for offline processing of the PerformanceProfile. Part of this change is the move of command line processing code to the cobra library.
The original PAO code supports an offline render mode where it reads the PerformanceProfile manifest from a file and generates all the outputs as files. This is useful for Day 0 and GitOps based installations.
This PR is work in progress and depends on #322