Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section for RHEL8to9 in-place upgrade using LEAPP #3070

Merged

Conversation

AkshayGadhaveRH
Copy link
Contributor

Adding information about the process to upgrade the underlying OS from EL8to9. Repurposed the older RHEL7to8 LEAPP module from 3.1 for 8to9 LEAPP upgrade.

Please cherry-pick my commits into:

  • Foreman 3.11/Katello 4.13
  • Foreman 3.10/Katello 4.12
  • Foreman 3.9/Katello 4.11 (Satellite 6.15; orcharhino 6.8)
  • Foreman 3.8/Katello 4.10
  • Foreman 3.7/Katello 4.9 (Satellite 6.14)
  • Foreman 3.6/Katello 4.8
  • Foreman 3.5/Katello 4.7 (Satellite 6.13; orcharhino 6.6/6.7)
  • We do not accept PRs for Foreman older than 3.5.

@evgeni
Copy link
Member

evgeni commented Jun 10, 2024

@maximiliankolb what are Orcharino's plans for EL9 upgrades? Should we include them here in the PR or will you enable them on your own whenever you're ready?

@evgeni evgeni changed the title Add section for RHEL8to9 in-place upgrade using LEAPPwq Add section for RHEL8to9 in-place upgrade using LEAPP Jun 10, 2024
@maximiliankolb
Copy link
Contributor

@maximiliankolb what are Orcharino's plans for EL9 upgrades? Should we include them here in the PR or will you enable them on your own whenever you're ready?

orcharhino will orient itself to Katello and Satellite.

@AkshayGadhaveRH Please include orcharhino in any "ifdef/ifndef" macros if possible. Feel free to ping me if something's unclear regarding those macros. I will also create a follow-up PR later on.

@AkshayGadhaveRH AkshayGadhaveRH force-pushed the add_RHEL8to9_LEAPP_section_to_master branch from 7b8eef5 to 5c1a161 Compare June 12, 2024 06:13
@AkshayGadhaveRH AkshayGadhaveRH force-pushed the add_RHEL8to9_LEAPP_section_to_master branch from 1004ed9 to 93ef876 Compare August 7, 2024 05:54
@pr-processor pr-processor bot added Needs re-review and removed Waiting on contributor Requires an action from the author labels Aug 7, 2024
Copy link
Contributor

@Lennonka Lennonka left a comment

Choose a reason for hiding this comment

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

One last detail and I'm merging

@Lennonka Lennonka merged commit da7017b into theforeman:master Aug 12, 2024
7 of 9 checks passed
@Lennonka
Copy link
Contributor

Lennonka commented Aug 12, 2024

I'm not sure about the cherry-pick to 3.11 because of the Pulpcore and Candlepin versions -- are you sure they are the same versions for 3.11 as for the future 3.12? I am not, therefore not cherry-picking.

@evgeni
Copy link
Member

evgeni commented Aug 12, 2024

I'm not sure about the cherry-pick to 3.11 because of the Pulpcore and Candlepin versions -- are you sure they are the same versions for 3.11 as for the future 3.12? I am not, therefore not cherry-picking.

I am sure. please pick.

@Lennonka
Copy link
Contributor

@evgeni Thank you! :)

Lennonka added a commit that referenced this pull request Aug 12, 2024
Adding information about the process to upgrade the underlying OS from EL8to9.
Repurposed the older RHEL7to8 LEAPP module from 3.1 for 8to9 LEAPP upgrade.

* Add `PulpcoreVersion` attribute
This attribute was removed as it was no longer needed after 3.1. Readding it as the LEAPP module refers to it.
Setting it to correct version (3.49).

---------

Co-authored-by: Akshay Gadhave <agadhave@agadhave-thinkpadp1gen4i.pnq.csb>
Co-authored-by: Zuzana Lena Ansorgová <zuansorg@redhat.com>
@Lennonka
Copy link
Contributor

Cherry-picked:

@evgeni
Copy link
Member

evgeni commented Aug 13, 2024

@Macleykun heya. thanks for the comment!

Would you mind double-check against the final rendering at https://docs.theforeman.org/3.11/Upgrading_Project/index-katello.html#upgrading-foreman-or-smart-proxy-in-place-using-leapp_upgrading-connected -- at least the commands should all be there.

You were using the leapp packages from RHEL, right, not the ones from the copr, as you're on a RHEL system?
That's probably the issue why the upgrade did not actually upgrade Foreman/Katello packages (and called installer) -- the leapp in RHEL still needs to release the version with our patches (but that's in the works)

@Macleykun
Copy link

@Macleykun heya. thanks for the comment!

Would you mind double-check against the final rendering at https://docs.theforeman.org/3.11/Upgrading_Project/index-katello.html#upgrading-foreman-or-smart-proxy-in-place-using-leapp_upgrading-connected -- at least the commands should all be there.

You were using the leapp packages from RHEL, right, not the ones from the copr, as you're on a RHEL system? That's probably the issue why the upgrade did not actually upgrade Foreman/Katello packages (and called installer) -- the leapp in RHEL still needs to release the version with our patches (but that's in the works)

I kept an eye on this PR and noticed all the commands stayed the same including the repos that need to be configured since my comment, overall the steps look great!

and correct I didn’t use copr! Those patches you mention, I assume these are being tracked in a PR in GitHub on the leapp repo? I may need to apply those patches manually still then :p .

But isn’t it an issue that those patches aren’t out yet but the docs to in place are released public?

ATM I’m out of the office for ~2 weeks so I may respond a bit later then I usually would!

@evgeni
Copy link
Member

evgeni commented Aug 14, 2024

and correct I didn’t use copr! Those patches you mention, I assume these are being tracked in a PR in GitHub on the leapp repo? I may need to apply those patches manually still then :p .

Just use the copr then ;-)
It's easier than applying (multiple) patches manually.

But isn’t it an issue that those patches aren’t out yet but the docs to in place are released public?

You are kinda right here. I was hoping that the RHEL update would be faster (it wasn't) and wasn't expecting to have too many "Foreman on RHEL" users (only "Foreman on CentOS/Rocky/Alma" which would use the copr anyway and "Satellite on RHEL" which would not be released before the RHEL update is out).

We can drop the "not needed on rhel" note from the "enable copr" instruction.

ATM I’m out of the office for ~2 weeks so I may respond a bit later then I usually would!

No worries at all!

@Macleykun
Copy link

I see, we are already running rhel 9 with foreman so I’m not sure if using copr would still work (installing leapp rhel 8 with the extra patches).
I would need to go through the patches manually still and see if there are any that are still applicable, hope to priorize that after return to the office!

Glad to read that the docs will also be updated to use the copr repo for rhel aswell to make the process smooth!

@evgeni
Copy link
Member

evgeni commented Aug 15, 2024

If you're already running el9 you don't need the copr, as it contains only leapp related packages for the 8to9 upgrade.

Did you reindex the database after switching to el9?

@Macleykun
Copy link

If you're already running el9 you don't need the copr, as it contains only leapp related packages for the 8to9 upgrade.

Did you reindex the database after switching to el9?

Awsome!
And I’m pretty sure I didn’t run: runuser -u postgres -- reindexdb -a but isn’t the reindex ran when running the foreman-installer? I assume the step is needed for performance?

@evgeni
Copy link
Member

evgeni commented Aug 15, 2024

And I’m pretty sure I didn’t run: runuser -u postgres -- reindexdb -a but isn’t the reindex ran when running the foreman-installer? I assume the step is needed for performance?

Sadly not, no.
It's required for data consistency, as EL9 uses different libc version which can influence PostgreSQL indexes.

You need to run the following two commands:

runuser -u postgres -- reindexdb -a
runuser -c 'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;" | psql pulpcore' postgres

only call the second if the first was successful!

@Macleykun
Copy link

And I’m pretty sure I didn’t run: runuser -u postgres -- reindexdb -a but isn’t the reindex ran when running the foreman-installer? I assume the step is needed for performance?

Sadly not, no. It's required for data consistency, as EL9 uses different libc version which can influence PostgreSQL indexes.

You need to run the following two commands:

runuser -u postgres -- reindexdb -a
runuser -c 'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;" | psql pulpcore' postgres

only call the second if the first was successful!

Understandable! Going to forward that immedialty to a collegeue of mine! Thank you so much for discussing the PR :)! <3

@evgeni
Copy link
Member

evgeni commented Aug 16, 2024

#3220 for the "copr on rhel" change

@maximiliankolb
Copy link
Contributor

Thank you @AkshayGadhaveRH

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.

None yet

8 participants