[OpenStack-Infra] multiple gerrit connections for ZUUL

Hejral, VaclavX vaclavx.hejral at intel.com
Tue Apr 5 06:54:09 UTC 2016


Hi,

my issue is solved by now. Details follow.

It was caused by (not aligned) comments in layout.yaml file
When removed few comments completely and some aligned differently, it works without issue
>>
return sorted(self.job_trees.keys(), lambda a, b: cmp(a.name, b.name))
AttributeError: 'NoneType' object has no attribute 'name'
>>

I understand this as a limitation in zuul parsing – let’s name it limitation #1

Working example:
Comments aligned to job names
>>
projects:
  - name: openstack-dev/ci-sandbox
    sandbox:
      - noop-check-communication
      - networking-ovs-dpdk-unit_tests
      #silent:
      #   - dsvm-tempest-full
>>


NOT working example:
Comments not aligned to job names – but at pipeline name
>>
projects:
  - name: openstack-dev/ci-sandbox
    sandbox:
      - noop-check-communication
      - networking-ovs-dpdk-unit_tests
    #silent:
    #   - dsvm-tempest-full
>>

NOT working example:
Comments not aligned to job names – but at beginning of line
>>
projects:
  - name: openstack-dev/ci-sandbox
    sandbox:
      - noop-check-communication
      - networking-ovs-dpdk-unit_tests
#silent:
#   - dsvm-tempest-full
>>

I realized there is as well another limitation – let’s name it limitation #2
This bounds with multiple accounts
When some repo is already cloned via gerrit account by zuul-merger and then a different gerrit account is configured to be used as “source” in layout.yaml, the already cloned repository it not possible to be updated from zuul-merger.
git remote origin update fails
>>
Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin'
2016-04-04 08:29:46,369 ERROR zuul.Merger: Unable to reset repo <zuul.merger.merger.Repo object at 0x7f2d54da09d0>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/zuul/merger/merger.py", line 304, in _mergeItem
    repo.reset()
  File "/usr/local/lib/python2.7/dist-packages/zuul/merger/merger.py", line 90, in reset
    self.update()
  File "/usr/local/lib/python2.7/dist-packages/zuul/merger/merger.py", line 185, in update
    origin.update()
  File "/usr/local/lib/python2.7/dist-packages/git/remote.py", line 536, in update
    self.repo.git.remote(scmd, self.name, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 450, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 902, in _call_process
    return self.execute(make_call(), **_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 695, in execute
    raise GitCommandError(command, status, stderr_value)
GitCommandError: 'git remote update origin' returned with exit code 1
stderr: 'Permission denied (publickey).
fatal: Could not read from remote repository.
>>

according to “git config –list” manually executed in such repository remote-url is set to the path with original gerrit account user name
e.g.
remote.origin.url=ssh://intel-nfv-ci@review.openstack.org:29418/openstack-dev/ci-sandbox

but the new user has different name and different keys
it is needed to remove such repository from /var/lib/zuul/git/
or to set  remote.origin.url with the new username

Vaclav


From: Hejral, VaclavX
Sent: Monday, April 4, 2016 15:46
To: 'Joshua Hesketh' <joshua.hesketh at gmail.com>; Paul Belanger <pabelanger at redhat.com>
Cc: Znoinski, Waldemar <waldemar.znoinski at intel.com>; openstack-infra at lists.openstack.org
Subject: RE: [OpenStack-Infra] multiple gerrit connections for ZUUL

Hello,

thank for hints.
…
Issue I have is that despite layout is checked fine, when triggering job via comment in patchset, zuul fails on project config

2016-04-04 14:39:53,504 INFO zuul.Scheduler: Adding openstack-dev/ci-sandbox, <Change 0x7fcb20753a90 282323,1> to <Pipeline sandbox>
2016-04-04 14:39:53,504 DEBUG zuul.IndependentPipelineManager: Considering adding change <Change 0x7fcb20753a90 282323,1>
2016-04-04 14:39:53,505 ERROR zuul.Scheduler: Exception in run handler:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/zuul/scheduler.py", line 962, in run
    self.process_event_queue()
  File "/usr/local/lib/python2.7/dist-packages/zuul/scheduler.py", line 1018, in process_event_queue
    pipeline.manager.addChange(change)
  File "/usr/local/lib/python2.7/dist-packages/zuul/scheduler.py", line 1366, in addChange
    with self.getChangeQueue(change, change_queue) as change_queue:
  File "/usr/local/lib/python2.7/dist-packages/zuul/scheduler.py", line 1889, in getChangeQueue
    if change.project not in self.pipeline.getProjects():
  File "/usr/local/lib/python2.7/dist-packages/zuul/model.py", line 111, in getProjects
    return sorted(self.job_trees.keys(), lambda a, b: cmp(a.name, b.name))
  File "/usr/local/lib/python2.7/dist-packages/zuul/model.py", line 111, in <lambda>
    return sorted(self.job_trees.keys(), lambda a, b: cmp(a.name, b.name))
AttributeError: 'NoneType' object has no attribute 'name'

Vaclav

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-infra/attachments/20160405/4cd16872/attachment-0001.html>


More information about the OpenStack-Infra mailing list