Skip to content

Bad Image for Jenkins Master Slave Example #10914

Closed

Description

@oatmealraisin

In the Jenkins Master-Slave example, the given steps produce an error in the Jenkins sample build.

Version
oc version
oc v1.3.0-alpha.3+7bb3e69-dirty
kubernetes v1.3.0+52492b4
features: Basic-Auth

Server https://10.192.216.108:8443
openshift v1.3.0-alpha.3
kubernetes v1.3.0+507d3a7
Steps To Reproduce

Go through the steps in the Master Slave example

Current Result
Started by user Jenkins Admin
Building remotely on ruby-22-centos7-jenkins-slave-a1c16dfb5d5a (ruby-22-centos7) in workspace /opt/app-root/jenkins/workspace/ruby-hello-world-test
java.io.IOException: Failed to mkdirs: /opt/app-root/jenkins/workspace/ruby-hello-world-test
    at hudson.FilePath.mkdirs(FilePath.java:1163)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1267)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1738)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE
Expected Result

Successful build

Additional Information

I've been able to work around this by adding lines to the Slave Dockerfile that create the needed directories, but this might not be the "right" solution

@mfojtik @gabemontero @bparees

Activity

  1. bparees commented on Sep 14, 2016

    @bparees
    Contributor

    i think the right fix is that in the master jenkins image, this:
    https://github.com/openshift/jenkins/blob/master/1/contrib/jenkins/kube-slave-common.sh#L78-L91

    should be setting a remote working directory to a writable location like this does:
    https://github.com/openshift/jenkins/blob/master/1/contrib/jenkins/kube-slave-common.sh#L125

    can you try building and running a new jenkins master with that change? Or just go to manage jenkins and edit the podtemplate definition that should be showing up on your master(under the kubernetes cloud plugin section), and put in "/tmp" as the remote filesystem and then run the build again. That should confirm it.

  2. oatmealraisin commented on Sep 14, 2016

    @oatmealraisin
    Author

    @bparees Changing the remote volume from within Jenkins worked, trying to get the change by updating the Jenkins image

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions