infra-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (INFRA-16417) Brooklyn unstable builds
Date Mon, 24 Sep 2018 13:05:00 GMT


ASF GitHub Bot commented on INFRA-16417:

GitHub user aledsage opened a pull request:

    Jenkins docker: use non-root user

    Implementing part of the advice from infra in
    They advised we use `-u 910:910`, rather than the mvn command running as root in the container.

    Note that running the docker build on my local (mac) laptop, the user ids are interesting!
In the container, (which use bind mounts for `.m2` and and the workspace) are owned by root:root.
However, on my laptop, the files created are still owned by my own user.
    Magic?! I'm therefore not sure whether this change will make much difference.
    The other big change we need (not done here - I'll look at that next), recommended in
INFRA-16417, is to STOP bind mounting .m2. They said: "Please don't use a bind mount for filesystems
you intend to write to".

You can merge this pull request into a Git repository by running:

    $ git pull fix-jenkins-build

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #159
commit 5a9fc95a99cd7b21fe2de9707e4a3286a358635f
Author: Aled Sage <aled.sage@...>
Date:   2018-09-24T12:32:07Z

    Jenkins docker: use non-root user


> Brooklyn unstable builds
> ------------------------
>                 Key: INFRA-16417
>                 URL:
>             Project: Infrastructure
>          Issue Type: Bug
>          Components: Docker, Jenkins
>            Reporter: Thomas Bouron
>            Assignee: Chris Lambertus
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: Jun 2018
> Our builds became unstable recently with the following errors:
> ```
> ERROR: Error fetching remote repo 'origin'
> hudson.plugins.git.GitException: Failed to fetch from
> 	at hudson.plugins.git.GitSCM.fetchFrom(
> 	at hudson.plugins.git.GitSCM.retrieveChanges(
> 	at hudson.plugins.git.GitSCM.checkout(
> 	at hudson.scm.SCM.checkout(
> 	at hudson.model.AbstractProject.checkout(
> 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(
> 	at jenkins.scm.SCMCheckoutStrategy.checkout(
> 	at hudson.model.AbstractBuild$
> 	at hudson.model.Run.execute(
> 	at
> 	at hudson.model.ResourceController.execute(
> 	at
> Caused by: hudson.plugins.git.GitException: Command "git config remote.origin.url"
returned status code 4:
> stdout: 
> stderr: error: failed to write new configuration file /home/jenkins/jenkins-slave/workspace/brooklyn-master-build-docker/.git/config.lock
> ```
> OR
> ```
> Cloning repository
> ERROR: Failed to clean the workspace
> Unable to delete '/home/jenkins/jenkins-slave/workspace/brooklyn-library-master-docker'.
Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
> 	at hudson.Util.deleteContentsRecursive(
> 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(
> 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$
> 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$
> 	at hudson.remoting.UserRequest.perform(
> 	at hudson.remoting.UserRequest.perform(
> 	at hudson.remoting.Request$
> 	at hudson.remoting.InterceptingExecutorService$
> 	at
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(
> 	at java.util.concurrent.ThreadPoolExecutor$
> 	at
> Caused by: java.nio.file.AccessDeniedException: /home/jenkins/jenkins-slave/workspace/brooklyn-library-master-docker/target/checkstyle-checker.xml
> 	at sun.nio.fs.UnixException.translateToIOException(
> 	at sun.nio.fs.UnixException.rethrowAsIOException(
> 	at sun.nio.fs.UnixException.rethrowAsIOException(
> 	at sun.nio.fs.UnixFileSystemProvider.implDelete(
> 	at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(
> 	at java.nio.file.Files.deleteIfExists(
> 	at hudson.Util.tryOnceDeleteFile(
> 	at hudson.Util.tryOnceDeleteRecursive(
> 	at hudson.Util.tryOnceDeleteContentsRecursive(
> 	at hudson.Util.tryOnceDeleteRecursive(
> 	at hudson.Util.tryOnceDeleteContentsRecursive(
> 	at hudson.Util.deleteContentsRecursive(
> 	... 11 more
> ERROR: Error cloning remote repo 'origin'
> ```
> I tried to clean up the workspace as a workaround but got the following error: `An error
occurred processing your request. Ask your Jenkins administrator to look up details. ErrorID=b1b46869-b755-478e-b410-01a3a0c9017d`
> Any idea how I can fix this?
> Builds are executed inside docker containers. For that, I configured jenkins jobs to
build Brooklyn only on slaves with the tag ubuntu. Is there something I can improve in this
configuration? What we need is a slave with a docker engine but I'm not sure if all slaves
have that (and there is no docker tag)
> For reference, here is the link to the job that fails the most:

This message was sent by Atlassian JIRA

View raw message