Open EmersonPrado opened 1 year ago
I guess I found the cause: defined types wildfly::jgroups::stack
, wildfly::jgroups::stack::tcp
, wildfly::jgroups::stack::tcpgossip
and wildfly::jgroups::stack::tcpping
have no profile
parameter, which is a required information for wildfly::resource
in domain mode.
I confirmed that in my Vagrant test setup, in branch resource_direct_calls. Long story short, I changed the calls to wildfly::jgroups::stack::tcpping
for the same wildfly::resource
calls they'd do, but adding the profile
parameter:
$mgmt_port = '9990'
$tcpp_port = '7600'
...
node /^controller/ {
class { 'wildfly':
mode => 'domain',
host_config => 'host-master.xml',
properties => {
'jboss.bind.address.management' => $controller_ip,
'jboss.management.http.port' => $mgmt_port, # Needed for wildfly::domain::server_group below
},
external_facts => true,
* => $wildfly_defaults,
}
wildfly::domain::server_group { ['main-server-group', 'other-server-group']:
ensure => absent,
}
wildfly::domain::server_group { 'app-server-group':
profile => 'full-ha',
socket_binding_group => 'full-ha-sockets',
}
wildfly::config::mgmt_user { 'managed':
password => 'whatever',
}
wildfly::resource { '/subsystem=jgroups/stack=tcpping':
recursive => true,
profile => 'full-ha',
content => {
'protocol' => wildfly::objectify([
'TCPPING',
'MERGE3',
{ 'FD_SOCK' => { 'socket-binding' => 'jgroups-tcp-fd' } },
'FD',
'VERIFY_SUSPECT',
'pbcast.NAKACK2',
'UNICAST3',
'pbcast.STABLE',
'pbcast.GMS',
'UFC',
'MFC',
'FRAG2',
'RSVP',
]),
'transport' => {
'TCP' => {
'socket-binding' => 'jgroups-tcp',
},
},
},
}
-> wildfly::resource { '/subsystem=jgroups/stack=tcpping/protocol=TCPPING':
profile => 'full-ha',
content => {
'properties' => {
'initial_hosts' => "${managed_ip}[${tcpp_port}]",
'timeout' => 3000,
'num_initial_members' => 1,
'port_range' => 0,
}
},
}
-> wildfly::resource { '/subsystem=jgroups':
profile => 'full-ha',
content => {
'default-stack' => 'tcpping',
},
}
}
node /^managed/ {
ensure_packages(['nmap'])
class { 'wildfly':
mode => 'domain',
host_config => 'host-slave.xml',
properties => {
'jboss.bind.address.management' => $managed_ip,
'jboss.domain.master.address' => $controller_ip,
},
secret_value => 'd2hhdGV2ZXIK', # Base64 encoding for 'whatever'
* => $wildfly_defaults,
}
wildfly::host::server_config { ['server-one', 'server-two']:
ensure => absent,
before => Class['wildfly::setup'],
}
wildfly::host::server_config { 'app':
server_group => 'app-server-group',
hostname => 'managed',
username => 'managed',
password => 'whatever',
require => Class['wildfly::install'],
}
}
So the proposed fix is just add the profile parameter in all affected defined types. I confirmed it's working with tcpping - didn't test tcpgossip, but added the same fix out of hope - with branch resource_with_profile_parameter of my Vagrant test fixture. In this test, I just added profile
parameter to tcpping
call for the domain controller, and left the same call intact for the standalone host:
node /^standalone/ {
...
wildfly::jgroups::stack::tcpping { 'TCPPING':
initial_hosts => "${standalone_ip}[${tcpp_port}]",
num_initial_members => 1,
}
}
node /^controller/ {
...
wildfly::jgroups::stack::tcpping { 'TCPPING':
initial_hosts => "${managed_ip}[${tcpp_port}]",
num_initial_members => 1,
profile => 'full-ha',
}
}
Next step is updating the affected tests, but I can't run them on my computer - my old OS (LMDE 4) couldn't catch the required versions for the test gems. Since the changes are quite straightforward, I'll try to add, then ask someone else to run them.
Description
I'm struggling to get a TCPPing-enabled JGroup with type
wildfly::jgroups::stack::tcpping
. Every Puppet run fails with:Indeed, there's no JGroup stack in Wildfly's profile setting:
I don't know if I'm missing some step or hitting a bug. This issue intends to find it out.
Test case
I set up a test environment with Vagrant, with a standalone server and a domain controller/managed server pair, the most similar I could get, both using
wildfly::jgroups::stack::tcpping
with the same minimal settings. All VMs are CentOS 7 (bento/centos-7 Vagrant box), tested with Puppet 5, 6 and 7, and with Wildfly 8, 9 and 10, with the same results.See below my Puppet main manifest. Further details in the test environment repo mentioned above.