[Users] Ovirt 3.4 - Fail to set permissions to VM

Jonas Israelsson jonas at israelsson.com
Tue Jan 28 09:34:50 UTC 2014


Greetings.

I have set up oVirt to use Openldap for its users store. I managed to 
make two users SuperUser but now when trying to add a third as a normal 
user and give him permission to a VM it fails. From the log I see it 
complains about duplicate key violations.

No matter what user I try to add to this vm I get the same error. Maybe 
it's beyond me but I really do not understand why It wants to add 
something to the users table (since the user is already there), sounds 
like a bug to me..

Anyone else have the same setup as me, and have this working ?

[root at dashboard ovirt-engine]# tail -100 engine.log
2014-01-28 10:19:14,655 INFO 
[org.ovirt.engine.core.bll.AddPermissionCommand] 
(org.ovirt.thread.pool-6-thread-26) [5c95fa5a] Running command: 
AddPermissionCommand internal: false. Entities affected :  ID: 
18bcf10a-6f63-44ea-8a9b-70f423476473 Type: StoragePool,  ID: 
aaa00000-0000-0000-0000-123456789aaa Type: System
2014-01-28 10:19:14,658 ERROR 
[org.ovirt.engine.core.bll.AddPermissionCommand] 
(org.ovirt.thread.pool-6-thread-26) [5c95fa5a] Command 
org.ovirt.engine.core.bll.AddPermissionCommand throw exception: 
org.springframework.dao.DuplicateKeyException: 
CallableStatementCallback; SQL [{call insertuser(?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint 
"users_domain_external_id_unique"
   Where: SQL statement "INSERT INTO users(department, domain, email, 
groups, name, note, role, active, surname, user_id, username, group_ids, 
external_id) VALUES( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 , $7 ,  $8 ,  $9 
,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertuser" line 2 at SQL statement; nested exception 
is org.postgresql.util.PSQLException: ERROR: duplicate key value 
violates unique constraint "users_domain_external_id_unique"
   Where: SQL statement "INSERT INTO users(department, domain, email, 
groups, name, note, role, active, surname, user_id, username, group_ids, 
external_id) VALUES( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 , $7 ,  $8 ,  $9 
,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertuser" line 2 at SQL statement
         at 
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:241) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1030) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1064) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:388) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:351) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:181) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.ovirt.engine.core.dao.DbUserDAODbFacadeImpl.save(DbUserDAODbFacadeImpl.java:119) 
[dal.jar:]
         at 
org.ovirt.engine.core.bll.AddPermissionCommand.executeCommand(AddPermissionCommand.java:94) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1114) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1199) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1875) 
[bll.jar:]
         at 
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:210) 
[utils.jar:]
         at 
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInRequired(TransactionSupport.java:149) 
[utils.jar:]
         at 
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:118) 
[utils.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1219) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:351) [bll.jar:]
         at 
org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommand(MultipleActionsRunner.java:179) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.MultipleActionsRunner.runCommands(MultipleActionsRunner.java:151) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.MultipleActionsRunner$2.run(MultipleActionsRunner.java:160) 
[bll.jar:]
         at 
org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:97) 
[utils.jar:]
         at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
[rt.jar:1.7.0_51]
         at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
[rt.jar:1.7.0_51]
         at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[rt.jar:1.7.0_51]
         at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[rt.jar:1.7.0_51]
         at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value 
violates unique constraint "users_domain_external_id_unique"
   Where: SQL statement "INSERT INTO users(department, domain, email, 
groups, name, note, role, active, surname, user_id, username, group_ids, 
external_id) VALUES( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 , $7 ,  $8 ,  $9 
,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertuser" line 2 at SQL statement
         at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
         at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
         at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
         at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
         at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
         at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381)
         at 
org.jboss.jca.adapters.jdbc.CachedPreparedStatement.execute(CachedPreparedStatement.java:297)
         at 
org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:404)
         at 
org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1066) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1014) 
[spring-jdbc.jar:3.1.1.RELEASE]
         ... 23 more

2014-01-28 10:19:14,673 ERROR 
[org.ovirt.engine.core.bll.AddPermissionCommand] 
(org.ovirt.thread.pool-6-thread-26) [5c95fa5a] Transaction rolled-back 
for command: org.ovirt.engine.core.bll.AddPermissionCommand.
2014-01-28 10:19:14,681 INFO 
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] 
(org.ovirt.thread.pool-6-thread-26) [5c95fa5a] Correlation ID: 5c95fa5a, 
Call Stack: null, Custom Event ID: -1, Message: User isrjo failed to 
grant permission for Role SuperUser on Data Center Elementary to 
User/Group Non interactive user.
2014-01-28 10:21:07,003 INFO 
[org.ovirt.engine.core.bll.AddPermissionCommand] 
(org.ovirt.thread.pool-6-thread-49) [398c89f9] Running command: 
AddPermissionCommand internal: false. Entities affected :  ID: 
0e5c1425-c9d9-46d3-a9f2-f5a6278ab748 Type: VM,  ID: 
aaa00000-0000-0000-0000-123456789aaa Type: System
2014-01-28 10:21:07,006 ERROR 
[org.ovirt.engine.core.bll.AddPermissionCommand] 
(org.ovirt.thread.pool-6-thread-49) [398c89f9] Command 
org.ovirt.engine.core.bll.AddPermissionCommand throw exception: 
org.springframework.dao.DuplicateKeyException: 
CallableStatementCallback; SQL [{call insertuser(?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint 
"users_domain_external_id_unique"
   Where: SQL statement "INSERT INTO users(department, domain, email, 
groups, name, note, role, active, surname, user_id, username, group_ids, 
external_id) VALUES( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 , $7 ,  $8 ,  $9 
,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertuser" line 2 at SQL statement; nested exception 
is org.postgresql.util.PSQLException: ERROR: duplicate key value 
violates unique constraint "users_domain_external_id_unique"
   Where: SQL statement "INSERT INTO users(department, domain, email, 
groups, name, note, role, active, surname, user_id, username, group_ids, 
external_id) VALUES( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 , $7 ,  $8 ,  $9 
,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertuser" line 2 at SQL statement
         at 
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:241) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1030) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1064) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:388) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:351) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:181) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.ovirt.engine.core.dao.DbUserDAODbFacadeImpl.save(DbUserDAODbFacadeImpl.java:119) 
[dal.jar:]
         at 
org.ovirt.engine.core.bll.AddPermissionCommand.executeCommand(AddPermissionCommand.java:94) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1114) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1199) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1875) 
[bll.jar:]
         at 
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:210) 
[utils.jar:]
         at 
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInRequired(TransactionSupport.java:149) 
[utils.jar:]
         at 
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:118) 
[utils.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1219) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:351) [bll.jar:]
         at 
org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommand(MultipleActionsRunner.java:179) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.MultipleActionsRunner.runCommands(MultipleActionsRunner.java:151) 
[bll.jar:]
         at 
org.ovirt.engine.core.bll.MultipleActionsRunner$2.run(MultipleActionsRunner.java:160) 
[bll.jar:]
         at 
org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:97) 
[utils.jar:]
         at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
[rt.jar:1.7.0_51]
         at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
[rt.jar:1.7.0_51]
         at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[rt.jar:1.7.0_51]
         at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[rt.jar:1.7.0_51]
         at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value 
violates unique constraint "users_domain_external_id_unique"
   Where: SQL statement "INSERT INTO users(department, domain, email, 
groups, name, note, role, active, surname, user_id, username, group_ids, 
external_id) VALUES( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 , $7 ,  $8 ,  $9 
,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertuser" line 2 at SQL statement
         at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
         at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
         at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
         at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
         at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
         at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381)
         at 
org.jboss.jca.adapters.jdbc.CachedPreparedStatement.execute(CachedPreparedStatement.java:297)
         at 
org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:404)
         at 
org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1066) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1) 
[spring-jdbc.jar:3.1.1.RELEASE]
         at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1014) 
[spring-jdbc.jar:3.1.1.RELEASE]
         ... 23 more


engine=# select * from users ;
                user_id                |   name   |  surname   | 
domain     | username | groups | department | role | email         | 
note | last_admin_check_status | group_ids |
           external_id                       | active
--------------------------------------+----------+------------+---------------+----------+--------+------------+------+----------------------+------+-------------------------+-----------+-------------
--------------------------------------------+--------
  fdfc627c-d875-11e0-90f0-83df133b58cc | admin    |            | 
internal      | admin    |        |            | |                      
|      | t                       | | \375\374b|\3
30u\021\340\220\360\203\337\023;X\314       | t
  d384ad4e-1ea1-4f52-8886-ca628772dc85 | Håkan    | Persson    | 
elementary.se | perhk    |        |            |      | 
hakan at violaberg.nu   |      | t                       |           | 
\021\270\332
&\334\320\0202\233\257\307_\221\007\374\362 | t
  8f787629-9957-41ed-90bb-cb38baa7d9c0 | Jonas    | Israelsson | 
elementary.se | isrjo    |        |            |      | 
jonas at wehay.com      |      | t                       |           | 
\020\322\340
H\334\320\0202\233\214\307_\221\007\374\362 | t
  f1a9336d-1d39-44e3-b843-b78aba2be54b | Jonathan | Poulain    | 
elementary.se | poujo    |        |            |      | 
jonatahan at sofiero.se |      | f                       |           | 
9%\346p\352(
\0202\210s\323v\335VO\334                   | t
(4 rows)



-------------- next part --------------
A non-text attachment was scrubbed...
Name: oVirt.png
Type: image/png
Size: 184236 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140128/4822e21e/attachment-0001.png>


More information about the Users mailing list