DAOS-15385 control: Add JSON output support to daos_server cmds
Support JSON output for daos_server stand-alone commands. Legacy and config-generate subcommands have not been updated to support -j flag.
Features: control Required-githooks: true
Before requesting gatekeeper:
- [ ] Two review approvals and any prior change requests have been resolved.
- [ ] Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
- [ ]
Features:(orTest-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR. - [ ] Commit messages follows the guidelines outlined here.
- [ ] Any tests skipped by the ticket being addressed have been run and passed in the PR.
Gatekeeper:
- [ ] You are the appropriate gatekeeper to be landing the patch.
- [ ] The PR has 2 reviews by people familiar with the code, including appropriate owners.
- [ ] Githooks were used. If not, request that user install them and check copyright dates.
- [ ] Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
- [ ] All builds have passed. Check non-required builds for any new compiler warnings.
- [ ] Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
- [ ] If applicable, the PR has addressed any potential version compatibility issues.
- [ ] Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
- [ ] Extra checks if forced landing is requested
- [ ] Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
- [ ] No new NLT or valgrind warnings. Check the classic view.
- [ ] Quick-build or Quick-functional is not used.
- [ ] Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.
Ticket title is 'daos_server {scm,nvme} scan -j does not produce json output' Status is 'In Review' Labels: 'scrubbed,triaged,usability' https://daosio.atlassian.net/browse/DAOS-15385
Note to reviewers, it may be easier to review individual commits which should indicate reasons for the changes.
Test stage Unit Test on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13994/5/testReport/
Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/6/execution/node/1540/log
Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/7/execution/node/345/log
Test stage Build on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/7/execution/node/383/log
Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/7/execution/node/363/log
Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/7/execution/node/328/log
Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/7/execution/node/381/log
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13994/9/testReport/
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13994/10/testReport/
Test stage Unit Test on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13994/11/testReport/
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13994/11/testReport/
apologies for the force push, was hard to avoid with the rebase
Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/15/execution/node/1541/log
Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/15/execution/node/1495/log
Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/16/execution/node/1405/log
Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/17/execution/node/1451/log
@tanabarr: I'm really having a hard time with the global variables... I think it's asking for a lot of trouble with flaky tests, particularly down the road when other people are modifying things in here and not understanding all of the context. I've pushed a relatively minor set of modifications to this PR that allows you to achieve your goal of testing without resorting to global variables. Please consider this or a similar approach: https://github.com/daos-stack/daos/pull/14188
@tanabarr: I'm really having a hard time with the global variables... I think it's asking for a lot of trouble with flaky tests, particularly down the road when other people are modifying things in here and not understanding all of the context. I've pushed a relatively minor set of modifications to this PR that allows you to achieve your goal of testing without resorting to global variables. Please consider this or a similar approach: #14188
That change is fine by me, I was trying to do it without modifying main.go to add sub-command specific logic as I had interpreted some of your objections as recommending against that. I will integrate that approach instead. Thanks
Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/20/execution/node/1406/log
Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13994/21/execution/node/422/log
2 most recent CI runs with Features: control both failed with a single intermittent failure unrelated to this change:
- https://build.hpdd.intel.com/blue/organizations/jenkins/daos-stack%2Fdaos/detail/PR-13994/21/tests/ https://daosio.atlassian.net/browse/DAOS-14585
- https://build.hpdd.intel.com/blue/organizations/jenkins/daos-stack%2Fdaos/detail/PR-13994/20/tests https://daosio.atlassian.net/browse/DAOS-15649
Requesting forced landing to avoid using up more CI cycles.