-
Notifications
You must be signed in to change notification settings - Fork 144
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
New repomap data format #714
Conversation
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
repos/system_upgrade/common/actors/repositoriesmapping/actor.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos_repomap.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/el7toel8/actors/repositoriesblacklist/libraries/repositoriesblacklist.py
Outdated
Show resolved
Hide resolved
1b08aee
to
3b97aa1
Compare
@MichalHe i've polished commits. so all others should be create ideally as fixups etc. to make autorebase possible :) Fixed some bugs, making linter happier, etc. I've started the manual testing and I need to check the differences between original and current results to discover possible issues and we can continue with tests. |
Some outputs regarding the current implementaion. Summary:
btw, the log output:
|
repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
Outdated
Show resolved
Hide resolved
a0dae6f
to
20d2a60
Compare
The current implementation of peseventsscanner provides almost same results as before, except the packages from excluded/blacklisted repositories. In the original implementation such a packages have been suggested to be installed even when they should be excluded as the actor could (and many times did) translate a mapped PES ID as a different repoid (because the pesid represents family of repositories and the original solution could not refer to the correct one, so based on an order of items, basically a random repoid from the family has been taken). |
created PR for the update of e2e tests. However for now we will have to deal with broken e2e tests until it gets to the stable branch. |
updated description of the PR. |
After a short disussion I decided for now to drop the old models completely. We will discuss the final decision about the drop/deprecation the next week. |
repos/system_upgrade/common/actors/peseventsscanner/libraries/peseventsscanner.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/actor.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/tests/unit_test_repositoriesmapping.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/el7toel8/actors/repositoriesblacklist/libraries/repositoriesblacklist.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finished reading the code introduced in this PR. The code is readable and reasonable (but that might be me starting to be really familiar with it 😁), but we need to get rid of the FIXME
/TODO
s.
a125fc5
to
32f28c0
Compare
@MichalHe almost complete review. I am in the middle of the repomap library unit tests. |
cabc5be
to
fcf9833
Compare
repos/system_upgrade/common/actors/setuptargetrepos/tests/test_repomapping.py
Show resolved
Hide resolved
@MichalHe just one nitpick, but coverage seems pretty good to me. 💯 let's wait for other reviewers. |
fcf9833
to
6b390e5
Compare
@Rezney @vinzenz some changes applied. pls re-review. Btw, one important note, the current split of commits result in broken state of the repository until the very last one. However, regarding the nature of the change, it could be one collasal commit with veeery long commit msg otherwise, so I wanted to go this way to make the changes more readable understandable. |
repos/system_upgrade/common/actors/peseventsscanner/libraries/peseventsscanner.py
Show resolved
Hide resolved
repos/system_upgrade/common/actors/peseventsscanner/libraries/peseventsscanner_repomap.py
Outdated
Show resolved
Hide resolved
repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to change also this StopActorExecutionError which mentions the old repomap.csv
file:
raise StopActorExecutionError(
message='There are no enabled target repositories for the upgrade process to proceed.',
details={'hint': (
'Ensure your system is correctly registered with the subscription manager and that'
' your current subscription is entitled to install the requested target version {version}.'
' In case the --no-rhsm option (or the LEAPP_NO_RHSM=1 environment variable is set)'
' ensure the custom repository file is provided regarding the documentation with'
' properly defined repositories or in case repositories are already defined'
' in any repofiles under /etc/yum.repos.d/ directory, use the --enablerepo option'
' for leapp. Also make sure "/etc/leapp/files/repomap.csv" file is up-to-date.'
).format(version=api.current_actor().configuration.version.target)
}
)
This is going to be handled as part of #731 PR - good catch |
49c3bce
to
c2b0ce8
Compare
The original input data (the repomap.csv file) limited possibilities of repository mapping between various channels (ga, eus, ...). As we have requirement for future to be able to enable repositories just from specific channels, we had to introduce new repomap data format that will allow us to do a mapping between repository families (repository family is identified by PES id). The current accepted version format of input repomap.json is 1.0.0 and it's now the only format accepted by the actor. TBD: add note about different models, etc... Co-authored-by: MichalHe <mhecko@redhat.com>
With the new repomap data we have have to apply the mapping algoritmus in each actor working with the repomap data that need to know target repositories or pes ids. We do not want to create a shared library to work with the repomap data so we put a private repomap library into each such an actor. We expect to update all such an actors soon (e.g. merge them together) to reduce the complexity of all these actors. - do not lower pes-ids (we lowered them (originally) because of different upper/lower chars used for pesids in pes data and repomap data but now we generate all PES IDs in the repomap based on the real PES ids. Let's use the same so when we debug any problems with data, we do not have to search for "SpecialIDs" when logged some "specialids". Co-authored-by: MichalHe <mhecko@redhat.com>
…ision logic This is analogy to the previous commit. In this case we update the actor responsible for the 'final' mapping to the target repositories. Actor has been refactored completely to make it more readable with several bugfixes (e.g. removal of death code, ..). The original decision logic for repomapping was this: 1. each src repoid map to ekvivalent target repoid + ga repoid (basically to each target repoid mentioned in the repomap data) 2. blacklisted drop blacklisted repositories 3. add all required custom target repositories IOW, it was typical that systems with EUS repositories expected EUS+GA repositories: src repos || dst repos ----------------||--------------------- EUSbase || EUSbaseos, GAbaseos, EUSappstream, GAappstream EUSbase, GAbase || EUSbaseos, GAbaseos, EUSappstream, GAappstream GAbase || GAbase, GAappstream ... The new logic works with families of repositories (based on pesids), so we decide to pick just the best fitting repository from each mapped family. So the table above is going to be changed like this: src repos || dst repos ----------------||--------------------- EUSbase || EUSbaseos, EUSappstream EUSbase, GAbase || EUSbaseos, EUSappstream GAbase || GAbase, GAappstream ... Each target repo family (pesid) has just one best candidate repository (or nothing in case of issues in mapping data). The priority of repositories is beta < ga < all_else where all else is e.g. eus, tus, aus, ... as we do not expect to have multiple premium channels available & enabled on one machine. In case of mapping between repositories have very special channels which does not follow typical channels (e.g. extras is just one, doesn't matter whether you have eus, aus, ga, ...it's same everywhere) or in case the target repo family doesn't contain a special channel (yet?) there is always fallback to default channels. In this case, we consider default channels to be get based on the top prio repository from base / baseos families and always the 'ga'. So e.g. in case an EUS repository is mapped to a family that has just a repo with the 'ga' channel, this one repository is going to be used for the fallback. Co-authored-by: MichalHe <mhecko@redhat.com>
…toriesMap The RepositoriesMap is no longer produced by any actor regarding the new repomap format. Author: MichalHe <mhecko@redhat.com>
The original actor tried to blacklist target repositories based on present Optional repositories (in case no Optional repo has been enabled). The originally consummed msg is not produced anymore and regarding the new concept of the repository mapping, we decided to blacklist all CRB repositories - even those that could be irrelevant for the particular system (e.g. RHUI CRB repoids on non-rhui systems, etc). This simplifies the solution significantly and should not be problematic for people. The most probably the solution will be updated in future to report just relevant CRB repositories. But it's not our current plan. Co-authored-by: MichalHe <mhecko@redhat.com>
c2b0ce8
to
10a6283
Compare
@examon the tests seem to be stuck, could you please take a look? |
There is an ongoing outage which is most probably affecting the rest of the tests. In any way, I performed the e2e test manually and it passed. |
Discussed with @Rezney , merging without latest results to unblock us in other tasks. Anyway, e2e tests passed in the past and we changed just texts recently. |
## Packaging - Add dependency on `dnf-command(config-manager)` (oamg#701) - Added a dependency on leapp as the new rpm provides leapp commands (oamg#701, #) - Bumped leapp-repository-dependencies to 6 (oamg#701) - Provides the leapp-upgrade capability, so users can install all packages just by the `yum install leapp-upgrade` command (oamg#701) - Support building on RHEL 8 systems: leapp-upgrade-el8toel9 (oamg#701) - The leapp-repository rpm has been renamed to leapp-upgrade-el7toel8 for RHEL 7 (oamg#701) ## Upgrade handling ### Fixes - Check all devices (not only PCI devices) for possible removed drivers (oamg#666) - Do not exclude repoids enabled via the --enablerepo option (oamg#623) - Enforce the `en_US.urf-8` locale when running leapp to prevent various issues when a different locale is used on the system (oamg#706) - Enhance the check of required free space on disk for the upgrade (oamg#734) - Fix XFS ftype=0 workaround when "non-XFS" rootfs is present (oamg#674) - Fix detection of XFS partitions without ftype (oamg#678) - Fix handling of /etc/yum.repos.d directory for RHUI (oamg#730) - Fix handling of issues when fetching leapp data files - Fix incorrect mapping of RHEL repositories (oamg#714) - Fix invalid detection of RHEL-ALT on RHEL 8 systems - Fix the detection of NFS partitions in /etc/fstab (oamg#712) - Fix the report message when multiple NICs with ethX names are present (oamg#640) - Introduce the LEAPP_NO_NETWORK_RENAMING environment variable to leave management of NICs names on user when set to '1'; fixes e.g. problems with bonding configuration (oamg#721) - Various Python3 compatibility fixes in regards to prepare for IPU 8 -> 9 (oamg#680, oamg#679, oamg#681, 688) ### Enhancements - Changed supported upgrade path for RHEL with SAP: RHEL with SAP 7.9 -> 8.2 - Add PostgresqlCheck actor for basic reporting about PostgresSQL changes (oamg#136) - Add multiple attempts to fetch data from server and increased the timeout to improve the experience on systems with unstable network connection - Add possibility to influence creation of targetuserspace container, upgrade initramfs, and target initramfs (oamg#517) - Add the scandasd actor to check if DASD is used on s390x arch (oamg#517) - Enable upgrades for SAP on AWS & Azure using RHUI (oamg#736, oamg#739) - Generate /etc/migration-results upon leapp preupgrade / upgrade execution to inform about status of the migration (oamg#719) - Improve the report message when BTRFS is detected (oamg#727) - Inhibit the upgrade if any CIFS entries found in /etc/fstab (oamg#632) - Inhibit the upgrade if any deprecated OpenSSH configuration options / directives are detected (oamg#695) - Inhibit the upgrade when multiple rescue boot entries exist on s390x (oamg#700) - Inhibit the upgrade when x32b and x64b versions of packages are installed (oamg#628) - Introduce hard preservation of leapp packages during the IPU (oamg#701) - Introduce new system of automatic mapping of RHEL repositories for the in-place upgrade based on the repomap.json file (oamg#714) - Introduce the --channel CLI option to specify the channel (e.g. eus) supposed to be used for the upgrade (oamg#728) - Report the problems with target repositories using inhibitors instead of error messages (oamg#731) - Restore the leapp environment variables on --resume execution after the reboot of the system (oamg#724) - Set `releasever` to the target version when specified in the /etc/{yum,dnf}/var/releasever file (e.g. on RHUI) (oamg#720) ## Additional changes interesting for devels - CLI: leapp CLI commands are now part of leapp-repository in the `commands` directory (oamg#662) - Drop of RepositoriesMap and RepositoryMap models as these have been replaced by new 'private' models and it was no possible to keep the original functionality connected to connected to these old models (oamg#714) - Dropped possibility to upgrade from/to HTB systems (HTB doesn't exist anymore) - Introduced many changes as preparation for the IPU 8 -> 9 - Introduced the upgrade/common leapp repository: contains fundamental parts generic for all IPUs - Introduced the upgrade/el8toel9 leapp repository: contains stuff related just for IPU 8 -> 9; depends on the upgrades/common repository - The upgrade/el7toel8 leapp repository contains only stuff related to IPU 7 -> 8 - Makefile: introduce the `fast_lint` target to run linters just on files different from master (oamg#722) - The InstalledRPM model is extended by module:stream data (oamg#667) - config library: introduce `get_target_major_version` and `get_source_major_version` functions - fetch library: the `fetch_or_read` function allows to specify the file encoding (oamg#717) - mounting library: add the remove_tree isolated action (oamg#517) - testutils library: CurrentActorMocked: implemented the get_actor_file_path method (oamg#517)
## Packaging - Add dependency on `dnf-command(config-manager)` (oamg#701) - Added a dependency on leapp as the new rpm provides leapp commands (oamg#701, #) - Bumped leapp-repository-dependencies to 6 (oamg#701) - Provides the leapp-upgrade capability, so users can install all packages just by the `yum install leapp-upgrade` command (oamg#701) - Support building on RHEL 8 systems: leapp-upgrade-el8toel9 (oamg#701) - The leapp-repository rpm has been renamed to leapp-upgrade-el7toel8 for RHEL 7 (oamg#701) ## Upgrade handling ### Fixes - Check all devices (not only PCI devices) for possible removed drivers (oamg#666) - Do not exclude repoids enabled via the --enablerepo option (oamg#623) - Enforce the `en_US.urf-8` locale when running leapp to prevent various issues when a different locale is used on the system (oamg#706) - Enhance the check of required free space on disk for the upgrade (oamg#734) - Fix XFS ftype=0 workaround when "non-XFS" rootfs is present (oamg#674) - Fix detection of XFS partitions without ftype (oamg#678) - Fix handling of /etc/yum.repos.d directory for RHUI (oamg#730) - Fix handling of issues when fetching leapp data files - Fix incorrect mapping of RHEL repositories (oamg#714) - Fix invalid detection of RHEL-ALT on RHEL 8 systems - Fix the detection of NFS partitions in /etc/fstab (oamg#712) - Fix the report message when multiple NICs with ethX names are present (oamg#640) - Introduce the LEAPP_NO_NETWORK_RENAMING environment variable to leave management of NICs names on user when set to '1'; fixes e.g. problems with bonding configuration (oamg#721) - Various Python3 compatibility fixes in regards to prepare for IPU 8 -> 9 (oamg#680, oamg#679, oamg#681, oamg#688) ### Enhancements - Changed supported upgrade path for RHEL with SAP: RHEL with SAP 7.9 -> 8.2 - Add PostgresqlCheck actor for basic reporting about PostgresSQL changes (oamg#136) - Add multiple attempts to fetch data from server and increased the timeout to improve the experience on systems with unstable network connection - Add possibility to influence creation of targetuserspace container, upgrade initramfs, and target initramfs (oamg#517) - Add the scandasd actor to check if DASD is used on s390x arch (oamg#517) - Enable upgrades for SAP on AWS & Azure using RHUI (oamg#736, oamg#739) - Generate /etc/migration-results upon leapp preupgrade / upgrade execution to inform about status of the migration (oamg#719) - Improve the report message when BTRFS is detected (oamg#727) - Inhibit the upgrade if any CIFS entries found in /etc/fstab (oamg#632) - Inhibit the upgrade if any deprecated OpenSSH configuration options / directives are detected (oamg#695) - Inhibit the upgrade when multiple rescue boot entries exist on s390x (oamg#700) - Inhibit the upgrade when x32b and x64b versions of packages are installed (oamg#628) - Introduce hard preservation of leapp packages during the IPU (oamg#701) - Introduce new system of automatic mapping of RHEL repositories for the in-place upgrade based on the repomap.json file (oamg#714) - Introduce the --channel CLI option to specify the channel (e.g. eus) supposed to be used for the upgrade (oamg#728) - Report the problems with target repositories using inhibitors instead of error messages (oamg#731) - Restore the leapp environment variables on --resume execution after the reboot of the system (oamg#724) - Set `releasever` to the target version when specified in the /etc/{yum,dnf}/var/releasever file (e.g. on RHUI) (oamg#720) ## Additional changes interesting for devels - CLI: leapp CLI commands are now part of leapp-repository in the `commands` directory (oamg#662) - Drop of RepositoriesMap and RepositoryMap models as these have been replaced by new 'private' models and it was no possible to keep the original functionality connected to connected to these old models (oamg#714) - Dropped possibility to upgrade from/to HTB systems (HTB doesn't exist anymore) - Introduced many changes as preparation for the IPU 8 -> 9 - Introduced the upgrade/common leapp repository: contains fundamental parts generic for all IPUs - Introduced the upgrade/el8toel9 leapp repository: contains stuff related just for IPU 8 -> 9; depends on the upgrades/common repository - The upgrade/el7toel8 leapp repository contains only stuff related to IPU 7 -> 8 - Makefile: introduce the `fast_lint` target to run linters just on files different from master (oamg#722) - The InstalledRPM model is extended by module:stream data (oamg#667) - config library: introduce `get_target_major_version` and `get_source_major_version` functions - fetch library: the `fetch_or_read` function allows to specify the file encoding (oamg#717) - mounting library: add the remove_tree isolated action (oamg#517) - testutils library: CurrentActorMocked: implemented the get_actor_file_path method (oamg#517)
## Packaging - Add dependency on `dnf-command(config-manager)` (oamg#701) - Added a dependency on leapp as the new rpm provides leapp commands (oamg#701, #) - Bumped leapp-repository-dependencies to 6 (oamg#701) - Provides the leapp-upgrade capability, so users can install all packages just by the `yum install leapp-upgrade` command (oamg#701) - Support building on RHEL 8 systems: leapp-upgrade-el8toel9 (oamg#701) - The leapp-repository rpm has been renamed to leapp-upgrade-el7toel8 for RHEL 7 (oamg#701) ## Upgrade handling ### Fixes - Check all devices (not only PCI devices) for possible removed drivers (oamg#666) - Do not exclude repoids enabled via the --enablerepo option (oamg#623) - Enforce the `en_US.urf-8` locale when running leapp to prevent various issues when a different locale is used on the system (oamg#706) - Enhance the check of required free space on disk for the upgrade (oamg#734) - Fix XFS ftype=0 workaround when "non-XFS" rootfs is present (oamg#674) - Fix detection of XFS partitions without ftype (oamg#678) - Fix handling of /etc/yum.repos.d directory for RHUI (oamg#730) - Fix handling of issues when fetching leapp data files - Fix incorrect mapping of RHEL repositories (oamg#714) - Fix invalid detection of RHEL-ALT on RHEL 8 systems - Fix the detection of NFS partitions in /etc/fstab (oamg#712) - Fix the report message when multiple NICs with ethX names are present (oamg#640) - Introduce the LEAPP_NO_NETWORK_RENAMING environment variable to leave management of NICs names on user when set to '1'; fixes e.g. problems with bonding configuration (oamg#721) - Various Python3 compatibility fixes in regards to prepare for IPU 8 -> 9 (oamg#680, oamg#679, oamg#681, oamg#688) ### Enhancements - Changed supported upgrade path for RHEL with SAP: RHEL with SAP 7.9 -> 8.2 - Add PostgresqlCheck actor for basic reporting about PostgresSQL changes (oamg#136) - Add multiple attempts to fetch data from server and increased the timeout to improve the experience on systems with unstable network connection - Add possibility to influence creation of targetuserspace container, upgrade initramfs, and target initramfs (oamg#517) - Add the scandasd actor to check if DASD is used on s390x arch (oamg#517) - Enable upgrades for SAP on AWS & Azure using RHUI (oamg#736, oamg#739) - Generate /etc/migration-results upon leapp preupgrade / upgrade execution to inform about status of the migration (oamg#719) - Improve the report message when BTRFS is detected (oamg#727) - Inhibit the upgrade if any CIFS entries found in /etc/fstab (oamg#632) - Inhibit the upgrade if any deprecated OpenSSH configuration options / directives are detected (oamg#695) - Inhibit the upgrade when multiple rescue boot entries exist on s390x (oamg#700) - Inhibit the upgrade when x32b and x64b versions of packages are installed (oamg#628) - Introduce hard preservation of leapp packages during the IPU (oamg#701) - Introduce new system of automatic mapping of RHEL repositories for the in-place upgrade based on the repomap.json file (oamg#714) - Introduce the --channel CLI option to specify the channel (e.g. eus) supposed to be used for the upgrade (oamg#728) - Report the problems with target repositories using inhibitors instead of error messages (oamg#731) - Restore the leapp environment variables on --resume execution after the reboot of the system (oamg#724) - Set `releasever` to the target version when specified in the /etc/{yum,dnf}/var/releasever file (e.g. on RHUI) (oamg#720) ## Additional changes interesting for devels - CLI: leapp CLI commands are now part of leapp-repository in the `commands` directory (oamg#662) - Drop of RepositoriesMap and RepositoryMap models as these have been replaced by new 'private' models and it was no possible to keep the original functionality connected to connected to these old models (oamg#714) - Dropped possibility to upgrade from/to HTB systems (HTB doesn't exist anymore) - Introduced the LEAPP_DEVEL_USE_PERSISTENT_PACKAGE_CACHE envar for development and testing purposes to speed up the process, but use of the envar could end with some issues when the cached data is not fresh (oamg#725) - Introduced many changes as preparation for the IPU 8 -> 9 - Introduced the upgrade/common leapp repository: contains fundamental parts generic for all IPUs - Introduced the upgrade/el8toel9 leapp repository: contains stuff related just for IPU 8 -> 9; depends on the upgrades/common repository - The upgrade/el7toel8 leapp repository contains only stuff related to IPU 7 -> 8 - Makefile: introduce the `fast_lint` target to run linters just on files different from master (oamg#722) - The InstalledRPM model is extended by module:stream data (oamg#667) - config library: introduce `get_target_major_version` and `get_source_major_version` functions - fetch library: the `fetch_or_read` function allows to specify the file encoding (oamg#717) - mounting library: add the remove_tree isolated action (oamg#517) - testutils library: CurrentActorMocked: implemented the get_actor_file_path method (oamg#517)
## Packaging - Add dependency on `dnf-command(config-manager)` (oamg#701) - Added a dependency on leapp as the new rpm provides leapp commands (oamg#701, #) - Bumped leapp-repository-dependencies to 6 (oamg#701) - Provides the leapp-upgrade capability, so users can install all packages just by the `yum install leapp-upgrade` command (oamg#701) - Support building on RHEL 8 systems: leapp-upgrade-el8toel9 (oamg#701) - The leapp-repository rpm has been renamed to leapp-upgrade-el7toel8 for RHEL 7 (oamg#701) ## Upgrade handling ### Fixes - Check all devices (not only PCI devices) for possible removed drivers (oamg#666) - Do not exclude repoids enabled via the --enablerepo option (oamg#623) - Enforce the `en_US.utf-8` locale when running leapp to prevent various issues when a different locale is used on the system (oamg#706) - Enhance the check of required free space on disk for the upgrade (oamg#734) - Fix XFS ftype=0 workaround when "non-XFS" rootfs is present (oamg#674) - Fix detection of XFS partitions without ftype (oamg#678) - Fix handling of /etc/yum.repos.d directory for RHUI (oamg#730) - Fix handling of issues when fetching leapp data files - Fix incorrect mapping of RHEL repositories (oamg#714) - Fix invalid detection of RHEL-ALT on RHEL 8 systems - Fix the detection of NFS partitions in /etc/fstab (oamg#712) - Fix the report message when multiple NICs with ethX names are present (oamg#640) - Introduce the LEAPP_NO_NETWORK_RENAMING environment variable to leave management of NICs names on user when set to '1'; fixes e.g. problems with bonding configuration (oamg#721) - Various Python3 compatibility fixes in regards to prepare for IPU 8 -> 9 (oamg#680, oamg#679, oamg#681, oamg#688) ### Enhancements - Changed supported upgrade path for RHEL with SAP: RHEL with SAP 7.9 -> 8.2 - Add PostgresqlCheck actor for basic reporting about PostgresSQL changes (oamg#136) - Add multiple attempts to fetch data from server and increased the timeout to improve the experience on systems with unstable network connection - Add possibility to influence creation of targetuserspace container, upgrade initramfs, and target initramfs (oamg#517) - Add the scandasd actor to check if DASD is used on s390x arch (oamg#517) - Enable upgrades for SAP on AWS & Azure using RHUI (oamg#736, oamg#739) - Generate /etc/migration-results upon leapp preupgrade / upgrade execution to inform about status of the migration (oamg#719) - Improve the report message when BTRFS is detected (oamg#727) - Inhibit the upgrade if any CIFS entries found in /etc/fstab (oamg#632) - Inhibit the upgrade if any deprecated OpenSSH configuration options / directives are detected (oamg#695) - Inhibit the upgrade when multiple rescue boot entries exist on s390x (oamg#700) - Inhibit the upgrade when x32b and x64b versions of packages are installed (oamg#628) - Introduce hard preservation of leapp packages during the IPU (oamg#701) - Introduce new system of automatic mapping of RHEL repositories for the in-place upgrade based on the repomap.json file (oamg#714) - Introduce the --channel CLI option to specify the channel (e.g. eus) supposed to be used for the upgrade (oamg#728) - Report the problems with target repositories using inhibitors instead of error messages (oamg#731) - Restore the leapp environment variables on --resume execution after the reboot of the system (oamg#724) - Update (or create) the /etc/{yum,dnf}/var/releasever file if exists or RHUI is detected (oamg#720) ## Additional changes interesting for devels - CLI: leapp CLI commands are now part of leapp-repository in the `commands` directory (oamg#662) - Drop of RepositoriesMap and RepositoryMap models as these have been replaced by new 'private' models and it was no possible to keep the original functionality connected to connected to these old models (oamg#714) - Dropped possibility to upgrade from/to HTB systems (HTB doesn't exist anymore) - Introduced the LEAPP_DEVEL_USE_PERSISTENT_PACKAGE_CACHE envar for development and testing purposes to speed up the process, but use of the envar could end with some issues when the cached data is not fresh (oamg#725) - Introduced many changes as preparation for the IPU 8 -> 9 - Introduced the upgrade/common leapp repository: contains fundamental parts generic for all IPUs - Introduced the upgrade/el8toel9 leapp repository: contains stuff related just for IPU 8 -> 9; depends on the upgrades/common repository - The upgrade/el7toel8 leapp repository contains only stuff related to IPU 7 -> 8 - Makefile: introduce the `fast_lint` target to run linters just on files different from master (oamg#722) - The InstalledRPM model is extended by module:stream data (oamg#667) - config library: introduce `get_target_major_version` and `get_source_major_version` functions - fetch library: the `fetch_or_read` function allows to specify the file encoding (oamg#717) - mounting library: add the remove_tree isolated action (oamg#517) - testutils library: CurrentActorMocked: implemented the get_actor_file_path method (oamg#517)
## Packaging - Add dependency on `dnf-command(config-manager)` (#701) - Added a dependency on leapp as the new rpm provides leapp commands (#701, #) - Bumped leapp-repository-dependencies to 6 (#701) - Provides the leapp-upgrade capability, so users can install all packages just by the `yum install leapp-upgrade` command (#701) - Support building on RHEL 8 systems: leapp-upgrade-el8toel9 (#701) - The leapp-repository rpm has been renamed to leapp-upgrade-el7toel8 for RHEL 7 (#701) ## Upgrade handling ### Fixes - Check all devices (not only PCI devices) for possible removed drivers (#666) - Do not exclude repoids enabled via the --enablerepo option (#623) - Enforce the `en_US.utf-8` locale when running leapp to prevent various issues when a different locale is used on the system (#706) - Enhance the check of required free space on disk for the upgrade (#734) - Fix XFS ftype=0 workaround when "non-XFS" rootfs is present (#674) - Fix detection of XFS partitions without ftype (#678) - Fix handling of /etc/yum.repos.d directory for RHUI (#730) - Fix handling of issues when fetching leapp data files - Fix incorrect mapping of RHEL repositories (#714) - Fix invalid detection of RHEL-ALT on RHEL 8 systems - Fix the detection of NFS partitions in /etc/fstab (#712) - Fix the report message when multiple NICs with ethX names are present (#640) - Introduce the LEAPP_NO_NETWORK_RENAMING environment variable to leave management of NICs names on user when set to '1'; fixes e.g. problems with bonding configuration (#721) - Various Python3 compatibility fixes in regards to prepare for IPU 8 -> 9 (#680, #679, #681, #688) ### Enhancements - Changed supported upgrade path for RHEL with SAP: RHEL with SAP 7.9 -> 8.2 - Add PostgresqlCheck actor for basic reporting about PostgresSQL changes (#136) - Add multiple attempts to fetch data from server and increased the timeout to improve the experience on systems with unstable network connection - Add possibility to influence creation of targetuserspace container, upgrade initramfs, and target initramfs (#517) - Add the scandasd actor to check if DASD is used on s390x arch (#517) - Enable upgrades for SAP on AWS & Azure using RHUI (#736, #739) - Generate /etc/migration-results upon leapp preupgrade / upgrade execution to inform about status of the migration (#719) - Improve the report message when BTRFS is detected (#727) - Inhibit the upgrade if any CIFS entries found in /etc/fstab (#632) - Inhibit the upgrade if any deprecated OpenSSH configuration options / directives are detected (#695) - Inhibit the upgrade when multiple rescue boot entries exist on s390x (#700) - Inhibit the upgrade when x32b and x64b versions of packages are installed (#628) - Introduce hard preservation of leapp packages during the IPU (#701) - Introduce new system of automatic mapping of RHEL repositories for the in-place upgrade based on the repomap.json file (#714) - Introduce the --channel CLI option to specify the channel (e.g. eus) supposed to be used for the upgrade (#728) - Report the problems with target repositories using inhibitors instead of error messages (#731) - Restore the leapp environment variables on --resume execution after the reboot of the system (#724) - Update (or create) the /etc/{yum,dnf}/var/releasever file if exists or RHUI is detected (#720) ## Additional changes interesting for devels - CLI: leapp CLI commands are now part of leapp-repository in the `commands` directory (#662) - Drop of RepositoriesMap and RepositoryMap models as these have been replaced by new 'private' models and it was no possible to keep the original functionality connected to connected to these old models (#714) - Dropped possibility to upgrade from/to HTB systems (HTB doesn't exist anymore) - Introduced the LEAPP_DEVEL_USE_PERSISTENT_PACKAGE_CACHE envar for development and testing purposes to speed up the process, but use of the envar could end with some issues when the cached data is not fresh (#725) - Introduced many changes as preparation for the IPU 8 -> 9 - Introduced the upgrade/common leapp repository: contains fundamental parts generic for all IPUs - Introduced the upgrade/el8toel9 leapp repository: contains stuff related just for IPU 8 -> 9; depends on the upgrades/common repository - The upgrade/el7toel8 leapp repository contains only stuff related to IPU 7 -> 8 - Makefile: introduce the `fast_lint` target to run linters just on files different from master (#722) - The InstalledRPM model is extended by module:stream data (#667) - config library: introduce `get_target_major_version` and `get_source_major_version` functions - fetch library: the `fetch_or_read` function allows to specify the file encoding (#717) - mounting library: add the remove_tree isolated action (#517) - testutils library: CurrentActorMocked: implemented the get_actor_file_path method (#517)
short
RepositoriesMap
format and introduce the newRepositoriesMapping
model1.0.0
) is processed . In case a repomap data with a different version format is loaded, ends with error.Names of methods/models/functions/.. could be bad. Any suggestions are welcomed
Why we want this
The previous repomap data in the CSV format limited us significantly to implement any better logic around the repositories mapping. We would like to provide a possibilty to:
Incompatible changes
RepositoriesMap
model is going to be dropped or deprecated (@oamg/developers point of discussion)Why the new introduced model instead of update of the original one?
We want to make people immediately aware they are expecting a message which is different and their code is broken. With the same model name they would realize that problem just after they execute their code (means e.g. in the middle of upgrade). With the new model name, leapp reports the problem immediately when loading leapp repositories.
The new mapping logic
The original solution mapped 1 repoid to X target repoids. In case of non-ga channels, we maped to premium channel + ga channel always. This resulted in real life mapping like:
The new logic provides mapping from one repository family (== repositories with the same PES ID) to target repository families, where each such a family ends with right one repoid in the end (remember mapping rhel 7 base to rhel 8 basos + appstream).
Using the previous table, the new result looks like this:
In this case the priority of various channels is this: beta < ga < all alse (where all else includes EUS, E4S, .... premium channels). It's not expected to have avilable several premium channels on one system right now and we do not know any expectations about possible different priorities in this case. In case the mapping for particular source repoid and channel doesn't exist, use as fallback a default channel(s). Such a fallback always includes the 'ga' channel right now. Such a case points to two possible root causes:
Tasks:
- sync with @vinzenz because of conflicting changes regarding the modularity PR The Modularity integration #672
- simplify the actor -> do not map pesid to repoid inside the actor, work just with pesids
channels