mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 04:52:20 +00:00
[FIXED JENKINS-9230] Added unique instance identifier to UDP broadcast and DNS multicast.
This commit is contained in:
1 parent
7bf279422c
commit
f28409ee27
3 files changed
+8
No files matched your search
@@ -65,6 +65,9 @@ Upcoming changes</a>
|
||||
<li class=bug>
|
||||
Fixed a persistence problem in <tt>View$PropertyList</tt>
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9367">issue 9367</a>)
|
||||
<li class=bug>
|
||||
Added unique instance identifier to UDP broadcast and DNS multicast information.
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9230">issue 9230</a>)
|
||||
<li class=rfe>
|
||||
Maven agent needs a fix for the 'hardcoded' socket connection to localhost
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-6795">issue 6795</a>)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package hudson;
|
||||
|
||||
import hudson.model.Hudson;
|
||||
import hudson.Util;
|
||||
|
||||
import javax.jmdns.JmDNS;
|
||||
import javax.jmdns.ServiceInfo;
|
||||
@@ -39,6 +40,8 @@ public class DNSMultiCast implements Closeable {
|
||||
if (tal!=null)
|
||||
props.put("slave-port",String.valueOf(tal.getPort()));
|
||||
|
||||
props.put("server-id", Util.getDigestOf(hudson.getSecretKey()));
|
||||
|
||||
jmdns.registerService(ServiceInfo.create("_hudson._tcp.local.","hudson",
|
||||
80,0,0,props)); // for backward compatibility
|
||||
jmdns.registerService(ServiceInfo.create("_jenkins._tcp.local.","jenkins",
|
||||
|
||||
@@ -25,6 +25,7 @@ package hudson;
|
||||
|
||||
import hudson.model.Hudson;
|
||||
import hudson.util.OneShotEvent;
|
||||
import hudson.Util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.BindException;
|
||||
@@ -77,6 +78,7 @@ public class UDPBroadcastThread extends Thread {
|
||||
StringBuilder rsp = new StringBuilder("<hudson>");
|
||||
tag(rsp,"version",Hudson.VERSION);
|
||||
tag(rsp,"url",hudson.getRootUrl());
|
||||
tag(rsp,"server-id", Util.getDigestOf(hudson.getSecretKey()));
|
||||
tag(rsp,"slave-port",tal==null?null:tal.getPort());
|
||||
|
||||
for (UDPBroadcastFragment f : UDPBroadcastFragment.all())
|
||||
|
||||
Reference in new issue
Block a user