-
Notifications
You must be signed in to change notification settings - Fork 236
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
jnlp failing on Windows nodes due to dns resolution issues #264
Comments
I did a work around by overriding the JENKINS_URL and JENKINS_TUNNEL parameters in the pod template for now. and was able to successfully run the pipeline on a windows node.
|
Hi @salluvada Cheers |
@jakalkhalili the problem with my work around is that the name of the CR is hardcoded in the pipeline groovy scripts so if we deploy the jenkins with a different with a different name for the CR, it would break all the pipelines. Can the operator generated pods running the pipelines be generated with the fully qualified domain name for the Jenkins http service and the jenkin slave service? It is just that the ".svc.cluster.local" that is needed to be appended so that it is guaranteed to be resolved, as per https://github.com/kubernetes/dns/blob/master/docs/specification.md |
@salluvada The operator builds the names for the http and agent k8s services. I think the best solution will be to get the cluster domain in pod runtime like here https://stackoverflow.com/questions/52940774/kubernetes-how-to-check-current-domain-set-by-cluster-domain-from-pod. Would you like to contribute the fix for that? The modifications should be here kubernetes-operator/pkg/controller/jenkins/configuration/base/resources/service.go Line 33 in 7815e58
kubernetes-operator/pkg/controller/jenkins/configuration/base/resources/service.go Line 38 in 7815e58
|
@tomaszsek great. Thank you for your inputs. I will take a shot at it. |
@tomaszsek I think that is the wrong place to change the code. When the operator is creating the service, its name should not have the FQDN. but when the jnlp container is created while spinning up a pod to run a build, the service environment variables there should have FQDNs
The configuration for that is in the jenkins-kubnernetes plugin. is the operator configuring the plugin with these values? need to fix the code there. |
The changes should be done in the below file Line 190 in cc35dcf
I am going to add two new methods in the file service.go |
I have an EKS cluster with two nodegroups linux and windows. The jenkins build pipelines are running fine on linux but when I run a pipeline on windows nodes, the jnlp container keeps failing as it is not able to connect to the operator.
Below is the error I see in jnlp when I tail the logs.
The issue actually is because of resolving the dns name. When I run curl on a windows container, to the operator service url
http://jenkins-operator-http-example.default:8080
below is the output.But when I curl the FQDN of the operator service, I am able to get response.
What surprises me the most is that on the linux nodes, I am able to curl using
http://jenkins-operator-http-example.default:8080
and I am getting a response.Do you think it is a operator issue or is it more of an EKS issue? This is the last missing piece of me being able to successfully test out jenkins operator in a multi node group scenario with linux and windows nodes.
The text was updated successfully, but these errors were encountered: