Wait until all containers are in ready state before starting the slav… #93

Merged
merged 1 commit into from Nov 30, 2016

Projects

None yet

3 participants

@iocanel
iocanel commented Nov 29, 2016

…e or execute a script in container. Improve error messages.

+ };
+
+ try (Watch watch = client.pods().withName(podName).watch(podWatcher)) {
+ if (latch.await(5, TimeUnit.MINUTES)) {
@carlossg
carlossg Nov 29, 2016

Can you put the 5 in a System.getProperty(ContainerExecDecorator.class.getName()+".containerReadyTimeout","5"); ?

@iocanel iocanel Wait until all containers are in ready state before starting the slav…
…e or execute a script in container. Improve error messages.
4c368f9
@iocanel
iocanel commented Nov 29, 2016

@carlossg: pushed and squashed.

@carlossg carlossg merged commit 679eb1c into jenkinsci:master Nov 30, 2016

1 check passed

Jenkins This pull request looks good
Details
@JeanMertz

I'm not sure yet why, but this PR broke the plugin for me.

The build just hangs on the first sh command in the Jenkinsfile, and eventually times out with the error:

java.io.IOException: Failed to execute shell script inside container [instance-1] of pod [kubernetes-0b2a01ae3a4d4b4cb29e4dc8eceabe04-6e4c7c9e42b8f].
Timed out waiting for container to become ready!

The container was definitely ready, as I can see all containers in the pod marked as "Running" when inspecting the pods on Kubernetes.

Furthermore, the jnlp container logs shows a connection was established with Jenkins master.

@carlossg
carlossg commented Dec 1, 2016

yeah, there is a PR at #95 to try to solve it

@JeanMertz

Ah sorry, missed that one. Thank you for the pointer 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment