AlmaLinux / almalinux-deploy

EL to AlmaLinux migration tool.
GNU General Public License v3.0
542 stars 71 forks source link

Eleavate script fails when using a proxy #204

Open mcurtis789 opened 7 months ago

mcurtis789 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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

mcurtis789 commented 7 months ago

@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 commented 7 months ago

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 commented 7 months ago

Any update or recommendations?

hubertbejda commented 6 months ago

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 commented 6 months ago

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

cafebeef commented 6 months ago

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 commented 3 months ago

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 commented 2 months ago

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.