puppet-rabbitmq icon indicating copy to clipboard operation
puppet-rabbitmq copied to clipboard

Change repos_ensure default from false to true

Open nmaludy opened this issue 4 years ago • 12 comments

Pull Request (PR) description

As part of the work i was doing to enable CentOS/RHEL 8 support in #842 i ran into an issue where EPEL no longer ships RabbitMQ packages. In that PR i had made some hacky fixes to enable the RabbitMQ repos, via the repos_ensure parameter, by default on that OS. After some discussions it was decided that we should instead, simply change the default value of repos_ensure to true on all OSes.

Note: This is a breaking change!

nmaludy avatar Jul 01 '20 00:07 nmaludy

@wyardley Looking at the build failures here and we may have opened a can of worms.

Debian: https://travis-ci.org/github/voxpupuli/puppet-rabbitmq/jobs/703736212#L1799-L1837 CentOS: https://travis-ci.org/github/voxpupuli/puppet-rabbitmq/jobs/703736222#L1701-L1707

In both cases, the repo enabled by the garethr/erlang module has such an old version of Erlang, that the modern version of rabbitmq-server can't be used.

I think if we want this to be the default, we'll have to craft our own Erlang module that has flags to support enabling the PackageCloud/Bintray repos.

Thoughts?

nmaludy avatar Jul 01 '20 00:07 nmaludy

@nmaludy yeah, tried to warn you that this was a big can of worms 😆

A new erlang module would be ideal, and if we can get that stood up (could either just start a brand new one or fork garethr). Additionally, we could consider a bool (defaulting to false) to use the RabbitMQ provided erlang packages from their repos? This won't work for everyone's use case, though, and even if we had such an option, if it defaults to false, wouldn't be ideal to use it in our own integration tests.

Since we document that the erlang dep has to be satisfied, you could use some other method of bootstrapping erlang in the acceptance test helpers, but that could get kind of hairy across the different things we support.

I'm almost never there, but might be good to kick around some of these ideas in #voxpupuli on Freenode IRC.

wyardley avatar Jul 01 '20 01:07 wyardley

@wyardley I've started on my own implementation of an erlang module. My plan is to donate this to Vox once i complete it, hopefully in the next few days. https://github.com/nmaludy/puppet-erlang

nmaludy avatar Jul 01 '20 12:07 nmaludy

In both cases, the repo enabled by the garethr/erlang module has such an old version of Erlang, that the modern version of rabbitmq-server can't be used.

Given garethr/erlang used to be approved, would it make sense to try and transfer it to VP?

ekohl avatar Jul 01 '20 14:07 ekohl

I feel like I might have tried to ask him about it ages ago, but could be wrong.

wyardley avatar Jul 01 '20 14:07 wyardley

I don't have bandwidth to look at this right now.

But from some initial debugging, it looks like RabbitMQ is hanging when starting up in this configuration.

  • apt-get install rabbitmq-server is failing:
  Setting up erlang-examples (1:21.3-1) ...                                                                                                                                       
  Setting up logrotate (3.8.7-1+b1) ...                                                                                                                                           
  Setting up socat (1.7.2.4-2) ...                                                                                                                                                
  Setting up rabbitmq-server (3.8.5-1) ...                                                                                                                                        
  Adding group `rabbitmq' (GID 117) ...                                                                                                                                           
  Done.                                                                                                                                                                           
  Adding system user `rabbitmq' (UID 110) ...                                                                                                                                     
  Adding new user `rabbitmq' (UID 110) with group `rabbitmq' ...                                                                                                                  
  Not creating home directory `/var/lib/rabbitmq'.                                                                                                                                
  Job for rabbitmq-server.service failed. See 'systemctl status rabbitmq-server.service' and 'journalctl -xn' for details.                                                        
  invoke-rc.d: initscript rabbitmq-server, action "start" failed.                                                                                                                 
  dpkg: error processing package rabbitmq-server (--configure):                                                                                                                   
   subprocess installed post-installation script returned error exit status 1                                                                                                     
  Processing triggers for systemd (215-17+deb8u13) ...                                                                                                                            
  Errors were encountered while processing:                                                                                                                                       
   rabbitmq-server                                                                                                                                                                
  E: Sub-process /usr/bin/dpkg returned an error code (1)   
  • Trying to start rabbitmq-server manually hangs

Some next steps are:

  • Attempt to use the "out of box" Erlang repos to narrow down if it's an Erlang problem or a RabbitMQ problem
  • Identify what is causing the rabbitmq-server install to error
  • Identify what is causing rabbitmq-server service to hang

nmaludy avatar Jul 06 '20 14:07 nmaludy

Dear @nmaludy, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs? If you need any help, you can reach out to us on our IRC channel voxpupuli on Freenode or our Slack channel voxpupuli at slack.puppet.com. You can find my sourcecode at voxpupuli/vox-pupuli-tasks

vox-pupuli-tasks[bot] avatar Jul 22 '20 18:07 vox-pupuli-tasks[bot]

@wyardley this PR is still a struggle for me... are you OK with us getting RHEL8 support in there with the one override for repos_ensure on RHEL8, then i can come back and revisit this making it the default on all platforms at a later time?

nmaludy avatar Aug 17 '20 15:08 nmaludy

@nmaludy Anything I can help with? and is the puppet-erlang module released yet? I still don't see a tag cut there.

My thought is that once that's released, it should be relatively easy to get this working and release it as a major / breaking release..

I don't think it's ideal to have RHEL8 support a different set of configurations from the default (though you could override that setting in your local config, presumably)

wyardley avatar Aug 17 '20 17:08 wyardley

@wyardley the integration tests are failing because rabbitmq fails to start on the hosts with the new repo, haven't been able to figure out why it's failing to start and/or how to fix it.

nmaludy avatar Aug 18 '20 12:08 nmaludy

Can we get a tag cut of the vox erlang mofule you wrote?

Can you try adding your erlang stuff as needed replacing the garethr stuff here https://github.com/voxpupuli/puppet-rabbitmq/blob/b05b6b24fc09591cf033ea841d844f7f78653c59/spec/spec_helper_acceptance.rb#L8 And then take it out of the acceptance test’s test manifests for now?

wyardley avatar Aug 18 '20 13:08 wyardley

Dear @nmaludy, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

vox-pupuli-tasks[bot] avatar Jun 21 '22 19:06 vox-pupuli-tasks[bot]

closing in favor of #926 Would still be great to get someone with time to spend on getting one of these options past the finish line.

wyardley avatar Dec 07 '23 04:12 wyardley