<div dir="ltr">Can you give me the exact rpm version of ovirt-engine-backend, I can give you a replacement jar file to test<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 23, 2017 at 3:56 AM,  <span dir="ltr">&lt;<a href="mailto:nicolas@devels.es" target="_blank">nicolas@devels.es</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ravi,<br>
<br>
Could you please tell me what&#39;s the right way to apply this patch on an already working oVirt instance? I already have applied some patches on *.py files, but it seems the *.java files are not there.<br>
<br>
Thanks!<div><div class="h5"><br>
<br>
El 2017-03-22 16:06, Ravi Nori escribió:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi Nicolás,<br>
<br>
There has been some changes to how a session is refreshed after 4.0.<br>
So this is a BZ and is being tracked by BZ 1434605.<br>
<br>
Will post a patch to fix this. Thanks for reporting the issue.<br>
<br>
Ravi<br>
<br>
On Wed, Mar 22, 2017 at 9:10 AM, &lt;<a href="mailto:nicolas@devels.es" target="_blank">nicolas@devels.es</a>&gt; wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi Juan,<br>
<br>
I confirm this was working with 4.0.6 (but the same SDK package).<br>
The script is relatively new but I&#39;m 100% sure it has been in<br>
execution for several weeks, in contrast to current version where<br>
after 5-6 iterations the exception starts showing up.<br>
<br>
I&#39;ve voted for the bug and added myself as CC.<br>
<br>
Thank you.<br>
<br>
Regards,<br>
<br>
Nicolás<br>
<br>
El 2017-03-22 12:58, Juan Hernández escribió:<br>
On 03/22/2017 01:50 PM, Juan Hernández wrote:<br>
On 03/22/2017 01:10 PM, <a href="mailto:nicolas@devels.es" target="_blank">nicolas@devels.es</a> wrote:<br>
Hi,<br>
<br>
We&#39;ve recently upgraded from oVirt 4.0.x to 4.1.0 and it seems that<br>
the<br>
behavior of a script we wrote in Python-SDK has changed slightly.<br>
We<br>
have a script that needs to be executed forever (daemon mode). This<br>
daemon creates an ovirtsdk4.Connection object and uses the same<br>
Connection object all the time.<br>
<br>
conn = sdk.Connection(<br>
  url=URI,<br>
  username=USERNAME,<br>
  password=PASSWORD,<br>
  ca_file=CAFILE<br>
)<br>
<br>
Between iterations we have ~5 minutes delays which we accomplish<br>
with a<br>
time.sleep(...) call.<br>
<br>
After some of these iterations (5 or 6), when trying to perform an<br>
operation on the Connection object (in this case, listing all SDs):<br>
<br>
    try:<br>
        sys_serv = conn.system_service()<br>
        sd_serv = sys_serv.storage_domains_servi<wbr>ce()<br>
        storages = sd_serv.list(search=sd_search_<wbr>query)<br>
    except Error, e:<br>
        log(&#39;ERR: Error getting storage domains: %s&#39; % (e))<br>
<br>
We start getting exceptions (i.e., the sd_serv.list() call throwing<br>
an<br>
Error exception) with this message:<br>
<br>
    ERR: Error getting storage domains: HTTP response code is<br>
401.<br>
<br>
I believe this has something to do with the Connection object<br>
expiring<br>
(even if it&#39;s not idle more than 5 minutes at any time). Is there a<br>
way<br>
to &quot;refresh&quot; the Connection object so it doesn&#39;t auto-logout<br>
(assuming<br>
this is the actual problem)?<br>
<br>
As I said, this started happening as of oVirt 4.1.0.<br>
ovirt-engine-sdk-python version is 4.1.1.<br>
<br>
Any ideas?<br>
<br>
This sound like this bug, opened yesterday:<br>
<br>
  SSO token used for the API expires when running only queries<br></div></div>
  <a href="https://bugzilla.redhat.com/1434605" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/14<wbr>34605</a> [1]<span class=""><br>
<br>
But I thought the same happened in 4.0. Can you confirm that you<br>
don&#39;t<br>
see this problem in 4.0?<br>
<br>
Open possible workaround is to force a refresh of the backend<br>
session<br>
sending an external event, like in this example:<br>
<br>
<br>
</span></blockquote>
<a href="https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_backup.py#L112-L131" rel="noreferrer" target="_blank">https://github.com/oVirt/ovirt<wbr>-engine-sdk/blob/master/sdk/<wbr>examples/vm_backup.py#L112-<wbr>L131</a><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[2]<span class=""><br>
<br>
I also think that we need to modify the SDKs so that they detect<br>
expired<br>
SSO tokens and renew them automatically. I will open another bug<br>
for that.<br>
</span></blockquote><span class="">
<br>
 Here is the bug for adding automatic SSO token renew to the SDK, in<br>
case<br>
 you want to follow/vote it:<br>
<br>
   Implement automatic SSO token renew<br></span>
   <a href="https://bugzilla.redhat.com/1434830" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/14<wbr>34830</a> [3]<span class=""><br>
 _____________________________<wbr>__________________<br>
 Users mailing list<br>
 <a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br></span>
 <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailma<wbr>n/listinfo/users</a> [4]<br>
<br>
<br>
<br>
Links:<br>
------<br>
[1] <a href="https://bugzilla.redhat.com/1434605" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/14<wbr>34605</a><br>
[2]<br>
<a href="https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_backup.py#L112-L131" rel="noreferrer" target="_blank">https://github.com/oVirt/ovirt<wbr>-engine-sdk/blob/master/sdk/<wbr>examples/vm_backup.py#L112-<wbr>L131</a><br>
[3] <a href="https://bugzilla.redhat.com/1434830" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/14<wbr>34830</a><br>
[4] <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br>
</blockquote>
</blockquote></div><br></div>