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

Projects
None yet
3 participants
@iocanel

iocanel commented Nov 29, 2016

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

Show outdated Hide outdated ...csanchez/jenkins/plugins/kubernetes/pipeline/ContainerExecDecorator.java
};
try (Watch watch = client.pods().withName(podName).watch(podWatcher)) {
if (latch.await(5, TimeUnit.MINUTES)) {

This comment has been minimized.

@carlossg

carlossg Nov 29, 2016

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

@carlossg

carlossg Nov 29, 2016

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

This comment has been minimized.

Wait until all containers are in ready state before starting the slav…
…e or execute a script in container. Improve error messages.
@iocanel

This comment has been minimized.

Show comment
Hide comment
@iocanel

iocanel Nov 29, 2016

@carlossg: pushed and squashed.

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

This comment has been minimized.

Show comment
Hide comment
@JeanMertz

JeanMertz Dec 1, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@carlossg

carlossg Dec 1, 2016

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

carlossg commented Dec 1, 2016

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

@JeanMertz

This comment has been minimized.

Show comment
Hide comment
@JeanMertz

JeanMertz Dec 1, 2016

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

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