Project

General

Profile

Tâche #23844

Scénario #23860: Tests et qualification (20-22)

Étudier le traceback Zéphir/check_maj_eole.py

Added by Joël Cuissinat almost 6 years ago. Updated almost 6 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
-
Start date:
05/07/2018
Due date:
% Done:

100%

Estimated time:
3.00 h
Remaining (hours):
0.0

Description

Exemple : http://jenkins.eole.lan/jenkins/job/2.6.2/job/test-instance-riezephir-2.6.2-amd64/180/console

00:05:06.399               Mise à jour de la liste des paquets (test-eole.ac-dijon.fr)
00:05:42.414             AUTOMATE : Traceback dans la sortie console!
00:05:42.415             Traceback (most recent call last):
00:05:42.415               File "/usr/share/eole/check_maj_eole.py", line 297, in <module>
00:05:42.415             MONITOR: traceback action:$TRACEBACK time:Fri May  4 21:37:21 2018
00:05:42.416                 maj_listes(updates, opener, zephir_version, codename=codename)
00:05:42.416               File "/usr/share/eole/check_maj_eole.py", line 182, in maj_listes
00:05:42.417                 opener.retrieve(pkg_url, "%s.gz" % pack_temp)
00:05:42.417               File "/usr/lib/python2.7/urllib.py", line 245, in retrieve
00:05:42.418                 fp = self.open(url, data)
00:05:42.418               File "/usr/lib/python2.7/urllib.py", line 213, in open
00:05:42.418                 return getattr(self, name)(url)
00:05:42.419               File "/usr/lib/python2.7/urllib.py", line 350, in open_http
00:05:42.419                 h.endheaders(data)
00:05:42.419               File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders
00:05:42.420                 self._send_output(message_body)
00:05:42.420               File "/usr/lib/python2.7/httplib.py", line 897, in _send_output
00:05:42.421                 self.send(msg)
00:05:42.421               File "/usr/lib/python2.7/httplib.py", line 859, in send
00:05:42.421                 self.connect()
00:05:42.422               File "/usr/lib/python2.7/httplib.py", line 836, in connect
00:05:42.422                 self.timeout, self.source_address)
00:05:42.422               File "/usr/lib/python2.7/socket.py", line 557, in create_connection
00:05:45.417                 for res in getaddrinfo(host, port, 0, SOCK_STREAM):
00:05:45.418             IOError: [Errno socket error] [Errno -3] Temporary failure in name resolution

Proposition : essayer plusieurs fois de se connecter ?


Related issues

Related to Distribution EOLE - Tâche #26672: Zéphir : timeout trop court sur la vérification des dépôts Fermé 02/07/2019

History

#1 Updated by Joël Cuissinat almost 6 years ago

Proposition de patch n°1 :

diff --git a/eole/check_maj_eole.py b/eole/check_maj_eole.py
index 540727b..e50a276 100755
--- a/eole/check_maj_eole.py
+++ b/eole/check_maj_eole.py
@@ -13,6 +13,7 @@
 ###########################################################################

 import sys, optparse, os, urllib, socket, glob
+from time import sleep
 from zephir.backend.config import PATH_ZEPHIR
 from zephir.config import DISTRIBS, ENVOLE_VERSION
 from ConfigParser import ConfigParser
@@ -179,7 +180,12 @@ def maj_listes(updates, opener, zephir_version, version=None, codename=None, env
             # lecture et traitement du fichier 'Packages'
             pkg_name = "" 
             pack_temp = os.path.join(PATH_ZEPHIR, 'Packages')
-            opener.retrieve(pkg_url, "%s.gz" % pack_temp)
+            try:
+                opener.retrieve(pkg_url, "%s.gz" % pack_temp)
+            except IOError:
+                # retry later #23844
+                sleep(1)
+                opener.retrieve(pkg_url, "%s.gz" % pack_temp)
             res = os.system("""/bin/gunzip -c %s.gz | grep -E "^(Package:|Version:)" > %s""" % (pack_temp, pack_temp))
             if os.path.isfile(pack_temp):
                 info_pkgs = file(pack_temp)

#2 Updated by Joël Cuissinat almost 6 years ago

Un premier lot de traitement avait été fait ici : #8804 !

Notons que la boucle principale débute par :

socket.setdefaulttimeout(5)

#3 Updated by Scrum Master almost 6 years ago

  • Status changed from En cours to Nouveau
  • Assigned To deleted (Joël Cuissinat)
  • Parent task changed from #23658 to #23860

#4 Updated by Fabrice Barconnière almost 6 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100
  • Parent task changed from #23860 to #23988
  • Remaining (hours) changed from 3.0 to 0.0

#5 Updated by Fabrice Barconnière almost 6 years ago

  • Parent task changed from #23988 to #23860

#6 Updated by Fabrice Barconnière almost 6 years ago

  • Status changed from Résolu to Fermé

#7 Updated by Joël Cuissinat about 5 years ago

  • Related to Tâche #26672: Zéphir : timeout trop court sur la vérification des dépôts added

Also available in: Atom PDF