-
Notifications
You must be signed in to change notification settings - Fork 38
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 support for JGroups JDBC_PING mode in clustered mode #139
Conversation
end | ||
|
||
describe port(7600) do | ||
it { is_expected.to be_listening.on('0.0.0.0').with('tcp') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is failing. I am guessing because in the config template you set to ::ipaddress
and here you are looking for 0.0.0.0
so the values don't match.
templates/config.cli.erb
Outdated
/subsystem=jgroups/channel=ee:write-attribute(name=stack, value="tcp") | ||
/subsystem=jgroups/stack=udp: remove() | ||
/socket-binding-group=standard-sockets/socket-binding=jgroups-udp:remove() | ||
/interface=private:write-attribute(name=inet-address, value=${jboss.bind.address.private:<%= scope['::ipaddress'] %>}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the public value should either be 0.0.0.0
or a parameter to define the addresses that defaults to $facts['networking']['ip']
.
The template for modifying the tcp stack looks really redundant. There are several things that are removed and later added with no difference in their configuration. I would recommend taking the block under subsystem
Also in my configs Another thing is if someone says |
after waaay too many hours trying to change the config.cli template without success, I finally understand why it was originally done in a redundant way. TL;DR: Order matters. We need to delete them first so they are added in a certain order later on. Otherwise it does not work. Are you OK leaving this part as it is? I will address your other comments. |
Verified this works, but it can't be run twice, you have to add guard clauses before removing or adding otherwise the second time Puppet runs it will fail. If you take the code from that web article and run it 2 times, the second time will give errors because you can not add something if it already exists and can't remove something if it's already removed. This is simplified logic, removed unnecessary add/remove logic and ensured can be run more than once without error:
|
I made a few changes, apart from the most obvious ones.
|
6b294f4
to
9c7c3b2
Compare
I think I know why there are many remove/add...that's a very odd way to make changes that can run multiple times since you can't do adds twice without either removing first or checking for existence. Did you try the code below? If you had issues then what version of Keycloak and what errors? I tested in Vagrant using 8.0.1 and it works just fine. This removes the unnecessary removals. The PR diff I see still shows FRAG removal/add. The example below keeps it but can omit that part of keeping FRAG3 works. I did a diff of standalone-ha.xml with your changes and then with changes below and diff looks similar if not identical.
|
Sorry it seems I forgot to add the latest version of my config.cli in my latest commit last Friday. |
I don't think those failures are related to my change:
|
templates/config.cli.erb
Outdated
if (outcome == success) of /subsystem=jgroups/stack=tcp/protocol=MPING:read-resource | ||
/subsystem=jgroups/stack=tcp/protocol=MPING: remove() | ||
end-if | ||
if (outcome == success) of /subsystem=jgroups/stack=tcp/protocol=FD_SOCK:read-resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This specific condition can be removed. The remove + add makes the condition unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done it. I rebase
-i and fixup
the commit. Let me know if that works for you
I re-ran previous passing tests on master branch and they now hang, not sure what changed to break this, will have to investigate. I think only one minor change left for the config.cli template and this is good to go. |
Closes #138