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

Sync with upstream version 0.21.0-4 #131

Merged

Commits on Nov 22, 2024

  1. Configuration menu
    Copy the full SHA
    6a729ed View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2024

  1. rhui(alibaba): add ARM RHEL8 and RHEL9 setup entries (oamg#1277)

    Since leapp's RHUI mechanism filters setups based on the architecture of the source system,
    it was not possible to upgrade of ARM-based RHEL systems on Alibaba cloud as there
    were no ARM entries in RHUI_SETUPS. This patch adds these entries, making it possible
    for EL 8 -> 9 upgrades of ARM systems on Alibaba cloud.
    
    (cherry picked from commit fbc38d4)
    jinkkkang authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    9dd634a View commit details
    Browse the repository at this point in the history
  2. don't require all versions to be defined for obsoleted keys

    in releases where we do not have any obsoleted keys, we still had to
    define an entry (with an empty list), as otherwise the code would fail
    
    instead, we can catch the KeyError and carry on as nothing happened
    
    (cherry picked from commit 7e0fb44)
    evgeni authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    9973aab View commit details
    Browse the repository at this point in the history
  3. Add RHEL 10.0 prod-certs

    Previously we temporarily used the RHEL 9 x86_64 prod cert for others
    archs it was missing completely.
    
    Jira: OAMG-11138
    (cherry picked from commit 9f2f172)
    matejmatuska authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    3ffc1f9 View commit details
    Browse the repository at this point in the history
  4. properly scope try/except when loading obsoleted keys

    We want to load all possible keys, even *after* a KeyError happenend
    
    Fixes: 7e0fb44
    (cherry picked from commit bf302fc)
    evgeni authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    0ae8203 View commit details
    Browse the repository at this point in the history
  5. Update references from master branch to main

    Focus was on making the CI and GitHub actions work after the default
    branch was switched from master to main.
    
    See: OAMG-4907
    (cherry picked from commit 9d49f46)
    vojtechsokol authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    64d53c5 View commit details
    Browse the repository at this point in the history
  6. pylint: exclude rule: too-many-positional-arguments (code: R0917)

    New version of Pylint have the rule for checking of positional
    arguments - complaining when more than 4 positional arguments exists.
    We do not want to refactor the code to make it happy and the default
    value cannot be set right now - that's planned for future Pylint
    versions at this moment. So excluding this rule.
    
    For more info:
      * https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/too-many-positional-arguments.html
    
    (cherry picked from commit 88e13fb)
    pirat89 authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    1079e78 View commit details
    Browse the repository at this point in the history
  7. pam_userdb: migrate backend database

    pam_userdb module changed its backend database technology from lidb to
    gdbm for RHEL10. This requires a set of leapp actors to perform the
    database migration automatically when upgrading to RHEL10:
    
    * ScanPamUserDB takes care of scanning the PAM service folder to detect
      whether pam_userdb is used and the location of the database in use.
      This information is stored in a model.
    
    * CheckPamUserDB checks the databases reported by ScanPamUserDB and
      prints a report about them.
    
    * ConvertPamUserDB checks the databases reported by ScanPamUserDB and
      converts them to GDBM format.
    
    * RemoveOldPamUserDB checks the databases reported by ScanPamUserDB and
      removes them.
    
    All these actors include unit-tests.
    
    Finally, there's also a spec file change to add `libdb-utils` dependency
    as it is required to convert pam_userdb databases from BerkeleyDB to
    GDBM.
    
    Signed-off-by: Iker Pedrosa <[email protected]>
    (cherry picked from commit 658700d)
    ikerexxe authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    e93eb3e View commit details
    Browse the repository at this point in the history
  8. Replace mirror.centos.org with vault.centos.org Centos 7 Containerfile

    As mirror.centos.org is dead, replace mirrorlist with baseurl pointing
    to vault.centos.org in utils/container-builds/Containerfile.centos7.
    
    (cherry picked from commit d6e57ee)
    matejmatuska authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    3b2fcb1 View commit details
    Browse the repository at this point in the history
  9. kernelcmdlineconfig: Add Report to produces tuple

    The missing `leapp.reporting.Report` class is added to
    kernelcmdlineconfig actor `produces` tuple.
    
    (cherry picked from commit b997e4e)
    matejmatuska authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    d7f5f74 View commit details
    Browse the repository at this point in the history
  10. kernelcmdlineconfig: Use args from first entry when multiple entries …

    …are listed
    
    Instead of erroring out when grubby lists multiple entries for the
    default kernel, always use the `args=` and `root=` from the first one and create
    a post-upgrade report. The report instruct user to ensure those are the
    correct ones or to correct them.
    
    This can happen, for example, if MAKEDEBUG=yes is set in
    /etc/sysconfing/kernel.
    
    Jira: RHEL-46911
    (cherry picked from commit c2c96af)
    matejmatuska authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    7d6266e View commit details
    Browse the repository at this point in the history
  11. check_microarch: refactor to handle possible future reqs

    (cherry picked from commit 053137c)
    mhecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    9b8e768 View commit details
    Browse the repository at this point in the history
  12. check_microarch: add rhel10 requirements

    (cherry picked from commit d3ebc99)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    070aa2f View commit details
    Browse the repository at this point in the history
  13. Skip checking files under .../directory-hash/ dir

    * The main reason for this change is to improve performance and
    reduce flood of logs for the content that does not seem to be important
    to check for the upgrade process.
    
    The directory has been relatively recently added to ca-certificates
    rpm on EL 9+ systems mostly to improve performance of OpenSSL and
    the content does not seem to be important for the IPU process.
    The high number of files takes too much time to evaluate and causes
    flood of logs that are not important.
    
    This is updated solution that we drop originally: 60f500e
    
    (cherry picked from commit a147938)
    pirat89 authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    33832ae View commit details
    Browse the repository at this point in the history
  14. lib(overlay): cap the max size of disk images

    On systems with large disks (e.g. 16TB) with lots of free space, leapp
    might attemt to create files larger than the max file size of the
    underlying FS. Attempting to create such large files causes leapp
    to crash. This patch caps the max image size to 1TB, based on empirical
    evidence that more free space is not needed for the upgrade RPM
    transaction.
    
    Jira-ref: RHEL-57064
    (cherry picked from commit cef2825)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    944d8ae View commit details
    Browse the repository at this point in the history
  15. Raise proper error when ModelViolationError occurs

    This error occurs when repo file has invalid definition, specifically
    when the 'name' entry of the config files is invalid. Also add tests.
    
    Jira: RHEL-19249
    (cherry picked from commit ec07824)
    tomasfratrik authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    5d984ab View commit details
    Browse the repository at this point in the history
  16. InhibitWhenLuks: simplify the logic

    (cherry picked from commit f84c6f8)
    danzatt authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    a6523ce View commit details
    Browse the repository at this point in the history
  17. StorageScanner: Add parent device name to lsblk

    Modify the StorageInfo model to include path and name of the parent
    device. Use StorageScanner to collect this information.
    
    Morover fix lsblk test, there should be a full device path in "lsblk
    -pbnr" output (just names were used in the original test).
    
    (cherry picked from commit 03fc674)
    danzatt authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    4e7e4ee View commit details
    Browse the repository at this point in the history
  18. LuksScanner: Add LUKS dump scanner and models

    Add LuksScanner actor that runs 'cryptsetup luksDump' for all 'crypt'
    from lsblk output. The output is then parsed and filled into LuksDump
    and LuksToken models.
    
    The LuksDump model contains information about LUKS version, device UUID,
    corresponding device path, name of the backing device (which contains
    the LUKS header) and a list of LuksToken models.
    
    LuksToken model represents a token associated with the given LUKS
    device. It contains token ID, IDs of associated keyslot and token type.
    If the token type is "clevis", we use "clevis luks list" command to
    determine the clevis-specific subtype and append it to the token name.
    E.g. if there is a "clevis" token and "clevis luks list" returns "tpm2",
    the token type will be "clevis-tpm2".
    
    (cherry picked from commit 266c249)
    danzatt authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    f3a9bc6 View commit details
    Browse the repository at this point in the history
  19. InhibitWhenLuks: allow upgrades for LUKS2 bound to Clevis TPM2 token

    So far, upgrades with encrypted drives were not supported. Encrypted
    drives require interactively typing unlock passphrases, which is not
    suitable for automatic upgrades using Leapp. We add a feature, where
    systems with all drives configured with automatic unlock method can be
    upgraded.
    
    Currently, we only support drives configured with Clevis/TPM2 token,
    because networking is not configured during Leapp upgrade (excluding
    NBDE).
    
    We consume LuksDumps message to decide whether the upgrade process
    should be inhibited. If there is at least one LUKS2 device without
    Clevis TPM2 binding, we inhibit the upgrade because we cannot tell if
    the device is not a part of a more complex storage stack and the failure
    to unlock the device migt cause boot problem.
    
    Co-authored-by: Petr Stodůlka <[email protected]>
    (cherry picked from commit ad241f7)
    danzatt authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    7476554 View commit details
    Browse the repository at this point in the history
  20. Rename inhibitwhenluks actor to checkluks

    The actor nowadays does more then just inhibiting the upgrade when
    LUKS is detected. Let's rename it to respect current behaviour.
    
    (cherry picked from commit 8e5fe75)
    pirat89 authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    0d90875 View commit details
    Browse the repository at this point in the history
  21. Fix IPU being blocked by resource limitations

    First resource limit is maximum number of open file descriptors limit,
    second one being limit for maximum writable file size. Plus add unit
    tests.
    
    Resolves: RHEL-26459 and RHEL-16881
    (cherry picked from commit 5e6d176)
    tomasfratrik authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    bc1367f View commit details
    Browse the repository at this point in the history
  22. feature: add possibility to use net.naming-scheme

    Leapp writes .link files to prevent interfaces being renamed
    after booting to post-upgrade system. This patch adds a less
    error-prone approach that uses net.naming-scheme kernel param.
    The naming-scheme tells udev what hardware properties to use
    when composing a device name. Moreover, possible values of this
    parameter are coarse-grained "profiles", that tell udev to
    behave as if it did on RHEL8.0.
    
    The functionality is enabled by setting LEAPP_USE_NET_NAMING_SCHEME
    environmental variable to 1. If the feature is enabled, the .link
    file generation is disabled. A kernel parameter `net.naming-scheme=`
    is added to the upgrade boot entry and the post-upgrade entry.
    The value of the parameter will be `rhel-<source_major>.0`. Note
    that the minor source version is *not used*. Using also source major
    version instead of 0 causes the device names to change slightly,
    so we use 0. Moreover, an extra RPM named `rhel-net-naming-sysattrs`
    is installed to the target system and target userspace container.
    The RPM provides definitions of the "profiles" for net.naming-scheme.
    
    The feature is available only for 8>9 and higher. Attempting to
    upgrade 7>8 with LEAPP_USE_NET_NAMING_SCHEME=1 will ignore
    the value of LEAPP_USE_NET_NAMING_SCHEME.
    
    Add a possibility to use the net.naming-scheme cmdline argument
    to make immutable network interface names during the upgrade.
    The feature can be used only for 8>9 upgrades and higher.
    To enable the feature, use LEAPP_USE_NET_NAMING_SCHEME=1.
    
    Jira-ref: RHEL-23473
    (cherry picked from commit e1bdf2c)
    mhecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    270a829 View commit details
    Browse the repository at this point in the history
  23. prevent the feature for being used outside 8>9

    (cherry picked from commit b4b5354)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    d2b1595 View commit details
    Browse the repository at this point in the history
  24. fix condition on when net naming is emitted

    (cherry picked from commit e43a892)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    6c7da71 View commit details
    Browse the repository at this point in the history
  25. scangrubdevpartitionlayout: Skip warning msgs

    The fdisk output can contain warning msgs when a partition is not
    aligned on physical sector boundary, like:
        Partition 4 does not start on physical sector boundary.
    We know that in case of MBR the line we expect to parse always
    starts with canonical path. So let's skip all lines which does
    not start with '/'.
    
    jira: https://issues.redhat.com/browse/RHEL-50947
    (cherry picked from commit 0bf07d1)
    pirat89 authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    20cbdc5 View commit details
    Browse the repository at this point in the history
  26. Workaround for ARM Upgrades from RHEL8 to RHEL9.5+

    Address issue with ARM system upgrades from RHEL 8 to RHEL 9.5+ caused
    by GRUB bootloader incompatibility with newer kernels. When attempting
    to load the RHEL 9.5+ kernel using the RHEL 8 bootloader, the upgrade
    process halts due to a boot crash.
    
    JIRA: 41193
    (cherry picked from commit abcf7a5)
    dkubek authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    fdcd4ff View commit details
    Browse the repository at this point in the history
  27. Add el9toel10 actor to handle symlink -> directory with ruby IRB.

    The `/usr/share/ruby/irb` path is a symlink in RHEL 9,
    but a regular directory in RHEL 10.
    This puts us back in line with RHEL 8 and Fedora in terms of the
    path's file type regarding the rubygem-irb package.
    
    Since this was not handled on RPM level, handle it as actor again.
    This was copied and adjusted from same-named el8->el9 actor.
    
    We do not care about the validity or target of the symlink, we just
    remove it to allow DNF create the correct directory on upgrade.
    
    Without this workaround, the upgrade will fail in transaction test with
    reports of file conflicts on the directory path.
    
    Users should not expect to ever retain anything in this directory.
    
    (cherry picked from commit 866a4b9)
    jackorp authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    9232547 View commit details
    Browse the repository at this point in the history
  28. Expand on the actor docstring for the el8->el9 rubygem-irb symlink fix.

    In RHEL 10, the directory is a regular directory again.
    
    The 2 actors are separate over creating a common solution for both.
    Expand in the docstring on the reason for the el8->el9 actor to
    differentiate them apart.
    
    (cherry picked from commit 81a3297)
    jackorp authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    0285e73 View commit details
    Browse the repository at this point in the history
  29. data: update data files

    Update data files to a newer version.
    
    (cherry picked from commit 2dc7efa)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    69f5a50 View commit details
    Browse the repository at this point in the history
  30. Packaging: Require leapp-framework 6.x + update leapp deps

    The leapp actors configuration feature is present since
    leapp-framework 6.0. Update the dependencies to ensure the correct
    version of the framework is installed on the system.
    
    Also, leapp requirements have been updated - requiring python3-PyYAML
    as it requires YAML parser, bumping leapp-framework-dependencies to 6.
    Address the change in leapp-deps metapackage to satisfy leapp
    dependencies during the upgrade process.
    
    (cherry picked from commit 89afbe8)
    pirat89 authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    ded1bd0 View commit details
    Browse the repository at this point in the history
  31. spec: create /etc/leapp/actor_conf.d

    Add additional build steps to the specfile that create the actor
    configuration directory. The directory is owned by the package, so
    it gets removed when the user uninstalls leapp.
    
    Also prepared some comment lines for future when we will want to
    include some configuration files as part of the rpm.
    
    (cherry picked from commit 36b93e4)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    189fd5d View commit details
    Browse the repository at this point in the history
  32. spec: drop .gitkeep files from the RPM

    We have several .gitkeep files in the repo as we want to have some
    directories present in git however these directories are empty
    otherwise. This is common hack to achieve this, but we do not want
    to have these files really in the resulting RPMs. So we just remove
    them.
    
    (cherry picked from commit 87db66c)
    pirat89 authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    b76c62e View commit details
    Browse the repository at this point in the history
  33. cli: load actor configuration

    Load actor configuration when running `leapp upgrade` or `leapp
    preupgrade`. The configuration is loaded, saved to leapp's DB,
    and remains available to all actors via framework's global variable.
    
    (cherry picked from commit 140a0bb)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    727ddbb View commit details
    Browse the repository at this point in the history
  34. configs(common): introduce RHUI configuration

    Introduce a common configuration definition for RHUI related decisions.
    The configuration has an atomic nature - if the user wants to overwrite
    leapp's decisions, he/she must overwrite all of them. Essentially, all
    fields of the RHUI_SETUPS cloud map entry can be configured. Almost no
    non-empty defaults are provided, as no reasonable defaults can be given.
    This is due to all setup parameters are different from provider to
    provider. Therefore, default values are empty values, so that it can
    later be detected by an actor whether all fields of the RHUI config
    has been filled.
    
    Jira ref: RHEL-56251
    
    (cherry picked from commit f3d3832)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    1ad879a View commit details
    Browse the repository at this point in the history
  35. check_rhui: read RHUI configuration

    Extend the check_rhui actor to read user-provided RHUI configuration.
    If the provided configuration values say that the user wants to
    overrwrite leapp's decisions, then the patch checks whether all values
    are provided. If so, corresponding RHUIInfo message is produced. The
    only implemented safe-guards are those that prevent the user from
    accidentaly specifying a non-existing file to be copied into the
    scrach container during us preparing to download target userspace
    content. If the user provides only some of the configuration values
    the upgrade is terminated early with an error, providing quick feedback
    about misconfiguration. The patch has been designed to allow development
    of upgrades on previously unknown clouds (clouds without an entry in
    RHUI_SETUPS).
    
    Jira ref: RHEL-56251
    
    (cherry picked from commit a03e8e5)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    90424dc View commit details
    Browse the repository at this point in the history
  36. testutils: add support for configs

    Extend the CurrentActorMocked class to accept a `config` value,
    allowing developers to mock actors that rely on configuration.
    A library function `_make_default_config` is also introduced,
    allowing to instantiate default configs from config schemas.
    
    (cherry picked from commit a206a7f)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    d7e9488 View commit details
    Browse the repository at this point in the history
  37. userspacegen(rhui): remove repofiles only if now owned by an RPM

    We copy files into the target userspace when setting up target
    repository content. If this file is named equally as some of the
    files installed by the target RHUI client installed during early
    phases of target userspace setup process, we would delete it in
    cleanup. Therefore, if we copy a repofile named /etc/yum.repos.d/X.repo
    and the target client also owns a file /etc/yum.repos.d/X.repo, we
    would remove it, making the container loose access to target content.
    This patch prevents us from blindly deleting files, keeping files that
    are owned by some RPM (usually that would be the target RHUI client).
    
    (cherry picked from commit 0147bc2)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    0e24268 View commit details
    Browse the repository at this point in the history
  38. Enable IPU for EL 9.6 (and drop EL 8.8/9.2)

    * Add product certificates for RHEL 9.6
    * Introduce upgrade path 8.10 -> 9.6
    * Drop IPUs related to EL 8.8 and 9.2
      * This will not be supported in this release.
      * Keeping for now still IPU 8.10 -> 9.5 as it is a fresh release
        so it has a value for us to run tests there. We will drop it
        later during this lifecycle (CTC-2?).
    * Drop EL 8.8 from the list of supported versions
    * Update tests in packit
      * Note that tests for 9.6 could be failing for a while until
        composes are created.
    
    jira: RHEL-67621
    (cherry picked from commit c2f2895)
    pirat89 authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    6cd496c View commit details
    Browse the repository at this point in the history
  39. spec: drop the /etc/leapp/actor_confid.d dir

    The directory should be provided by the framework. leapp-repository
    should provide only a content inside if any present.
    
    (cherry picked from commit f50e347)
    pirat89 authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    59f96d8 View commit details
    Browse the repository at this point in the history
  40. chore(deps): update dependency ubuntu to v24

    (cherry picked from commit 9c07443)
    renovate[bot] authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    bc421b3 View commit details
    Browse the repository at this point in the history
  41. feat(net-naming-scheme): enable by default

    This commit enables the use of net.naming-scheme for 8>9 upgrades by
    default. The previously used environmental variablel
    LEAPP_USE_NET_NAMING_SCHEMES is replaced with
    LEAPP_DISABLE_NET_NAMING_SCHEMES with inverse semantics.
    
    (cherry picked from commit 3c3421a)
    Michal Hecko authored and yuravk committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    93305b6 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    6a16ff3 View commit details
    Browse the repository at this point in the history