Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-11-07 Thread Dmitro Lisnichenko

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


Ship it!




Ship It!

- Dmitro Lisnichenko


On Nov. 7, 2016, 11:40 a.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Nov. 7, 2016, 11:40 a.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 
> 655b2fc 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
>   ambari-agent/src/main/python/ambari_agent/main.py a5edfe3 
>   ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 
>   ambari-agent/src/test/python/ambari_agent/TestController.py 59b41cd 
>   ambari-agent/src/test/python/ambari_agent/TestMain.py 01028ec 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-11-07 Thread Andrew Onischuk

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




ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py (line 91)


The fix for the recent. HB lost issue.


- Andrew Onischuk


On Nov. 7, 2016, 9:40 a.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Nov. 7, 2016, 9:40 a.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 
> 655b2fc 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
>   ambari-agent/src/main/python/ambari_agent/main.py a5edfe3 
>   ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 
>   ambari-agent/src/test/python/ambari_agent/TestController.py 59b41cd 
>   ambari-agent/src/test/python/ambari_agent/TestMain.py 01028ec 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-11-07 Thread Andrew Onischuk

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

(Updated Nov. 7, 2016, 9:40 a.m.)


Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

SmartSense status command does an http call without timeout in 1.2 version of
SS.

Ambari agent queues STATUS commands until we end up with HB lost state with
ton of commands queued up.

This should just never happen is commands are getting queued by by the agent
every HB.


Diffs (updated)
-

  ambari-agent/conf/unix/ambari-agent.ini 914e09a 
  ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
  ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
  ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 655b2fc 
  ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
PRE-CREATION 
  ambari-agent/src/main/python/ambari_agent/main.py a5edfe3 
  ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 
  ambari-agent/src/test/python/ambari_agent/TestController.py 59b41cd 
  ambari-agent/src/test/python/ambari_agent/TestMain.py 01028ec 

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


Testing
---

mvn clean test


Thanks,

Andrew Onischuk



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-24 Thread Dmitro Lisnichenko

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




ambari-agent/src/main/python/ambari_agent/ActionQueue.py (line 79)


typo


- Dmitro Lisnichenko


On Oct. 24, 2016, 6:18 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Oct. 24, 2016, 6:18 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 
> 655b2fc 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
>   ambari-agent/src/main/python/ambari_agent/main.py c0f7b81 
>   ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 
>   ambari-agent/src/test/python/ambari_agent/TestController.py 59b41cd 
>   ambari-agent/src/test/python/ambari_agent/TestMain.py 23cdb13 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-24 Thread Andrew Onischuk

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

(Updated Oct. 24, 2016, 3:18 p.m.)


Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

SmartSense status command does an http call without timeout in 1.2 version of
SS.

Ambari agent queues STATUS commands until we end up with HB lost state with
ton of commands queued up.

This should just never happen is commands are getting queued by by the agent
every HB.


Diffs
-

  ambari-agent/conf/unix/ambari-agent.ini 914e09a 
  ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
  ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
  ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 655b2fc 
  ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
PRE-CREATION 
  ambari-agent/src/main/python/ambari_agent/main.py c0f7b81 
  ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 
  ambari-agent/src/test/python/ambari_agent/TestController.py 59b41cd 
  ambari-agent/src/test/python/ambari_agent/TestMain.py 23cdb13 

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


Testing (updated)
---

mvn clean test


Thanks,

Andrew Onischuk



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-24 Thread Andrew Onischuk

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

(Updated Oct. 24, 2016, 3:16 p.m.)


Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

SmartSense status command does an http call without timeout in 1.2 version of
SS.

Ambari agent queues STATUS commands until we end up with HB lost state with
ton of commands queued up.

This should just never happen is commands are getting queued by by the agent
every HB.


Diffs (updated)
-

  ambari-agent/conf/unix/ambari-agent.ini 914e09a 
  ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
  ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
  ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 655b2fc 
  ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
PRE-CREATION 
  ambari-agent/src/main/python/ambari_agent/main.py c0f7b81 
  ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 
  ambari-agent/src/test/python/ambari_agent/TestController.py 59b41cd 
  ambari-agent/src/test/python/ambari_agent/TestMain.py 23cdb13 

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


Testing
---

unit tests are pending to be added. Patch is not final


Thanks,

Andrew Onischuk



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-20 Thread Sid Wagle

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


Fix it, then Ship it!




Pending unit tests for the patch, +1 for the impl.


ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py (line 57)


Reference to the executor should not be lost.


- Sid Wagle


On Oct. 20, 2016, 3:54 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Oct. 20, 2016, 3:54 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> unit tests are pending to be added. Patch is not final
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-20 Thread Alejandro Fernandez

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




ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py (line 38)


Please add a comment that this is in seconds.


- Alejandro Fernandez


On Oct. 20, 2016, 3:54 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Oct. 20, 2016, 3:54 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> unit tests are pending to be added. Patch is not final
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-20 Thread Andrew Onischuk


> On Oct. 20, 2016, 6:11 p.m., Andrew Onischuk wrote:
> > The blacklisting logic we previously were implementing is not needed now 
> > (as disscussed with Sid).
> > 
> > Reasons for that:
> > 1. If command takes more than 5 seconds, the executor will just restart 
> > itself and continue to execute other status commands. 
> > 2. Also since status commands run parallel to the agent as of now, we won't 
> > get into situations where some timeouted commands, can make heartbeat hang, 
> > the results will just come back with the next heartbeat.

3. Status commands queue cannot get full due to timeouted commands. Because 
with every new pack of status commands, old commands get removed from queue.


- Andrew


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


On Oct. 20, 2016, 3:54 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Oct. 20, 2016, 3:54 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> unit tests are pending to be added. Patch is not final
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-20 Thread Andrew Onischuk

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



The blacklisting logic we previously were implementing is not needed now (as 
disscussed with Sid).

Reasons for that:
1. If command takes more than 5 seconds, the executor will just restart itself 
and continue to execute other status commands. 
2. Also since status commands run parallel to the agent as of now, we won't get 
into situations where some timeouted commands, can make heartbeat hang, the 
results will just come back with the next heartbeat.

- Andrew Onischuk


On Oct. 20, 2016, 3:54 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Oct. 20, 2016, 3:54 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> unit tests are pending to be added. Patch is not final
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-20 Thread Sid Wagle


> On Oct. 20, 2016, 4:52 p.m., Sid Wagle wrote:
> > ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py, line 56
> > 
> >
> > This looks weird I would think you would need a 
> > self.statusCommandsExecutor reference to point to this new executor, would 
> > this not get lost after 1st re-spawn?

Dropped my previous comment since it is not exactly valid but there is no 
reference to the newly respawned executor right? I think the controller should 
always have a handle on the executor.


- Sid


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


On Oct. 20, 2016, 3:54 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Oct. 20, 2016, 3:54 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> unit tests are pending to be added. Patch is not final
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-20 Thread Sid Wagle

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




ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py (line 56)


This looks weird I would think you would need a self.statusCommandsExecutor 
reference to point to this new executor, would this not get lost after 1st 
re-spawn?


- Sid Wagle


On Oct. 20, 2016, 3:54 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Oct. 20, 2016, 3:54 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> unit tests are pending to be added. Patch is not final
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-20 Thread Andrew Onischuk

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

(Updated Oct. 20, 2016, 3:54 p.m.)


Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

SmartSense status command does an http call without timeout in 1.2 version of
SS.

Ambari agent queues STATUS commands until we end up with HB lost state with
ton of commands queued up.

This should just never happen is commands are getting queued by by the agent
every HB.


Diffs (updated)
-

  ambari-agent/conf/unix/ambari-agent.ini 914e09a 
  ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
  ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
PRE-CREATION 

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


Testing
---

unit tests are pending to be added. Patch is not final


Thanks,

Andrew Onischuk



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-20 Thread Andrew Onischuk

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



This is preliminary version of the patch. Basically to have the concept 
reviewed. Still have to add unit tests and do more testing.

- Andrew Onischuk


On Oct. 20, 2016, 3:51 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Oct. 20, 2016, 3:51 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
>   ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> unit tests are pending to be added. Patch is not final
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-20 Thread Andrew Onischuk

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

(Updated Oct. 20, 2016, 3:50 p.m.)


Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

SmartSense status command does an http call without timeout in 1.2 version of
SS.

Ambari agent queues STATUS commands until we end up with HB lost state with
ton of commands queued up.

This should just never happen is commands are getting queued by by the agent
every HB.


Diffs (updated)
-

  ambari-agent/conf/unix/ambari-agent.ini 914e09a 
  ambari-agent/src/main/python/ambari_agent/Controller.py 2a4d384 
  ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py 
PRE-CREATION 

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


Testing
---

mvn clean test


Thanks,

Andrew Onischuk



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-03 Thread Dmitro Lisnichenko

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


Ship it!




Ship It!

- Dmitro Lisnichenko


On Oct. 3, 2016, 12:38 p.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Oct. 3, 2016, 12:38 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
>   ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 
> 655b2fc 
>   ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-03 Thread Vitalyi Brodetskyi

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


Ship it!




Ship It!

- Vitalyi Brodetskyi


On Жов. 3, 2016, 9:38 до полудня, Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Жов. 3, 2016, 9:38 до полудня)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
>   ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 
> 655b2fc 
>   ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-03 Thread Andrew Onischuk

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

(Updated Oct. 3, 2016, 9:38 a.m.)


Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.


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


Repository: ambari


Description
---

SmartSense status command does an http call without timeout in 1.2 version of
SS.

Ambari agent queues STATUS commands until we end up with HB lost state with
ton of commands queued up.

This should just never happen is commands are getting queued by by the agent
every HB.


Diffs (updated)
-

  ambari-agent/conf/unix/ambari-agent.ini 914e09a 
  ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
  ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 655b2fc 
  ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 

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


Testing
---

mvn clean test


Thanks,

Andrew Onischuk



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-03 Thread Vitalyi Brodetskyi

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


Ship it!




Ship It!

- Vitalyi Brodetskyi


On Жов. 3, 2016, 9:21 до полудня, Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Жов. 3, 2016, 9:21 до полудня)
> 
> 
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
>   ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 
> 655b2fc 
>   ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-10-03 Thread Andrew Onischuk

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

(Updated Oct. 3, 2016, 9:19 a.m.)


Review request for Ambari and Dmitro Lisnichenko.


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


Repository: ambari


Description
---

SmartSense status command does an http call without timeout in 1.2 version of
SS.

Ambari agent queues STATUS commands until we end up with HB lost state with
ton of commands queued up.

This should just never happen is commands are getting queued by by the agent
every HB.


Diffs (updated)
-

  ambari-agent/conf/unix/ambari-agent.ini 914e09a 
  ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
  ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 655b2fc 
  ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 7d04d42 

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


Testing
---

mvn clean test


Thanks,

Andrew Onischuk



Re: Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-09-30 Thread Sid Wagle

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



So we are still slowing down heartbeat status by 5 seconds and two of such 
commands would still cause queue overload since same aprent thread is 
whitelisting and blacklisting.
Shouldn't we do the del on the hanging command only the next retry on a 
separate thread not affecting other status commands?


ambari-agent/src/main/python/ambari_agent/ActionQueue.py (line 90)


5 seconds seems too long since we execute them serially. IMO, 2 seconds 
should suffice.



ambari-agent/src/main/python/ambari_agent/ActionQueue.py (line 243)


Can you add more comments on what this does and why it is needed?


- Sid Wagle


On Sept. 30, 2016, 9:24 a.m., Andrew Onischuk wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52420/
> ---
> 
> (Updated Sept. 30, 2016, 9:24 a.m.)
> 
> 
> Review request for Ambari and Dmitro Lisnichenko.
> 
> 
> Bugs: AMBARI-18505
> https://issues.apache.org/jira/browse/AMBARI-18505
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> SmartSense status command does an http call without timeout in 1.2 version of
> SS.
> 
> Ambari agent queues STATUS commands until we end up with HB lost state with
> ton of commands queued up.
> 
> This should just never happen is commands are getting queued by by the agent
> every HB.
> 
> 
> Diffs
> -
> 
>   ambari-agent/conf/unix/ambari-agent.ini 914e09a 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
>   ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 
> 655b2fc 
> 
> Diff: https://reviews.apache.org/r/52420/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>



Review Request 52420: Ambari Status commands should enforce a timeout < heartbeat interval

2016-09-30 Thread Andrew Onischuk

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

Review request for Ambari and Dmitro Lisnichenko.


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


Repository: ambari


Description
---

SmartSense status command does an http call without timeout in 1.2 version of
SS.

Ambari agent queues STATUS commands until we end up with HB lost state with
ton of commands queued up.

This should just never happen is commands are getting queued by by the agent
every HB.


Diffs
-

  ambari-agent/conf/unix/ambari-agent.ini 914e09a 
  ambari-agent/src/main/python/ambari_agent/ActionQueue.py f104939 
  ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py 655b2fc 

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


Testing
---

mvn clean test


Thanks,

Andrew Onischuk