Repository navigation
Closed
Labels
Description
This time, the job failed, and then when we attempted to get job log, we got 403's. And sure enough,
within the test, we see that we are being authenticated as anonymous, which oc whoami -t not returning a valid token:
STEP: get token via whoami
May 7 10:17:58.536: INFO: Running 'oc whoami --config=/tmp/extended-test-jenkins-pipeline-bk2z1-x400d-user.kubeconfig --namespace=extended-test-jenkins-pipeline-bk2z1-x400d -t'
Retrieving Jenkins resource: "http://172.30.19.134:80//job/extended-test-jenkins-pipeline-bk2z1-x400d-openshift-jee-sample/1/consoleText"
<html><head><meta http-equiv='refresh' content='1;url=/securityRealm/commenceLogin?from=%2F%2Fjob%2Fextended-test-jenkins-pipeline-bk2z1-x400d-openshift-jee-sample%2F1%2FconsoleText'/><script>window.location.replace('/securityRealm/commenceLogin?from=%2F%2Fjob%2Fextended-test-jenkins-pipeline-bk2z1-x400d-openshift-jee-sample%2F1%2FconsoleText');</script></head><body style='background-color:white; color:white;'>
Authentication required
<!--
You are authenticated as: anonymous
Groups that you are in:
Permission you need to have (but didn't): hudson.model.Hudson.Read
... which is implied by: hudson.security.Permission.GenericRead
... which is implied by: hudson.model.Hudson.Administer
-->
</body></html>
Minimally, the user which instantiated the jenkins template and created the pods, etc. should have proper credentials set up.
Also, in the dump of the jenkins pod logs, I see none of the expected messages that we were able to read in the secrets mounted into the jenkins pod.
I've seen some messages about failures if mounting to pods in the master logs before with recent flakes, but could never correlate it time wise with our runs. This time though, there errors are more precise and damning for the namespace in question:
openshift.log:146252:E0507 08:43:30.512950 6308 secret.go:201] Couldn't get secret extended-test-jenkins-pipeline-bk2z1-7cjrf/deployer-token-tqh6d
openshift.log:146253:E0507 08:43:30.513027 6308 nestedpendingoperations.go:262] Operation for "\"kubernetes.io/secret/aa0c10c8-3322-11e7-b69e-0e2d300b6578-deployer-token-tqh6d\" (\"aa0c10c8-3322-11e7-b69e-0e2d300b6578\")" failed. No retries permitted until 2017-05-07 08:43:31.012998619 -0400 EDT (durationBeforeRetry 500ms). Error: MountVolume.SetUp failed for volume "kubernetes.io/secret/aa0c10c8-3322-11e7-b69e-0e2d300b6578-deployer-token-tqh6d" (spec.Name: "deployer-token-tqh6d") pod "aa0c10c8-3322-11e7-b69e-0e2d300b6578" (UID: "aa0c10c8-3322-11e7-b69e-0e2d300b6578") with: secret "extended-test-jenkins-pipeline-bk2z1-7cjrf"/"deployer-token-tqh6d" not registered
and
openshift.log:259074:E0507 09:05:16.691612 6308 kubelet.go:1554] Unable to mount volumes for pod "ruby-1-build_extended-test-jenkins-pipeline-bk2z1-f4krb(5c15d535-3325-11e7-b69e-0e2d300b6578)": timeout expired waiting for volumes to attach/mount for pod "extended-test-jenkins-pipeline-bk2z1-f4krb"/"ruby-1-build". list of unattached/unmounted volumes=[docker-socket builder-dockercfg-b3hvd-push builder-token-08xnf]; skipping pod
openshift.log:259075:I0507 09:05:16.691797 6308 server.go:345] Event(v1.ObjectReference{Kind:"Pod", Namespace:"extended-test-jenkins-pipeline-bk2z1-f4krb", Name:"ruby-1-build", UID:"5c15d535-3325-11e7-b69e-0e2d300b6578", APIVersion:"v1", ResourceVersion:"7485", FieldPath:""}): type: 'Warning' reason: 'FailedMount' Unable to mount volumes for pod "ruby-1-build_extended-test-jenkins-pipeline-bk2z1-f4krb(5c15d535-3325-11e7-b69e-0e2d300b6578)": timeout expired waiting for volumes to attach/mount for pod "extended-test-jenkins-pipeline-bk2z1-f4krb"/"ruby-1-build". list of unattached/unmounted volumes=[docker-socket builder-dockercfg-b3hvd-push builder-token-08xnf]
openshift.log:259076:E0507 09:05:16.691808 6308 pod_workers.go:182] Error syncing pod 5c15d535-3325-11e7-b69e-0e2d300b6578 ("ruby-1-build_extended-test-jenkins-pipeline-bk2z1-f4krb(5c15d535-3325-11e7-b69e-0e2d300b6578)"), skipping: timeout expired waiting for volumes to attach/mount for pod "extended-test-jenkins-pipeline-bk2z1-f4krb"/"ruby-1-build". list of unattached/unmounted volumes=[docker-socket builder-dockercfg-b3hvd-push builder-token-08xnf]
Activity
bparees commentedon May 8, 2017
if secrets aren't getting mounted into pods (and your analysis seems sound to me), let's start with @derekwaynecarr's team. hopefully it's a known upstream issue.
gabemontero commentedon May 9, 2017
@mfojtik just in case, fyi
drewhemm commentedon May 10, 2017
We've just hit the same error message when starting a build in OpenShift Enterprise 3.4.18:
It worked yesterday, so I'm not sure what has caused it. Any luck with mitigation or workarounds?
drewhemm commentedon May 10, 2017
I noticed that all the errors were coming from pods running on a single node, so I marked that node as unschedulable. Builds and deployments are now working on other pods. I've rebooted the troublesome node and will watch it for future failures. I also sent a sosreport to RH.
oatmealraisin commentedon May 10, 2017
This happened again today,
Jenkins logs
bparees commentedon May 17, 2017
fresh logs here:
https://ci.openshift.redhat.com/jenkins/job/test_branch_origin_extended_builds/64
bparees commentedon May 23, 2017
we're continuing to see issues w/ mounting secrets:
https://ci.openshift.redhat.com/jenkins/job/test_branch_origin_extended_builds/73/testReport/junit/(root)/Extended/_builds__Slow__openshift_pipeline_build_Pipeline_using_jenkins_client_plugin_should_build_and_complete_successfully/
bparees commentedon May 23, 2017
@derekwaynecarr is there anyone on your team who can shed some light on these mount failures?
liggitt commentedon May 31, 2017
the "secret not registered" error is from https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/secret/secret_manager.go#L204 which means the kubelet's view of secrets needed is not accurate
derekwaynecarr commentedon Jul 5, 2017
@joelsmith -- can you help triage further?
gabemontero commentedon Jul 6, 2017
If it helps, I have not seen this in our jenkins pipeline extended tests in the 2 weeks since we bumped the container memory limit. We were seeing a variety of intermittent, "lower level" issues in those tests that I concluded coincided with container level memory exhaustion.
I was running tests fairly regularly in #14013 and after a quick perusal, don't think we went 2 weeks without hitting this while still running at the lower memory limit for those tests.
If intermittent container memory exhaustion seems like a plausible reason for a failure like this, we could consider closing this as "environmental", or at least lowering the severity and monitoring our overnight jenkins tests a while longer to see if it still occurs.
Of course if this scenario warrants some investigation into more fault tolerance, retry, etc. in this path, I'll defer to the SME's here.
gabemontero commentedon Aug 3, 2017
I still have not seen this in our jenkins pipeline tests since the env change noted in #14093 (comment)
joelsmith commentedon Sep 6, 2017
We think we've tracked this down. We'll work on getting this upstream PR merged: kubernetes/kubernetes#52044 then backport to origin.
gabemontero commentedon Sep 6, 2017
Certainly a race condition like that could line up with the timing changes one might expect when we relaxed the memory resource constraints of our jenkins pipeline tests.
Thanks for the follow up.
joelsmith commentedon Oct 25, 2017
As it turns out, the bug that we thought we found wasn't a bug and the secrets not mounting error was a red herring. The log message happens when a pod is going away right at the same time that the volume manager is checking if it needs to mount anything. So I think that your theory about your pod needing more memory is a good one. If the pod was dying as a result of it not having enough resources, the error you saw would be likely to show up in the logs. I'm going to close this since I believe that the real issue is fixed thanks to the larger pod sizes.