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

Module always installs RabbitMQ 3.5.7 even if pinned at 3.6 #756

Closed
witchbutter opened this issue Jan 11, 2019 · 3 comments
Closed

Module always installs RabbitMQ 3.5.7 even if pinned at 3.6 #756

witchbutter opened this issue Jan 11, 2019 · 3 comments

Comments

@witchbutter
Copy link

witchbutter commented Jan 11, 2019

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.8
  • Module version: 8.4.1

How to reproduce (e.g Puppet code you use)

require apt

# Rabbit MQ stable repo
apt::source {'rabbitmq':
    comment      => 'RabbitMQ Stable Repository',
    location     => 'https://dl.bintray.com/rabbitmq/debian',
    release      => $facts['os']['distro']['codename'],
    repos        => 'main',
    architecture => 'amd64',
    key => {
      id         => '0A9AF2115F4687BD29803A206B73A36E6026DFCA',
      source     => 'https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc',
    },
    include => {
      'deb'      => true,
    },
    notify       => Exec['force refresh apt for rabbit'],
    before       => Package['rabbitmq-server'],
}

class { 'rabbitmq':
    package_ensure              => 'latest',
    package_apt_pin             => '3.6.*',
}

What are you seeing

The module always installs version 3.5.7 then on a subsequent run upgrades to the latest 3.6 version in this case 3.16.6. Once upgraded the fact rabbitmq_version still reports the version as 3.5.7 for no apparent reason.

What behaviour did you expect instead

Install a version of 3.6 out of the gate. There is really no reason for me not be able to specify the repo within the rabbitmq forge module itself, but since there seems to be no facility to do that I am also use the apt module.

@wyardley
Copy link
Contributor

@witchbutter Have you tried using repos_ensure => True instead of calling the apt module directly?

@func0der
Copy link

@witchbutter You are using rabbitmq::package_apt_pin pin wrong.
rabbitmq::package_apt_pin is supposed to give the priority with which the source you define, should be ranked during installation via apt.
Basically, you should put 1000 in rabbitmq::package_apt_pin.

Like @wyardley mentioned, you pinning is not going to workig without $repos_ensure being set to true. If you'd do that, you could remove your apt::source definition, because you can do this all with rabbitmq module configuraiton:

rabbitmq::package_gpg_key: https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
rabbitmq::repos_ensure: true
rabbitmq::package_apt_pin: '1000'
# @todo: Remove when pinning in rabbitmq module is fixed.
rabbitmq::package_ensure: '3.6*'

rabbitmq::repo::apt::key: '0A9AF2115F4687BD29803A206B73A36E6026DFCA'
rabbitmq::repo::apt::location: https://dl.bintray.com/rabbitmq
rabbitmq::repo::apt::repos: rabbitmq-server-v3.6.x erlang-20.x # Only use rabbitmq 3.6 and erlang versions compatible with it.

The hiera code above SHOULD install the 3.6 version of rabbitmq, but it does not, because there is a hard coded pinning to packagecloud.io in the module (#779, go and vote on that bug pls.)

So you got two choices:

  1. Do not use rabbitmq::repos_ensure and continue to use your apt::source definition, but add the apt::source::pin property by hand.
  2. Use packagecloud. Downside with that is, that is does not seem to be possible to properly control the erlang version. I had issues with that constellation before, that's why i am using bintray.

@dhoppe
Copy link
Member

dhoppe commented May 2, 2019

@witchbutter, @func0der We fixed issue #779. Could you please check again, based on the master branch?

@dhoppe dhoppe added needs-feedback Further information is requested and removed question labels May 2, 2019
@bastelfreak bastelfreak added skip-changelog and removed needs-feedback Further information is requested labels Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants