FBR - a timeout for the koji pkglist sync script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mohan and Matt found yesterday that the koji pkglist sync script was hung (for
two hours) waiting on a koji query.  We looked today, and found that the
default timeout for koji requests is 12 hours!  (whee!)

Here's a patch to that script that sets a timeout of 10 minutes which, based on
a reading of the logs, is 9.9 more minutes than we need to make the requests in
question.

If this doesn't work, we can just `git revert` to back it out.

Any +1s?


diff --git a/roles/bodhi2/backend/templates/owner-sync-pagure.j2 b/roles/bodhi2/backend/templates/owner-sync-pagure.j2
index 8046c32..314e2c2 100755
--- a/roles/bodhi2/backend/templates/owner-sync-pagure.j2
+++ b/roles/bodhi2/backend/templates/owner-sync-pagure.j2
@@ -292,22 +292,27 @@ def get_pagure_project_branches(namespace, package=None, verbose=False):
 
 
 def set_koji_ownership(tag, packages, arches, verbose=False):
-    koji_options = get_options()
+    koji_login_options = get_options()
 
+    koji_options={
+        'krb_rdns': False,
+        # About ten minutes.  The default is 12 hours.
+        'timeout': 60 * 10,
+    }
     for arch in arches:
         if arch == 'primary':
             session = koji.ClientSession(
                 'https://koji{0}.fedoraproject.org/kojihub'.format(ENV_SUFFIX),
-                {'krb_rdns': False}
+                opts=koji_options,
             )
         else:
             session = koji.ClientSession(
                 'https://{0}.koji.fedoraproject.org/kojihub'.format(arch),
-                {'krb_rdns': False}
+                opts=koji_options,
             )
 
         try:
-            session.krb_login(koji_options['principal'], koji_options['keytab'])
+            session.krb_login(koji_login_options['principal'], koji_login_options['keytab'])
         except:
             import traceback
             traceback.print_exc()

Attachment: signature.asc
Description: PGP signature

_______________________________________________
infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux