Re: Review Request 52646: Remove Unnecessary Locks Inside Of Service Business Object Implementations

2016-10-10 Thread Sid Wagle


> On Oct. 7, 2016, 8:13 p.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java,
> >  line 966
> > 
> >
> > Shouldn't we target removing the explicit refresh calls as well, these 
> > have been grandfathered in and seem to be somewhat of an anit-pattern. If 
> > we are doing this the right way and Casading the operations from JPA layer, 
> > do you think we should still keep refreshing logic around?
> 
> Jonathan Hurley wrote:
> Yes - but I don't want to break the world. I've removed them from places 
> where they are just outright wrong and I've kept a few uses of them. I can 
> probably remove completely.

+1 Removing them, it would anyways lead to finding out areas which need to be 
changed.


- Sid


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


On Oct. 7, 2016, 7:04 p.m., Jonathan Hurley wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52646/
> ---
> 
> (Updated Oct. 7, 2016, 7:04 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18556
> https://issues.apache.org/jira/browse/AMBARI-18556
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> A continuation of AMBARI-18456...
> 
> The {{Service}} business object should have the following work performed:
> - Remove locking around areas where its no longer required
> - Replace collections with thread-safe concurrent versions
> - Remove some reliance on state-full business objects (caches)
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseRequest.java
>  9f7b949 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
>  746bca4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  ac680a5 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
>  56196c1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java
>  176e15b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java
>  2eefe09 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostDAO.java 
> d367eb3 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterServiceEntity.java
>  320c1be 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
>  fd15200 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
>  1555321 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Service.java 
> 48ab252 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 
> 36d4902 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
>  aff3a3b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 
> ec8873a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
>  7e345e5 
>   ambari-server/src/main/java/org/apache/ambari/server/utils/RetryHelper.java 
> 17f1447 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatProcessorTest.java
>  dd93374 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
>  0f48cf6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java
>  503c8e5 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java
>  50f5abe 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
>  a3521fd 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PreUpgradeCheckResourceProviderTest.java
>  6a0fa12 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
>  84f8124 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderHDP22Test.java
>  a0940ba 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
>  c2c8ced 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProviderTest.java
>  8efec98 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/state/GeneralServiceCalculatedStateTest.java
>  710c723 
>   

Review Request 52711: Logging of ambari agent scheduling activities in debug mode- AMBARI-18502.

2016-10-10 Thread Ranjan Banerjee

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

Review request for Ambari and Nahappan Somasundaram.


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


Repository: ambari


Description
---

Added debug logging to better understand if a scheduler has missed scheduling 
the job or there is a threadpool delay in getting to the required job. Will 
help in the case of stale alerts


Diffs
-

  ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py 35460b2 
  ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py 6cd7ce2 

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


Testing
---

Ran mvn clean test in Ambari-agent module.


Thanks,

Ranjan Banerjee



Re: Review Request 52709: Deprecate old UpgradeCatalog Unit Tests

2016-10-10 Thread Alejandro Fernandez

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

(Updated Oct. 10, 2016, 11:21 p.m.)


Review request for Ambari, Jonathan Hurley and Sid Wagle.


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


Repository: ambari


Description
---

Deprecate the older UpgradeCatalog tests that are no longer needed to decrease 
time it takes to run unit tests.
UpgradeCatalog150Test
UpgradeCatalog151Test
UpgradeCatalog160Test
UpgradeCatalog161Test
UpgradeCatalog170Test


Diffs
-

  
ambari-server/src/test/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheckTest.java
 7469bbc 
  
ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java
 49eefed 
  
ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
 ec01b80 
  
ambari-server/src/test/java/org/apache/ambari/server/testing/DeadlockWarningThread.java
 589aee1 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog150Test.java
 4647815 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog151Test.java
 b47f411 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
 303fa3a 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java
 a3b41b8 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
 10e4993 

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


Testing (updated)
---

"mvn clean test" passed


Thanks,

Alejandro Fernandez



Review Request 52710: AMBARI-18566 Installer wizard-> Select Versions page: Selecting Red Hat Satellite option and clicking next button makes wizard stuck

2016-10-10 Thread Zhe (Joe) Wang

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

Review request for Ambari, Jaimin Jetly, Richard Zang, Vivek Ratnavel 
Subramanian, Xi Wang, and Yusaku Sako.


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


Repository: ambari


Description
---

*STR:*
# Got to select versions page
# Choose "Use Local Repository" option and then choose "Use RedHat 
Satellite/Spacewalk" option
# Next button will get enabled. click on next button. 

*Expected Result:* wizard goes to next page
*Actual Result:* On clicking next button, next button gets disabled and wizard 
does not go to next page.


Diffs
-

  ambari-web/app/controllers/installer.js f8f70a0 

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


Testing
---

Local ambari-web test passed.
30374 tests complete (27 seconds)
151 tests pending
Manual testing done


Thanks,

Zhe (Joe) Wang



Re: Review Request 52654: At "Add Service Wizard", when the installation is going on, if I click the close (X) on the wizard, the service will only get INSTALLED not STARTED.

2016-10-10 Thread Zhe (Joe) Wang

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


Ship it!




Ship It!

- Zhe (Joe) Wang


On Oct. 7, 2016, 10:14 p.m., Vivek Ratnavel Subramanian wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52654/
> ---
> 
> (Updated Oct. 7, 2016, 10:14 p.m.)
> 
> 
> Review request for Ambari, Jaimin Jetly, Zhe (Joe) Wang, Richard Zang, Xi 
> Wang, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-18559
> https://issues.apache.org/jira/browse/AMBARI-18559
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> - Typically being in "Add Service Wizard", user expects the INSTALL and START 
> of sevices components.
> - However, if user clicks on the close (X) on the wizard, the service will 
> only get INSTALLED not STARTED.
> 
> - Either apprising the user that only INSTALL will take place and START will 
> be skipped will help OR even if the  close (X) on the wizard is hit, context 
> for START is still maintained.
> 
> 
> Diffs
> -
> 
>   ambari-web/app/messages.js 5eafad2 
>   ambari-web/app/routes/add_service_routes.js 30c8e07 
> 
> Diff: https://reviews.apache.org/r/52654/diff/
> 
> 
> Testing
> ---
> 
> Verified Manually.
> Ambari-web unit tests pass.
> 30374 tests complete (26 seconds)
> 151 tests pending
> 
> 
> Thanks,
> 
> Vivek Ratnavel Subramanian
> 
>



Re: Review Request 52709: Deprecate old UpgradeCatalog Unit Tests

2016-10-10 Thread Alejandro Fernandez

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




ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java
 (line 115)


Gain a small improvement in this class by switching to mock module



ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
 (line 74)


Added more threads here and reduced the number of hosts, time went down 
from 2 min to 1:30


- Alejandro Fernandez


On Oct. 10, 2016, 10:12 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52709/
> ---
> 
> (Updated Oct. 10, 2016, 10:12 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Sid Wagle.
> 
> 
> Bugs: AMBARI-18565
> https://issues.apache.org/jira/browse/AMBARI-18565
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Deprecate the older UpgradeCatalog tests that are no longer needed to 
> decrease time it takes to run unit tests.
> UpgradeCatalog150Test
> UpgradeCatalog151Test
> UpgradeCatalog160Test
> UpgradeCatalog161Test
> UpgradeCatalog170Test
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/test/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheckTest.java
>  7469bbc 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java
>  49eefed 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
>  ec01b80 
>   
> ambari-server/src/test/java/org/apache/ambari/server/testing/DeadlockWarningThread.java
>  589aee1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog150Test.java
>  4647815 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog151Test.java
>  b47f411 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
>  303fa3a 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java
>  a3b41b8 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
>  10e4993 
> 
> Diff: https://reviews.apache.org/r/52709/diff/
> 
> 
> Testing
> ---
> 
> Waiting for unit test results to make sure trunk is clean.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Review Request 52709: Deprecate old UpgradeCatalog Unit Tests

2016-10-10 Thread Alejandro Fernandez

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

Review request for Ambari, Jonathan Hurley and Sid Wagle.


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


Repository: ambari


Description
---

Deprecate the older UpgradeCatalog tests that are no longer needed to decrease 
time it takes to run unit tests.
UpgradeCatalog150Test
UpgradeCatalog151Test
UpgradeCatalog160Test
UpgradeCatalog161Test
UpgradeCatalog170Test


Diffs
-

  
ambari-server/src/test/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheckTest.java
 7469bbc 
  
ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java
 49eefed 
  
ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
 ec01b80 
  
ambari-server/src/test/java/org/apache/ambari/server/testing/DeadlockWarningThread.java
 589aee1 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog150Test.java
 4647815 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog151Test.java
 b47f411 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
 303fa3a 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java
 a3b41b8 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
 10e4993 

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


Testing
---

Waiting for unit test results to make sure trunk is clean.


Thanks,

Alejandro Fernandez



Re: Review Request 52528: Custom logsearch property should override default value

2016-10-10 Thread Robert Nettleton

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


Ship it!




Patch looks fine to me.  

Thanks.


ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/UserDao.java
 (line 91)


Minor question (and I won't raise an issue about this):

Why is the final modifier removed here?  Is there a specific reason for 
this?


- Robert Nettleton


On Oct. 6, 2016, 11:47 p.m., Miklos Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52528/
> ---
> 
> (Updated Oct. 6, 2016, 11:47 p.m.)
> 
> 
> Review request for Ambari, Oliver Szabo, Robert Nettleton, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18529
> https://issues.apache.org/jira/browse/AMBARI-18529
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Custom properties are now overriding default proplerties, not the other way
> Also removed some unused code, and made UserDao more reasonable
> 
> 
> Diffs
> -
> 
>   
> ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/UserDao.java
>  0810571 
>   
> ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/web/security/LogsearchAbstractAuthenticationProvider.java
>  eb6c9f1 
>   
> ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/web/security/LogsearchSimpleAuthenticationProvider.java
>  92a7aaa 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
>  e55653f 
> 
> Diff: https://reviews.apache.org/r/52528/diff/
> 
> 
> Testing
> ---
> 
> done.
> 
> 
> Thanks,
> 
> Miklos Gergely
> 
>



Re: Review Request 52583: Request/access log feature in Ambari-server

2016-10-10 Thread Amarnath reddy pappu

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

(Updated Oct. 10, 2016, 8:43 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, and 
Sid Wagle.


Changes
---

Have added another method and attached new code diff.
Have marked the bug as fixed and resolved it.


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


Repository: ambari


Description
---

Request/access log feature in Ambari-server


1. Have provided option in ambari.properties to configure the path - 
"server.requestlogs.path"
By default has given it as 
server.requestlogs.path=\var\log\ambari-server\ambari-access-_mm_dd.log
2. If some customers does not want this to enable then removing 
"server.requestlogs.path" property will not create any file. 
3. currently have set the number of reatin days as 15
4. if somebody wants to reduce/increase that value then add that property in 
ambari.properties file

5. log content should look alike below,
 
 192.168.65.1 -  -  [05/Oct/2016:23:45:18 +] "GET / HTTP/1.1" 404 618 "-" 
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 
Firefox/48.0"

Please review and provide your comments.


Diffs (updated)
-

  ambari-server/conf/windows/ambari.properties 64cce3b 
  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 2e850ef 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 5e498f0 

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


Testing
---

1. install and start  Ambari-server, access the UI. 
Expected Result: server should create ambari-server-access-_mm_dd.log
Result: PASS

2. access few links in ambari server UI
Expected Result: server should log URL and response code
Result: PASS

3. Remove entry server.requestlogs.path from ambari.properties 
Expected Result: server should not create any request log
Result: PASS

4. change the log path server.requestlogs.path in ambari.properties and restart 
server
Expected Result: it should create request log in new path
Result: PASS


File Attachments


sample request log
  
https://reviews.apache.org/media/uploaded/files/2016/10/10/c6ccec4e-dd49-4f13-8533-bf20e13f9b2f__ambari-access-2016_10_10.log.bk


Thanks,

Amarnath reddy pappu



Re: Review Request 52583: Request/access log feature in Ambari-server

2016-10-10 Thread Sid Wagle

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 (line 505)


Can we move this to a separate method, run is already too long.



ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 (line 509)


StringUtils is null safe no need for extra check.


- Sid Wagle


On Oct. 10, 2016, 7:27 p.m., Amarnath reddy pappu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52583/
> ---
> 
> (Updated Oct. 10, 2016, 7:27 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, 
> and Sid Wagle.
> 
> 
> Bugs: AMBARI-18543
> https://issues.apache.org/jira/browse/AMBARI-18543
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Request/access log feature in Ambari-server
> 
> 
> 1. Have provided option in ambari.properties to configure the path - 
> "server.requestlogs.path"
> By default has given it as 
> server.requestlogs.path=\var\log\ambari-server\ambari-access-_mm_dd.log
> 2. If some customers does not want this to enable then removing 
> "server.requestlogs.path" property will not create any file. 
> 3. currently have set the number of reatin days as 15
> 4. if somebody wants to reduce/increase that value then add that property in 
> ambari.properties file
> 
> 5. log content should look alike below,
>  
>  192.168.65.1 -  -  [05/Oct/2016:23:45:18 +] "GET / HTTP/1.1" 404 618 "-" 
> "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 
> Firefox/48.0"
> 
> Please review and provide your comments.
> 
> 
> Diffs
> -
> 
>   ambari-server/conf/windows/ambari.properties 64cce3b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  2e850ef 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  5e498f0 
> 
> Diff: https://reviews.apache.org/r/52583/diff/
> 
> 
> Testing
> ---
> 
> 1. install and start  Ambari-server, access the UI. 
> Expected Result: server should create ambari-server-access-_mm_dd.log
> Result: PASS
> 
> 2. access few links in ambari server UI
> Expected Result: server should log URL and response code
> Result: PASS
> 
> 3. Remove entry server.requestlogs.path from ambari.properties 
> Expected Result: server should not create any request log
> Result: PASS
> 
> 4. change the log path server.requestlogs.path in ambari.properties and 
> restart server
> Expected Result: it should create request log in new path
> Result: PASS
> 
> 
> File Attachments
> 
> 
> sample request log
>   
> https://reviews.apache.org/media/uploaded/files/2016/10/10/c6ccec4e-dd49-4f13-8533-bf20e13f9b2f__ambari-access-2016_10_10.log.bk
> 
> 
> Thanks,
> 
> Amarnath reddy pappu
> 
>



Re: Review Request 52583: Request/access log feature in Ambari-server

2016-10-10 Thread Amarnath reddy pappu

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

(Updated Oct. 10, 2016, 7:27 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, and 
Sid Wagle.


Changes
---

Have attached sample request log file.


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


Repository: ambari


Description
---

Request/access log feature in Ambari-server


1. Have provided option in ambari.properties to configure the path - 
"server.requestlogs.path"
By default has given it as 
server.requestlogs.path=\var\log\ambari-server\ambari-access-_mm_dd.log
2. If some customers does not want this to enable then removing 
"server.requestlogs.path" property will not create any file. 
3. currently have set the number of reatin days as 15
4. if somebody wants to reduce/increase that value then add that property in 
ambari.properties file

5. log content should look alike below,
 
 192.168.65.1 -  -  [05/Oct/2016:23:45:18 +] "GET / HTTP/1.1" 404 618 "-" 
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 
Firefox/48.0"

Please review and provide your comments.


Diffs
-

  ambari-server/conf/windows/ambari.properties 64cce3b 
  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 2e850ef 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 5e498f0 

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


Testing
---

1. install and start  Ambari-server, access the UI. 
Expected Result: server should create ambari-server-access-_mm_dd.log
Result: PASS

2. access few links in ambari server UI
Expected Result: server should log URL and response code
Result: PASS

3. Remove entry server.requestlogs.path from ambari.properties 
Expected Result: server should not create any request log
Result: PASS

4. change the log path server.requestlogs.path in ambari.properties and restart 
server
Expected Result: it should create request log in new path
Result: PASS


File Attachments (updated)


sample request log
  
https://reviews.apache.org/media/uploaded/files/2016/10/10/c6ccec4e-dd49-4f13-8533-bf20e13f9b2f__ambari-access-2016_10_10.log.bk


Thanks,

Amarnath reddy pappu



Re: Review Request 52583: Request/access log feature in Ambari-server

2016-10-10 Thread Amarnath reddy pappu

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

(Updated Oct. 10, 2016, 7:26 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, and 
Sid Wagle.


Changes
---

Hi,

I have modified the code to take couple of more things.

1. now access/request log prints time taken for each call to Ambari-server
2. have disabled requests logs bydefault.
3. havetaken care one of the issue relating to handles.
4. corrected incorrect comments.

Regards,
Amar


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


Repository: ambari


Description
---

Request/access log feature in Ambari-server


1. Have provided option in ambari.properties to configure the path - 
"server.requestlogs.path"
By default has given it as 
server.requestlogs.path=\var\log\ambari-server\ambari-access-_mm_dd.log
2. If some customers does not want this to enable then removing 
"server.requestlogs.path" property will not create any file. 
3. currently have set the number of reatin days as 15
4. if somebody wants to reduce/increase that value then add that property in 
ambari.properties file

5. log content should look alike below,
 
 192.168.65.1 -  -  [05/Oct/2016:23:45:18 +] "GET / HTTP/1.1" 404 618 "-" 
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 
Firefox/48.0"

Please review and provide your comments.


Diffs (updated)
-

  ambari-server/conf/windows/ambari.properties 64cce3b 
  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 2e850ef 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 5e498f0 

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


Testing
---

1. install and start  Ambari-server, access the UI. 
Expected Result: server should create ambari-server-access-_mm_dd.log
Result: PASS

2. access few links in ambari server UI
Expected Result: server should log URL and response code
Result: PASS

3. Remove entry server.requestlogs.path from ambari.properties 
Expected Result: server should not create any request log
Result: PASS

4. change the log path server.requestlogs.path in ambari.properties and restart 
server
Expected Result: it should create request log in new path
Result: PASS


Thanks,

Amarnath reddy pappu



Re: Review Request 52583: Request/access log feature in Ambari-server

2016-10-10 Thread Amarnath reddy pappu


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/conf/unix/ambari.properties, line 78
> > 
> >
> > Not really a path, more like "pattern" or "format".  Probably disable 
> > by default.
> > 
> > 
> > Are PUT/POST added to the log?  With data?

For PUT/POST it does not print any data. here is an example

0:0:0:0:0:0:0:1 -  -  [10/Oct/2016:19:08:29 +] "POST 
https://localhost:8441/agent/v1/heartbeat/c6407.ambari.apache.org HTTP/1.1" 200 
230 "-" "-"  60
0:0:0:0:0:0:0:1 -  -  [10/Oct/2016:19:08:29 +] "POST 
https://localhost:8441/agent/v1/register/c6407.ambari.apache.org HTTP/1.1" 200 
29619 "-" "-"  309


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java,
> >  lines 1685-1687
> > 
> >
> > Description is wrong (copy/paste?).  Also property name should be 
> > pattern or format, not "path"

addressed, attaching modified code for review.


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  lines 626-628
> > 
> >
> > I think this is something that should be disabled by default and 
> > enabled for support purposes.  What goes in the log?  POST/PUT bodies?

yeah agreed - removed the properties from ambari.properties file. only way to 
enable this is, add server.requestlogs.path in properties


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 627
> > 
> >
> > !StringUtils.isBlank(...)

implemented.


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  lines 634-635
> > 
> >
> > Why only use the default value?  Isn't that why it's configurable?

This is configurable.


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 641
> > 
> >
> > Agent communication is pretty stable, what purpose is there in logging 
> > it?  Maybe a separate config for that?

we were still observing some agent communication issues. basically using access 
log we can find out how much time Ambari is taking to respond back for each 
agent as well.


- Amarnath reddy


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


On Oct. 5, 2016, 11:51 p.m., Amarnath reddy pappu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52583/
> ---
> 
> (Updated Oct. 5, 2016, 11:51 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, 
> and Sid Wagle.
> 
> 
> Bugs: AMBARI-18543
> https://issues.apache.org/jira/browse/AMBARI-18543
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Request/access log feature in Ambari-server
> 
> 
> 1. Have provided option in ambari.properties to configure the path - 
> "server.requestlogs.path"
> By default has given it as 
> server.requestlogs.path=\var\log\ambari-server\ambari-access-_mm_dd.log
> 2. If some customers does not want this to enable then removing 
> "server.requestlogs.path" property will not create any file. 
> 3. currently have set the number of reatin days as 15
> 4. if somebody wants to reduce/increase that value then add that property in 
> ambari.properties file
> 
> 5. log content should look alike below,
>  
>  192.168.65.1 -  -  [05/Oct/2016:23:45:18 +] "GET / HTTP/1.1" 404 618 "-" 
> "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 
> Firefox/48.0"
> 
> Please review and provide your comments.
> 
> 
> Diffs
> -
> 
>   ambari-server/conf/unix/ambari.properties 4dcbe99 
>   ambari-server/conf/windows/ambari.properties 64cce3b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  2e850ef 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  5e498f0 
> 
> Diff: https://reviews.apache.org/r/52583/diff/
> 
> 
> Testing
> ---
> 
> 1. install and start  Ambari-server, access the UI. 
> Expected Result: server should create 

Re: Review Request 52681: Add more logging to track what condition resulted in skipping agent commands

2016-10-10 Thread Alejandro Fernandez

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


Ship it!




Ship It!

- Alejandro Fernandez


On Oct. 10, 2016, 11:14 a.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52681/
> ---
> 
> (Updated Oct. 10, 2016, 11:14 a.m.)
> 
> 
> Review request for Ambari, Laszlo Puskas, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-18560
> https://issues.apache.org/jira/browse/AMBARI-18560
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Log at INFO level the cases when commands to be sent for agents are not 
> created for update host component requests due to certain conditions are not 
> met. This will help with tracing from logs why no actions for agents were not 
> created by the server.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  1fc9dbf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
>  73cedb4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
>  85a4949 
> 
> Diff: https://reviews.apache.org/r/52681/diff/
> 
> 
> Testing
> ---
> 
> Manual testing.
> 
> Unit test results:
> Failed tests: 
>   UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1118 
>   Unexpected method call 
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
> org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service):
> AmbariManagementController.getClusters(): expected: at least 0, actual: 1
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
> interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service): expected: 1, actual: 0
>   DataStoreImplTest.testFind:526 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testRemove:475 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update:357 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update_longStringValue:426 
>   Expectation failure on verify:
> DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
> 
> 
> These failure are not related to this change.
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>



Re: Review Request 52649: Create Component to Repo Version associations

2016-10-10 Thread Alejandro Fernandez

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


Ship it!




Ship It!

- Alejandro Fernandez


On Oct. 10, 2016, 6:27 p.m., Nate Cole wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52649/
> ---
> 
> (Updated Oct. 10, 2016, 6:27 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-18577
> https://issues.apache.org/jira/browse/AMBARI-18577
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> This jira is making the entities and schema changes.  Heartbeat and 
> transition logic will be in a future change.
> 
> The version entity will likely change as the enhancement evolves.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
>  cdaa6f0 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
>  61c053d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentVersionEntity.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog300.java
>  64c98b7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql c2c965d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1c17e1a 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 49f3e2f 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7aa52ef 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 0c95471 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 631b5c4 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2bc3282 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
>  b043da1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
>  dcb1fdd 
> 
> Diff: https://reviews.apache.org/r/52649/diff/
> 
> 
> Testing
> ---
> 
> Failures are known and unrelated to this change.
> 
> Automated:
> 
> Tests in error:
>   AgentResourceTest.agentHeartBeat:176 » ClientHandler 
> org.codehaus.jackson.map
>   AgentResourceTest.agentHeartBeatWithEnv:190 » ClientHandler 
> org.codehaus.jacks...
>   AgentResourceTest.agentRegistration:163 » ClientHandler 
> org.codehaus.jackson.m...
> 
> Tests run: 4693, Failures: 0, Errors: 3, Skipped: 36
> 
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time: 41:55.279s
> [INFO] Finished at: Fri Oct 07 16:07:02 EDT 2016
> [INFO] Final Memory: 37M/540M
> [INFO] 
> 
> 
> 
> Thanks,
> 
> Nate Cole
> 
>



Re: Review Request 52649: Create Component to Repo Version associations

2016-10-10 Thread Nate Cole

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

(Updated Oct. 10, 2016, 2:27 p.m.)


Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.


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


Repository: ambari


Description
---

This jira is making the entities and schema changes.  Heartbeat and transition 
logic will be in a future change.

The version entity will likely change as the enhancement evolves.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
 cdaa6f0 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
 61c053d 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentVersionEntity.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog300.java
 64c98b7 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql c2c965d 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1c17e1a 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 49f3e2f 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7aa52ef 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 0c95471 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 631b5c4 
  ambari-server/src/main/resources/META-INF/persistence.xml 2bc3282 
  
ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
 b043da1 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
 dcb1fdd 

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


Testing
---

Failures are known and unrelated to this change.

Automated:

Tests in error:
  AgentResourceTest.agentHeartBeat:176 » ClientHandler 
org.codehaus.jackson.map
  AgentResourceTest.agentHeartBeatWithEnv:190 » ClientHandler 
org.codehaus.jacks...
  AgentResourceTest.agentRegistration:163 » ClientHandler 
org.codehaus.jackson.m...

Tests run: 4693, Failures: 0, Errors: 3, Skipped: 36

[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time: 41:55.279s
[INFO] Finished at: Fri Oct 07 16:07:02 EDT 2016
[INFO] Final Memory: 37M/540M
[INFO] 


Thanks,

Nate Cole



Re: Review Request 52636: Implement instrumented Lock for profiling/logging

2016-10-10 Thread Attila Doroszlai


> On Oct. 7, 2016, 9 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java,
> >  lines 332-333
> > 
> >
> > Why is this a read/write lock? I don't think it's used with a reader 
> > anywhere.

It was a ReadWriteLock previously, too.  I only moved initialization to the 
constructor to be able to use the injected factory.

You are right, read part of the lock is never used.  I will remove it.


- Attila


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


On Oct. 7, 2016, 10:21 p.m., Attila Doroszlai wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52636/
> ---
> 
> (Updated Oct. 7, 2016, 10:21 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Laszlo Puskas, Sandor Magyari, 
> and Sebastian Toader.
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> 1. Create `Lock` and `ReadWriteLock` implementation for profiling and logging 
> lock usage
> 2. Introduce `LockFactory` that creates regular or instrumented locks based 
> on Ambari Server configuration
> 3. As sample usage, replace locks in `ClusterImpl` with the ones created by 
> `LockFactory`
> 4. Allows on-demand dump of lock profiler summary stats as part of the debug 
> log for `/api/v1/clusters` requests (This is a temporary solution.  Once the 
> factory is used in more places, the dump should be triggered by some other 
> request unrelated to the clusters.)
> 
> Configuration:
> 
>  * `server.locks.profiling=true` enables usage of instrumented locks instead 
> of regular ones (goes in `ambari.properties`)
>  * 
> `log4j.logger.org.apache.ambari.server.controller.AmbariManagementControllerImpl=DEBUG`
>  required for the on-demand dump (goes in `log4j.properties`)
>  * `log4j.logger.org.apache.ambari.server.logging=DEBUG` enables logging of 
> individual "requested", "acquired", "released" events. Only the outermost 
> lock/unlock call is logged, reentrant calls are ignored (goes in 
> `log4j.properties`)
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  2e850ef 
>   
> ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java 
> PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/logging/LockProfileDelegate.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/logging/ProfiledLock.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/logging/ProfiledReentrantLock.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/logging/ProfiledReentrantReadWriteLock.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
>  2f7d6b9 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  a56ace5 
>   
> ambari-server/src/test/java/org/apache/ambari/server/logging/LockFactoryTest.java
>  PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/logging/ProfiledReentrantReadWriteLockTest.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52636/diff/
> 
> 
> Testing
> ---
> 
> * Manual testing: cluster creation via blueprint both with and without 
> `server.locks.profiling=true` setting
>  * Unit tests:
>Tests run: 56, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.968 sec 
> - in org.apache.ambari.server.configuration.ConfigurationTest
>Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.044 sec 
> - in org.apache.ambari.server.logging.DelegatingLockTest
>Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.279 sec 
> - in org.apache.ambari.server.logging.LockFactoryTest
>Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.168 sec 
> - in org.apache.ambari.server.logging.ProfiledReentrantReadWriteLockTest
>  * Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 
> approved: 5012 licence.
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>



Re: Review Request 52456: Modify HTTP headers to follow best security practices

2016-10-10 Thread Sangeeta Ravindran


> On Oct. 9, 2016, 10:39 p.m., Robert Levas wrote:
> > Ship It!
> 
> Sangeeta Ravindran wrote:
> Thank you Robert.
> Can you please help push the fix?
> 
> Robert Levas wrote:
> Pushed to trunk:
> 
> ```
> commit 34c5686c3a0f80a5c7b78ddf05bb41cb13202438
> Author: Sangeeta Ravindran 
> Date:   Mon Oct 10 11:05:40 2016 -0400
> 
> AMBARI-17311. Modify HTTP headers to follow best security practices 
> (Sangeeta Ravindran via rlevas)
> ```

Thank you Robert.


- Sangeeta


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


On Oct. 4, 2016, 4:45 p.m., Sangeeta Ravindran wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52456/
> ---
> 
> (Updated Oct. 4, 2016, 4:45 p.m.)
> 
> 
> Review request for Ambari, Di Li, Robert Levas, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-17311
> https://issues.apache.org/jira/browse/AMBARI-17311
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> This patch adds the following HTTP headers to follow security best practices.
> 
> X-Content-Type-Options: nosniff
> Cache-control: no-store
> Pragma: no-cache
> 
> 
> Diffs
> -
> 
>   ambari-server/conf/unix/ambari.properties 4dcbe99 
>   ambari-server/conf/windows/ambari.properties 64cce3b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  2e850ef 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilter.java
>  05c9ecb 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilter.java
>  b40953b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilter.java
>  5bff4e3 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
>  7be70a3 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
>  6537130 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
>  c9d7974 
> 
> Diff: https://reviews.apache.org/r/52456/diff/
> 
> 
> Testing
> ---
> 
> Test cases have been updated to test with the new headers added.
> Also did manual testing.
> 
> 
> File Attachments
> 
> 
> Patch with review comments addressed
>   
> https://reviews.apache.org/media/uploaded/files/2016/10/04/32920075-a5ab-481b-bc47-e1be6b569605__AMBARI-17311.patch
> Updated patch with review comments addressed
>   
> https://reviews.apache.org/media/uploaded/files/2016/10/04/674db481-c4e0-4afb-98cb-b051d785c710__AMBARI-17311.patch
> 
> 
> Thanks,
> 
> Sangeeta Ravindran
> 
>



Re: Review Request 52456: Modify HTTP headers to follow best security practices

2016-10-10 Thread Robert Levas


> On Oct. 9, 2016, 6:39 p.m., Robert Levas wrote:
> > Ship It!
> 
> Sangeeta Ravindran wrote:
> Thank you Robert.
> Can you please help push the fix?

Pushed to trunk:

```
commit 34c5686c3a0f80a5c7b78ddf05bb41cb13202438
Author: Sangeeta Ravindran 
Date:   Mon Oct 10 11:05:40 2016 -0400

AMBARI-17311. Modify HTTP headers to follow best security practices 
(Sangeeta Ravindran via rlevas)
```


- Robert


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


On Oct. 4, 2016, 12:45 p.m., Sangeeta Ravindran wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52456/
> ---
> 
> (Updated Oct. 4, 2016, 12:45 p.m.)
> 
> 
> Review request for Ambari, Di Li, Robert Levas, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-17311
> https://issues.apache.org/jira/browse/AMBARI-17311
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> This patch adds the following HTTP headers to follow security best practices.
> 
> X-Content-Type-Options: nosniff
> Cache-control: no-store
> Pragma: no-cache
> 
> 
> Diffs
> -
> 
>   ambari-server/conf/unix/ambari.properties 4dcbe99 
>   ambari-server/conf/windows/ambari.properties 64cce3b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  2e850ef 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilter.java
>  05c9ecb 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilter.java
>  b40953b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilter.java
>  5bff4e3 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
>  7be70a3 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
>  6537130 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
>  c9d7974 
> 
> Diff: https://reviews.apache.org/r/52456/diff/
> 
> 
> Testing
> ---
> 
> Test cases have been updated to test with the new headers added.
> Also did manual testing.
> 
> 
> File Attachments
> 
> 
> Patch with review comments addressed
>   
> https://reviews.apache.org/media/uploaded/files/2016/10/04/32920075-a5ab-481b-bc47-e1be6b569605__AMBARI-17311.patch
> Updated patch with review comments addressed
>   
> https://reviews.apache.org/media/uploaded/files/2016/10/04/674db481-c4e0-4afb-98cb-b051d785c710__AMBARI-17311.patch
> 
> 
> Thanks,
> 
> Sangeeta Ravindran
> 
>



Re: Review Request 52692: Ambari startup script doesn't work on SUSE and potentially other OS's.

2016-10-10 Thread Myroslav Papirkovskyy

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


Ship it!




Ship It!

- Myroslav Papirkovskyy


On Жов. 10, 2016, 5:20 після полудня, Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52692/
> ---
> 
> (Updated Жов. 10, 2016, 5:20 після полудня)
> 
> 
> Review request for Ambari and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18563
> https://issues.apache.org/jira/browse/AMBARI-18563
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Since installing the new 2.4.0.1 on SLES 11 the ambari startup script doesn't
> work on server boot or reboot. It seems to be the SED line called in the
> ambari startup script that doesn't account for a directory structure of
> /etc/init.d/rc3.d to populate $ROOT.
> 
> 
> Diffs
> -
> 
>   ambari-server/conf/unix/install-helper.sh 229e146 
>   ambari-server/sbin/ambari-server 64f1c8c 
> 
> Diff: https://reviews.apache.org/r/52692/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Review Request 52692: Ambari startup script doesn't work on SUSE and potentially other OS's.

2016-10-10 Thread Andrew Onischuk

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

Review request for Ambari and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

Since installing the new 2.4.0.1 on SLES 11 the ambari startup script doesn't
work on server boot or reboot. It seems to be the SED line called in the
ambari startup script that doesn't account for a directory structure of
/etc/init.d/rc3.d to populate $ROOT.


Diffs
-

  ambari-server/conf/unix/install-helper.sh 229e146 
  ambari-server/sbin/ambari-server 64f1c8c 

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


Testing
---

mvn clean test


Thanks,

Andrew Onischuk



Re: Review Request 52681: Add more logging to track what condition resulted in skipping agent commands

2016-10-10 Thread Sandor Magyari

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


Ship it!




Ship It!

- Sandor Magyari


On Oct. 10, 2016, 11:14 a.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52681/
> ---
> 
> (Updated Oct. 10, 2016, 11:14 a.m.)
> 
> 
> Review request for Ambari, Laszlo Puskas, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-18560
> https://issues.apache.org/jira/browse/AMBARI-18560
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Log at INFO level the cases when commands to be sent for agents are not 
> created for update host component requests due to certain conditions are not 
> met. This will help with tracing from logs why no actions for agents were not 
> created by the server.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  1fc9dbf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
>  73cedb4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
>  85a4949 
> 
> Diff: https://reviews.apache.org/r/52681/diff/
> 
> 
> Testing
> ---
> 
> Manual testing.
> 
> Unit test results:
> Failed tests: 
>   UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1118 
>   Unexpected method call 
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
> org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service):
> AmbariManagementController.getClusters(): expected: at least 0, actual: 1
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
> interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service): expected: 1, actual: 0
>   DataStoreImplTest.testFind:526 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testRemove:475 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update:357 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update_longStringValue:426 
>   Expectation failure on verify:
> DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
> 
> 
> These failure are not related to this change.
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>



Re: Review Request 52649: Create Component to Repo Version associations

2016-10-10 Thread Nate Cole


> On Oct. 7, 2016, 4:51 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql, line 875
> > 
> >
> > can we make the name consistent, either remove the underscore or add 
> > another one between service and component?

it's consistent with servicecomponent_history (and more or less with 
servicecomponentdesiredstate).  I'd rather not even call them this - I would 
rather component_history, component_version, etc - but I stuck with the 
"servicecomponent" naming that was already there.


> On Oct. 7, 2016, 4:51 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentVersionEntity.java,
> >  line 75
> > 
> >
> > user_name column is missing, or does it need to be deleted from the 
> > schema?

Good catch!  Will fix this up.


- Nate


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


On Oct. 7, 2016, 4:14 p.m., Nate Cole wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52649/
> ---
> 
> (Updated Oct. 7, 2016, 4:14 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-18577
> https://issues.apache.org/jira/browse/AMBARI-18577
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> This jira is making the entities and schema changes.  Heartbeat and 
> transition logic will be in a future change.
> 
> The version entity will likely change as the enhancement evolves.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
>  cdaa6f0 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
>  61c053d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentVersionEntity.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog300.java
>  64c98b7 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql c2c965d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1c17e1a 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 49f3e2f 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 7aa52ef 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 0c95471 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 631b5c4 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2bc3282 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
>  b043da1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
>  dcb1fdd 
> 
> Diff: https://reviews.apache.org/r/52649/diff/
> 
> 
> Testing
> ---
> 
> Failures are known and unrelated to this change.
> 
> Automated:
> 
> Tests in error:
>   AgentResourceTest.agentHeartBeat:176 » ClientHandler 
> org.codehaus.jackson.map
>   AgentResourceTest.agentHeartBeatWithEnv:190 » ClientHandler 
> org.codehaus.jacks...
>   AgentResourceTest.agentRegistration:163 » ClientHandler 
> org.codehaus.jackson.m...
> 
> Tests run: 4693, Failures: 0, Errors: 3, Skipped: 36
> 
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time: 41:55.279s
> [INFO] Finished at: Fri Oct 07 16:07:02 EDT 2016
> [INFO] Final Memory: 37M/540M
> [INFO] 
> 
> 
> 
> Thanks,
> 
> Nate Cole
> 
>



Re: Review Request 52681: Add more logging to track what condition resulted in skipping agent commands

2016-10-10 Thread Laszlo Puskas

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


Ship it!




Ship It!

- Laszlo Puskas


On Oct. 10, 2016, 11:14 a.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52681/
> ---
> 
> (Updated Oct. 10, 2016, 11:14 a.m.)
> 
> 
> Review request for Ambari, Laszlo Puskas, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-18560
> https://issues.apache.org/jira/browse/AMBARI-18560
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Log at INFO level the cases when commands to be sent for agents are not 
> created for update host component requests due to certain conditions are not 
> met. This will help with tracing from logs why no actions for agents were not 
> created by the server.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  1fc9dbf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
>  73cedb4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
>  85a4949 
> 
> Diff: https://reviews.apache.org/r/52681/diff/
> 
> 
> Testing
> ---
> 
> Manual testing.
> 
> Unit test results:
> Failed tests: 
>   UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1118 
>   Unexpected method call 
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
> org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service):
> AmbariManagementController.getClusters(): expected: at least 0, actual: 1
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
> interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service): expected: 1, actual: 0
>   DataStoreImplTest.testFind:526 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testRemove:475 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update:357 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update_longStringValue:426 
>   Expectation failure on verify:
> DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
> 
> 
> These failure are not related to this change.
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>



Review Request 52688: Capacity Scheduler View: Calculating absolute capacity for node labels and showing in sunburst chart

2016-10-10 Thread Akhil PB

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

Review request for Ambari, DIPAYAN BHOWMICK, Pallav Kulshreshtha, and Sreenath 
Somarajapuram.


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


Repository: ambari


Description
---

Calculating absolute capacity for node labels
Render sunburst chart based on node label capacity when selected
Read-only mode for non-operator users in preemption and queue mappings
Bug fixes


Diffs
-

  contrib/views/capacity-scheduler/src/main/resources/ui/app/app.js 4349538 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/components/labelCapacityBar.js
 032b2ec 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/components/queueMapping.js
 1d07351 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/components/sunburstChart.js
 d5b19ae 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/advanced.js
 af15fa5 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/capsched.js
 631edbb 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/editqueue.js
 9d84704 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queuesconf.js
 e7fba41 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/scheduler.js
 aa139b1 
  contrib/views/capacity-scheduler/src/main/resources/ui/app/models/queue.js 
e2d67bd 
  contrib/views/capacity-scheduler/src/main/resources/ui/app/router.js d838958 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
 1ab1740 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/advanced.hbs
 9973708 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/partials/preemption.hbs
 6d398f6 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/editLabelCapacity.hbs
 8fe627e 
  
contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueMapping.hbs
 f143911 

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


Testing
---

Manual Unit Testing


Thanks,

Akhil PB



Re: Review Request 52681: Add more logging to track what condition resulted in skipping agent commands

2016-10-10 Thread Oliver Szabo

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


Ship it!




Ship It!

- Oliver Szabo


On Oct. 10, 2016, 11:14 a.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52681/
> ---
> 
> (Updated Oct. 10, 2016, 11:14 a.m.)
> 
> 
> Review request for Ambari, Laszlo Puskas, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-18560
> https://issues.apache.org/jira/browse/AMBARI-18560
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Log at INFO level the cases when commands to be sent for agents are not 
> created for update host component requests due to certain conditions are not 
> met. This will help with tracing from logs why no actions for agents were not 
> created by the server.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  1fc9dbf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
>  73cedb4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
>  85a4949 
> 
> Diff: https://reviews.apache.org/r/52681/diff/
> 
> 
> Testing
> ---
> 
> Manual testing.
> 
> Unit test results:
> Failed tests: 
>   UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1118 
>   Unexpected method call 
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
> org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service):
> AmbariManagementController.getClusters(): expected: at least 0, actual: 1
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
> interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service): expected: 1, actual: 0
>   DataStoreImplTest.testFind:526 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testRemove:475 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update:357 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update_longStringValue:426 
>   Expectation failure on verify:
> DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
> 
> 
> These failure are not related to this change.
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>



Review Request 52681: Add more logging to track what condition resulted in skipping agent commands

2016-10-10 Thread Sebastian Toader

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

Review request for Ambari, Laszlo Puskas, Oliver Szabo, and Sandor Magyari.


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


Repository: ambari


Description
---

Log at INFO level the cases when commands to be sent for agents are not created 
for update host component requests due to certain conditions are not met. This 
will help with tracing from logs why no actions for agents were not created by 
the server.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 1fc9dbf 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
 73cedb4 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
 85a4949 

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


Testing
---

Manual testing.

Unit test results:
Failed tests: 
  UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1118 
  Unexpected method call 
AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
org.apache.ambari.server.state.Cluster, EasyMock for interface 
org.apache.ambari.server.state.Service):
AmbariManagementController.getClusters(): expected: at least 0, actual: 1
AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
org.apache.ambari.server.state.Service): expected: 1, actual: 0
  DataStoreImplTest.testFind:526 expected: but was:
  DataStoreImplTest.testRemove:475 expected: but was:
  DataStoreImplTest.testStore_update:357 expected: but was:
  DataStoreImplTest.testStore_update_longStringValue:426 
  Expectation failure on verify:
DynamicEntity.set("DS_id", 99): expected: 1, actual: 0


These failure are not related to this change.


Thanks,

Sebastian Toader