testdata: keep state-changing storcli2 captures out of SAFE mode#60
Merged
Merged
Conversation
The collect script's header and README promised that SAFE mode (the default) only collects read-only outputs, yet six captures issuing state-changing verbs ran unconditionally: start/stop locate (drive LED), set/delete jbod, the delete-nonexistent-VD and the migrate failure cases. They are only expected to fail or toggle an LED on the reference setup, but on a host where their target exists (an unconfigured slot 0, a VD 999) they would really change the configuration. Move them into the DESTRUCTIVE block so SAFE mode is strictly "show" commands, and align the README's Mode column with the actual behavior. Also fix the surrounding staleness found in review: - Rename controllergetter's c0_s12_UGood.json to c0_UGood.json: the captured unconfigured drive is e320:s11 (auto-detected at capture time), so a slot-specific name is misleading. - Rename cacheoptions/success.json to combined_syntax_error.json: it records the v1 combined "set rdcache=RA wrcache=WT" syntax that storcli2 rejects with a plain-text syntax error, not a success payload. - Sync VD_IDS with the live controller: VDs are 1-23 and 25 (the original v24 was sacrificed by a destructive run and recreated as v25; the per-VD list stopped at 23). - Document the c0_aso.json / c0_autoconfig.json captures in the README mapping table and drop the stale "command logic is unchanged" claim.
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.
What
Makes the storcli2 collect script's SAFE mode actually read-only, and fixes the testdata staleness found in review.
Why
The script header and the README promised that SAFE mode (the default) only collects read-only outputs, yet six captures issuing state-changing verbs ran unconditionally:
start/stop locate(drive LED),set/delete jbod, the delete-nonexistent-VD and the migrate failure cases. They are only expected to fail or toggle an LED on the reference setup, but on a host where their target exists (an unconfigured slot 0, a VD 999) they would really change the configuration.How
DESTRUCTIVE=trueblock; SAFE mode is now strictlyshowcommands. README Mode column aligned with the actual behavior.controllergetter/testdata/storcli2/c0_s12_UGood.json→c0_UGood.json: the captured unconfigured drive ise320:s11(auto-detected at capture time), so a slot-specific name is misleading. Not referenced by any test.cacheoptions/success.json→combined_syntax_error.json: it records the v1 combinedset rdcache=RA wrcache=WTsyntax that storcli2 rejects with a plain-text syntax error, not a success payload. README "Known issues" updated.VD_IDSwith the live controller: VDs are 1-23 and 25 — the original v24 was sacrificed by a destructive capture run and recreated as v25 (the per-VD list stopped at 23).c0_aso.json/c0_autoconfig.jsoncaptures in the README mapping table and drop the stale "command logic is unchanged" claim.bash -nclean;go test ./pkg/...green (the two renamed fixtures are not referenced by tests).