You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Robert Levas <rl...@hortonworks.com> on 2017/08/31 17:55:19 UTC
Review Request 62020: Pre-configure services during stack upgrade if
Kerberos is enabled to reduce number of core service restarts when
services are added
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62020/
-----------------------------------------------------------
Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
Bugs: AMBARI-21809
https://issues.apache.org/jira/browse/AMBARI-21809
Repository: ambari
Description
-------
Pre-configure (certain) services during a stack upgrade to HDP 2.6, when Kerberos is enabled, to reduce number of core service restarts when services are added.
Services to pre-configure include:
* Knox
* Beacon
While upgrading the stack (EU or RU), processing the relevant Kerberos descriptor to find services marked to be _pre-configured_. When a tagged service is encountered, process it if it is not installed. Apply only configuration changes for existing configuration types. This will set at least the core-site changes related to proxyuser and auth-to-local rules properties. By doing this, if a tagged service is later installed, the settings will already be in place in the existing service configs and thus the existing services will not need to be restarted.
Caveats:
* Default values for the uninstalled, tagged, services will be assumed
* The stack advisor will be used to suggest locations of components - used to build the clusterHostInfo structure that may be used to derive property values.
Note: This processing is to occur when upgrading the stack from HDP 2.5 to HDP 2.6.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java 978b329d35
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java 9bdb377cf7
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java d86433f880
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java 178d129dc8
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java da83a74aca
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java 581067f939
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java PRE-CREATION
ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml 492c308275
ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 995a1d3fd9
ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java PRE-CREATION
ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json PRE-CREATION
ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json PRE-CREATION
ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json PRE-CREATION
Diff: https://reviews.apache.org/r/62020/diff/1/
Testing
-------
Manually tested
# Local test results:
```
Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
```
# Jenkins test results: PENDING
Thanks,
Robert Levas
Re: Review Request 62020: Pre-configure services during stack upgrade
if
Kerberos is enabled to reduce number of core service restarts when services
are added
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62020/#review184368
-----------------------------------------------------------
Ship it!
Ship It!
- Jonathan Hurley
On Sept. 1, 2017, 11:29 a.m., Robert Levas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> -----------------------------------------------------------
>
> (Updated Sept. 1, 2017, 11:29 a.m.)
>
>
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
>
>
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when Kerberos is enabled, to reduce number of core service restarts when services are added.
>
> Services to pre-configure include:
> * Knox
> * Beacon
>
> While upgrading the stack (EU or RU), processing the relevant Kerberos descriptor to find services marked to be _pre-configured_. When a tagged service is encountered, process it if it is not installed. Apply only configuration changes for existing configuration types. This will set at least the core-site changes related to proxyuser and auth-to-local rules properties. By doing this, if a tagged service is later installed, the settings will already be in place in the existing service configs and thus the existing services will not need to be restarted.
>
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed
> * The stack advisor will be used to suggest locations of components - used to build the clusterHostInfo structure that may be used to derive property values.
>
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to HDP 2.6.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java 978b329d35
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java 9bdb377cf7
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java d86433f880
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java 178d129dc8
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java da83a74aca
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java 581067f939
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java PRE-CREATION
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml 492c308275
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 995a1d3fd9
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/62020/diff/2/
>
>
> Testing
> -------
>
> Manually tested
>
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
>
> # Jenkins test results: PENDING
>
>
> Thanks,
>
> Robert Levas
>
>
Re: Review Request 62020: Pre-configure services during stack upgrade
if
Kerberos is enabled to reduce number of core service restarts when services
are added
Posted by Attila Magyar <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62020/#review184361
-----------------------------------------------------------
Ship it!
Ship It!
- Attila Magyar
On Sept. 1, 2017, 3:29 p.m., Robert Levas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> -----------------------------------------------------------
>
> (Updated Sept. 1, 2017, 3:29 p.m.)
>
>
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
>
>
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when Kerberos is enabled, to reduce number of core service restarts when services are added.
>
> Services to pre-configure include:
> * Knox
> * Beacon
>
> While upgrading the stack (EU or RU), processing the relevant Kerberos descriptor to find services marked to be _pre-configured_. When a tagged service is encountered, process it if it is not installed. Apply only configuration changes for existing configuration types. This will set at least the core-site changes related to proxyuser and auth-to-local rules properties. By doing this, if a tagged service is later installed, the settings will already be in place in the existing service configs and thus the existing services will not need to be restarted.
>
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed
> * The stack advisor will be used to suggest locations of components - used to build the clusterHostInfo structure that may be used to derive property values.
>
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to HDP 2.6.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java 978b329d35
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java 9bdb377cf7
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java d86433f880
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java 178d129dc8
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java da83a74aca
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java 581067f939
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java PRE-CREATION
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml 492c308275
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 995a1d3fd9
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/62020/diff/2/
>
>
> Testing
> -------
>
> Manually tested
>
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
>
> # Jenkins test results: PENDING
>
>
> Thanks,
>
> Robert Levas
>
>
Re: Review Request 62020: Pre-configure services during stack upgrade
if
Kerberos is enabled to reduce number of core service restarts when services
are added
Posted by Robert Levas <rl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62020/
-----------------------------------------------------------
(Updated Sept. 1, 2017, 11:29 a.m.)
Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
Changes
-------
Addressed Attila's concerns.
Bugs: AMBARI-21809
https://issues.apache.org/jira/browse/AMBARI-21809
Repository: ambari
Description
-------
Pre-configure (certain) services during a stack upgrade to HDP 2.6, when Kerberos is enabled, to reduce number of core service restarts when services are added.
Services to pre-configure include:
* Knox
* Beacon
While upgrading the stack (EU or RU), processing the relevant Kerberos descriptor to find services marked to be _pre-configured_. When a tagged service is encountered, process it if it is not installed. Apply only configuration changes for existing configuration types. This will set at least the core-site changes related to proxyuser and auth-to-local rules properties. By doing this, if a tagged service is later installed, the settings will already be in place in the existing service configs and thus the existing services will not need to be restarted.
Caveats:
* Default values for the uninstalled, tagged, services will be assumed
* The stack advisor will be used to suggest locations of components - used to build the clusterHostInfo structure that may be used to derive property values.
Note: This processing is to occur when upgrading the stack from HDP 2.5 to HDP 2.6.
Diffs (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java 978b329d35
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java 9bdb377cf7
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java d86433f880
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java 178d129dc8
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java da83a74aca
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java 581067f939
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java PRE-CREATION
ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml 492c308275
ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 995a1d3fd9
ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java PRE-CREATION
ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json PRE-CREATION
ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json PRE-CREATION
ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json PRE-CREATION
Diff: https://reviews.apache.org/r/62020/diff/2/
Changes: https://reviews.apache.org/r/62020/diff/1-2/
Testing
-------
Manually tested
# Local test results:
```
Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
```
# Jenkins test results: PENDING
Thanks,
Robert Levas
Re: Review Request 62020: Pre-configure services during stack upgrade
if
Kerberos is enabled to reduce number of core service restarts when services
are added
Posted by Robert Levas <rl...@hortonworks.com>.
> On Sept. 1, 2017, 3:40 a.m., Attila Magyar wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
> > Lines 173 (patched)
> > <https://reviews.apache.org/r/62020/diff/1/?file=1808720#file1808720line173>
> >
> > unnecessary null check: cluster.getServices() never returns null
I never like making that assumption ("never returns null"). Today the implementation happens to not return null, tommorow may be a different story.
> On Sept. 1, 2017, 3:40 a.m., Attila Magyar wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
> > Lines 370 (patched)
> > <https://reviews.apache.org/r/62020/diff/1/?file=1808720#file1808720line370>
> >
> > isn't this supposed to be !MapUtils.isEmpty ?
Nice catch.
- Robert
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62020/#review184341
-----------------------------------------------------------
On Aug. 31, 2017, 1:55 p.m., Robert Levas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> -----------------------------------------------------------
>
> (Updated Aug. 31, 2017, 1:55 p.m.)
>
>
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
>
>
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when Kerberos is enabled, to reduce number of core service restarts when services are added.
>
> Services to pre-configure include:
> * Knox
> * Beacon
>
> While upgrading the stack (EU or RU), processing the relevant Kerberos descriptor to find services marked to be _pre-configured_. When a tagged service is encountered, process it if it is not installed. Apply only configuration changes for existing configuration types. This will set at least the core-site changes related to proxyuser and auth-to-local rules properties. By doing this, if a tagged service is later installed, the settings will already be in place in the existing service configs and thus the existing services will not need to be restarted.
>
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed
> * The stack advisor will be used to suggest locations of components - used to build the clusterHostInfo structure that may be used to derive property values.
>
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to HDP 2.6.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java 978b329d35
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java 9bdb377cf7
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java d86433f880
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java 178d129dc8
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java da83a74aca
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java 581067f939
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java PRE-CREATION
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml 492c308275
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 995a1d3fd9
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/62020/diff/1/
>
>
> Testing
> -------
>
> Manually tested
>
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
>
> # Jenkins test results: PENDING
>
>
> Thanks,
>
> Robert Levas
>
>
Re: Review Request 62020: Pre-configure services during stack upgrade
if
Kerberos is enabled to reduce number of core service restarts when services
are added
Posted by Attila Magyar <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62020/#review184341
-----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
Lines 173 (patched)
<https://reviews.apache.org/r/62020/#comment260476>
unnecessary null check: cluster.getServices() never returns null
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
Lines 341 (patched)
<https://reviews.apache.org/r/62020/#comment260477>
this isEmpty check looks unnecessary, there is a for loop after the check
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java
Lines 370 (patched)
<https://reviews.apache.org/r/62020/#comment260478>
isn't this supposed to be !MapUtils.isEmpty ?
- Attila Magyar
On Aug. 31, 2017, 5:55 p.m., Robert Levas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> -----------------------------------------------------------
>
> (Updated Aug. 31, 2017, 5:55 p.m.)
>
>
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
>
>
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when Kerberos is enabled, to reduce number of core service restarts when services are added.
>
> Services to pre-configure include:
> * Knox
> * Beacon
>
> While upgrading the stack (EU or RU), processing the relevant Kerberos descriptor to find services marked to be _pre-configured_. When a tagged service is encountered, process it if it is not installed. Apply only configuration changes for existing configuration types. This will set at least the core-site changes related to proxyuser and auth-to-local rules properties. By doing this, if a tagged service is later installed, the settings will already be in place in the existing service configs and thus the existing services will not need to be restarted.
>
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed
> * The stack advisor will be used to suggest locations of components - used to build the clusterHostInfo structure that may be used to derive property values.
>
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to HDP 2.6.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java 978b329d35
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java 9bdb377cf7
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java d86433f880
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java 178d129dc8
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java da83a74aca
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java 581067f939
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java PRE-CREATION
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml 492c308275
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 995a1d3fd9
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/62020/diff/1/
>
>
> Testing
> -------
>
> Manually tested
>
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
>
> # Jenkins test results: PENDING
>
>
> Thanks,
>
> Robert Levas
>
>
Re: Review Request 62020: Pre-configure services during stack upgrade
if
Kerberos is enabled to reduce number of core service restarts when services
are added
Posted by Eugene Chekanskiy <ec...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62020/#review184358
-----------------------------------------------------------
Ship it!
Ship It!
- Eugene Chekanskiy
On Aug. 31, 2017, 5:55 p.m., Robert Levas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62020/
> -----------------------------------------------------------
>
> (Updated Aug. 31, 2017, 5:55 p.m.)
>
>
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene Chekanskiy, Jonathan Hurley, Laszlo Puskas, Nate Cole, and Sebastian Toader.
>
>
> Bugs: AMBARI-21809
> https://issues.apache.org/jira/browse/AMBARI-21809
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Pre-configure (certain) services during a stack upgrade to HDP 2.6, when Kerberos is enabled, to reduce number of core service restarts when services are added.
>
> Services to pre-configure include:
> * Knox
> * Beacon
>
> While upgrading the stack (EU or RU), processing the relevant Kerberos descriptor to find services marked to be _pre-configured_. When a tagged service is encountered, process it if it is not installed. Apply only configuration changes for existing configuration types. This will set at least the core-site changes related to proxyuser and auth-to-local rules properties. By doing this, if a tagged service is later installed, the settings will already be in place in the existing service configs and thus the existing services will not need to be restarted.
>
> Caveats:
> * Default values for the uninstalled, tagged, services will be assumed
> * The stack advisor will be used to suggest locations of components - used to build the clusterHostInfo structure that may be used to derive property values.
>
> Note: This processing is to occur when upgrading the stack from HDP 2.5 to HDP 2.6.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java 978b329d35
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java 9bdb377cf7
> ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java d86433f880
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareDisableKerberosServerAction.java 178d129dc8
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareEnableKerberosServerAction.java da83a74aca
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/PrepareKerberosIdentitiesServerAction.java 581067f939
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosAction.java PRE-CREATION
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml 492c308275
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 995a1d3fd9
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_cluster_config.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack.json PRE-CREATION
> ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/62020/diff/1/
>
>
> Testing
> -------
>
> Manually tested
>
> # Local test results:
> ```
> Tests run: 4861, Failures: 0, Errors: 0, Skipped: 37
> ```
>
> # Jenkins test results: PENDING
>
>
> Thanks,
>
> Robert Levas
>
>