daos icon indicating copy to clipboard operation
daos copied to clipboard

DAOS-15385 control: Add JSON output support to daos_server cmds

Open tanabarr opened this issue 1 year ago • 1 comments

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: (or Test-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.

tanabarr avatar Mar 15 '24 16:03 tanabarr

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

github-actions[bot] avatar Mar 15 '24 17:03 github-actions[bot]

Note to reviewers, it may be easier to review individual commits which should indicate reasons for the changes.

tanabarr avatar Mar 21 '24 11:03 tanabarr

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/

daosbuild1 avatar Mar 22 '24 22:03 daosbuild1

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

daosbuild1 avatar Mar 26 '24 13:03 daosbuild1

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

daosbuild1 avatar Mar 26 '24 14:03 daosbuild1

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

daosbuild1 avatar Mar 26 '24 14:03 daosbuild1

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

daosbuild1 avatar Mar 26 '24 14:03 daosbuild1

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

daosbuild1 avatar Mar 26 '24 14:03 daosbuild1

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

daosbuild1 avatar Mar 26 '24 14:03 daosbuild1

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/

daosbuild1 avatar Mar 26 '24 15:03 daosbuild1

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/

daosbuild1 avatar Mar 27 '24 13:03 daosbuild1

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/

daosbuild1 avatar Mar 27 '24 18:03 daosbuild1

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/

daosbuild1 avatar Mar 27 '24 18:03 daosbuild1

apologies for the force push, was hard to avoid with the rebase

tanabarr avatar Apr 04 '24 21:04 tanabarr

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

daosbuild1 avatar Apr 05 '24 20:04 daosbuild1

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

daosbuild1 avatar Apr 05 '24 22:04 daosbuild1

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

daosbuild1 avatar Apr 12 '24 17:04 daosbuild1

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

daosbuild1 avatar Apr 16 '24 04:04 daosbuild1

@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

mjmac avatar Apr 18 '24 15:04 mjmac

@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

tanabarr avatar Apr 18 '24 15:04 tanabarr

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

daosbuild1 avatar Apr 20 '24 05:04 daosbuild1

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

daosbuild1 avatar Apr 22 '24 04:04 daosbuild1

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.

tanabarr avatar Apr 22 '24 10:04 tanabarr