Skip to content
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

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

Merged
merged 1 commit into from
Nov 30, 2016

Conversation

iocanel
Copy link
Contributor

@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)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

…e or execute a script in container. Improve error messages.
@iocanel
Copy link
Contributor Author

iocanel commented Nov 29, 2016

@carlossg: pushed and squashed.

@carlossg carlossg merged commit 679eb1c into jenkinsci:master Nov 30, 2016
@JeanMertz
Copy link
Contributor

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
Copy link
Contributor

carlossg commented Dec 1, 2016

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

@JeanMertz
Copy link
Contributor

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants