Skip to content

fix(xcat-server): remove the unreachable deprecated provisioning paths - #7715

Open
viniciusferrao wants to merge 3 commits into
xcat2:masterfrom
VersatusHPC:cleanup/deprecated-provisioning-deadcode
Open

fix(xcat-server): remove the unreachable deprecated provisioning paths#7715
viniciusferrao wants to merge 3 commits into
xcat2:masterfrom
VersatusHPC:cleanup/deprecated-provisioning-deadcode

Conversation

@viniciusferrao

@viniciusferrao viniciusferrao commented Aug 8, 2026

Copy link
Copy Markdown
Member

setdestiny reports the deprecated install, netboot and statelite states and returns. The legacy path below that return has not run since 57aa417.

packimage rejects -o, -p and -a up front, which strands three things below it. The branch for a missing image name asks for -o:

$ packimage -o rhels9 -a x86_64 -p compute
Error: -o, -p and -a options are obsoleted, please use 'packimage <osimage name>' instead.

$ packimage
Error: Please specify a os version with the -o flag

It now reports the missing image name. The other two cannot be entered and are removed.

With xCAT 2.18.2: the deprecated states are still rejected, and nodeset <node> osimage=<name> and packimage <osimage name> are unchanged.

setdestiny reports the deprecated install, netboot and statelite states and
returns, and the legacy path that set nodetype.provmethod from the target sits
directly after that return. It has not run since the deprecation landed in
57aa417, and it still reads like live code when following setdestiny.

Remove it. The deprecated states are still rejected exactly as before, and the
osimage path is untouched.
…ption

packimage rejects -o, -p and -a before anything else runs, which leaves three
things below it that cannot be reached. The branch handling a missing image
name asks for -o and reports "Please specify a os version with the -o flag",
so passing the option is rejected and omitting it is reported as the option
being absent. The check for those options alongside an image name re-tests a
condition already rejected, and the block that built an image from them can no
longer be entered.

Report the missing image name instead, and drop the parts that cannot run.
Passing -o, -p or -a is rejected exactly as before, and packing a named image
is unchanged.
Scan destiny.pm and packimage.pm for statements sitting after an unconditional
return, which is how the deprecated provisioning paths stayed in the tree after
they stopped running.

Also assert the behavior that has to survive the removal: the deprecated
nodeset states are still rejected, packimage still rejects -o, -p and -a, and a
missing image name is now reported as such rather than as a missing option that
would be rejected anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant