rabbitmq / chef-cookbook

Development repository for Chef cookbook RabbitMQ
https://supermarket.chef.io/cookbooks/rabbitmq
Apache License 2.0
212 stars 425 forks source link

Cloudsmith url points to non-existing binary #575

Closed nikolawannabe closed 3 years ago

nikolawannabe commented 3 years ago

Testing out 5.9.0 as requested, had the following error:

==> default: * remote_file[/var/chef/cache/rabbitmq-server_3.8.1-1_all.deb] action create_if_missing
==> default: [2021-06-16T13:50:49-07:00] WARN: remote_file[/var/chef/cache/rabbitmq-server_3.8.1-1_all.deb] cannot be downloaded from https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server-all/raw/versions/3.8.1/rabbitmq-server_3.8.1-1_all.deb: 404 "Not Found"
==> default:     
michaelklishin commented 3 years ago

Cloudsmith doesn't have the entire version catalog and the "direct download" repo starts with 3.8.14. These direct downloads can use GitHub which has everything starting with 3.6.x or so.

I don't know where 3.8.1 may be coming from. Grep doesn't reveal it being used anywhere. 3.8.17 is the default version. Ubuntu 18.04 with backports provides 3.8.2.

Can you please try provisioning 3.8.17 as 3.8.1 is a tad out of date?

nikolawannabe commented 3 years ago

Yes, it works if I specify 3.8.17. (I found a spot where a defunct coworker had specified an old version outside of our regular recipe.) I did have to change some things related to the definition file drop, but for the first time in a while, rabbit installed. Thanks!

michaelklishin commented 3 years ago

I have switched v5.x to download files from GitHub. That should cover a few years worth of releases. Cloudsmith's rabbitmq-server-all (a direct download repository) only provisions 3.8.14 plus. GitHub should be perfectly sufficient for remote_file resources.

Can you please update and try with 3.8.17? I suspect that 3.8.1 could be used due to a typo or a Librarian/Berkshelf cache entry?

Below is how I am testing this cookbook so that we are on the same page :)

Test Kitchen

Assuming you have Docker running locally,

export KITCHEN_LOCAL_YAML=.kitchen.dokken.yml
kitchen test "default-deb-ubuntu-1804"

should provision a node and run some Test Kitchen tests using these attributes on Ubuntu 18.04.

The above succeeds for me. To make sure it does use GitHub for downloads, I modify the URL to be incorrect, and the above test fails as expected.

Vagrant

We have a Vagrant-based test repository that needs updating. Currently it fails for me with a VBoxManage startvm error which I cannot immediately explain. Perhaps I need to upgrade Vagrant and VirtualBox.

I'll try again when I'm near a decent Internet connection again.

michaelklishin commented 3 years ago

Ah, I see your above comment. Thanks for the confirmation.

This issue helped me realise that relying on Cloudsmith entirely at the moment would not be very wise. So it definitely spared the users of older version some head scratching 💚