Created attachment 926385 [details] attach_snap_liron.py Description of problem: After an attempt to execute attach_snapshot command flow(attached file) which have already worked on other versions. Py-sdk failed with error message: Traceback (most recent call last): File "attach_snap_liron.py", line 11, in <module> debug=False File "/usr/lib/python2.6/site-packages/ovirtsdk/api.py", line 152, in __init__ url='' File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 118, in request persistent_auth=self._persistent_auth) File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 146, in __doRequest persistent_auth=persistent_auth File "/usr/lib/python2.6/site-packages/ovirtsdk/web/connection.py", line 134, in doRequest raise RequestError, response ovirtsdk.infrastructure.errors.RequestError: status: 401 reason: Unauthorized detail: HTTP Status 401 Version-Release number of selected component (if applicable): rc1 How reproducible: 100% Steps to Reproduce: 1.see file Actual results: operation fails Expected results: Additional info:
This is exactly what happens when you use an incorrect user name or password? Can you double check that? Also please check the engine.log file, as it may indicate what is the reason for the failed authentication.
double checked.user and password are correct.
Did you check the engine.log file?
from the engine logs: 2014-08-20 14:43:26,248 INFO [org.ovirt.engine.core.bll.OvfDataUpdater] (DefaultQuartzScheduler_Worker-34) Attempting to update VMs/Templates Ovf. 2014-08-20 14:43:27,850 INFO [org.ovirt.engine.core.bll.aaa.LoginUserCommand] (ajp--127.0.0.1-8702-8) Running command: LoginUserCommand internal: false. 2014-08-20 14:43:27,866 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp--127.0.0.1-8702-8) Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: User admin logged in. *** Note *** when attempting to connect to py-sdk with a wrong username or password the engine.log message is different: 2014-08-20 14:46:33,894 ERROR [org.ovirt.engine.core.aaa.filters.BasicAuthenticationFilter] (ajp--127.0.0.1-8702-9) Failure in authentication to profile org.ovirt.engine.core.aaa.AuthenticationProfile@34e4ab2b. Invocation Result code is 0. Authn result code is 12
Can you please run this adding the debug=True parameter to the call of the API constructor and report the results? Take into account that the results will contain the user password, so you may want to change it before running the test.
This is a duplicate of bug 1122546. Please repeat your test with version 3.5.0.4 of the SDK. It isn't available in ovirt.org yet, but you can get it here: https://jhernand.fedorapeople.org/rpms/ovirt-engine-sdk-python/3.5.0.4-1 *** This bug has been marked as a duplicate of bug 1122546 ***