Skip to content

Fixes #615 - Add documentation for upgrade procedure - #621

Open
aidenfine wants to merge 10 commits into
theforeman:masterfrom
aidenfine:upgrade-document
Open

Fixes #615 - Add documentation for upgrade procedure#621
aidenfine wants to merge 10 commits into
theforeman:masterfrom
aidenfine:upgrade-document

Conversation

@aidenfine

Copy link
Copy Markdown
Contributor

Why are you introducing these changes? (Problem description, related links)

#615

What are the changes introduced in this pull request?

  • Introduce user documentation to cover the manual update process for connected RPM, disconnected RPM, and from-source installs.

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

  • Attempt the upgrade procedure from source and the portions of the RPM procedures which can be currently attempted.
  • Validate the document for accuracy. Ensure it is concise, useful, and well organized.

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

Comment thread docs/user/upgrade.md Outdated
@aidenfine

Copy link
Copy Markdown
Contributor Author

Based on previous comments on #616. I added the health check mention in docs/user/upgrade.md and moved Upgrading from source section into docs/developer/development-environment.md

Comment thread docs/developer/development-environment.md Outdated
Comment thread docs/developer/development-environment.md Outdated
Comment thread docs/developer/development-environment.md
@aidenfine
aidenfine requested a review from ehelms July 14, 2026 04:33
Comment thread docs/developer/development-environment.md Outdated
Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md
Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md
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.).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the RPM enough? Or will they need the Foreman repository for dependencies?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I recall you should also need the repo for the deps, let me test right now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ehelms Take a look I added an extra bullet point what do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ehelms

ehelms commented Jul 16, 2026

Copy link
Copy Markdown
Member

Minor wording mismatch -- the PR title and commits mention update which is different than upgrade in our nomenclature. I think we should try to be clear about which one we are talking about. Hopefully the procedure for the two becomes the same, but for now I like the differentiation:

  1. upgrade: X.Y -> X.Y+1
  2. update: X.Y.Z -> X.Y.Z+1

upgrade requires things like switching repositories, different version tags on the images and possibly "bigger" upgrade actions happening. Where as "update" should feel smaller, and more direct to achieve for the user.

@ianballou ianballou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one note so far, thanks for putting all this together:

Comment thread docs/user/upgrade.md
@aidenfine aidenfine changed the title Fixes #615 - Add documentation for update procedure Fixes #615 - Add documentation for upgrade procedure Jul 23, 2026
@aidenfine

Copy link
Copy Markdown
Contributor Author

Minor wording mismatch -- the PR title and commits mention update which is different than upgrade in our nomenclature. I think we should try to be clear about which one we are talking about. Hopefully the procedure for the two becomes the same, but for now I like the differentiation:

  1. upgrade: X.Y -> X.Y+1
  2. update: X.Y.Z -> X.Y.Z+1

upgrade requires things like switching repositories, different version tags on the images and possibly "bigger" upgrade actions happening. Where as "update" should feel smaller, and more direct to achieve for the user.

Updated commits and PR title.

Comment thread docs/developer/development-environment.md Outdated
Comment thread docs/user/upgrade.md

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

@ianballou ianballou Jul 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md
- 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/developer/development-environment.md Outdated
Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md
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.).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@aidenfine

Copy link
Copy Markdown
Contributor Author

@ianballou Are you talking about the Foreman repository?

@ianballou

Copy link
Copy Markdown
Contributor

@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:

# rpm -q --requires foremanctl 
/usr/bin/bash
/usr/bin/env
/usr/bin/python3
config(foremanctl) = 2.3.0-1.el9sat
python3.12-obsah >= 1.8.1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1

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 foremanctl lives.

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.

@aidenfine

Copy link
Copy Markdown
Contributor Author

@ianballou I added the suggestion let me know what you think.

@qcjames53

Copy link
Copy Markdown
Contributor

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.

@ianballou

Copy link
Copy Markdown
Contributor

Hi @qcjames53 !

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.

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 foremanctl restore, will the older container images be downgraded too?

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.

+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.

Comment thread docs/user/upgrade.md Outdated
Comment thread docs/user/upgrade.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants