ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Levas" <rle...@hortonworks.com>
Subject Review Request 30485: Service configurations are not updated as customized in the descriptor
Date Sun, 01 Feb 2015 13:04:22 GMT

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

Review request for Ambari, John Speidel and Robert Nettleton.


Bugs: AMBARI-9406
    https://issues.apache.org/jira/browse/AMBARI-9406


Repository: ambari


Description
-------

The Kerberos descriptor was saved with the customized value for smokeuser 

```
(${cluster-env/smokeuser}/c1@${realm})
```

The generated principal had the default value (i.e without /c1) and the corresponding configurations
also had the default value 

```
(${cluster-env/smokeuser}@${realm})
```

The reason for this is that the Kerberos descriptor stored for the cluster was not being used
when generating principals.  The solution is to read the configuration from the cluster artifact
and use appropriately. While at it, added factories for `KerberosDescriptor` and `KerberosServiceDescriptor`
and fixed implemenation where cluster artifact data was incorrectly being parsed into a `KerberosDescriptor`.

Most of the changes were due to refactoring the `KerberosDescriptor` and `KerberosServiceDescriptor`
classes to move static methods to relevant factory classes.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java 897cf52

  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
b6dd5c4 
  ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java 9e097c3

  ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java 8647f26

  ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java fd1fb57

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
49b8d5d 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
b1e05cc 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
bdf79b9 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java
89ac9d7 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java
717be2f 
  ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptor.java
41d100b 
  ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptorFactory.java
PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosDescriptor.java
0c05859 
  ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorFactory.java
PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptor.java
1f5e94f 
  ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptorFactory.java
PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
c0ff4a6 
  ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
e0667da 
  ambari-server/src/test/java/org/apache/ambari/server/controller/KerberosHelperTest.java
3532e69 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
337cc74 
  ambari-server/src/test/java/org/apache/ambari/server/stack/KerberosDescriptorTest.java cf426b0

  ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java
e4e9776 
  ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptorTest.java
9785e54 

Diff: https://reviews.apache.org/r/30485/diff/


Testing
-------

Manually tested in test cluster
Updated unit tests


# Jenkins test results
Running org.apache.ambari.server.api.services.AmbariMetaInfoTest
Tests run: 63, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 36.69 sec

Running org.apache.ambari.server.controller.AmbariManagementControllerImplTest
Tests run: 29, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.094 sec

Running org.apache.ambari.server.controller.KerberosHelperTest
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.488 sec

Running org.apache.ambari.server.controller.internal.HostComponentResourceProviderTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.071 sec

Running org.apache.ambari.server.stack.KerberosDescriptorTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.194 sec

Running org.apache.ambari.server.state.kerberos.KerberosDescriptorTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.279 sec

Running org.apache.ambari.server.state.kerberos.KerberosServiceDescriptorTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.231 sec

Ambari server test suite
Tests run: 2633, Failures: 0, Errors: 0, Skipped: 15

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:06 h
[INFO] Finished at: 2015-02-01T12:48:17+00:00
[INFO] Final Memory: 44M/534M
[INFO] ------------------------------------------------------------------------


Thanks,

Robert Levas


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