Fixes #615 - Add documentation for upgrade procedure - #621
Conversation
|
Based on previous comments on #616. I added the health check mention in |
| All below steps must be run as root user. | ||
|
|
||
| 1. Stage the foremanctl RPM package | ||
| - The foremanctl RPM must be available in a repository accessible to your disconnected Foreman server. Please transfer the RPM to your disconnected system via an available transport mechanism (USB drive, rsync over a bastion, etc.). |
There was a problem hiding this comment.
Is the RPM enough? Or will they need the Foreman repository for dependencies?
There was a problem hiding this comment.
If I recall you should also need the repo for the deps, let me test right now.
There was a problem hiding this comment.
@ehelms Take a look I added an extra bullet point what do you think?
There was a problem hiding this comment.
I would recommend telling users to stage the entire repository locally. python3.12-obsah is a dependency of foremanctl for example, and users may want to update it even if the update isn't a hard requirement. One reason could be for a CVE, for example.
|
Minor wording mismatch -- the PR title and commits mention
|
ianballou
left a comment
There was a problem hiding this comment.
Just one note so far, thanks for putting all this together:
ccbc170 to
ce5938d
Compare
Updated commits and PR title. |
|
|
||
| For nearly all install situations, upgrading your Foreman server should be approached through upgrading foremanctl. Scroll to the correct procedure below which matches your installation environment type (RPM, disconnected RPM, source). | ||
|
|
||
| ## Upgrading foremanctl from RPM install |
There was a problem hiding this comment.
This procedure doesn't explain to the user where to get the new version of foremanctl. I would expect it to include managing the Foreman repository. I think the title here is also confusing as it talks about "upgrading foremanctl". But upgrading foremanctl inherently means also updating or upgrading Foreman. Right now, we do not support one without the other. Therefore, I think the focus needs to be on "How do I upgrade my installation from X.Y to X.Y+1"
There was a problem hiding this comment.
@aidenfine it might help to run through the upgrading and updating guides in the existing documentation to understand how we handle defining repositories. I think the general strategy for how we manage the repo will stay the same.
| - Run `podman load -i <filename>.tar` to stage the required images. | ||
| 3. Complete the [Upgrading foremanctl from RPM install](#upgrading-foremanctl-from-rpm-install) section above to install from locally staged packages and images. | ||
|
|
||
| ## Recovering from a failed upgrade |
There was a problem hiding this comment.
The troubleshooting section should probably have a section about varying Ansible errors, after which a user should probably open up an issue on GitHub or a post at community.theforeman.org.
There was a problem hiding this comment.
Is there any link to common Ansible errors that may occur?
|
|
||
| All steps must be run as the root user. These steps assume that foremanctl is being ran from the same machine that Foreman was deployed on. | ||
|
|
||
| 1. Please take a moment to determine your preferred Foreman version / git branch, we only support sequential updates. |
There was a problem hiding this comment.
We don't support anything on development environments, so people can git pull at will.
| All steps must be run as the root user. These steps assume that foremanctl is being ran from the same machine that Foreman was deployed on. | ||
|
|
||
| 1. Please take a moment to determine your preferred Foreman version / git branch, we only support sequential updates. | ||
| 2. We recommend a full foremanctl backup before all upgrade operations. Run `foremanctl backup <filepath for backup>`. Please see [Backup](backup.md) for more information on this process. |
There was a problem hiding this comment.
While it's a good practice, I'm not sure how many people will be taking backups of their development environment. Actually, it makes me wonder if they're somehow incompatible with backup/restore.
| All below steps must be run as root user. | ||
|
|
||
| 1. Stage the foremanctl RPM package | ||
| - The foremanctl RPM must be available in a repository accessible to your disconnected Foreman server. Please transfer the RPM to your disconnected system via an available transport mechanism (USB drive, rsync over a bastion, etc.). |
There was a problem hiding this comment.
I would recommend telling users to stage the entire repository locally. python3.12-obsah is a dependency of foremanctl for example, and users may want to update it even if the update isn't a hard requirement. One reason could be for a CVE, for example.
|
@ianballou Are you talking about the Foreman repository? |
Yep! Like https://yum.theforeman.org/releases/3.19/el9/x86_64/. Where users will find the foremanctl RPM. The repository contains the dependencies that foremanctl needs. Check this out: The basic deps likely come from the main OS repos. But then there's python3.12-obsah, which we package up. But anyway - when a user is installing Foreman we want them to have the whole repo. For disconnected users in Satellite, the full setup typically looks like having a connected Satellite host the repositories and the disconnected Satellite consuming from it in some fashion - possibly via import/export. The foremanctl docs don't need to fully define this whole setup though, it could be as basic as saying the user needs to bundle up the repository in some manner and present it to the host. It might be acceptable if we identify all the dependencies and tell them to copy them over, but it's technically safer to use the entire repo where I think the tricky thing here is that "disconnected" installation is truly a bit complicated and I don't think we've really documented it before for regular Foreman or Katello, just Satellite. So - with all this said, my recommendation would be to suggest that the disconnected user creates a local repository mirror of the foreman distribution of their choice, but leave the complexities of how to their choosing. See https://access.redhat.com/solutions/7019225 for an example of how Red Hat suggests users make local mirrors of RHEL repos. |
|
@ianballou I added the suggestion let me know what you think. |
|
Thank you guys for all the movement on this :) Something I think is worth bringing up is that downgrading rpm version troubleshooting section was intended for people with a full backup. If you upgrade from x.1 to x.2 and something breaks, there's a path to restore your working x.1 backup. It could use better wording. Another thought: is there a way to force upgrade jobs to run sequentially if a user goes from foremanctl x.1 to x.10 in one dnf command? Eric mentioned we require version bumping foreman one release at a time so if we can't automate that in packaging there should be clear instructions to the user here. |
|
Hi @qcjames53 !
I think we need to test that the downgrade is possible, with containers it might be easier to support. One question that comes to mind, for example, is what happens if the new deployment pull some newer container images. If you downgrade and run
+1 to this, we need a note saying that users must upgrade to the next Z or Y version and it's the only upgrade path we support. |
cf8d331 to
510e93e
Compare
Why are you introducing these changes? (Problem description, related links)
#615
What are the changes introduced in this pull request?
Note: this pull request has a few TODOs which are open questions that need to be answered by the foremanctl team. Please feel free to push to this branch to address these issues (no AI fluff please). This PR was originally opened #616. The author (@qcjames53) is on paternity leave. This PR will replace the existing PR.
How to test this pull request
Checklist