[OpenStack-Infra] Zuul-Cloner failing with missing origin/HEAD

Philipp, Damian Damian.Philipp at vector.com
Fri Sep 23 09:05:48 UTC 2016


Hello OpenStack Experts,

I am trying to set up a Gating system using Gerrit, Jenkins, and Zuul (2.5.0 installed using PIP on Debian 8). I managed to get zuul-server, zuul-merger and Jenkins up and running. However, I am facing problems when Jenkins executes zuul-cloner as part of a build.

In short: zuul-cloner attempts to use 'origin/HEAD', which is present in the repository that zuul-merger prepared on its machine (Hostname "zuulserver"), but which does *not* exist in the repository that zuul-cloner created on the build slave. Zuul-cloner crashes and aborts the build with an error. Google does not provide any insight on the error message. What am I missing?

Long form: When I run a new build job, Jenkins starts zuul-cloner to prepare the workspace. Here is the relevant line from the Job configuration:

  zuul-cloner http://zuulserver:8822/p $ZUUL_PROJECT

 From this run, I get the following log:

INFO:zuul.CloneMapper:Workspace path set to: /var/jenkins_home/workspace/myjob
INFO:zuul.CloneMapper:Mapping projects to workspace...
INFO:zuul.CloneMapper:  fancyproject -> /var/jenkins_home/workspace/myjob/fancyproject
INFO:zuul.CloneMapper:Expansion completed.	
INFO:zuul.Cloner:Preparing 1 repositories
INFO:zuul.Cloner:Creating repo fancyproject from upstream http://zuulserver:8822/p/fancyproject
Traceback (most recent call last):
  File "/usr/local/bin/zuul-cloner", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/zuul/cmd/cloner.py", line 162, in main
    cloner.main()
  File "/usr/local/lib/python2.7/dist-packages/zuul/cmd/cloner.py", line 157, in main
    cloner.execute()
  File "/usr/local/lib/python2.7/dist-packages/zuul/lib/cloner.py", line 74, in execute
    self.prepareRepo(project, dest)
  File "/usr/local/lib/python2.7/dist-packages/zuul/lib/cloner.py", line 156, in prepareRepo
    repo.reset()
  File "/usr/local/lib/python2.7/dist-packages/zuul/merger/merger.py", line 99, in reset
    repo.head.reference = origin.refs['HEAD']
  File "/usr/local/lib/python2.7/dist-packages/git/util.py", line 706, in __getitem__
    raise IndexError("No item found with id %r" % (self._prefix + index))
IndexError: No item found with id u'origin/HEAD'
Build step 'Execute shell' marked build as failure

Cloning the repository actually worked, i.e., I can see the repo including the change to be tested in the Jenkins workspace on the build slave. I can then run "git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master" in the repository created by zuul-cloner. When I then trigger my change in Gerrit again, the next build run will commence past the call to zuul-cloner. However, manually fixing *every* repository for *every* build job on *every* build slave does not appear to be a viable option. Am I missing something? Is this possibly a bug in Zuul? Googling the error message turns up a couple of commits, but nothing that provides any actual insight.

I apologize if I picked the wrong mailing list for this kind of question. In this case, please direct me to a more appropriate plaace.

Best regards
Damian Philipp
-----------------------------------------------------
Software Development Engineer 
RDE1

Vector Informatik GmbH
Ingersheimer Str. 24
70499 Stuttgart
Deutschland / Germany
Tel.: +49 711 80670-3656
Fax: +49 711 80670-399
mailto: Damian.Philipp at vector.com
Internet: www.vector.com

Sitz der Gesellschaft / Head Office: Stuttgart
Handelsregister / Commercial Register: 
Amtsgericht Stuttgart, HRB 17317 
Geschaeftsfuehrer / Managing Directors:
Dr. Thomas Beck, Thomas Riegraf
-----------------------------------------------------




More information about the OpenStack-Infra mailing list