Skip to content

FISH-13174 Reimplement change-master-broker for Deployment Groups#8060

Open
Pandrex247 wants to merge 11 commits intopayara:FISH-8649-Remove-Clustersfrom
Pandrex247:FISH-13174-Reimplement-Change-Master-Broker
Open

FISH-13174 Reimplement change-master-broker for Deployment Groups#8060
Pandrex247 wants to merge 11 commits intopayara:FISH-8649-Remove-Clustersfrom
Pandrex247:FISH-13174-Reimplement-Change-Master-Broker

Conversation

@Pandrex247
Copy link
Copy Markdown
Member

Description

Reimplements the change-master-broker command and the supplemental classes to work with deployment groups.

Also removes some more dangling GMS references.
Also pulls in the OpenMQ update as without it the logs are extremely hard to read.

This will likely need further iteration - if nothing else the configure-jms-cluster command also still needs readding

Important Info

Blockers

N/A

Testing

New tests

None

Testing Performed

Testing has proven problematic - either my environment isn't set up correctly or even on vanilla main JMS clustering is broken ¯\_(ツ)_/¯ (or I'm missing some prerequisite steps).

The option to change a master broker for a config appears in the admin console now for instances in a deployment group (it only showed for clusters before).

The command also appears under a deployment group in the REST management interface.

For setting up clusters, it helps to ensure that your /etc/hosts file (C:\Windows\System32\drivers\etc\hosts for Windows) is set up such that the FQDN and IP address is the first entry or at the very least before localhost and the other loopback entries.

  • Start a clean domain
  • asadmin copy-config default-config Gruppy-config
  • asadmin set-hazelcast-configuration --memberGroup=GruppyShoal --target=Gruppy-config
  • Create an SSH node on two VMs (to act as remote machines) - I used HyperV
  • asadmin create-deployment-group Gruppy
  • asadmin create-instance --config Gruppy-config --deploymentgroup Gruppy --node vm-node-1 Insty1
  • asadmin create-instance --config Gruppy-config --deploymentgroup Gruppy --node vm-node-2 Insty2
  • Create a random other instance outside of the deployment group: asadmin create-local-instance --node localhost-domain1 Insty3
  • asadmin start-deployment-group Gruppy
  • Check that the two instances have successfully clustered, in both Hazelcast and in JMS
  • Set the master broker to Insty2: asadmin change-master-broker Insty2 - the command should succeed, and the instances will require restart, but you will likely see errors in the logs from OpenMQ: these happen for vanilla clusters on main as well following the equivalent instructions
  • Load the admin console and go to Configs > Gruppy-config > JMS
    • You should see a dropdown for selecting the master broker, and within it you should see blank, Insty1, and Insty2 (you should not see Insty3 or server)

Testing Environment

Windows 11, Zulu JDK 21.0.10, Maven 3.9.14
WSL OpenSUSE Tumbleweed
HyperV OpenSUSE Leap 16.0

Documentation

Later™

Notes for Reviewers

I have had to do some formatting on these classes - the indentation feels like it was done to offend me personally, I find them extremely hard to read as-is.

Restores the file from git history, reverting its deletion in 2b912e2

git checkout 2b912e2~1 appserver/jms/admin/src/main/java/org/glassfish/jms/admin/cli/ChangeMasterBrokerCommand.java

Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Most of these JMS classes have awful formatting!
…for Deployment Groups

Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Reapplies our outstanding patches and adds a couple of fixes to close the streams Payara is warning about

Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Copy link
Copy Markdown
Contributor

@breakponchito breakponchito left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants