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

Wrong yum repo url generated on redhat #370

Open
dermarens opened this issue Aug 10, 2023 · 0 comments
Open

Wrong yum repo url generated on redhat #370

dermarens opened this issue Aug 10, 2023 · 0 comments

Comments

@dermarens
Copy link
Contributor

πŸ‘» Brief Description

yum_repo_platform_string in helpers.rb doesn't consider redhat and thus generated a wrong repo url that isn't provided by yum.mariadb.org

πŸ₯ž Cookbook version

5.3.2

πŸ‘©β€πŸ³ Chef-Infra Version

 Cinc Client 18.1.0
 Platform: x86_64-linux

🎩 Platform details

"os": "linux",
"os_version": "4.18.0-240.1.1.el8_3.x86_64",
"platform": "redhat",
"platform_version": "8.3",
"platform_family": "rhel",
"provider": "openstack"

Steps To Reproduce

Steps to reproduce the behavior:

  1. Try to install server
mariadb_server_install 'mariamaria' do
    version '10.5'
    setup_repo true
    password new_resource.server_root_password
    action [:install, :create]
end
  1. See error
[2023-08-10T08:18:32-04:00] INFO: template[/etc/yum.repos.d/mariadb10.5.repo] created file /etc/yum.repos.d/mariadb10.5.repo

              - create new file /etc/yum.repos.d/mariadb10.5.repo[2023-08-10T08:18:32-04:00] INFO: template[/etc/yum.repos.d/mariadb10.5.repo] updated file contents /etc/yum.repos.d/mariadb10.5.repo

              - update content in file /etc/yum.repos.d/mariadb10.5.repo from none to 8b5586
              --- /etc/yum.repos.d/mariadb10.5.repo     2023-08-10 08:18:32.462738245 -0400
              +++ /etc/yum.repos.d/.chef-mariadb1020230810-4908-7jycms.5.repo   2023-08-10 08:18:32.462738245 -0400
              @@ -1,11 +1,22 @@
              +# This file was generated by Chef Infra
              +# Do NOT modify this file by hand.
              +
              +[mariadb10.5]
              +name=MariaDB.org 10.5
              +baseurl=http://yum.mariadb.org/10.5/redhat/$releasever/$basearch
              +enabled=1
              +fastestmirror_enabled=0
              +gpgcheck=1
              +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-MariaDB-10.5
              +module_hotfixes=1[2023-08-10T08:18:32-04:00] INFO: template[/etc/yum.repos.d/mariadb10.5.repo] mode changed to 644

              - change mode from '' to '0644'
              - restore selinux security context
       [2023-08-10T08:18:32-04:00] DEBUG: immediate notification from template[/etc/yum.repos.d/mariadb10.5.repo] to execute[yum clean metadata mariadb10.5] is delayed until declaration due to unified_mode
       [2023-08-10T08:18:32-04:00] DEBUG: immediate notification from template[/etc/yum.repos.d/mariadb10.5.repo] to execute[yum-makecache-mariadb10.5] is delayed until declaration due to unified_mode
       [2023-08-10T08:18:32-04:00] DEBUG: immediate notification from template[/etc/yum.repos.d/mariadb10.5.repo] to package[package-cache-reload-mariadb10.5] is delayed until declaration due to unified_mode
...
...
...
       ---- Begin output of yum -q -y makecache --disablerepo=* --enablerepo=mariadb10.5 ----
       STDOUT:
       STDERR: Error: Failed to download metadata for repo 'mariadb10.5': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
       ---- End output of yum -q -y makecache --disablerepo=* --enablerepo=mariadb10.5 ----
       Ran yum -q -y makecache --disablerepo=* --enablerepo=mariadb10.5 returned 1

πŸš“ Expected behavior

A valid yum repo url for redhat is generated using http://yum.mariadb.org/10.5/rhel/$releasever/$basearch instead of http://yum.mariadb.org/10.5/redhat/$releasever/$basearch

βž• Additional context

Will add a pull request

dermarens pushed a commit to dermarens/mariadb that referenced this issue Aug 10, 2023
* treat redhat like other members of the family to generate yum repo url

Signed-off-by: Marc Arens <[email protected]>
dermarens pushed a commit to dermarens/mariadb that referenced this issue Aug 10, 2023
* treat redhat like other members of the platform_family to generate yum repo url

Signed-off-by: Marc Arens <[email protected]>
xorima pushed a commit that referenced this issue Aug 19, 2023
* treat redhat like other members of the platform_family to generate yum repo url

Signed-off-by: Marc Arens <[email protected]>
Co-authored-by: Marc Arens <[email protected]>
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

1 participant