Bug 1018559 - [RHEVM-SDK-PYTHON]: support automatic auth session invalidation
[RHEVM-SDK-PYTHON]: support automatic auth session invalidation
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk (Show other bugs)
3.4.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.5.0
Assigned To: Juan Hernández
movciari
infra
: Reopened
: 1109709 (view as bug list)
Depends On:
Blocks: 1018561 rhev3.5beta 1156165
  Show dependency treegraph
 
Reported: 2013-10-13 06:31 EDT by Michael Pasternak
Modified: 2016-02-10 14:32 EST (History)
11 users (show)

See Also:
Fixed In Version: rhevm-sdk-python-3.5.0.2-1.el6_5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-16 08:36:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 21822 None None None Never

  None (edit)
Description Michael Pasternak 2013-10-13 06:31:37 EDT
Description of problem:

latest REST-API supports automatic auth session invalidation (upon expiry), sdk should expose this capability as well.
Comment 7 Itamar Heim 2014-06-12 10:06:08 EDT
Closing as part of 3.4.0
Comment 8 Juan Hernández 2014-06-16 07:00:41 EDT
*** Bug 1109709 has been marked as a duplicate of this bug. ***
Comment 9 Roman Hodain 2014-06-16 08:26:15 EDT
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.
Comment 10 Juan Hernández 2014-07-08 12:23:30 EDT
The fix for bug 1116009 fixes this bug as well.

Note You need to log in before you can comment on or make changes to this bug.