You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[builds][Slow] openshift pipeline build Pipeline with maven slave [It] should build and complete successfully #13984
OK, grepping on the build config openshift-jee-sample-docker in the master log, there are only gets on the bc, which I think can all be attributed to config_controller.go, and then the delete of the resource when the test ends and the namespace is cleaned up:
In other words, no POSTs that would have occured if the build config instantiatebinary endpoint had bubbled up to the master's audit.go or wrap.go level.
So things to pursue:
is there lower level networking type trace possible on either client or master side within the context of our extended tests running on jenkins,
traversing through the k8s rest client code, I see a very sparse sprinkling of glog.V(4) trace; we could try adding a --loglevel=10 to the oc start-build in the maven test, and see if that reveals anything
I'll start a PR for 2), and start asking around about 1)
The jenkins logs also has repeated connection exceptions thrown,
May 03, 2017 1:37:30 PM io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager nextReconnectInterval
INFO: Current reconnect backoff is 1000 milliseconds (T0)
May 03, 2017 1:37:30 PM io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager closeWebSocket
WARNING: Failed to write websocket close message: class java.net.SocketException Socket is closed
May 03, 2017 1:37:30 PM io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$2 onFailure
WARNING: Exec Failure
java.net.SocketException: Connection closed by remote host
at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1565)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:71)
at okio.Okio$1.write(Okio.java:78)
at okio.AsyncTimeout$1.write(AsyncTimeout.java:180)
at okio.RealBufferedSink.emit(RealBufferedSink.java:178)
at okhttp3.internal.ws.WebSocketWriter.writeControlFrameSynchronized(WebSocketWriter.java:152)
at okhttp3.internal.ws.WebSocketWriter.writePing(WebSocketWriter.java:79)
at okhttp3.internal.ws.RealWebSocket.sendPing(RealWebSocket.java:143)
at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$2$1.execute(WatchConnectionManager.java:171)
at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$NamedRunnable.run(WatchConnectionManager.java:424)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
In chatting with @oatmealraisin and digesting the data he noted, of particular interest to me was:
ERROR: Error during describe;
{reference={}, err=Unable to connect to the server: net/http: TLS handshake timeout, verb=describe, cmd=oc describe serviceaccount --server=https://172.30.0.1:443 --namespace=extended-test-jenkins-pipeline-3spsj-q825m --token=XXXXX , out=, status=1}
Is exactly like the error seen previously with oc start-build, only with oc describe this time.
I agree the java side exceptions @oatmealraisin noted seem similar.
We'll have to consider when diving into this more whether this issue is somehow Jenkins/JVM specific, or if the Jenkins/JVM scenario is surfacing a new instability in openshift/origin.
Possible correlation ... in debugging some new unit tests, if an api object was invalid, rather than getting a validation error, I got a tls handshake error:
--- FAIL: TestSetPipelineBuild (0.00s)
logs_test.go:111: &{{ } { 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] } {{ <nil> <nil> <nil> {map[] map[]} map[] map[] <nil>} 0 [] 0 <nil> false false map[] <nil>} {0 0 0 0 0 0 <nil> [] 0}}, unexpected results isPipeline false JenkinsLogs true
2017-05-03 13:02:29.801786 I | http: TLS handshake error from 127.0.0.1:48424: EOF
2017-05-03 13:02:29.819717 I | http: TLS handshake error from 127.0.0.1:49948: EOF
Tag yourproject/rails:tip set to openshift/ruby:latest.
Tag yourproject/rails:tip set to openshift/ruby:2.0.
Deleted tag yourproject/rails:tip.
Tag yourproject/rails:tip set to openshift/ruby:2.0.
Tag yourproject/rails:tip set to openshift/ruby:2.0.
Deleted tag yourproject/rails:tip.
FAIL
I wonder if at least for the failed oc calls, if some other error is getting masked as tls handshake ....
I am seeing another flavor of this test failing. Specifically, it looks like the oc start-build --follow is not exiting because of the --follow. I've seen this when running oc start-build openshift-jee-sample-docker --follow manually. The build finished but the oc ... --follow does not exit and I have to control-c.
I've also reproduced this locally/manually in jenkins deployed in openshift. It is not everytime, but has happened more than once.
Also, on the point of "what might have changed" ... we did update the oc client in the jenkins image late last week: see openshift/jenkins@d48c23c
I wonder if that is at least part of the instability we've seen, at least in the cases where invocations of oc are involved (which includes our extended tests and the openshift-client plugin). It would exclude sync plugin / fabric8 ssl comm issues, and the master seeing readiness check failures for the jenkins pod.
UPDATE: switching --follow to --wait in the example maven pipeline template has the job passing consistently now in my local env (vs. the --follow version hanging at least half the time).
We don't use spdy for retrieving logs. Only exec, attach, and portforward.
There is a kube PR to fix an issue where --follow wouldn't stop when the container exited, but as best I can tell, it only applies to the json-file docker log driver. kubernetes/kubernetes#44406.
If you start a pod that does something like print out the date every second for five or ten seconds before terminating, and then in another terminal run oc logs mypod -f, does it stop following, or does it hang waiting for more logs?
On Thu, May 4, 2017 at 8:19 PM Andy Goldstein ***@***.***> wrote:
We don't use spdy for retrieving logs. Only exec, attach, and portforward.
There is a kube PR to fix an issue where --follow wouldn't stop when the
container exited, but as best I can tell, it only applies to the json-file
docker log driver. kubernetes/kubernetes#44406
<kubernetes/kubernetes#44406>.
If you start a pod that does something like print out the date every
second for five or ten seconds before terminating, and then in another
terminal run oc logs mypod -f, does it stop following, or does it hang
waiting for more logs?
The frequency of logging was similar to what you described, and it hangs
waiting for more logs. In other words The pod was done generating output
(for an openshift build in our case), and all the logs showed where the
--follow was employed.
The build pod / container had exited as well.
Would you have time to try to reproduce with the smallest example possible,
like what I described above with just a simple pod?
On Thu, May 4, 2017 at 8:34 PM, Gabe Montero <[email protected]>
wrote:
On Thu, May 4, 2017 at 8:19 PM Andy Goldstein ***@***.***>
wrote:
> We don't use spdy for retrieving logs. Only exec, attach, and
portforward.
>
> There is a kube PR to fix an issue where --follow wouldn't stop when the
> container exited, but as best I can tell, it only applies to the
json-file
> docker log driver. kubernetes/kubernetes#44406
> <kubernetes/kubernetes#44406>.
>
> If you start a pod that does something like print out the date every
> second for five or ten seconds before terminating, and then in another
> terminal run oc logs mypod -f, does it stop following, or does it hang
> waiting for more logs?
>
The frequency of logging was similar to what you described, and it hangs
waiting for more logs. In other words The pod was done generating output
(for an openshift build in our case), and all the logs showed where the
--follow was employed.
The build pod / container had exited as well.
> —
> You are receiving this because you were assigned.
> Reply to this email directly, view it on GitHub
> <#13984 (comment)
>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
ADbadNX55nY4ysfpQcgCHRz0XR8Pq7omks5r2msYgaJpZM4NNaF8>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13984 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAABYpQw3zW8qfKdOmCQcqBCejUW0ai3ks5r2m6SgaJpZM4NNaF8>
.
Separate from the --follow item discussed here, on the debug front For the TLS issues I'm planning to
ramp the extended test scope ... the focused scope has been too successful
on the jenkins image commit I noted earlier, in addition to a bump in oc version there was a bump in jenkins version; assuming I can get at least intermittent failures I am the going to run with custom jenkins images that revert first jenkins, then oc, and see if that has bearing
On Thu, May 4, 2017 at 8:36 PM Andy Goldstein <[email protected]>
wrote:
Would you have time to try to reproduce with the smallest example possible,
like what I described above with just a simple pod?
Sure. I've got some diagnostic ideas I just posted for the more prevalent
TLS comm errors, but when I get done with those I'll circle back and try a
simple pod.
This is at some level I built yesterday (with a debug commit on top).
This particular pod ends up error'ing out after running for a bit, but since I've seen this occur repeatedly with both pods that complete after a while and pods that error out after a while, I figured it wasn't worth debugging this sample further.
I'm going to rebase / rebuild my origin in a sec from latest master, to see if the error still occurs. I'll report the finding when I have them.
@gabemontero I haven't tested with a build pod, but I have tested with a simple centos:centos7, and the oc logs -f command terminates as soon as the container exits.
@ncdc yep ther is an intermittent nature to this. I've seen it
consistently on my fedora 25 laptop but only occasionally in our extended
tests on ci.openshift. Not sure how to pin down the environmental
differences.
On Fri, May 5, 2017 at 1:30 PM Gabe Montero ***@***.***> wrote:
On Fri, May 5, 2017 at 1:22 PM Andy Goldstein ***@***.***>
wrote:
> @gabemontero <https://github.com/gabemontero> I haven't tested with a
> build pod, but I have tested with a simple centos:centos7, and the oc
> logs -f command terminates as soon as the container exits.
>
@ncdc yep ther is an intermittent nature to this. I've seen it
consistently on my fedora 25 laptop but only occasionally in our extended
tests on ci.openshift. Not sure how to pin down the environmental
differences.
Perhaps I should see if I can induce a golang thread dump on the oc logs on
my system ....would that be of any use?
Definitely. `kill -3`. You may need to redirect the output of `oc logs` to
a file in case the thread dump overflows your terminal scrollback.
On Fri, May 5, 2017 at 1:36 PM, Gabe Montero <[email protected]>
wrote:
Other than goroutine 72, everything else is blocked on IO or semaphores down in golang code.
The comment before the channel select in the apimachinery code was ominous at first glance:
// NOTE: b/c there is no priority selection in golang
// it is possible for this to race, meaning we could
// trigger t.C and stopCh, and t.C select falls through.
// In order to mitigate we re-check stopCh at the beginning
// of every loop to prevent extra executions of f().
Though that logic has not changed in a while if I'm reading git blame correctly.
Here is my go version: go version go1.7.3 linux/amd64
first blush, smells like a golang issue
(admittedly novice) opinion, I would contend some defensive programming is in order, and that the call to io.Copy in k8s.io/kubernetes/pkg/kubectl/cmd.LogsOptions.getLogs should be coupled with a select/channel/timer so we don't block forever ... thoughts?
UPDATE (May 11) - upgraded to go1.7.5, no affect on my local runs of oc logs -f.
Older PR test and overnight failures have been pruned, but between the debug runs in #14013, a recent overnight run that resulted in #14093,
and @coreydaley 's failure noted in #14084, I'm not seeing the common thread of volume mount issues. In the case of the client plugin, they result in the mongodb deployment failing. Here is a snippet from @coreydaley 's run cataloged in #14084:
May 5 15:48:46.203: INFO: At 2017-05-05 15:42:23.452467294 -0400 EDT - event for jenkins-1-deploy: {kubelet 172.18.0.186} FailedMount: Unable to mount volumes for pod "jenkins-1-deploy_extended-test-jenkins-pipeline-n2w9s-r8pf3(99bb5368-31ca-11e7-ab80-0e76db0f9e3c)": timeout expired waiting for volumes to attach/mount for pod "extended-test-jenkins-pipeline-n2w9s-r8pf3"/"jenkins-1-deploy". list of unattached/unmounted volumes=[deployer-token-0qmcm]
May 5 15:48:46.203: INFO: At 2017-05-05 15:42:23.452535031 -0400 EDT - event for jenkins-1-deploy: {kubelet 172.18.0.186} FailedSync: Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "extended-test-jenkins-pipeline-n2w9s-r8pf3"/"jenkins-1-deploy". list of unattached/unmounted volumes=[deployer-token-0qmcm]
May 5 15:48:46.203: INFO: At 2017-05-05 15:42:30.954662138 -0400 EDT - event for mongodb-1-77ttj: {kubelet 172.18.0.186} Started: Started container with id 428c475c64b8b41904775b28744ca7793090960feb08376ccfd54dd5f8a60677
May 5 15:48:46.203: INFO: At 2017-05-05 15:42:53.009580387 -0400 EDT - event for mongodb-1-deploy: {kubelet 172.18.0.186} Killing: Killing container with id docker://95b68fb656cf1c0c17e542ab73123629e84885caae3cc6133bcc673864b6b479:Need to kill Pod
May 5 15:48:46.203: INFO: At 2017-05-05 15:44:52.985650286 -0400 EDT - event for mongodb-1-deploy: {kubelet 172.18.0.186} FailedMount: Unable to mount volumes for pod "mongodb-1-deploy_extended-test-jenkins-pipeline-n2w9s-r8pf3(c7fe9baa-31ca-11e7-ab80-0e76db0f9e3c)": timeout expired waiting for volumes to attach/mount for pod "extended-test-jenkins-pipeline-n2w9s-r8pf3"/"mongodb-1-deploy". list of unattached/unmounted volumes=[deployer-token-0qmcm]
May 5 15:48:46.203: INFO: At 2017-05-05 15:44:52.985704605 -0400 EDT - event for mongodb-1-deploy: {kubelet 172.18.0.186} FailedSync: Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "extended-test-jenkins-pipeline-n2w9s-r8pf3"/"mongodb-1-deploy". list of unattached/unmounted volumes=[deployer-token-0qmcm]
I'm not ready to close this issue out in lieu of #14093 until
a) we get a good week or so of runs where a failure occurs and this apparent mount issues is not in play ... though admittedly, it is entirely conceivable that these were present in the older runs and I just missed them / wasn't cognizant enough earlier on to look for them
b) the oc logs | oc start-build --follow not returning phenomenon is still in theory pending ... minimally, as a fall back I'm thinking we switch the oc start-build --follow to oc start-build --wait in our jee jenkins pipeline sample
Activity
stevekuznetsov commentedon May 1, 2017
Dupe of #13983
stevekuznetsov commentedon May 2, 2017
/cc @gabemontero
gabemontero commentedon May 2, 2017
OK, grepping on the build config
openshift-jee-sample-dockerin the master log, there are only gets on the bc, which I think can all be attributed toconfig_controller.go, and then the delete of the resource when the test ends and the namespace is cleaned up:In other words, no POSTs that would have occured if the build config instantiatebinary endpoint had bubbled up to the master's
audit.goorwrap.golevel.So things to pursue:
glog.V(4)trace; we could try adding a--loglevel=10to theoc start-buildin the maven test, and see if that reveals anythingI'll start a PR for 2), and start asking around about 1)
oatmealraisin commentedon May 3, 2017
Another failure in the extended tests today.
An excerpt from the build logs shows some networking issues
The jenkins logs also has repeated connection exceptions thrown,
gabemontero commentedon May 3, 2017
In chatting with @oatmealraisin and digesting the data he noted, of particular interest to me was:
Is exactly like the error seen previously with
oc start-build, only withoc describethis time.I agree the java side exceptions @oatmealraisin noted seem similar.
We'll have to consider when diving into this more whether this issue is somehow Jenkins/JVM specific, or if the Jenkins/JVM scenario is surfacing a new instability in openshift/origin.
gabemontero commentedon May 3, 2017
Possible correlation ... in debugging some new unit tests, if an api object was invalid, rather than getting a validation error, I got a tls handshake error:
I wonder if at least for the failed
occalls, if some other error is getting masked as tls handshake ....gabemontero commentedon May 4, 2017
I am seeing another flavor of this test failing. Specifically, it looks like the
oc start-build --followis not exiting because of the--follow. I've seen this when runningoc start-build openshift-jee-sample-docker --followmanually. The build finished but theoc ... --followdoes not exit and I have to control-c.I've also reproduced this locally/manually in jenkins deployed in openshift. It is not everytime, but has happened more than once.
Also, on the point of "what might have changed" ... we did update the oc client in the jenkins image late last week: see openshift/jenkins@d48c23c
I wonder if that is at least part of the instability we've seen, at least in the cases where invocations of
ocare involved (which includes our extended tests and the openshift-client plugin). It would exclude sync plugin / fabric8 ssl comm issues, and the master seeing readiness check failures for the jenkins pod.@bparees wdyt ^^
UPDATE: switching
--followto--waitin the example maven pipeline template has the job passing consistently now in my local env (vs. the--followversion hanging at least half the time).gabemontero commentedon May 4, 2017
Also note,
oc logsreally defers to k8s logs for the actual streaming, etc. It potentially could have been impacted by the rebase.stevekuznetsov commentedon May 5, 2017
@ncdc could probably weigh in on
kubectl logsand/orspdystreamncdc commentedon May 5, 2017
We don't use spdy for retrieving logs. Only exec, attach, and portforward.
There is a kube PR to fix an issue where --follow wouldn't stop when the container exited, but as best I can tell, it only applies to the json-file docker log driver. kubernetes/kubernetes#44406.
If you start a pod that does something like print out the date every second for five or ten seconds before terminating, and then in another terminal run
oc logs mypod -f, does it stop following, or does it hang waiting for more logs?gabemontero commentedon May 5, 2017
ncdc commentedon May 5, 2017
gabemontero commentedon May 5, 2017
Separate from the --follow item discussed here, on the debug front For the TLS issues I'm planning to
gabemontero commentedon May 5, 2017
gabemontero commentedon May 5, 2017
@ncdc - here is what I believe is a simple pod example:
pod.json.zip
Details on my locally build origin:
This is at some level I built yesterday (with a debug commit on top).
This particular pod ends up error'ing out after running for a bit, but since I've seen this occur repeatedly with both pods that complete after a while and pods that error out after a while, I figured it wasn't worth debugging this sample further.
I'm going to rebase / rebuild my origin in a sec from latest master, to see if the error still occurs. I'll report the finding when I have them.
thanks
gabemontero commentedon May 5, 2017
@ncdc - hey, still happens for me after rebasing this moring.
version particulars:
And it is probably obvious, but to be clear, I ran:
oc create -f pods.jsonoc logs -f pods/openshift-jee-sample-docker-1-buildthanks
ncdc commentedon May 5, 2017
@gabemontero I haven't tested with a build pod, but I have tested with a simple centos:centos7, and the
oc logs -fcommand terminates as soon as the container exits.gabemontero commentedon May 5, 2017
gabemontero commentedon May 5, 2017
ncdc commentedon May 5, 2017
gabemontero commentedon May 5, 2017
@ncdc here is the thread dump:
thread-dump.txt
Other than goroutine 72, everything else is blocked on IO or semaphores down in golang code.
The comment before the channel select in the apimachinery code was ominous at first glance:
Though that logic has not changed in a while if I'm reading
git blamecorrectly.Here is my go version: go version go1.7.3 linux/amd64
first blush, smells like a golang issue
(admittedly novice) opinion, I would contend some defensive programming is in order, and that the call to
io.Copyink8s.io/kubernetes/pkg/kubectl/cmd.LogsOptions.getLogsshould be coupled with a select/channel/timer so we don't block forever ... thoughts?UPDATE (May 11) - upgraded to go1.7.5, no affect on my local runs of
oc logs -f.gabemontero commentedon May 8, 2017
Older PR test and overnight failures have been pruned, but between the debug runs in #14013, a recent overnight run that resulted in #14093,
and @coreydaley 's failure noted in #14084, I'm not seeing the common thread of volume mount issues. In the case of the client plugin, they result in the mongodb deployment failing. Here is a snippet from @coreydaley 's run cataloged in #14084:
I'm not ready to close this issue out in lieu of #14093 until
a) we get a good week or so of runs where a failure occurs and this apparent mount issues is not in play ... though admittedly, it is entirely conceivable that these were present in the older runs and I just missed them / wasn't cognizant enough earlier on to look for them
b) the
oc logs|oc start-build --follownot returning phenomenon is still in theory pending ... minimally, as a fall back I'm thinking we switch theoc start-build --followtooc start-build --waitin our jee jenkins pipeline samplegabemontero commentedon May 11, 2017
FYI - broke out the log following thread here to separate issue #14148
gabemontero commentedon Jun 21, 2017
the latest findings in #14013 are pointing toward a solution for this issue
if the trend in the PR continues for another day or so, I'll rebrand it as a fix