jenkinsci / jenkinsci/implied-labels-plugin
[JENKINS-51252] redundant implied label causes slave reconnect loop
- Dominant language
- Java
- Stars
- 5
- Forks
- 10
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 1
Description
(See this comment for latest summary of this issue)
Specifying the label "windows" causes the client to go into reconnect loop as follows:
INFO: Attempting to connect to ....
May 10, 2018 1:17:30 PM hudson.plugins.swarm.SwarmClient getCsrfCrumb
SEVERE: Could not obtain CSRF crumb. Response code: 404
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: slave-010-9533db6e
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener
INFO: Jenkins agent is running in headless mode.
May 10, 2018 1:17:31 PM hudson.remoting.Engine startEngine
WARNING: No Working Directory. Using the legacy JAR Cache location:...
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [....]
May 10, 2018 1:17:31 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, CLI2-connect, JNLP-connect, Ping, CLI-connect, JNLP2-connect]
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
{{ Agent address: .....}}
{{ Agent port: 42442}}
{{ Identity: 2b:48:59:ed:b6:88:6b:da:b5:7c:ef:8e:f4:70:a6:41}}
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to tc-jenkins-master-001.eur.ad.sag:42442
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Remote identity confirmed: 2b:48:59:ed:b6:88:6b:da:b5:7c:ef:8e:f4:70:a6:41
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
May 10, 2018 1:17:32 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Terminated
May 10, 2018 1:17:32 PM hudson.plugins.swarm.Client run
INFO: Retrying in 10 seconds
This occurs whether using auto-discovery or if specifying -master. It behaves the same way with client 3.7 or 3.12. It doesn't matter if the label is specified on command line or in a labelsFile. There are no errors in the server log file.
The following command works:
java -Xrs -jar swarm-client-3.7.jar -mode exclusive -name slave-010 -e
xecutors 1 -labels "test test2 windows64"
The following command fails:
java -Xrs -jar swarm-client-3.7.jar -mode exclusive -name slave-010 -e
xecutors 1 -labels "test test2 windows"
This problem did not exist in Jenkins 2.98 and swarm plugin 3.7
---
Originally reported by
akom, imported from: redundant implied label causes slave reconnect loop
Raw content of original issue
(See this comment for latest summary of this issue)
Specifying the label "windows" causes the client to go into reconnect loop as follows:
INFO: Attempting to connect to ....
May 10, 2018 1:17:30 PM hudson.plugins.swarm.SwarmClient getCsrfCrumb
SEVERE: Could not obtain CSRF crumb. Response code: 404
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: slave-010-9533db6e
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
May 10, 2018 1:17:31 PM hudson.remoting.Engine startEngine
WARNING: No Working Directory. Using the legacy JAR Cache location:...
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [....]
May 10, 2018 1:17:31 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, CLI2-connect, JNLP-connect, Ping, CLI-connect, JNLP2-connect]
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
{{ Agent address: .....}}
{{ Agent port: 42442}}
{{ Identity: 2b:48:59:ed:b6:88:6b:da:b5:7c:ef:8e:f4:70:a6:41}}
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to tc-jenkins-master-001.eur.ad.sag:42442
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Remote identity confirmed: 2b:48:59:ed:b6:88:6b:da:b5:7c:ef:8e:f4:70:a6:41
May 10, 2018 1:17:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
May 10, 2018 1:17:32 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Terminated
May 10, 2018 1:17:32 PM hudson.plugins.swarm.Client run
INFO: Retrying in 10 secondsThis occurs whether using auto-discovery or if specifying -master. It behaves the same way with client 3.7 or 3.12. It doesn't matter if the label is specified on command line or in a labelsFile. There are no errors in the server log file.
The following command works:
java -Xrs -jar swarm-client-3.7.jar -mode exclusive -name slave-010 -e
xecutors 1 -labels "test test2 windows64"The following command fails:
java -Xrs -jar swarm-client-3.7.jar -mode exclusive -name slave-010 -e
xecutors 1 -labels "test test2 windows"
This problem did not exist in Jenkins 2.98 and swarm plugin 3.7
environment
```
Jenkins 2.121
Swarm plugin 3.12
Client: tested with swarm plugin 3.7 and 3.12
```
2 attachments
- [log-master.txt](https://issues.jenkins.io/secure/attachment/43552/log-master.txt)
- [log-slave.txt](https://issues.jenkins.io/secure/attachment/43554/log-slave.txt)
Contributor guide
Research direction
Start with the attached log-slave.txt and the SwarmClient run/getCsrfCrumb entries in the report, then reproduce the two commands with the implied-labels-plugin. Compare the working windows64 label with the failing windows label and trace how the implied label is handled. Done means the windows case connects without terminating and retrying.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100