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

Add auto cluster configuration support #718

Closed
wants to merge 2 commits into from
Closed

Add auto cluster configuration support #718

wants to merge 2 commits into from

Conversation

dn1s
Copy link
Contributor

@dn1s dn1s commented Aug 30, 2018

Pull Request (PR) description

This PR adds two things:

  1. A fact for the cluster name of a rabbitmq cluster.
  2. New resource rabbitmq_cluster{} which can be used to join nodes to a cluster and manage rabbitmq_cluster name.

This Pull Request (PR) fixes the following issues

Fixes #130

@dn1s
Copy link
Contributor Author

dn1s commented Aug 30, 2018

I'd like to regenerate the docs. Does someone have a one liner for me. I'm new to spec test and such.

@wyardley
Copy link
Contributor

wyardley commented Sep 1, 2018

@dn1s: it's been a while, but I believe the rake tasks can do it for you:

rake strings:generate[patterns,debug,backtrace,markup,json,markdown,yard_args]  # Ge...
rake strings:gh_pages:update

Or you can just run puppet strings.

I forget if this happens automagically as part of the release process, but I think probably you shouldn't run it and commit as part of this PR. @bastelfreak might know more, or check in the voxpupuli channels on IRC / Slack.

Copy link
Contributor

@wyardley wyardley left a comment

Choose a reason for hiding this comment

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

From a quick look, this seems sensible to me. Have you tested it?

How do you deal with the situation when multiple nodes are getting built at the same time?

I seem to remember having had trouble with cookie changes, especially since the cookie presumably needs to be generated / provided ahead of being added to the Puppet config.

I haven't been working with RMQ or Puppet lately, not sure who can give additional feedback or approve this, but I'm cautiously +1 on this.

It does seem like the acceptance test failure shows an issue that's probably a real one - have you looked into that yet?

https://github.com/voxpupuli/puppet-rabbitmq#clustering should probably get updated (in README)?

end
end

context 'with dashes in clustername/hostname' do
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these from another provider? Are all these valid and expected for cluster names as well as for node names?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the default of cluster name is actually the hostname of the node which you joined. I would guess all hostname restraints apply.

@bastelfreak
Copy link
Member

automatic doc gneration is currently not implemented. feedback in voxpupuli/modulesync_config#397 is highly apreciated.

Array $cluster_nodes = $rabbitmq::params::cluster_nodes,
String $config = $rabbitmq::params::config,
Boolean $config_cluster = $rabbitmq::params::config_cluster,
Hash $cluster = $rabbitmq::params::cluster,
Copy link
Member

Choose a reason for hiding this comment

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

can you also define the structure within the Hash please?

Copy link
Contributor

Choose a reason for hiding this comment

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

And If possible, don’t change the formatting before that open paren - I think the param spacing also doesn’t need to change, which would make this easier to review?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bastelfreak I don't see a hash in the module that has a definition of it's inner structure should I nevertheless add one?

Copy link
Member

Choose a reason for hiding this comment

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

There is none yet, please add one. Some examples for complex datatypes and tests are at: https://github.com/voxpupuli/puppet-nginx/pull/1233/files. Maybe that helps you.

@bastelfreak bastelfreak added enhancement New feature or request needs-work not ready to merge just yet labels Sep 2, 2018
@bastelfreak
Copy link
Member

please also rebase against our latest master branch to pull in some changes we did to the testmatrix.

@dn1s
Copy link
Contributor Author

dn1s commented Sep 4, 2018

I'll have a look into the travis issue and your feedback in the next days.

@dn1s
Copy link
Contributor Author

dn1s commented Sep 7, 2018

Hmm I thought a bit more of this pull request and it may be more sane to do this with autocluster on my side. And change this pr to just have a fact for cluster_name. Thoughts about this idea?

@vchepkov
Copy link

It's a very useful feature. Any plans to add it soon?

@bastelfreak
Copy link
Member

@vchepkov we can't currently merge it due to the git conflicts. If @dn1s doesn't want to continue, you could rebase it and submit it as a new PR.

@vchepkov
Copy link

Rebased and submitted #736.

I took a liberty with replacing create_resources with a lambda

@dn1s
Copy link
Contributor Author

dn1s commented Oct 19, 2018

Discontinued in favor of #736.

@dn1s dn1s closed this Oct 19, 2018
@rehan2908
Copy link

Hello,

Any plans for adding this feature soon?

@wyardley
Copy link
Contributor

@rehan2908: it's been moved to #736 and still needs rebase + tests. If someone provides those things, then yes, should be able to be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-rebase needs-work not ready to merge just yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rabbitmq clustering status needs manual intervention if cluster partners aren't reachable at time of creation
5 participants