aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2017-04-19 14:21:03 -0500
committerAndy Doan <andy.doan@linaro.org>2017-04-19 14:21:03 -0500
commit8effd26076bce45b65bc176646cfd52cf2a13ef6 (patch)
treed818a203466f55e0fe3fc7d2523635b2fb51d55b
parent5736fb00d529ecd120fc059af20dd67b1884beec (diff)
downloadlinaro-git-tools-8effd26076bce45b65bc176646cfd52cf2a13ef6.tar.gz
gerrit: skip buildslave on ssh key sync
For some reason the Gerrit REST API treats requests to /buildslave/* as GETS/PUTS/etc to the tcwg-buildslave user. This causes us to constantly add/remove the keys for each account. "buildslave" isn't a user in Gerrit, so we'll just skip that user for now. Change-Id: Id1a8c759e3c375d614e58001ff754da33077e1b9
-rwxr-xr-xupdate-gerrit-keys.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/update-gerrit-keys.py b/update-gerrit-keys.py
index ce7bab0..c500c34 100755
--- a/update-gerrit-keys.py
+++ b/update-gerrit-keys.py
@@ -22,6 +22,9 @@ result = linaro_ldap.get_users_and_keys(only_validated=True)
for user, keysets in result.iteritems():
+ if user == 'buildslave':
+ log.debug('skipping buildslave (Gerrit thinks its tcwg-buildslave)')
+ continue
gerritkeys = gerrit.list_keys(user)
if gerritkeys is False:
continue