Upgrade Rocky Linux 8 to Rocky Linux 9 fails with The repository mapping file is invalid

Trying to follow instructions from CentOS 7 End of Life - Migrate to Rocky Linux 9. Upgrade from Centos 7 to Rocky 8 was successful but then from 8 to 9, after leapp preupgrade, I get:

Actor: repository_mapping
Message: The repository mapping file is invalid: the JSON does not match required schema (wrong field type/value): The value of “mapping” field is None, but this is not allowed
Summary:
Hint: Read documentation at the following link for more information about how to retrieve the valid file: Leapp utility metadata in-place upgrades of RHEL for disconnected upgrades (including Satellite) - Red Hat Customer Portal

I don´t have access to the mentioned URL.

log:
2024-05-27 14:07:05.746 DEBUG PID: 44113 leapp.workflow.FactsCollection.pes_events_scanner: File /etc/leapp/files/pes-events.json successfully read (1917066 bytes)
2024-05-27 14:07:05.781 DEBUG PID: 44113 leapp.workflow.FactsCollection.pes_events_scanner: The following target system packages will not be installed:

2024-05-27 14:07:05.784 WARNING PID: 44113 leapp.workflow.FactsCollection.pes_events_scanner: Cannot determine the representative target base repository.
2024-05-27 14:07:05.785 INFO PID: 44113 leapp.workflow.FactsCollection.pes_events_scanner: Fallback: Create an artificial representative PESIDRepositoryEntry for the repository mapping
2024-05-27 14:07:05.787 WARNING PID: 44113 leapp.workflow.FactsCollection.pes_events_scanner: Cannot determine the representative target base repository.
2024-05-27 14:07:05.788 INFO PID: 44113 leapp.workflow.FactsCollection.pes_events_scanner: Fallback: Create an artificial representative PESIDRepositoryEntry for the repository mapping
2024-05-27 14:07:05.790 WARNING PID: 44113 leapp.workflow.FactsCollection.pes_events_scanner: Cannot determine the representative target base repository.
2024-05-27 14:07:05.792 INFO PID: 44113 leapp.workflow.FactsCollection.pes_events_scanner: Fallback: Create an artificial representative PESIDRepositoryEntry for the repository mapping
2024-05-27 14:07:05.803 INFO PID: 41285 leapp.workflow.FactsCollection: Executing actor setuptargetrepos
2024-05-27 14:07:05.894 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Custom repos: [‘rocky9-baseos’, ‘rocky9-appstream’, ‘rocky9-crb’, ‘rocky9-ha’, ‘rocky9-resilient-storage’, ‘rocky9-extras’]
2024-05-27 14:07:05.896 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Vendor repos:
2024-05-27 14:07:05.896 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Used repos: dict_keys()
2024-05-27 14:07:05.898 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Enabled repos: [‘extras’, ‘elevate’, ‘baseos’, ‘appstream’]
2024-05-27 14:07:05.899 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Mapped repos: set()
2024-05-27 14:07:05.900 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Expected repos: dict_keys()
2024-05-27 14:07:05.911 INFO PID: 41285 leapp.workflow.FactsCollection: Starting stage After of phase FactsCollection
2024-05-27 14:07:05.914 INFO PID: 41285 leapp.workflow: Workflow interrupted due to the FailPhase error policy

Thanks.

I’ve tried to replace the files from the RedHat access source, but to no avail.
But, this helped me in the same situation:

dnf remove leapp-data-rockylinux
rm /etc/leapp/files/*.json
dnf install leapp-data-rockylinux

May help you too.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.