ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Buildfarm jobs can't access ros_buildfarm, ros_buildfarm_config repos

asked 2019-08-21 01:51:16 -0500

max-krichenbauer gravatar image


After setting deploying a buildfarm as outlined in the buildfarm_deployment and ros_buildfarm repository documentations, I noticed that most jobs fail with an error message similar to the following

python3 -u /home/jenkins-agent/workspace/Krel_arm_reconfigure-jobs/ros_buildfarm/scripts/release/ file:/tmp/deploy_ros_buildfarm/ros_buildfarm_config/index.yaml kinetic arm --distribution-repository-urls --distribution-repository-key-files /home/jenkins-agent/workspace/Krel_arm_reconfigure-jobs/keys/0.key --groovy-script /tmp/reconfigure_jobs/reconfigure_jobs.groovy --dockerfile-dir /home/jenkins-agent/workspace/Krel_arm_reconfigure-jobs/docker_generate_release_jobs

python3: can't open file '/home/jenkins-agent/workspace/Krel_arm_reconfigure-jobs/ros_buildfarm/scripts/release/': [Errno 2] No such file or directory

It seems like the jobs require scripts from the ros_buildfarm repo but can't find it.

To test, I manually copied the repo into one of the job's workspace directories.

That overcame the previous error, but then the job fails with

docker run --rm --cidfile=/home/jenkins-agent/workspace/Krel_reconfigure-jobs/docker_generate_release_jobs/docker.cid -e=GIT_BRANCH= --net=host -v /home/jenkins-agent/workspace/Krel_reconfigure-jobs/ros_buildfarm:/tmp/ros_buildfarm:ro -v /home/jenkins-agent/.buildfarm:/home/buildfarm/.buildfarm:ro -v /home/jenkins-agent/workspace/Krel_reconfigure-jobs/reconfigure_jobs:/tmp/reconfigure_jobs release_reconfigure_jobs

Traceback (most recent call last):
    File "/usr/lib/python3.5/urllib/", line 1410, in open_local_file
        stats = os.stat(localfile)

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/deploy_ros_buildfarm/ros_buildfarm_config/index.yaml'

The file /tmp/deploy_ros_buildfarm/ros_buildfarm_config/index.yaml does exist (and contains the proper settings), but I assume it is not accessible from the docker container.

Can someone please explain to me how the jobs expect to access ros_buildfarm and ros_buildfarm_config?

Thanks in advance!


edit retag flag offensive close merge delete



First thing to check: deployment was successful. Do this by checking the puppet log on all three hosts (master, repo and slave(s)). Any "error", "warning" or failure will lead to a partial deployment.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-21 04:45:46 -0500 )edit

After following gvdhoorn's suggestion about checking the deployment success here's a next step:

Each job is configured to check out its own copy of the ros_buildfarm scripts. If you can share the full build log for one of the failures before you manually changed the workspace it might contain hints about why the checkout didn't occur.

nuclearsandwich gravatar image nuclearsandwich  ( 2019-08-21 11:45:15 -0500 )edit

@gvdhoorn Thank you for your advice! I have checked the puppet log, and apart from some "deprecated" warnings at the beginning, there is one error message:

/Stage[main]/Profile::Jenkins::Master/Rosjenkins::Groovy[/tmp/configure_git_user.groovy]/Exec[/tmp/configure_git_user.groovy]/returns (notice): ERROR: Unexpected exception occurred while performing groovy command.

Any idea what this can mean? The only related settings in the deployment configuration are:

### GitHub pull-request builder settings
jenkins::github::username: ros-pull-request-builder
jenkins::github::token: somegithubtoken

which doesn't seem to relate or be required for the job. Do I have to have a github account to deploy the build farm?

max-krichenbauer gravatar image max-krichenbauer  ( 2019-08-21 19:02:03 -0500 )edit

@nuclearsandwich Thank you for the tip. I checked the log, but the job doesn't seem to check out anything. After outputting info about the used docker and issuing a warning about "no swap limit support", it only deletes and creates the docker_generae_release_jobs and reconfigure_jobs folders and then tries to run the command. No check-out or copying is performed.

I pasted the full log here:

max-krichenbauer gravatar image max-krichenbauer  ( 2019-08-21 19:07:49 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-21 22:10:33 -0500

max-krichenbauer gravatar image

I finally was able to get it to work.

The first issue was caused by an outdated git plugin in Jenkins. After updating all the plugins, the job started checking out ros_buildfarm from github and used it.

The second issue seems to be that when generating the jobs with ros_buildfarm's script, the job generation configuration of ros_buildfarm_config MUST be specified as an http link.

Before I had used: --commit file:/path/to/my/local/ros_buildfarm_config/index.yaml

but it seems the provided link is saved in the jobs, which won't be able to access the file system.

So it must be: --commit http://localhost_or_wherever/ros_buildfarm_config/index.yaml
edit flag offensive delete link more



Ah, yes. This was one of the first things I did wrong when just starting out.

This might actually be something to change in the various Python scripts in ros_buildfarm that accept these type of arguments. Just a check that no file:// URIs are being passed in, or at least a very noticable warning.

Could be nice PR @max-krichenbauer.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-22 02:33:19 -0500 )edit

Question Tools



Asked: 2019-08-21 01:51:16 -0500

Seen: 99 times

Last updated: Aug 21 '19