[JIRA] (JENKINS-58794) Kubernetes plugin handling two JNLP agents

1 view
Skip to first unread message

mig.suarez49@gmail.com (JIRA)

unread,
Aug 2, 2019, 5:24:02 PM8/2/19
to jenkinsc...@googlegroups.com
Miguel Suarez created an issue
 
Jenkins / Improvement JENKINS-58794
Kubernetes plugin handling two JNLP agents
Issue Type: Improvement Improvement
Assignee: Carlos Sanchez
Components: kubernetes-plugin
Created: 2019-08-02 21:23
Environment: Jenkins 2.176.2
Priority: Minor Minor
Reporter: Miguel Suarez
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mig.suarez49@gmail.com (JIRA)

unread,
Aug 2, 2019, 5:39:04 PM8/2/19
to jenkinsc...@googlegroups.com
Miguel Suarez updated an issue
Change By: Miguel Suarez
Environment: Jenkins 2.176.2 , Kubernetes AKS 1.14 - preview, Jenkins installed from Helm, Kubernetes plugin 1.16.0
Hello, I have tested windows agents using the AKS 1.14 preview. I have created Windows and Linux agents successfully in different pipelines using the plugin by configuring a separate pod template with a jnlp container (for Windows) in the UI. I am trying to have two different containers (one for windows and one for linux) using pod specs from Git. Is this possible? I have been able to run the Jenkinsfile from here: [https://github.com/mluyo3414org/pod-templates] where one pod (linux based) is obtained from Git and one pod (windows based ) is obtained from the UI.  The jenkinsfile currently works fine as the label 'windows-test' is configured in the UI but when trying to use [https://github.com/mluyo3414org/pod-templates/blob/master/win/win-pod.yaml] it fails with:

25m Warning Failed pod/windows-q658k-sv952 Error: failed to start container "jnlp": Error response from daemon: container jnlp encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"CommandLine":"cat","User":"jenkins","WorkingDirectory":"C:\\Users\\jenkins\\Jenkins","Environment":{"AGENT_WORKDIR":"C:/Users/jenkins/Jenkins/Agent","HOME":"/home/jenkins","JAVA_BASE_URL":"https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u212-b04/OpenJDK8U-","JAVA_HOME":"C:\\openjdk-8","JAVA_URL_VERSION":"8u212b04","JAVA_VERSION":"8u212-b04","JENKINS_AGENT_NAME":"windows-q658k-sv952","JENKINS_AGENT_PORT":"tcp://10.0.103.127:50000","JENKINS_AGENT_PORT_50000_TCP":"tcp://10.0.103.127:50000","JENKINS_AGENT_PORT_50000_TCP_ADDR":"10.0.103.127","JENKINS_AGENT_PORT

slide.o.mix@gmail.com (JIRA)

unread,
Aug 2, 2019, 7:15:02 PM8/2/19
to jenkinsc...@googlegroups.com
Alex Earl commented on Improvement JENKINS-58794
 
Re: Kubernetes plugin handling two JNLP agents

Are you setting AGENT_WORKDIR via some environment for the container. Also, HOME looks like a Linux path, not a Windows path, not sure if that would cause any issues.

mig.suarez49@gmail.com (JIRA)

unread,
Aug 5, 2019, 3:32:03 PM8/5/19
to jenkinsc...@googlegroups.com
Change By: Miguel Suarez
Status: Open Fixed but Unreleased
Resolution: Not A Defect

mig.suarez49@gmail.com (JIRA)

unread,
Aug 5, 2019, 3:32:04 PM8/5/19
to jenkinsc...@googlegroups.com
Miguel Suarez commented on Improvement JENKINS-58794
 
Re: Kubernetes plugin handling two JNLP agents

Found my bug- I was running the cat command in the yaml. 

 

Error: failed to start container "jnlp": Error response from daemon: container jnlp encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info:

{"*CommandLine":"cat*","User":"jenkins","WorkingDirectory":"C:\\Users\\jenkins\\Jenkins","Environment":\{"AGENT_WORKDIR":"C:/Users/jenkins/Jenkins/Agent","HOME":"/home/jenkins","JAVA_BASE_URL":"https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u212-b04/OpenJDK8U-","JAVA_HOME":"C:\\openjdk-8","JAVA_URL_VERSION":"8u212b04","JAVA_VERSION":"8u212-b04","JENKINS_AGENT_NAME":"windows-jenkinsfile-f206f-85sqn","JENKINS_AGENT_PORT":"tcp://10.0.103.127:50000","JENKINS_AGENT_PORT_50000_TCP":"tcp://10.0.103.127:50000","JENKINS_AGENT_PORT_50000_TCP_ADDR":"10.0.103.127","JENKINS_AGENT_PORT_50000_TCP_PORT":"50000","JENKINS_AGENT_PORT_50000_TCP_PROTO":"tcp","JENKINS_AGENT_SERVICE_HOST":"10.0.103.127","JENKINS_AGENT_SERVICE_PORT":"50000","JENKINS_AGENT_SERVICE_PORT_SLAVELISTENER":"50000","JENKINS_NAME":"windows-jenkinsfile-f206f-85sqn","JENKINS_PORT":"tcp://10.0.180.187:8080","JENKINS_PORT_8080_TCP":"tcp://10.0.180.187:8080","JENKINS_PORT_8080_TCP_ADDR":"10.0.180.187","JENKINS_PORT_8080_TCP_PORT":"8080","JENKINS_PORT_8080_TCP_PROTO":"tcp","JENKINS_SECRET":"51f86dd9aaebf60f3a5915733104d7c5d69ef6c760130b8995c5df74273f4f7b","JENKINS_SERVICE_HOST":"10.0.180.187","JENKINS_SERVICE_PORT":"8080","JENKINS_SERVICE_PORT_HTTP":"8080","JENKINS_TUNNEL":"jenkins-agent:50000","JENKINS_URL":"http://jenkins:8080/","KUBERNETES_PORT":"tcp://10.0.0.1:443","KUBERNETES_PORT_443_TCP":"tcp://10.0.0.1:443","KUBERNETES_PORT_443_TCP_ADDR":"10.0.0.1","KUBERNETES_PORT_443_TCP_PORT":"443","KUBERNETES_PORT_443_TCP_PROTO":"tcp","KUBERNETES_SERVICE_HOST":"10.0.0.1","KUBERNETES_SERVICE_PORT":"443","KUBERNETES_SERVICE_PORT_HTTPS":"443"}

,"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[0,0]}

 

Now it works fine. FYI, Entire list of env variables from pod

 

 

msuarez@Miguels-MBP  ~/jenkins-world   master  kubectl exec -it windows-21r3v cmd.exe 
Microsoft Windows [Version 10.0.17763.615]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\home\jenkins>set
AGENT_WORKDIR=C:/Users/jenkins/Jenkins/Agent
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\jenkins\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=WINDOWS-21R3V
ComSpec=C:\Windows\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
HOME=/home/jenkins
JAVA_BASE_URL=https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u212-b04/OpenJDK8U-
JAVA_HOME=C:\openjdk-8
JAVA_URL_VERSION=8u212b04
JAVA_VERSION=8u212-b04
JENKINS_AGENT_NAME=windows-21r3v
JENKINS_AGENT_PORT=tcp://10.0.103.127:50000
JENKINS_AGENT_PORT_50000_TCP=tcp://10.0.103.127:50000
JENKINS_AGENT_PORT_50000_TCP_ADDR=10.0.103.127
JENKINS_AGENT_PORT_50000_TCP_PORT=50000
JENKINS_AGENT_PORT_50000_TCP_PROTO=tcp
JENKINS_AGENT_SERVICE_HOST=10.0.103.127
JENKINS_AGENT_SERVICE_PORT=50000
JENKINS_AGENT_SERVICE_PORT_SLAVELISTENER=50000
JENKINS_NAME=windows-21r3v
JENKINS_PORT=tcp://10.0.180.187:8080
JENKINS_PORT_8080_TCP=tcp://10.0.180.187:8080
JENKINS_PORT_8080_TCP_ADDR=10.0.180.187
JENKINS_PORT_8080_TCP_PORT=8080
JENKINS_PORT_8080_TCP_PROTO=tcp
JENKINS_SECRET=XXXXXXX
JENKINS_SERVICE_HOST=10.0.180.187
JENKINS_SERVICE_PORT=8080
JENKINS_SERVICE_PORT_HTTP=8080
JENKINS_TUNNEL=jenkins-agent:50000
JENKINS_URL=http://jenkins:8080/
KUBERNETES_PORT=tcp://10.0.0.1:443
KUBERNETES_PORT_443_TCP=tcp://10.0.0.1:443
KUBERNETES_PORT_443_TCP_ADDR=10.0.0.1
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT_443_TCP_PROTO=tcp
KUBERNETES_SERVICE_HOST=10.0.0.1
KUBERNETES_SERVICE_PORT=443
KUBERNETES_SERVICE_PORT_HTTPS=443
LOCALAPPDATA=C:\Users\jenkins\AppData\Local
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\openjdk-8\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\ContainerAdministrator\AppData\Local
\Microsoft\WindowsApps;C:\Users\jenkins\AppData\Local\Microsoft\WindowsApps
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3f02
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\jenkins\AppData\Local\Temp
TMP=C:\Users\jenkins\AppData\Local\Temp
USERDOMAIN=WINDOWS-21R3V
USERNAME=jenkins
USERPROFILE=C:\Users\jenkins
windir=C:\Windows

 

 

 

 

mig.suarez49@gmail.com (JIRA)

unread,
Aug 5, 2019, 3:33:02 PM8/5/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages