You shouldn’t need to pass --enablerepo for the repositories defined in /etc/leapp/files/leapp_upgrade_repositories.repo (at least on upstream Leapp, those are automatically enabled).
Can you show me the contents of /var/log/leapp/leapp-report.txt and /var/log/leapp/leapp-preupgrade.log? Those files will contain a bit of private infromation (hostname, rpms installed), so feel free to mail them to evgeni at redhat dot com if you don’t want to post them publicly
Thanks a ton for the logs. They helped me to understand the problem!
So in EL8 several software is packaged as “modules” (so that the user can pick between different versions) and we’re using that to run Foreman with Ruby 2.7 (instead of the default 2.5) among other things. The error you pasted above indicates that it cannot find Ruby 2.7 in the created “target userspace” (aka: the thing it created that contains your new OL8).
The Leapp actor(s) we’ve written to aide the upgrade do have instructions to enable those modules:
And that code is also present in the RPM shipped by Oracle.
However, our actors do not implement the module enablement, but just instruct Leapp to do this for us.
Why am I writing all this? Well, in the Oracle-shipped version of Leapp, there is no rhel_upgrade.py, but there is a oracle_upgrade.py (in /usr/share/leapp-repository/repositories/system_upgrade/common/files/oracle_upgrade.py) which doesn’t have any of the modularity-related changes that happened in Leapp upstream.
That means that no modules will be enabled during the upgrade and stuff breaks left and right.
I guess you gotta engage with Oracle support so that they unbreak their Leapp fork.
Wow, amazing! I grabbed the rhel_upgrade.py and merged the changes with oracle_upgrade.py. The preupgrade now passes!
I had one error during the upgrade, but that was easy to resolve, and I’m now running on Oracle Linux 8.7! Thank you so much for your help, would not have been able to do that without it.
There is a high chance you’ll see errors like this:
reindexdb: error: reindexing of database "foreman" failed: ERROR: could not create unique index "index_fact_names_on_name_and_type"
DETAIL: Key (name, type)=(<something>, PuppetFactName) is duplicated.
or
reindexdb: error: reindexing of database "foreman" failed: ERROR: could not create unique index "index_fact_names_on_name_and_type"
DETAIL: Key (name, type)=(<something>, Katello::RhsmFactName) is duplicated.
Luckily the facts table can be wiped and will be re-populated by clients once the check in again.
OK. It has been running more than 50 minutes:
reindexdb: reindexing database “candlepin”
and in processes I can see:
postgres: postgres candlepin [local] REINDEX waiting.
reindexdb: error: reindexing of database “foreman” failed: ERROR: could not create unique index “katello_erratum_packages_eid_nvrea_n_f”
DETAIL: Key (erratum_id, nvrea, name, filename)=(3095639, gcc-objc-8.5.0-15.el8.s390x, gcc-objc, gcc-objc-8.5.0-15.el8.s390x.rpm) is duplicated.
That should return a list of repository paths. I’d be curious how many repositories are affected.
There are a couple ways to fix. The safest fix would be to destroy all errata records (and children) for your affected repositories and then reindex from Pulp. If too many large repositories are affected, then reindexing from Pulp may take too much time and we may need to fix the dupes manually.
Order of operations would be:
Destroy affected errata and child records
Reindex the DB
Reindex/reimport the data from Pulp to the repositories (like a resync without some steps).
Don’t worry about the fix that I mentioned yet, first it would be good to know the magnitude of the duplicates. If the query is really taking a long time to return your environment must be sizable and perhaps another query should be used.
If the above query seems to be taking way too long, perhaps some of these queries could give me a better idea:
Busy day, but I’ve managed to start getting caught up. I started the db reindexing as you added, and had exactly the same problems as @JendaVodka. Stopping tomcat took care of the >4 hour run reindexing candlepin, then I got:
reindexdb: reindexing database "candlepin"
reindexdb: reindexing database "foreman"
reindexdb: error: reindexing of database "foreman" failed: ERROR: could not create unique index "index_fact_names_on_name_and_type"
DETAIL: Key (name, type)=(augeasversion, PuppetFactName) is duplicated.
I don’t know if the foreman-rake console command about errata is relevant, but it ran for a while and didn’t finish before I killed it.
What now?
If it’s helpful, here’s the size of my environment:
Ah! Sorry, missed that one. I used those commands and removed the facts, and got a clean, successful reindex! Thank you so much again for your help, it’s very appreciated!