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

mysql-5.6-community/el/latest does not exist #21

Closed
fedekau opened this issue Feb 26, 2018 · 5 comments
Closed

mysql-5.6-community/el/latest does not exist #21

fedekau opened this issue Feb 26, 2018 · 5 comments
Labels
Stale This is marked as stale and will be closed shortly

Comments

@fedekau
Copy link

fedekau commented Feb 26, 2018

Cookbook version

4.0.0

Chef-client version

12.21.31

Platform Details

Linux 2a60e86b9146 4.9.60-linuxkit-aufs #1 SMP Mon Nov 6 16:00:12 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
AmazonLinux

Scenario:

I am trying to run kitchen converge, I did run it on Friday and everything was working.

Steps to Reproduce:

Include include_recipe 'yum-mysql-community::mysql56' into a recipe

Expected Result:

I expect it to successfully install mysql 5.6

Actual Result:

It blows up with:

Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/yum-mysql-community/recipes/mysql56.rb:19:in `from_file'
           yum_repository("mysql56-community") do
             action [:create]
             updated true
             updated_by_last_action true
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             declared_type :yum_repository
             cookbook_name "yum-mysql-community"
             recipe_name "mysql56"
             repositoryid "mysql56-community"
             description "MySQL 5.6 Community Server"
             gpgkey "https://raw.githubusercontent.com/chef-cookbooks/yum-mysql-community/master/files/mysql_pubkey.asc"
             failovermethod "priority"
             gpgcheck true
             enabled true
             baseurl "http://repo.mysql.com/yum/mysql-5.6-community/el/$releasever/$basearch/"
             mode "0644"
           end
           System Info:
           ------------
           chef_version=12.21.31
           platform=amazon
           platform_version=2017.09
           ruby=ruby 2.3.5p376 (2017-09-14 revision 59905) [x86_64-linux]
           program_name=chef-client worker: ppid=152;start=16:14:08;
           executable=/opt/chef/bin/chef-client
       [2018-02-26T16:17:17+00:00] INFO: Running queued delayed notifications before re-raising exception
       Running handlers:
       [2018-02-26T16:17:17+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2018-02-26T16:17:17+00:00] ERROR: Exception handlers complete
       Chef Client failed. 19 resources updated in 03 minutes 08 seconds
       [2018-02-26T16:17:17+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2018-02-26T16:17:17+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2018-02-26T16:17:17+00:00] ERROR: yum_repository[mysql56-community] (yum-mysql-community::mysql56 line 19) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[yum-makecache-mysql56-community] (/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.21.31/lib/chef/provider/yum_repository.rb line 65) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
       ---- Begin output of yum -q -y makecache --disablerepo=* --enablerepo=mysql56-community ----
       STDOUT:
       STDERR: http://repo.mysql.com/yum/mysql-5.6-community/el/latest/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
       Trying other mirror.
       To address this issue please refer to the below knowledge base article
       https://access.redhat.com/articles/1320623
       If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
        One of the configured repositories failed (MySQL 5.6 Community Server),
        and yum doesn't have enough cached data to continue. At this point the only
        safe thing yum can do is fail. There are a few ways to work "fix" this:
            1. Contact the upstream for the repository and get them to fix the problem.
            2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).
            3. Disable the repository, so yum won't use it by default. Yum will then
        just ignore the repository until you permanently enable it again or use
        --enablerepo for temporary usage:
            yum-config-manager --disable mysql56-community
            4. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:
            yum-config-manager --save --setopt=mysql56-community.skip_if_unavailable=true
       failure: repodata/repomd.xml from mysql56-community: [Errno 256] No more mirrors to try.
       http://repo.mysql.com/yum/mysql-5.6-community/el/latest/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
       ---- End output of yum -q -y makecache --disablerepo=* --enablerepo=mysql56-community ----
       Ran yum -q -y makecache --disablerepo=* --enablerepo=mysql56-community returned 1
       [2018-02-26T16:17:17+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@fedekau
Copy link
Author

fedekau commented Feb 26, 2018

Apparently what happens is that $releasever is set to latest but http://repo.mysql.com/yum/mysql-5.6-community/el/latest/x86_64/repodata/repomd.xml does not exist. So it fails

@fedekau
Copy link
Author

fedekau commented Feb 26, 2018

According to /etc/yum.conf file on the Amazon Linux AMI that value (latest) is the default one, so in my opinion that value should be taken into consideration:

Amazon Linux /etc/yum.conf file

# by default the yum configuration will point to the latest release
# of Amazon Linux AMI. If you prefer not to automatically move to
# new releases, comment out this line.
releasever=latest

@fedekau
Copy link
Author

fedekau commented Mar 1, 2018

Has someone been able to reproduce this?

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot added the Stale This is marked as stale and will be closed shortly label Oct 22, 2020
@github-actions
Copy link

Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale This is marked as stale and will be closed shortly
Projects
None yet
Development

No branches or pull requests

1 participant