ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley" <jhur...@hortonworks.com>
Subject Re: Review Request 34590: DDL errors seen on a cluster while enabling Kerberos
Date Fri, 22 May 2015 18:31:51 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34590/#review84954
-----------------------------------------------------------

Ship it!


Ship It!

- Jonathan Hurley


On May 22, 2015, 5:56 a.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34590/
> -----------------------------------------------------------
> 
> (Updated May 22, 2015, 5:56 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-11327
>     https://issues.apache.org/jira/browse/AMBARI-11327
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> ```
> 1 May 2015 00:18:53,950  INFO [Server Action Executor Worker 256] KerberosServerAction:436
- Processing identities completed.
> 21 May 2015 00:18:56,754  INFO [qtp-ambari-agent-83] HeartBeatHandler:822 - SET_KEYTAB
called
> 21 May 2015 00:18:57,658  INFO [qtp-ambari-agent-83] HeartBeatHandler:822 - SET_KEYTAB
called
> 21 May 2015 00:18:57,926  INFO [qtp-ambari-agent-83] HeartBeatHandler:822 - SET_KEYTAB
called
> 21 May 2015 00:19:00,677  INFO [qtp-ambari-agent-83] HeartBeatHandler:822 - SET_KEYTAB
called
> 21 May 2015 00:19:12,502 ERROR [ambari-action-scheduler] ClusterImpl:2459 - ServiceComponentHost
lookup exception
> 21 May 2015 00:19:21,850 ERROR [ambari-action-scheduler] ClusterImpl:2459 - ServiceComponentHost
lookup exception
> 21 May 2015 00:19:21,870  INFO [Server Action Executor Worker 263] KerberosServerAction:332
- Processing identities...
> 21 May 2015 00:19:21,873  INFO [Server Action Executor Worker 263] DestroyPrincipalsServerAction:90
- Destroying identity, ambari-qa_ruocwwby@EXAMPLE.COM
> 21 May 2015 00:19:22,123 ERROR [Server Action Executor Worker 263] AmbariJpaLocalTxnInterceptor:114
- [DETAILED ERROR] Rollback reason:
> Local Exception Stack:
> Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd):
org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity
constraint (AMBARICUSTOMUSER.FK_KRB_PR_HOST_PRINCIPALNAME) violated - child record found
> 
> Error Code: 2292
> Call: DELETE FROM kerberos_principal WHERE (principal_name = ?)
>         bind => [1 parameter bound]
>         at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
>         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900)
>         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962)
>         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:631)
>         at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatch(ParameterizedSQLBatchWritingMechanism.java:149)
>         at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:134)
>         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.writesCompleted(DatabaseAccessor.java:1836)
>         at org.eclipse.persistence.internal.sessions.AbstractSession.writesCompleted(AbstractSession.java:4244)
>         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.writesCompleted(UnitOfWorkImpl.java:5594)
>         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.acquireWriteLocks(UnitOfWorkImpl.java:1646)
>         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1614)
>         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:284)
>         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169)
>         at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:132)
>         at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:91)
>         at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
>         at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
>         at org.apache.ambari.server.orm.dao.KerberosPrincipalDAO$$EnhancerByGuice$$9e172ec6.remove(<generated>)
>         at org.apache.ambari.server.serveraction.kerberos.DestroyPrincipalsServerAction.processIdentity(DestroyPrincipalsServerAction.java:107)
>         at org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.processRecord(KerberosServerAction.java:504)
>         at org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.processIdentities(KerberosServerAction.java:393)
>         at org.apache.ambari.server.serveraction.kerberos.DestroyPrincipalsServerAction.execute(DestroyPrincipalsServerAction.java:64)
>         at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:504)
>         at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:441)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint
(AMBARICUSTOMUSER.FK_KRB_PR_HOST_PRINCIPALNAME) violated - child record found
> 
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
>         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
>         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
>         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
>         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
>         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
>         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)
>         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
>         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
>         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)
>         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
>         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:890)
>         ... 23 more
> 21 May 2015 00:19:22,126 ERROR [Server Action Executor Worker 263] AmbariJpaLocalTxnInterceptor:122
- [DETAILED ERROR] Internal exception (1) :
> java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (AMBARICUSTOMUSER.FK_KRB_PR_HOST_PRINCIPALNAME)
violated - child record found
> 
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
>         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
>         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
>         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
>         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
>         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
>         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)
>         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
>         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
>         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)
>         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
>         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:890)
>         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962)
>         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:631)
>         at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatch(ParameterizedSQLBatchWritingMechanism.java:149)
>         at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:134)
>         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.writesCompleted(DatabaseAccessor.java:1836)
>         at org.eclipse.persistence.internal.sessions.AbstractSession.writesCompleted(AbstractSession.java:4244)
>         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.writesCompleted(UnitOfWorkImpl.java:5594)
>         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.acquireWriteLocks(UnitOfWorkImpl.java:1646)
>         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1614)
>         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:284)
>         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169)
>         at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:132)
>         at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:91)
>         at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
>         at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
>         at org.apache.ambari.server.orm.dao.KerberosPrincipalDAO$$EnhancerByGuice$$9e172ec6.remove(<generated>)
>         at org.apache.ambari.server.serveraction.kerberos.DestroyPrincipalsServerAction.processIdentity(DestroyPrincipalsServerAction.java:107)
>         at org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.processRecord(KerberosServerAction.java:504)
>         at org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.processIdentities(KerberosServerAction.java:393)
>         at org.apache.ambari.server.serveraction.kerberos.DestroyPrincipalsServerAction.execute(DestroyPrincipalsServerAction.java:64)
>         at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:504)
>         at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:441)
>         at java.lang.Thread.run(Thread.java:745)
> 21 May 2015 00:19:22,127  WARN [Server Action Executor Worker 263] DestroyPrincipalsServerAction:119
- Failed to remove identity for ambari-qa_ruocwwby@EXAMPLE.COM from the Ambari database -
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
> ```
> 
> #Solution:
> Manually ensuring the child records are removed before the parent record is, when removing
the parent record. This is needed since the database's foreign key constraint and cascading
rules have been removed - See AMBARI-10717.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/KerberosPrincipalDAO.java
126d768 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/KerberosPrincipalEntity.java
45ccd9c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/KerberosPrincipalHostEntity.java
d8266e5 
> 
> Diff: https://reviews.apache.org/r/34590/diff/
> 
> 
> Testing
> -------
> 
> Manually tested in clusters using PostgrSQL, MySQL, and Oracle.  Viewed database tables
(kerberos_principal and kerberos_principal_host) to ensure records were acutally removed when
they should have been.
> 
> 
> Thanks,
> 
> Robert Levas
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message