DAOS-19440 ddb: Fix --db_path/--vos_path placement inconsistency - #18862
Draft
knard38 wants to merge 1 commit into
Draft
DAOS-19440 ddb: Fix --db_path/--vos_path placement inconsistency#18862knard38 wants to merge 1 commit into
knard38 wants to merge 1 commit into
Conversation
|
Ticket title is 'ddb: |
ddb's pool-lifecycle subcommands (open, close, feature, rm_pool, dev_list, dev_replace, prov_mem, smd_sync) manage their own pool lifecycle, so the CLI's --vos_path/--db_path auto-open logic skipped them entirely. This made the top-level flags behave inconsistently: they opened the pool for pool-content commands (ls, rm, ...) but were silently ignored for pool-lifecycle commands -- with dev_list, dev_replace, prov_mem, and smd_sync also taking db_path positionally instead of as a flag. Fix: - Normalize db_path to a -p/--db_path flag for dev_list, dev_replace, prov_mem, and smd_sync, matching open/feature/rm_pool. Breaking change: the old positional syntax now fails with a clear usage error instead of silently misinterpreting arguments. - Reject --vos_path/--db_path outright (instead of silently ignoring them) when a pool-lifecycle command is given as a single bare CLI command. close is included, with no exception: its "open+close health check" use case is redundant with the existing pool-content auto-open/auto-close behavior. Pool-content commands, interactive mode, and -f command-file mode are unchanged: the top-level flags still auto-open the pool as before. Also updates ddbLongDescription and each pool-lifecycle command's LongHelp, adds a dedicated POOL-CONTENT VS. POOL-LIFECYCLE COMMANDS man page section, updates README.md and ddb_utils.py's prov_mem() caller, and reworks test coverage in main_test.go and ddb_commands_test.go. Validated with the full src/control/run_go_tests.sh suite and live end-to-end testing on a DAOS cluster covering pool-content auto-open, pool-lifecycle rejection (including close), pool-lifecycle commands using their own arguments, and -f command-file mode. Features: recovery Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
knard38
force-pushed
the
ckochhof/fix/master/daos-19440/patch-000
branch
from
August 14, 2026 09:14
16caa70 to
ad03995
Compare
Collaborator
|
Test stage Functional Hardware Medium MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-18862/2/execution/node/1757/log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
ddbCLI requires--db_path/--vos_pathto be placed before the subcommand name for most subcommands (ls,rm,value_dump, etc.), but after the subcommand name for pool-lifecycle subcommands (rm_pool,open,feature,dev_list,dev_replace,prov_mem). For example:This asymmetry is confusing to users and adds unnecessary special-casing to test code that drives
ddb(raised independently by @makito while investigatingrm_poolusage in MD-on-SSD recovery tests).dev_list,dev_replace,prov_mem, andsmd_synchad a second, related inconsistency:db_pathwas declared as a positional argument rather than a flag, unlikeopen/feature/rm_pool.This is a distinct, follow-up design/UX issue from DAOS-19122 / #18466, which fixed a crash caused by the same underlying flag-name collision but left the resulting per-subcommand placement rules in place.
Solution
Normalize
db_pathto a-p/--db_pathflag fordev_list,dev_replace,prov_mem, andsmd_sync, matching the flag already used byopen/feature/rm_pool. This is an intentional, breaking CLI change for these four commands: the old positional syntax now fails with a clear grumble usage error instead of silently misinterpreting arguments. No C-layer changes are needed — the Go wrapper functions incommands_wrapper.goalready takedbPathas a plain string regardless of whether the caller reads it from a flag or a positional argument.Reject
--vos_path/--db_pathoutright (instead of silently ignoring them, which is what happens today) when a pool-lifecycle command (open,close,feature,rm_pool,dev_list,dev_replace,prov_mem,smd_sync) is given as a single bare command directly on the CLI. These commands manage their own pool open/close/remove/replace lifecycle and take their own path argument/flag directly, so silently ignoring the top-level flags left users wondering why they had no effect:closeis included in the rejection with no exception: an "open+close health check" use case was considered but found redundant with the existing pool-content auto-open/auto-close behavior (ddb --vos_path X lsalready performs an equivalent open-then-close, with more useful output).Pool-content commands (
ls,rm,value_dump, ...), interactive mode, and-fcommand-file mode are unchanged: the top-level--vos_path/--db_pathcontinue to auto-open the pool before the command runs, exactly as before.Documentation
ddbLongDescription(general--help) and each pool-lifecycle command'sLongHelpnow document the pool-content vs. pool-lifecycle distinction and the new rejection rule.ddbman page (see attached ddb-manpage.pdf), alongside the existing MD-ON-SSD MODE section.README.mdwas updated with the same explanation and a rejected/works example.Testing
src/control/run_go_tests.shsuite (-race -cover -tags fault_injection,test_stubs,spdk).main_test.go/ddb_commands_test.goextended/reworked to cover: pool-content commands still auto-opening (regression), all 8 pool-lifecycle commands rejecting the top-level flags with the new error as a bare command, pool-lifecycle commands using their own arguments directly still working unchanged, and-fcommand-file mode still accepting the top-level flags without triggering the new rejection.ddb_utils.py'sDdbCommand.prov_mem()updated to the new--db_pathflag syntax — the only ftest/Python caller of any of the four converted commands.Steps for the author:
After all prior steps are complete: