Ask Your Question
0

Buildfarm jobs can't access ros_buildfarm, ros_buildfarm_config repos

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

max-krichenbauer gravatar image

Hello!

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/run_release_reconfigure_job.py file:/tmp/deploy_ros_buildfarm/ros_buildfarm_config/index.yaml kinetic arm --distribution-repository-urls http://packages.ros.org/ros/ubuntu --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/run_release_reconfigure_job.py': [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/request.py", 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!

Max

edit retag flag offensive close merge delete

Comments

1

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 imagegvdhoorn ( 2019-08-21 04:45:46 -0500 )edit
1

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 imagenuclearsandwich ( 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 imagemax-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: https://pastebin.com/8W6wHdF5

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

1 Answer

Sort by ยป oldest newest most voted
0

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 generate_all_jobs.py script, the job generation configuration of ros_buildfarm_config MUST be specified as an http link.

Before I had used:

generate_all_jobs.py --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:

generate_all_jobs.py --commit http://localhost_or_wherever/ros_buildfarm_config/index.yaml
edit flag offensive delete link more

Comments

1

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 imagegvdhoorn ( 2019-08-22 02:33:19 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 25 times

Last updated: Aug 21