Bug 1900667

Summary: Leapp fails with -> leapp.workflow: Workflow interrupted due to the FailPhase error policy
Product: Red Hat Enterprise Linux 7 Reporter: Tzach Shefi <tshefi>
Component: leappAssignee: Leapp team <leapp-notifications>
Status: CLOSED WORKSFORME QA Contact: Alois Mahdal <amahdal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.9CC: itbrown, lbezdick
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-24 14:45:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Leapp logs none

Description Tzach Shefi 2020-11-23 13:56:12 UTC
Created attachment 1732552 [details]
Leapp logs

Description of problem: While testing OPS fast forward upgrade from OSP13 rhel 7.9, to OSP16.1 running on rhel8.2, I keep hitting this leapp issue:



Version-Release number of selected component (if applicable):
(undercloud) [stack@undercloud-0 ~]$ rpm -qa | grep leapp
leapp-0.11.1-1.el7_9.noarch
python2-leapp-0.11.1-1.el7_9.noarch
leapp-repository-deps-0.12.0-2.el7_9.noarch
leapp-deps-0.11.1-1.el7_9.noarch
leapp-repository-0.12.0-2.el7_9.noarch

How reproducible:
3 times, I even tried other RHEL8. 

Steps to Reproduce:
1. Deploy OSP13 latest, install on rhel7.9
2. Follow the upgrade here:
https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html/framework_for_upgrades_13_to_16.1/upgrading-the-undercloud-operating-system 
3. When I get step 5.2, substep 7:

sudo -E leapp upgrade --no-rhsm --debug --enablerepo rhosp-rhel-8.2-appstream --enablerepo rhosp-rhel-8.2-av --enablerepo rhosp-rhel-8.2-baseos --enablerepo rhosp-rhel-8.2-fdp --enablerepo rhelosp-ceph-3-tools --enablerepo rhosp-ansible-2.9

Actual results:

It fails with below, I'll attach all the logs

2020-11-23 04:26:41.625 DEBUG    PID: 32212 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Recursively removing scratch directory /var/lib/leapp/scratch.
2020-11-23 04:26:41.630 DEBUG    PID: 32212 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Recursively removed scratch directory /var/lib/leapp/scratch.
/etc/yum.repos.d/rhos-release.repo
/etc/yum.repos.d/rhos-release-16.1.repo
/etc/yum.repos.d/rhos-release-rhel-8.2.repo
/etc/yum.repos.d/redhat.repo
2020-11-23 04:26:41.676 INFO     PID: 26837 leapp.workflow.TargetTransactionFactsCollection: Starting stage After of phase TargetTransactionFactsCollection
2020-11-23 04:26:41.691 INFO     PID: 26837 leapp.workflow: Workflow interrupted due to the FailPhase error policy
2020-11-23 04:26:41.717 INFO     PID: 26837 leapp: Answerfile will be created at /var/log/leapp/answerfile

============================================================
                           ERRORS                           
============================================================

2020-11-23 04:26:41.633204 [ERROR] Actor: target_userspace_creator
Message: Some required custom target repositories are not available.
Summary:
    Hint:  The most probably you are using custom or third party actor that produces CustomTargetRepository message or you did a typo in one of repoids specified on command line for the leapp --enablerepo option. Inside the upgrade container, we are not able to find such repository inside any repository file. Consider use of the custom repository file regarding the official upgrade documentation or check whether you did not do a typo in any repoids you specified for the --enablerepo option of leapp.

============================================================
                       END OF ERRORS                        
============================================================


Debug output written to /var/log/leapp/leapp-upgrade.log

============================================================
                           REPORT                           
============================================================

A report has been generated at /var/log/leapp/leapp-report.json
A report has been generated at /var/log/leapp/leapp-report.txt

============================================================
                       END OF REPORT                        
============================================================

Answerfile has been generated at /var/log/leapp/answerfile



Expected results:
Leapp worked fine all the times I ran this upgrade before. 


Additional info:

Leapp-report.txt showsup all sorts of stuff like:
Risk Factor: high
Title: Packages from unknown repositories may not be installed
Summary: 1 packages may not be installed or upgraded due to repositories unknown to leapp:
- python3-jwt (repoid: rhel8-highavailability)
Remediation: [hint] Please file a bug in http://bugzilla.redhat.com/ for leapp-repository component of the Red Hat Enterprise Linux 7 product.

Thus I filed this bug :) 

Other than the usual logs there is this file:
leap1.txt  which is screen redirect of the failed command.

Comment 3 Lukas Bezdicka 2020-11-24 14:45:20 UTC
You are wiping out your ceph-3 repos which are _required_

Please ensure you don't remove and keep:
/etc/yum.repos.d/rhos-release-ceph-3.repo

Or you don't pass  --enablerepo rhelosp-ceph-3-tools