Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1018559 - [RHEVM-SDK-PYTHON]: support automatic auth session invalidation
Summary: [RHEVM-SDK-PYTHON]: support automatic auth session invalidation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: movciari
URL:
Whiteboard: infra
: 1109709 (view as bug list)
Depends On:
Blocks: 1018561 rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2013-10-13 10:31 UTC by Michael Pasternak
Modified: 2016-02-10 19:32 UTC (History)
11 users (show)

Fixed In Version: rhevm-sdk-python-3.5.0.2-1.el6_5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-16 13:36:39 UTC
oVirt Team: Infra
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 21822 None None None Never

Description Michael Pasternak 2013-10-13 10:31:37 UTC
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 14:06:08 UTC
Closing as part of 3.4.0

Comment 8 Juan Hernández 2014-06-16 11:00:41 UTC
*** Bug 1109709 has been marked as a duplicate of this bug. ***

Comment 9 Roman Hodain 2014-06-16 12:26:15 UTC
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 16:23:30 UTC
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.