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

tdnf makecache hangs on PhotonOS3 #1530

Closed
sebma opened this issue Jan 3, 2024 · 8 comments
Closed

tdnf makecache hangs on PhotonOS3 #1530

sebma opened this issue Jan 3, 2024 · 8 comments
Labels

Comments

@sebma
Copy link

sebma commented Jan 3, 2024

Describe the bug

tdnf makecache hangs on VMware Photon OS 3.0

Reproduction steps

  1. Clean the tdnf cache
$ sudo tdnf clean all
Cleaning repos: photon photon-extras photon-updates
Cleaning up everything
$ 
  1. Rebuild the tdnf cache
$ sudo tdnf makecache
Refreshing metadata for: 'VMware Photon Linux 3.0 (x86_64) Updates'
^Coton-updates                            9558   100%
$ 

Expected behavior

The cache is downloaded.

Additional context

VMware Photon OS 3.0

@sebma sebma added the bug label Jan 3, 2024
@sebma
Copy link
Author

sebma commented Jan 3, 2024

It somehow took 4 minutes to make the cache :

$ time sudo tdnf makecache
Refreshing metadata for: 'VMware Photon Linux 3.0 (x86_64) Updates'
Refreshing metadata for: 'VMware Photon Extras 3.0 (x86_64)'
Refreshing metadata for: 'VMware Photon Linux 3.0 (x86_64)'
Metadata cache created.                2498249   100%

real    3m58.512s
user    3m52.216s
sys     0m1.616s
$

@oliverkurth
Copy link
Contributor

oliverkurth commented Jan 3, 2024

Can you send the content of the repo files in /etc/yum.repos.d/? Make sure you have skip_md_filelists=1 set, especially for /etc/yum.repos.d/photon-updates.repo which is the largest repo because it contains all versions.

Also, have you checked if network access is acceptable for other applications, or is it just tdnf?

@sshedi
Copy link
Contributor

sshedi commented Jan 4, 2024

Can you send the content of the repo files in /etc/yum.repos.d/? Make sure you have skip_md_filelists=1 set, especially for /etc/yum.repos.d/photon-updates.repo which is the largest repo because it contains all versions.

Also, have you checked if network access is acceptable for other applications, or is it just tdnf?

Before doing this, you have to update tdnf to latest. It's a one time thing but there is no other option.

tdnf update -y tdnf

This might take a while to finish. Then add skip_md_filelists=1 in repo file.

Then try rm -rf /var/cache/tdnf/ and tdnf makecache --refresh

@oliverkurth
Copy link
Contributor

oliverkurth commented Jan 4, 2024

Well yes, I was assuming that tdnf was updated to the latest what's available in Photon 3.0, maybe I shouldn't have. So which version is this? (tdnf --version)

Also, if this is an old version, there should be no need to edit the config file to add skip_md_filelists=1 , it will be done in the post install script of the package. But double check in any case.

@sebma
Copy link
Author

sebma commented Jan 4, 2024

Here is my tdnf :

$ grep skip_md_filelists /etc/yum.repos.d/*.repo
$ sudo tdnf --version
tdnf: 3.1.0
$

@sebma
Copy link
Author

sebma commented Jan 4, 2024

Now I've just updated it :

$ sudo tdnf update tdnf

Upgrading:
tdnf-cli-libs                                                   x86_64                          3.1.15-2.ph3                               photon-updates                           70.24k 71928
tdnf                                                            x86_64                          3.1.15-2.ph3                               photon-updates                         313.71k 321243

Total installed size: 383.96k 393171
Is this ok [y/N]: y

Downloading:
tdnf-cli-libs                            37007   100%
tdnf                                    123865   100%
Testing transaction
Running transaction
Installing/Updating: tdnf-cli-libs-3.1.15-2.ph3.x86_64
Installing/Updating: tdnf-3.1.15-2.ph3.x86_64
Removing: tdnf-3.1.0-1.ph3.x86_64
Removing: tdnf-cli-libs-3.1.0-1.ph3.x86_64

Complete!
$

The update of the tdnf package did not add the skip_md_filelists=1 line to the /etc/yum.repos.d/*.repo files :

$ grep skip_md_filelists /etc/yum.repos.d/*.repo
$

@sebma
Copy link
Author

sebma commented Jan 4, 2024

Still have the same problem :

$ sudo rm -rf /var/cache/tdnf/
$ time sudo tdnf makecache --refresh
Refreshing metadata for: 'VMware Photon Linux 3.0 (x86_64) Updates'
Refreshing metadata for: 'VMware Photon Extras 3.0 (x86_64)'
Refreshing metadata for: 'VMware Photon Linux 3.0 (x86_64)'
Metadata cache created.                2498249   100%

real    3m38.129s
user    3m31.838s
sys     0m1.610s
$

On another vcenter, the exact same operation takes 1.5s.

@sebma
Copy link
Author

sebma commented Jan 4, 2024

The issue was solved by manually appending the line skip_md_filelists=1 to the /etc/yum.repos.d/*.repo files.

Thanks a lot guys 👍

@sebma sebma closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants