Skip to content

draft: RabbitMQ 4 support#1075

Open
d1nuc0m wants to merge 2 commits into
voxpupuli:masterfrom
d1nuc0m:rabbitmq4
Open

draft: RabbitMQ 4 support#1075
d1nuc0m wants to merge 2 commits into
voxpupuli:masterfrom
d1nuc0m:rabbitmq4

Conversation

@d1nuc0m

@d1nuc0m d1nuc0m commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

Pull Request (PR) description

Work in Progress to update module for recent RabbitMQ versions

This Pull Request (PR) fixes the following issues

Fixes #1050

Comment thread manifests/repo/rhel.pp Outdated
Comment thread data/family/RedHat.yaml Outdated
Comment thread files/rabbitmq.repo
## Zero dependency Erlang RPM
##

[modern-erlang]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use yumrepo resources instead. That's how we usually manage repositories. That makes it way easier to customize the different attributes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a problem, in yumrepo "Continuation lines that yum supports (for the baseurl, for example) are not supported.", and the .repo files contains newlines in baseurl

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can provide a string with multiple URLs and use whitespace as delimiter https://github.com/puppetlabs/puppetlabs-yumrepo_core/blob/main/lib/puppet/type/yumrepo.rb#L81

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll try

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was checking https://forge.puppet.com/modules/puppetlabs/yumrepo_core/readme and I have a doubt, how could I place multiple repositories in a single file with yumrepo?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I think that's still not supported. just make multiple files? but you can have multiple baseurls per repo I think.

@d1nuc0m d1nuc0m Jan 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk if it's the same, see the original .repo here, the GPG keys are different

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yumrepo { 'modern-erlang':
    baseurl          => "https://yum1.rabbitmq.com/erlang/el/${facts['os']['release']['major']}/\${basearch} https://yum2.rabbitmq.com/erlang/el/${facts['os']['release']['major']}/\${basearch}",
    repo_gpgcheck    => '1',
    enabled          => '1',
    gpgkey           => $erlang_repo_gpg_key,
    gpgcheck         => '1',
    sslverify        => '1',
    sslcacert        => '/etc/pki/tls/certs/ca-bundle.crt',
    metadata_expire  => '300',
    payload_gpgcheck => '1',
  }

results in Validate method failed for class baseurl: bad URI(is not URI?): "https://yum1.rabbitmq.com/erlang/el/9/${basearch}", so whitespace is not working

Comment thread manifests/init.pp Outdated
@d1nuc0m d1nuc0m force-pushed the rabbitmq4 branch 10 times, most recently from 4472f9e to 2a36df4 Compare January 16, 2026 15:07
@d1nuc0m d1nuc0m changed the title draft: change repo draft: RabbitMQ 4 support Jan 16, 2026
In 2024 RabbitMQ's PackageCloud repository has been discontinued in
favor of Cloudsmith

Kudos to @corporate-gadfly for Hiera.
@d1nuc0m d1nuc0m force-pushed the rabbitmq4 branch 4 times, most recently from 4774616 to f53cf5d Compare January 22, 2026 11:27
Comment thread data/common.yaml
rabbitmq::loopback_users:
- 'guest'
rabbitmq::service_restart: true
{} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this emptied out?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Values were declared both in common.yaml and init.pp + per VoxPupuli guidelines "Static data that is equal across every supported operating system must stay in the init.pp, it shouldn’t be moved to a common.yaml due to puppet-strings issue #250."

it { is_expected.not_to contain_apt__source('rabbitmq') }
it { is_expected.not_to contain_class('rabbitmq::repo::rhel') }
it { is_expected.not_to contain_yumrepo('rabbitmq') }
it { is_expected.to contain_class('rabbitmq::repo::rhel') }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What changed to cause the reversal?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream repositories are now enabled by default, as Messaging SIG ships an older version (not available yet on EL10 btw)

@@ -36,8 +36,8 @@
context 'with default params' do
it { is_expected.not_to contain_class('rabbitmq::repo::apt') }
it { is_expected.not_to contain_apt__source('rabbitmq') }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What changed to cause the reversal?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same (and I'm still working on Debian/Ubuntu tests as I'm having problems with tests toolchain in local)

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

Successfully merging this pull request may close these issues.

RabbitMQ 4.0/4.1 support?

3 participants