Skip to content

docs: document the clean --raid modes - #1080

Open
ideaship wants to merge 2 commits into
mainfrom
docs-baremetal-clean-raid-modes
Open

docs: document the clean --raid modes#1080
ideaship wants to merge 2 commits into
mainfrom
docs-baremetal-clean-raid-modes

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

Documents the RAID handling of osism baremetal clean, including the three named modes
added in:

Neither page mentioned any clean flag before this — not --raid, not
--metadata-only — and software-raid.md described the array as something only
osism baremetal deploy ever applies.

node-deployment.md

Extends the existing clean section with the three modes, the bare --raid shorthand,
how --metadata-only interacts with them, and the recreate refusal rules including
that --all skips and reports rather than aborting, then exits non-zero.

Also states that a mixed fleet needs no special handling. That is the common case — half
the nodes have a target_raid_config, half have no RAID interface at all — and since
the modes only ever apply to nodes with a RAID interface, one --all run does the right
thing for both halves. Worth saying explicitly, because there is no way to select a
subset of nodes even if one were needed.

The argument order caveat is documented because it is not guessable: --raid takes an
optional value, so a node name written directly after it is claimed as the value and
clean --raid node101 is rejected.

software-raid.md

New section on building or rebuilding the declared array without a deployment, which is
what --raid recreate is for, plus the reason delete and erase have to precede the
create step (Ironic's create step does not remove existing disks and fails on a
partitioned target) and the --metadata-only --raid recreate variant for hardware whose
disks cannot be erased in band.

Two things an operator can be caught by, now stated:

  • A full clean removes the array by default. That was already true before the flag
    existed, and the page otherwise only ever mentions the array as something a deploy
    creates.
  • Why recreate refuses a node with no target_raid_config rather than proceeding.
    Ironic accepts such a request and fails on the create step, which runs last, so the
    disks are already erased and the node lands in clean failed with maintenance mode
    set. Recovering means clearing the flag and cleaning again.

Checks

yarn build passes, which matters here because onBrokenLinks: 'throw' and the two
pages now cross-reference each other. markdown-table-formatter --check reports nothing
to reformat and codespell is clean.

Draft until the companion PR is reviewed; they should land together, since this
documents flags that do not exist on main yet.

`osism baremetal clean` gained `--raid {delete,keep,recreate}`, replacing the
earlier boolean flag. None of it was documented: no `clean` flag appears
anywhere on these pages, and the software RAID page described the array as
something only `osism baremetal deploy` applies.

Cover it in the two places an operator would look. Node deployment gets the
three modes, the bare `--raid` shorthand, how `--metadata-only` interacts with
them, and the `recreate` refusal rules, including that `--all` skips and
reports rather than aborting and then exits non-zero. Software RAID gets a
section on building or rebuilding the declared array without a deployment,
which is what `--raid recreate` is for, along with the reason delete and erase
have to precede the create step and the `--metadata-only` variant for hardware
whose disks cannot be erased in band.

Also note that a full clean removes the array by default. That was already
true before the flag existed and is easy to be surprised by, since the array
is otherwise only ever mentioned as something a deploy creates.

The argument order caveat is documented because it is not guessable: `--raid`
takes an optional value, so argparse claims a node name written directly after
it and `clean --raid node101` is rejected.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
Two gaps in the first pass, both found by working through what an operator
actually asks when they hit this.

The refusal was justified only as not deleting the array it was asked to
rebuild. The concrete consequence is what makes it understandable: Ironic
accepts the request and fails on the create step, which runs last, so the disks
are already erased and the node ends up in `clean failed` with maintenance mode
set. Recovering means clearing the flag and cleaning again. Knowing that turns
the refusal from an obstacle into an obvious kindness.

The mixed fleet was also unaddressed, and it is the common case: half the nodes
have a `target_raid_config` and half have no RAID interface at all. Because the
modes only ever apply to nodes with a RAID interface, one `--all` run does the
right thing for both halves, and there is nothing to select. Worth saying,
because there is no way to select a subset of nodes even if it were needed.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@github-actions

Copy link
Copy Markdown

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.05s
✅ JSON jsonlint 4 0 0 0.11s
✅ JSON prettier 4 0 0 0.32s
✅ JSON v8r 4 0 0 8.98s
✅ MARKDOWN markdownlint 169 0 0 2.74s
✅ MARKDOWN markdown-table-formatter 169 0 0 0.43s
✅ REPOSITORY betterleaks yes no no 0.67s
✅ REPOSITORY checkov yes no no 19.73s
✅ REPOSITORY git_diff yes no no 0.06s
✅ REPOSITORY secretlint yes no no 3.64s
✅ REPOSITORY trufflehog yes no no 4.04s
✅ SPELL codespell 179 0 0 0.74s
✅ SPELL lychee 179 0 0 40.42s
✅ YAML prettier 6 0 0 0.41s
✅ YAML v8r 6 0 0 7.73s
✅ YAML yamllint 6 0 0 0.54s

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.0.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,JSON_JSONLINT,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,SPELL_CODESPELL,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@ideaship ideaship self-assigned this Aug 27, 2026
@ideaship
ideaship marked this pull request as ready for review August 27, 2026 15:11
@ideaship ideaship moved this from New to Ready for review in Human Board Aug 27, 2026
@berendt
berendt requested a review from janhorstmann August 27, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants