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

Eleavate script fails when using a proxy #204

Open
mcurtis789 opened this issue Feb 27, 2024 · 12 comments
Open

Eleavate script fails when using a proxy #204

mcurtis789 opened this issue Feb 27, 2024 · 12 comments

Comments

@mcurtis789
Copy link

Hello,
I have been working on upgrading some servers that must go through a proxy in order to reach the internet. with previous attempts I have been able to adjust /etc/leapp/files/leapp_upgrade_repositories.repo and add a proxy statement to each entry and had success with upgrading the host. but recently I have found it necessary to not just update /var/lib/leapp/el8userspace/etc/dnf/dnf.conf to have a proxy but also run a script that keeps updating the file every time it changes. based on the error below the script should not be looking to directly connect to mirrors.fedoraproject.org.

Upgrading from CentOS 7 to Alma 8

currently both the pre upgrade and upgrade script can start but will fail with the following error.
==> Processing phase TargetTransactionCheck
====> * dnf_transaction_check
This actor tries to solve the RPM transaction to verify the all package dependencies can be successfully resolved.
Applying transaction workaround - yum config fix

Extra Packages for Enterprise Linux 8 - x86_64 0.0 B/s | 0 B 00:00
2024-02-27 10:29:40.674 ERROR PID: 10310 leapp.workflow.TargetTransactionCheck.dnf_transaction_check: DNF execution failed:
====> * local_repos_inhibit
Inhibits the upgrade if local repositories were found.
====> * report_set_target_release
Reports information related to the release set in the subscription-manager after the upgrade.
====> * tmp_actor_to_satisfy_sanity_checks
The actor does NOTHING but satisfy static sanity checks
====> * check_initramfs_tasks
Inhibit the upgrade if conflicting "initramfs" tasks are detected

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

2024-02-27 10:29:40.859112 [ERROR] Actor: dnf_transaction_check
Message: DNF execution failed with non zero exit code.
STDOUT:
Extra Packages for Enterprise Linux 8 - x86_64 0.0 B/s | 0 B 00:00

STDERR:
No matches found for the following disable plugin patterns: subscription-manager
Repository extras is listed more than once in the configuration
Repository extras-source is listed more than once in the configuration
Errors during downloading metadata for repository 'el8-epel':

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

@brianvess
Copy link

brianvess commented Feb 27, 2024

I am having the same error. This issue just started. I had had successful conversions up until this time. Any help on this issue would be greatly appreciated.

I have replaced the repo files with internal repos and have epel 8 in the internal repo and Leapp repo.

From what I see this repo is not even needed for me to use. Is there any way to skip this?????

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

2024-02-27 15:38:39.633403 [ERROR] Actor: dnf_transaction_check
Message: DNF execution failed with non zero exit code.
STDOUT:
Extra Packages for Enterprise Linux 8 - x86_64 0.0 B/s | 0 B 00:00

STDERR:
No matches found for the following disable plugin patterns: subscription-manager
Repository extras is listed more than once in the configuration
Errors during downloading metadata for repository 'el8-epel':

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

@mcurtis789
Copy link
Author

It seems that more that others are starting to encounter this.
https://almalinux.discourse.group/t/curl-error-6-couldnt-resolve-host-name-for-https-mirrors/3652

@brianvess
Copy link

I found this today. I tired editing it but during the pre-check it gets overwritten. Trying to find a way around it.

/var/lib/leapp/el8userspace/etc/yum.repos.d/epel.repo

[el8-epel]
name=Extra Packages for Enterprise Linux 8 - $basearch

It is much more secure to use the metalink, but if you wish to use a local mirror

place its address here.

#baseurl=https://dl.fedoraproject.org/pub/epel/8/Everything/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch&infra=$infra&content=$contentdir
enabled=1
gpgcheck=1
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8

@andrewlukoshko
Copy link
Member

Have you tried LEAPP_PROXY_HOST env?
https://leapp.readthedocs.io/en/latest/el7toel8/envars.html#leapp-proxy-host

@mcurtis789
Copy link
Author

mcurtis789 commented Feb 28, 2024

@andrewlukoshko
yes I have tried that env setting. in fact I have tried all 3 of these.
export LEAPP_PROXY_HOST=
export http_proxy=
export https_proxy=

none of them make any difference.

its worth noting that prior attempts(last attempt was about a month ago) all i had to do was update /etc/leapp/files/leapp_upgrade_repositories.repo and the upgrade was able to function.

there is behavior change is somewhat recent.

Also the file(var/lib/leapp/el8userspace/etc/dnf/dnf.conf ) I spoke about earlier was mentioned here http://neilrieck.net/docs/linux_notes_leeap.html#script

if you run this bash script in a second session then attempt to upgrade, the upgrade will work. Also This error happen after the first round of downloading and installing packages. it looks like it is in a verification phase when it fails.

@brianvess
Copy link

Same here is there anyway to get a fix for this as this is holding up our migration and with our strict security rules I cannot open this to the url for Fedora. As I stated earlier this was not an issue a month or two ago and went through without an issue.

thank you in advance.

@brianvess
Copy link

Any update or recommendations?

@hubertbejda
Copy link

I had the same problem, just go into /etc/leapp/files/vendors.d, edit the epel.repo file
delete:

#baseurl=https://dl.fedoraproject.org/pub/epel/8/Everything/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch&infra=$infra&content=$contentdir

and insert this:

baseurl=http://elrepo.org/linux/elrepo/el8/$basearch/
        http://mirrors.coreix.net/elrepo/elrepo/el8/$basearch/
        http://mirror.rackspace.com/elrepo/elrepo/el8/$basearch/
        http://linux-mirrors.fnal.gov/linux/elrepo/elrepo/el8/$basearch/
mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo.el8

works beautifully :)

@INNOBGE
Copy link

INNOBGE commented Mar 26, 2024

Same issue; and i can see with netstat that it's trying to connect direct.
Haven't found a fix yet.

@cafebeef
Copy link

cafebeef commented Apr 5, 2024

I had same issue.

Try the following:

sudo sed -i "/^enabled=.*/a proxy=<YOUR PROXY:PORT>"  /etc/leapp/files/leapp_upgrade_repositories.repo
sudo sed -i "/^enabled=.*/a proxy=<YOUR PROXY:PORT>"  /etc/leapp/files/vendors.d/epel.repo

@INNOBGE
Copy link

INNOBGE commented Jun 28, 2024

I had same issue.

Try the following:

sudo sed -i "/^enabled=.*/a proxy=<YOUR PROXY:PORT>"  /etc/leapp/files/leapp_upgrade_repositories.repo
sudo sed -i "/^enabled=.*/a proxy=<YOUR PROXY:PORT>"  /etc/leapp/files/vendors.d/epel.repo

That one did the trick for me. Thanks!

@brianvess
Copy link

So anyone having this issue, I found that if you are hosting epel on an internal repo that they changed their metadata tag compression and the internal repo was not able to be parsed causing the internal epel repo to fail causing the code to reach outside for a different epel url. check and make sure your epel is syncing correctly on your local repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants