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

Support MULTI_PING #27

Open
loganm27 opened this issue Nov 12, 2020 · 0 comments · May be fixed by #28
Open

Support MULTI_PING #27

loganm27 opened this issue Nov 12, 2020 · 0 comments · May be fixed by #28

Comments

@loganm27
Copy link

loganm27 commented Nov 12, 2020

MULTI_PING allows for multiple discovery protocols to be used in a configuration.
I have an application that needs to support multiple providers: Data Center (TCPPING\ MPING), AWS, GOOGLE_PING, and AZURE_PING Per the original use case of MULTI_PING: "Allow for multiple discovery protocols. This would allow us to use a single configuration which includes discovery protocols for multiple cloud providers." Also see: https://github.com/belaban/JGroups/blob/master/doc/manual/protocols.adoc#multiple-discovery-protocols-in-the-same-stack

I attempted to use it with AWS_PING. Unfortunately at initialization AWS_PING attempts to discover the EC2 Instance's identity and throws an exception if it cannot be found. This does not allow me to utilize MULTI_PING.
Catching and suppressing the exception would allow for MULTI_PING to be used.

Example stack:

<stack name="tcp">
    <transport type="TCP" socket-binding="jgroups-tcp"/>
    <socket-protocol type="MPING" socket-binding="jgroups-mping" />
    <protocol type="TCPPING">
        <property name="initial_hosts">host1[7600],host2[7600],host3[7600]</property>
    </protocol>
    <protocol type="com.meltmedia.jgroups.aws.AWS_PING" module="com.meltmedia.jgroups.jgroups-aws">
        <property name="port_number">7600</property>
        <property name="port_range">0</property>
        <property name="tags">stack_name,role</property>
        <property name="filters">instance-state-name=running</property>
    </protocol>
    <protocol type="MULTI_PING">
        <property name="async_discovery">true</property>
    </protocol>
    <protocol type="MERGE3"/>
    <socket-protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
    <protocol type="FD_ALL"/>
    <protocol type="VERIFY_SUSPECT"/>
    <protocol type="pbcast.NAKACK2"/>
    <protocol type="UNICAST3"/>
    <protocol type="pbcast.STABLE"/>
    <protocol type="pbcast.GMS"/>
    <protocol type="MFC"/>
    <protocol type="FRAG3"/>
</stack>

Expected behavior: If not in AWS MPING or TCPPING would be used in the Data Center.
Actual behavior: When not in AWS, AWS_PING throws an exception and Wildfly fails to use the other JGroups discovery protocols

@loganm27 loganm27 linked a pull request Nov 12, 2020 that will close this issue
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 a pull request may close this issue.

1 participant