[Freeze Break Request] fix fas-bugzilla sync script for new bugzilla server

Toshio Kuratomi a.badger at gmail.com
Mon May 20 21:02:37 UTC 2013


It was reported today that people were being added to packager but weren't
having their bugzilla accounts updated with the correct permissions.  Runing
the scrip manually on fas01 showed that the script that updates user's
permissions in bugzilla works with python-bugzill-0.8 but not with the new
bugzilla.redhat.com version.  Luckily, the fix for this simply a matter of
switching from sending the server a list of groups to add the bugzilla user
to into sending it a string.name of a single group.

I'd like to apply the following hotfix to stg and production.  Could I get
two +1's?


diff --git a/modules-staging/hotfix/files/fas/export-bugzilla b/modules-staging/hotfix/files/fas/export-bugzilla
index 33b23c7..9e6bb27 100755
--- a/modules-staging/hotfix/files/fas/export-bugzilla
+++ b/modules-staging/hotfix/files/fas/export-bugzilla
@@ -56,7 +56,7 @@ if __name__ == '__main__':
         if entry.action == 'r':
             # Remove the user's bugzilla group
             try:
-                server.updateperms(entry.email, 'rem', (bzGroup,))
+                server.updateperms(entry.email, 'rem', bzGroup)
             except xmlrpclib.Fault, e:
                 if e.faultCode == 504:
                     # It's okay, not having this user is equivalent to setting
@@ -78,7 +78,7 @@ if __name__ == '__main__':
                 else:
                     print 'Error:', e, entry.email, entry.person.human_name
                     raise
-            server.updateperms(entry.email, 'add', (bzGroup,))
+            server.updateperms(entry.email, 'add', bzGroup)
         else:
             print 'Unrecognized action code: %s %s %s %s %s' % (entry.action,
                     entry.email, entry.person.human_name, entry.person.username, entry.group.name)
diff --git a/modules-staging/hotfix/manifests/init.pp b/modules-staging/hotfix/manifests/init.pp
index e229962..58400e0 100644
--- a/modules-staging/hotfix/manifests/init.pp
+++ b/modules-staging/hotfix/manifests/init.pp
@@ -84,6 +84,10 @@ class hotfix::fas {
 }
 
 class hotfix::fasbugzillasync {
+    file { '/usr/sbin/export-bugzilla':
+        source => 'puppet:///hotfix/fas/export-bugzilla',
+        mode => '0755'
+    }
 }
 
 class hotfix::pkgdb {


-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20130520/c4f9449d/attachment.sig>


More information about the infrastructure mailing list