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

[DRAFT] JGRP 1388/dns ping #335

Closed
wants to merge 2 commits into from

Conversation

slaskawi
Copy link
Collaborator

https://issues.jboss.org/browse/JGRP-2139

At this point please consider this PR as a draft. There is still some work to be done including:

  • documentation
  • DNS SRV entries

However, this is a running implementation of DNS PING that operates on Headless Services in Kubernetes (or OpenShift). In Kubernetes, a Headless Service is responsible for creating DNS entries for Containers. It creates multiple A entries for each host and multiple SRV entries for each port. Here's an example:

sh-4.2$ dig +search jgroups

; <<>> DiG 9.9.4-RedHat-9.9.4-38.el7_3 <<>> +search jgroups
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 38901
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;jgroups.			IN	A

;; Query time: 0 msec
;; SERVER: 192.168.0.17#53(192.168.0.17)
;; WHEN: Wed Dec 21 12:37:53 UTC 2016
;; MSG SIZE  rcvd: 25

sh-4.2$ dig +search jgroups-dns-ping.myproject.svc.cluster.local

; <<>> DiG 9.9.4-RedHat-9.9.4-38.el7_3 <<>> +search jgroups-dns-ping.myproject.svc.cluster.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40178
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;jgroups-dns-ping.myproject.svc.cluster.local. IN A

;; ANSWER SECTION:
jgroups-dns-ping.myproject.svc.cluster.local. 30 IN A 172.17.0.10
jgroups-dns-ping.myproject.svc.cluster.local. 30 IN A 172.17.0.3
jgroups-dns-ping.myproject.svc.cluster.local. 30 IN A 172.17.0.5
jgroups-dns-ping.myproject.svc.cluster.local. 30 IN A 172.17.0.6
jgroups-dns-ping.myproject.svc.cluster.local. 30 IN A 172.17.0.7

;; Query time: 0 msec
;; SERVER: 192.168.0.17#53(192.168.0.17)
;; WHEN: Wed Dec 21 12:38:13 UTC 2016
;; MSG SIZE  rcvd: 142

Unfortunately DNS A entries have no port assigned, so I'm assuming that all instances have the same configuration and reusing TP's port.

A working example that uses this protocol can be found here: https://github.com/slaskawi/jgroups-dns-ping-example

@belaban
Copy link
Owner

belaban commented Dec 22, 2016

OK, I merged this into master as the code is quite self-reliant and there were no changes to other code. I had to change the unit test slightly in order for it to pass.
Closing this for now. Please create another PR to update the code and add a section to the documentation.
Cheers

@belaban belaban closed this Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants