fix(xcat-server): remove the unreachable deprecated provisioning paths - #7715
Open
viniciusferrao wants to merge 3 commits into
Open
fix(xcat-server): remove the unreachable deprecated provisioning paths#7715viniciusferrao wants to merge 3 commits into
viniciusferrao wants to merge 3 commits into
Conversation
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.
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.
setdestinyreports the deprecated install, netboot and statelite states and returns. The legacy path below that return has not run since 57aa417.packimagerejects-o,-pand-aup front, which strands three things below it. The branch for a missing image name asks for-o: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>andpackimage <osimage name>are unchanged.