[ContentMigration] 2.4.1 Upgrading => 2.5 then 3.0 - Still can't get Pulp to Migrate Correctly

I am on 2.4.1 of Foreman with 4.0 Katello and am having issues upgrading to 2.5/4.1 so we can get to 3.0/4.2. Maybe we still have the Pulp bug? I know we hit the qpid-proton-c upgrade issue in trying to fix this but before I can upgrade and fix this the pulp migration needs to be right. I have deleted all unnecessary content views but still show 2 repositories to be migrated but can’t fix them due to Pulp not processing the changes.

foreman-maintain content prepare gives the error:
Failed executing preserve_output=true foreman-rake katello:pulp3_migration, exit status 1

How did you get to 4.0 without pulp3 migration? You have to finish migration before the upgrading to 4.0. See Prerequisites for Katello 4.0

The migration code may be still present in 4.0 and later but AFAIK it’s not supported to migration. I think 4.0 only uses pulp3 and thus migration wouldn’t work anymore…

1 Like

In completing the 2.4 upgrade, all checks had passed at that time. The 2.5 documentation says to go through the same checks, some are failing. The upgrade fails and I have to roll back to snapshot. I can’t answer whether it was correct the first time, only that it reported that it was. That doesn’t answer the question at this point though which is how to move forward.

Can you post a link to the documentation you followed? (for each upgrade since the one to 4.*)
I still can’t quite tell what the state is, so I can’t give a recommendation on how to move forwards. :wink:

It used to be located here:
(newer docs have been scrubbed but an older example is here:

This is the closest documentation on the website:

Unfortunately Katello 4 has coincided with a switch to a new documentation, and the docs regarding 2to3 migration and Katello upgrades are a bit of a mess…

So let me try to clear up some background to hopefully help you decide how to move forwards:

  1. Running foreman-maintain content prepare when you are already running Katello 4.0 does not make any sense, and is not something that is expected to work, so the fact that this is not working does not necessarily mean anything (it is more likely to break things that were already working, than it is to work).
  2. If you successfully ran foreman-maintain content prepare and foreman-maintain content switchover BEFORE upgrading to Katello 4.0, then everything should just work and you can just upgrade to Katello 4.1 (or even directly to 4.2?) WITHOUT ever running these two commands again. Is anything not working on your running 4.0 instance? If it all works you probably did migrate successfully and don’t need the content prepare command as part of your further upgrades.
  3. If, for whatever reason, something went wrong during the original foreman-maintain content prepare (before you upgraded to Katello 4.0), and then you somehow upgraded to Katello 4.0 anyway, then there is a high chance your DB state is now broken in who knows what ways, and it may be best to abandon the installation and start over…

It is difficult for me to assess from afar if you are in scenario 2. or in scenario 3., so I cannot just tell you what you should do.

Before you do decide to abandon your installation, it might be worth getting a second opinion on this…

If the only thing troubling you is that the foreman-maintain content commands do not work on Katello 4.0, you can savely ignore this. That is in fact a documentation bug.
We had an issue regarding this topic in github (https://github.com/theforeman/foreman-documentation/issues/898) to fix this in nightly. Looks like it was not ported back to old documentations. You can savely ignore the whole “Preparing to Migrate Content to Pulp 3” part of the docs if you successfully upgraded to Katello 4.0


Thanks I will try the upgrade again.