redhat-cop / infra.leapp

Collection of Ansible roles for automating RHEL in-place upgrades using Leapp.
MIT License
44 stars 34 forks source link

Leapp preupgrade report failed #142

Closed adpavlov closed 8 months ago

adpavlov commented 8 months ago

Playbook:

- name: Analysis
  hosts: '*10.61.17.53'
  strategy: free
  gather_facts: true
  become: true
  force_handlers: true
  vars:
    leapp_preupg_opts: '--target 8.8'
    leapp_answerfile: |
      [remove_pam_pkcs11_module_check]
      confirm = True
  tasks:
    - name: Generate preupgrade analysis report
      ansible.builtin.import_role:
        name: infra.leapp.analysis

OS release

cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.7 (Ootpa)

Role is failing on Leapp usage syntax:

invalid choice: '8.8' (choose from '9.3')

cat /var/log/ripu/ripu.log
RIPU preupgrade analysis
Job started at 2023-12-07T15:11:29Z
usage: leapp preupgrade [-h] [--nogpgcheck]
                        [--report-schema {1.0.0,1.1.0,1.2.0}] [--target {9.3}]
                        [--iso ISO] [--channel {ga,tuv,e4s,eus,aus}]
                        [--enablerepo <repoid>] [--no-rhsm-facts]
                        [--no-insights-register] [--no-rhsm] [--verbose]
                        [--debug] [--whitelist-experimental ActorName]

Description:

Generate preupgrade report

Optional arguments:
  -h, --help            show this help message and exit
  --nogpgcheck          Disable RPM GPG checks. Same as yum/dnf --nogpgcheck
                        option.
  --report-schema {1.0.0,1.1.0,1.2.0}
                        Specify report schema version for leapp-report.json
  --target {9.3}        Specify RHEL version to upgrade to for default
                        detected upgrade flavour
  --iso ISO             Use provided target RHEL installation image to perform
                        the in-place upgrade.
  --channel {ga,tuv,e4s,eus,aus}
                        Set preferred channel for the IPU target.
  --enablerepo <repoid>
                        Enable specified repository. Can be used multiple
                        times.
  --no-rhsm-facts       Do not store migration information using Red Hat
                        Subscription Manager. Automatically implied by --no-
                        rhsm.
  --no-insights-register
                        Do not register into Red Hat Insights
  --no-rhsm             Use only custom repositories and skip actions with Red
                        Hat Subscription Manager
  --verbose             Enable verbose logging
  --debug               Enable debug mode
  --whitelist-experimental ActorName
                        Enables experimental actors
error: argument --target: invalid choice: '8.8' (choose from '9.3')
Job ended at 2023-12-07T15:12:46Z
swapdisk commented 8 months ago

The infra.leapp collection is for doing upgrades of the RHEL major version, for example, from 8.x to 9.x. It looks like you are trying to go from 8.7 to 8.8?

adpavlov commented 8 months ago

Yes, 8.7 to 8.8. Didn’t know about this limitation. I think it’s worth to make a debug statement before trying leapp that upgrade is not possible between minor versions and end play.

swapdisk commented 8 months ago

Didn’t know about this limitation.

Not a limitation as much as just not in the scope of what Leapp and this role do.

I think it’s worth to make a debug statement before trying leapp that upgrade is not possible between minor versions and end play.

I respectfully disagree. We depend on the Leapp framework to determine what upgrade paths are possible and adding logic to the role to do the same would be redundant. It would also be problematic because the supported upgrade paths change over time as Red Hat releases new minor versions.

djdanielsson commented 8 months ago

8.7 to 8.8 is a minor release you can just dnf update.....

adpavlov commented 8 months ago

I agree, just pre check would be nice that input parameters are not good and upgrade is not supported between minor versions. But it’s up to you.