Update foreman-maintain health for foremanctl#4843
Conversation
206adbc to
3d90402
Compare
|
@jafiala Can you please take a look here? This is my first foremanctl PR that updates a foreman-maintain command to its foremanctl equivalent. This involves introducing a foremanctl-maintain attribute (which has the same value as foremanctl-installer, I think those can be merged after we change the foremanctl build target attribute) and updating the individual occurrences of the commands. It does not involve exposing the affected guides' foremanctl variants in the list of containerized guides in https://docs.theforeman.org/release/nightly/ because this particular command is spread over multiple procedures and verifying those procedures (and assemblies) as a whole is out of scope (that should come later, as we actually review the whole guides and expose them). Does this make sense to you? |
This copies the precedent that added a foremanctl-installer attribute
3d90402 to
be96daa
Compare
The command's help page is not that helpful in foremanctl
The containerized health command does not include a separate option for checking for duplicate permissions
baa96d1 to
602bdfa
Compare
|
With the latest commit, I also exposed |
|
Hi @qcjames53, I think I applied all your feedback. Can you please re-review? |
| ifdef::containerized[] | ||
| [options="nowrap", subs="+quotes,attributes"] | ||
| ---- | ||
| # {foremanctl} health |
There was a problem hiding this comment.
| # {foremanctl} health | |
| $ {foremanctl} health |
Needs tech ACK.
FYI: In guides/common/modules/proc_retrieving-status-of-services-by-using-cli.adoc, you use a dollar sign to indicate that it works as normal user too. (issue for foreman-maintain exists on "master" already, but it would be nice to know and adjust it.)
There was a problem hiding this comment.
foreman-maintain works fine as a regular user that has the ability to elevate to superuser so I think $ is fine. Root access is still required for most operations but all the playbooks use become: true.
qcjames53
left a comment
There was a problem hiding this comment.
I'm sorry about the big delay for re-reviewing this. I'm confident we're finally at a place where there won't be any more param changes on theforeman/foremanctl#521. Sorry to keep changing things; it has been a very involved review process. This will need one more round of fixes and I think we'll be good.
| ifdef::containerized[] | ||
| [options="nowrap", subs="+quotes,attributes"] | ||
| ---- | ||
| # {foremanctl} health |
There was a problem hiding this comment.
foreman-maintain works fine as a regular user that has the ability to elevate to superuser so I think $ is fine. Root access is still required for most operations but all the playbooks use become: true.
There was a problem hiding this comment.
I did a deep dive into this procedure and came to the conclusion we can delete it for current Foreman.
- Foreman maintain added the duplicate permissions check in 2020 as a part of 30527, fixing a duplicate permissions issue in the Sat 6.5 -> 6.6 upgrade (do not know exact Foreman versions since NOTHING mentions it; I think it's 1.21 -> 1.22?).
- Modern Foreman does not allow duplicate permissions to be created and we're well beyond supporting 1.21.
- Eric and I agreed to delete the duplicate permissions check from
foremanctl healthsince it's legacy code and we have a validation in place these days to try and prevent duplicates from being created. The--fixoption is gone as well.
What do you think, Aneta?
| ifdef::containerized[] | ||
| [options="nowrap", subs="verbatim,quotes,attributes"] | ||
| ---- | ||
| # {foremanctl} health --fix |
There was a problem hiding this comment.
As mentioned above, --fix no longer exists and foremanctl health no longer checks for duplicate permissions.
What changes are you introducing?
Changing references to
foreman-maintain healthtoforemanctl health.Why are you introducing these changes? (Explanation, links to references, issues, etc.)
To support the transition to containerized Foreman.
Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)
This PR only updates the commands. It does not publish the changes to docs.theforeman.org because I'm only verifying the new commands work, not the procedures as a whole.
Contributor checklists
Please cherry-pick my commits into: