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 Mon, 15 Sep 2014 20:38:03 GMT

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

(Updated Sept. 15, 2014, 8:38 p.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
-------

Results :

Tests run: 1970, Failures: 0, Errors: 0, Skipped: 15 


Thanks,

Dmitro Lisnichenko


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