-
Notifications
You must be signed in to change notification settings - Fork 423
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
rabbitmq::cluster resource type doesn't match the docs #498
Comments
I'm afraid there isn't enough information to work with here. I don't see any evidence that this is "a cookbook defect". The resource is question is this one. How does the right hand side of the comparison end up being On an unrelated note, mirroring to all nodes is excessive and usually unnecessary. |
Highly relevant (but without any feedback that would help us reproduce or reach a conclusion): #476. |
@michaelklishin I could certainly provide information.... I just am curious what to provide. So in digging around the resources, I see this I'm providing the Could this be the problem? I'm unsure of the debugging required in order to provide more context around what you'd require - if you could tell me I'd appreciate it. |
Yes, that must be it: an array of hashes would be iterable still but each element of such collection would be a character and not a map. So invoking a |
so what is the correct string to provide to the variable that will allow parsing? a string of an array of hashses? or is this a provider type issue that needs changing? |
OK so the template clearly doesn't want a string:
|
An array of hashes as demonstrated in the docs. I will correct the provided type. |
My syntax matches the docs; so if there's a fix that I can publish and test with that syntax i can validate it quickly |
trying now |
looks like something in the provider converts that to a string
|
I think name attributes must be a string, not sure they can be an array |
|
RabbitMQ cluster will use first node's name if no name is configured explicitly. |
I pushed a couple more updates. |
Alrighty |
Please pull. |
OK i pulled in your latest changes; and the cluster recipe never fired. |
I see that the config included the list of cluster nodes |
Do you have |
these are the attributes from the node object: "clustering": {
"enable": true,
"cluster_partition_handling": "autoheal",
"use_auto_clustering": true,
"cluster_name": "kamehamehaus1a",
"cluster_nodes": [
{
"name": "rabbit@us1a-rmq1-kamehameha.domain.tld",
"type": "disc"
},
{
"name": "rabbit@us1a-rmq2-kamehameha.domain.tld",
"type": "disc"
},
{
"name": "rabbit@us1a-rmq3-kamehameha.domain.tld",
"type": "disc"
}
], |
unless node['rabbitmq']['clustering']['cluster_name']
target_name = if cluster_nodes.any?
# this is what RabbitMQ would do anyway
cluster_nodes.first.name
else
'rabbitmq-cluster'
end
# Set cluster name to the first node's name, if any
rabbitmq_cluster "rabbitmq-cluster-#{target_name}" do
cluster_name target_name
action [:set_cluster_name, :change_cluster_node_type]
end
end I'm setting a cluster_name so that will not fire
|
Unsetting that exposes:
|
Looking like the root might be a confusiong between |
So I went back to your 5.x branch; deployed 5.6.2; turned
I had some debugging added there and noticed this:
Seems that it caught empty here on var_cluster_name. Not sure why but after setting a cluster_name once more I'm able to see the clustering attempt on 5.6.2 |
I think this has been addressed in master but I'm not yet sure if it can be backported. As you correctly pointed out, name attributes cannot be anything other than a String, at least in Chef 13. What that means for us is that if we change the type to be what's actually expected, it can be potentially breaking. Cluster name doesn't bear any significant meaning in RabbitMQ itself but plugins and operator tools can use them as identifiers :( I need to at least research what tier 1 (core) plugins do and we'll have to provide a detailed change log entry. |
This was a great proof to me that the cluster provider is insanely complicated and dependent on existing cluster state in some ways. So in 6.0 I think it should only support peer discovery. This way RabbitMQ can (and already does) handle some of the complications and how to retry/reconcile cluster state. |
@michaelklishin turns out this is largely a documentation issue and order of operations issue. If you wouldn't mind I can make some updates to the README.md in a PR so that hopefully this red-herring is no longer experienced |
FYI - i did get to a working state with 5.6.2 - would you mind publishing that to the supermarket please? |
I'm trying to operate the
cluster.rb
recipe I'm having difficulty getting teh ndoes to cluster. This appears to be a recipe defect, or a defect in what I'm providing however it looks like I'm following available documentation.RMQ: 3.6.9-1.el7
OS: RedHat 7.4
ERLANG: 19.3.4-1.el7
Cookbook version: 5.6.1
Chef: 13.9.4
Rendered node json attributes (bootstrap):
My wrapped recipe segment:
chef client run:
The text was updated successfully, but these errors were encountered: