stdevel / satprep

Python toolkit for automating system maintenance and generating CSV/PDF patch reports along with Spacewalk, Red Hat Satellite 5.x or SUSE Manager
GNU General Public License v3.0
14 stars 6 forks source link

satprep_snapshot.py - inventory of large system landscapes aborts: "503 Service Temporarily Unavailable" #5

Closed stdevel closed 10 years ago

stdevel commented 10 years ago

If an inventory of a large system landscape is created the script aborts after at about 10 minutes with the following error:

Traceback (most recent call last):
  File "./satprep_snapshot.py", line 254, in <module>
    updates = client.system.listLatestUpgradablePackages(key, system["id"])
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1243, in request
    headers
xmlrpclib.ProtocolError: <ProtocolError for localhost/rpc/api: 503 Service Temporarily Unavailable>

It seems like there is a timeout which can't be changed for XMLRPC API calls: https://access.redhat.com/solutions/696783 The recommendation from Red Hat is to split large calls in bunches - so the idea is to implement a re-login after ~5-10 hosts when satprep_snapshot.py discovers large environments.

stdevel commented 10 years ago

Fixed in commit d522f06