Page MenuHomePhabricator

zuul-cloner fails with "AttributeError: 'IterableList' object has no attribute 'origin' " (operations-apache-config-lint)
Closed, ResolvedPublic

Description

operations-apache-config-lint Builds (non-voting) are failing since 3 days with:

INFO:zuul.Cloner:Creating repo operations/mediawiki-config from upstream https://gerrit.wikimedia.org/r/p/operations/mediawiki-config
DEBUG:zuul.Repo:Updating repository src/operations/mediawiki-config
Traceback (most recent call last):
  File "/usr/local/bin/zuul-cloner", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/zuul/cmd/cloner.py", line 156, in main
    cloner.main()
  File "/usr/local/lib/python2.7/dist-packages/zuul/cmd/cloner.py", line 151, in main
    cloner.execute()
  File "/usr/local/lib/python2.7/dist-packages/zuul/lib/cloner.py", line 66, in execute
    self.prepareRepo(project, dest)
  File "/usr/local/lib/python2.7/dist-packages/zuul/lib/cloner.py", line 129, in prepareRepo
    repo.update()
  File "/usr/local/lib/python2.7/dist-packages/zuul/merger/merger.py", line 168, in update
    origin = repo.remotes.origin
  File "/usr/lib/pymodules/python2.7/git/util.py", line 612, in __getattr__
    return list.__getattribute__(self, attr)
AttributeError: 'IterableList' object has no attribute 'origin'
Build step 'Exécuter un script shell' marked build as failure

maybe same error: T75103
example: https://integration.wikimedia.org/ci/job/operations-apache-config-lint/4777/console

Event Timeline

Se4598 created this task.Dec 6 2014, 11:33 PM
Se4598 raised the priority of this task from to Needs Triage.
Se4598 updated the task description. (Show Details)
Se4598 changed Security from none to None.
Se4598 added subscribers: Se4598, hashar.
hashar claimed this task.Dec 8 2014, 10:28 AM
hashar triaged this task as Normal priority.
hashar added a project: Zuul.

The git repository does not have a remote anymore :-/

hashar closed this task as Resolved.Dec 8 2014, 10:35 AM

The job has been aborted while cloning the repository:

00:00:05.305 INFO:zuul.Cloner:Creating repo operations/mediawiki-config from upstream https://gerrit.wikimedia.org/r/p/operations/mediawiki-config
00:00:06.191 Build was aborted
00:00:06.224 Aborted by anonymous
00:00:06.227 ERROR: Failed to notify HTTP:http://127.0.0.1:8001/jenkins_endpoint
00:00:06.228 java.net.SocketException: Connection reset
00:00:06.228 	at java.net.SocketInputStream.read(SocketInputStream.java:196)
00:00:06.228 	at java.net.SocketInputStream.read(SocketInputStream.java:122)
00:00:06.229 	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
00:00:06.229 	at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
00:00:06.229 	at sun.net.www.MessageHeader.mergeHeader(MessageHeader.java:468)
00:00:06.229 	at sun.net.www.MessageHeader.parseHeader(MessageHeader.java:436)
00:00:06.229 	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:699)
00:00:06.230 	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
00:00:06.230 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
00:00:06.230 	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
00:00:06.230 	at com.tikal.hudson.plugins.notification.Protocol$3.send(Protocol.java:117)
00:00:06.230 	at com.tikal.hudson.plugins.notification.Phase.handle(Phase.java:43)
00:00:06.230 	at com.tikal.hudson.plugins.notification.JobListener.onCompleted(JobListener.java:36)
00:00:06.231 	at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:199)
00:00:06.231 	at hudson.model.Run.execute(Run.java:1796)
00:00:06.231 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
00:00:06.231 	at hudson.model.ResourceController.execute(ResourceController.java:89)
00:00:06.231 	at hudson.model.Executor.run(Executor.java:240)
00:00:06.649 Finished: ABORTED

Which left a lock behind, then the next build dies with:

00:00:03.501 INFO:zuul.Cloner:Creating repo operations/mediawiki-config from upstream https://gerrit.wikimedia.org/r/p/operations/mediawiki-config
00:00:03.556 ERROR:zuul.Repo:Unable to initialize repo for https://gerrit.wikimedia.org/r/p/operations/mediawiki-config
...
00:00:03.558 IOError: Lock for file '/srv/ssd/jenkins-slave/workspace/operations-apache-config-lint/src/operations/mediawiki-config/.git/config'
did already exist, delete '/srv/ssd/jenkins-slave/workspace/operations-apache-config-lint/src/operations/mediawiki-config/.git/config.lock' in case the lock is illegal

I have deleted the workspace and the job is working again. Nice catch!

In theory we could handle such situation to make the script a bit more robust, but it is going to be rare enough that I am not going to invest time properly fixing it up. If we find out it is annoying us often, I would fix it for sure.