Description of problem: latest REST-API supports automatic auth session invalidation (upon expiry), sdk should expose this capability as well.
Closing as part of 3.4.0
*** Bug 1109709 has been marked as a duplicate of this bug. ***
Hello, I have tested this feature, but I am still hitting the same issue. rhevm-sdk-python-3.4.1.0-2 The following script was started and then ovirt-engine rstart was triggered. ================================== #!/usr/bin/python import sys import time from ovirtsdk.api import API USERNAME="admin@internal" PASSWORD="password" CA_FILE="/etc/pki/ovirt-engine/ca.pem" URL="https://FQDN/api" while True: try: api_instance = API(url=URL, username=USERNAME, password=PASSWORD, ca_file=CA_FILE, renew_session=True) print "Connection Ok..." except Exception as e: print "Connection failure: %s" % str(e) time.sleep(5) ==================================== RESULT: ==================================== # ./test.py Connection Ok... Connection failure: status: 503 reason: Service Temporarily Unavailable detail: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>503 Service Temporarily Unavailable</title> </head><body> <h1>Service Temporarily Unavailable</h1> <p>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.</p> <hr> <address>Apache/2.2.22 (Red Hat Enterprise Web Server) Server at vm-236.gsslab.brq.redhat.com Port 443</address> </body></html> Connection failure: status: 404 reason: Not Found detail: Connection failure: [ERROR]::oVirt sdk is disconnected from the server. Connection failure: [ERROR]::oVirt sdk is disconnected from the server. Connection failure: [ERROR]::oVirt sdk is disconnected from the server. Connection failure: [ERROR]::oVirt sdk is disconnected from the server. .... ==================================== The manager is already UP and reachable by the same script if started from another terminal.
The fix for bug 1116009 fixes this bug as well.