mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-31 13:35:19 +00:00
Fix advertised JNLP Port
As far as I can figure, the /TcpSlaveAgentListener/ endpoint headers tell the slaves what the JNLP port is. When I'm running jenkins behind a proxy (marathon using the mesos plugin, which bridged networking), even though I was setting the advertised port per a thread[1], it was not accurately being returned in the header. This patch fixes that. [1] https://groups.google.com/d/topic/jenkins-mesos/qUrXpDY07TQ/discussion
This commit is contained in:
1 parent
a5bede84e6
commit
6fe31014d8
3 files changed
+10
-3
No files matched your search
@@ -1925,7 +1925,7 @@ public class Functions {
|
||||
|
||||
TcpSlaveAgentListener tal = j.tcpSlaveAgentListener;
|
||||
if (tal !=null) {
|
||||
int p = TcpSlaveAgentListener.CLI_PORT !=null ? TcpSlaveAgentListener.CLI_PORT : tal.getPort();
|
||||
int p = tal.getAdvertisedPort();
|
||||
rsp.setIntHeader("X-Hudson-CLI-Port", p);
|
||||
rsp.setIntHeader("X-Jenkins-CLI-Port", p);
|
||||
rsp.setIntHeader("X-Jenkins-CLI2-Port", p);
|
||||
|
||||
Reference in new issue
Block a user