ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitro Lisnichenko" <dlysniche...@hortonworks.com>
Subject Re: Review Request 25660: Add "exclusive" flag to custom command/custom action requests
Date Tue, 16 Sep 2014 14:15:36 GMT


> On Sept. 16, 2014, 12:48 p.m., Dmytro Sen wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java,
line 233
> > <https://reviews.apache.org/r/25660/diff/2/?file=690507#file690507line233>
> >
> >     Shouldn't it be boolean.class ?

We have a convention to use Integer in such cases as stated at AMBARI-6202


- Dmitro


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


On Sept. 16, 2014, 10:54 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25660/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2014, 10:54 a.m.)
> 
> 
> Review request for Ambari and Dmytro Sen.
> 
> 
> Bugs: AMBARI-7317
>     https://issues.apache.org/jira/browse/AMBARI-7317
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The issue is that Update Nagios request may be executed in parallel with start/stop requests
in some cases. If Nagios host does not belong to a set of hosts that are affected by start/stop
requests, then API user may be able to get a race condition and (sometimes) fake alerts.
> 
> It seems that the straightforward solution for both issues is to implement some flag
(like exclusive=true) that would be available for custom actions/custom commands. The flag
would forbid running request in parallel with other requests. This flag would be used when
issuing Update Nagios request. As a result, race condition would not be possible.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
0385686 
>   ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Request.java 03c4d2e

>   ambari-server/src/main/java/org/apache/ambari/server/controller/ExecuteActionRequest.java
5e42276 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
059e2c9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
3e36ee9 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestEntity.java
a35771e 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
75635cc 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 4a6d3ba 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 2e6b5c0 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 400373e 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 74e6d1c 
>   ambari-server/src/main/resources/properties.json 9471f3d 
>   ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionDBAccessorImpl.java
6d4f056 
>   ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
c4a88cf 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelperTest.java
a14c86a 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
8a3e270 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
76b9fbc 
> 
> Diff: https://reviews.apache.org/r/25660/diff/
> 
> 
> Testing
> -------
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO] 
> [INFO] Ambari Views ...................................... SUCCESS [7.122s]
> [INFO] Ambari Server ..................................... SUCCESS [17:43.658s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:51.487s
> [INFO] Finished at: Tue Sep 16 13:41:34 FET 2014
> [INFO] Final Memory: 24M/329M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>


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