Hide Forgot
It seems that if an API command fails (e.g. because you used the invalid syntax), the command that comes right after it fails as well with an "401 Unauthorized" HTTP error. Subsequent commands do work properly again. oVirt log seems to suggest the user is already logged in. Perhaps it did not log out properly after the error? == 2012-02-12 20:46:13,085 WARN [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http--0.0.0.0-8080-1) CanDoAction of action LoginAdminUser failed. Reasons:USER_IS_ALREADY_LOGGED_IN 2012-02-12 20:46:13,086 INFO [org.ovirt.engine.api.restapi.security.auth.LoginValidator] (http--0.0.0.0-8080-1) Login failure, user: admin domain: internal reason: [USER_IS_ALREADY_LOGGED_IN] ==
Floris, can you please give some more information about how to reproduce this bug? I wrote a shell script with two consecutive curl commands. The first is update with bad syntax, the second is update with good syntax. The commands are executed sequentially, one right after the other. The first one fails with SAX exception (due to the bad syntax), but the second one succeeds; I do not see the "user still logged-in" issue.
Created attachment 598308 [details] Data sent and received to reproduce Issue occurs when you trying to create a new VM (POST /api/vms), and having a syntax error there. See attached.
Thanks for the log. I updated my curl script to execute the same commands that you've sent. However, the second command still works fine. Contents of script curl_commands.sh: #First request: #--------------- echo '<vmSYNTAXERROR><name></name><cluster id="test"/><template><name>Blank</name></template><memory>805306368</memory><os><boot dev="hd"/></os><display><type>vnc</type></display></vm>' | curl -v -u "admin@internal":letmein! -H "Content-type:application/xml" 'http://localhost:8080/api/vms' -X POST -T - #Second request: #-------------- curl -v -u "admin@internal":letmein! -H "Content-type:application/xml" 'http://localhost:8080/api/networks' -X GET What did you use to send the http requests (curl?) Ori
>What did you use to send the http requests (curl?) PHP Zend framework HTTP classes Log was created with Wireshark. So I'm certain what it sends is correct. Also my requests are done from another server, not localhost. Not sure if that might affect your login session restrictions.
I tried from a remote computer as well (reply to comment 10), and the problem still didn't reproduce. I can't fix without reproducing, so I'm closing the bug. Maybe one day it will resurface in a way that will allow reproducing it.