infra-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/INFRA-16417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16625792#comment-16625792
] 

ASF GitHub Bot commented on INFRA-16417:
----------------------------------------

GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-library/pull/159

    Jenkins docker: use non-root user

    Implementing part of the advice from infra in https://issues.apache.org/jira/browse/INFRA-16417
    
    ---
    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 https://github.com/aledsage/brooklyn-library fix-jenkins-build

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

    https://github.com/apache/brooklyn-library/pull/159.patch

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: https://issues.apache.org/jira/browse/INFRA-16417
>             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 https://git-wip-us.apache.org/repos/asf/brooklyn.git
> 	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
> 	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
> 	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160)
> 	at hudson.scm.SCM.checkout(SCM.java:495)
> 	at hudson.model.AbstractProject.checkout(AbstractProject.java:1202)
> 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
> 	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
> 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
> 	at hudson.model.Run.execute(Run.java:1724)
> 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
> 	at hudson.model.ResourceController.execute(ResourceController.java:97)
> 	at hudson.model.Executor.run(Executor.java:429)
> Caused by: hudson.plugins.git.GitException: Command "git config remote.origin.url https://git-wip-us.apache.org/repos/asf/brooklyn.git"
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 https://git-wip-us.apache.org/repos/asf/brooklyn-library.git
> ERROR: Failed to clean the workspace
> java.io.IOException: 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(Util.java:230)
> 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:555)
> 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
> 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
> 	at hudson.remoting.UserRequest.perform(UserRequest.java:207)
> 	at hudson.remoting.UserRequest.perform(UserRequest.java:53)
> 	at hudson.remoting.Request$2.run(Request.java:358)
> 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:748)
> 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(UnixException.java:84)
> 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
> 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
> 	at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
> 	at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
> 	at java.nio.file.Files.deleteIfExists(Files.java:1165)
> 	at hudson.Util.tryOnceDeleteFile(Util.java:290)
> 	at hudson.Util.tryOnceDeleteRecursive(Util.java:370)
> 	at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:389)
> 	at hudson.Util.tryOnceDeleteRecursive(Util.java:369)
> 	at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:389)
> 	at hudson.Util.deleteContentsRecursive(Util.java:225)
> 	... 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: https://builds.apache.org/view/B/view/Brooklyn/job/brooklyn-master-build-docker/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message