Re: Review Request 23244: Fixing return value in _check_sla.

2014-07-22 Thread Mark Chu-Carroll

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

Ship it!


Ship It!


src/main/python/apache/aurora/admin/host_maintenance.py


Doh - I misread the indents. I hate python.



- Mark Chu-Carroll


On July 22, 2014, 4:40 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23244/
> ---
> 
> (Updated July 22, 2014, 4:40 p.m.)
> 
> 
> Review request for Aurora, Joe Smith and Mark Chu-Carroll.
> 
> 
> Bugs: AURORA-571
> https://issues.apache.org/jira/browse/AURORA-571
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Fixing return value in _check_sla. Also, adding logging in drainHosts RPC to 
> help troubleshooting occasional LOST tasks when draining.
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java 
> bf48db97cf882105c0b2e6b70f9a4612ce60dbe8 
>   src/main/python/apache/aurora/admin/host_maintenance.py 
> b5b1375b1bbaed833acf2d17ec432b3d99145fab 
>   src/test/python/apache/aurora/client/commands/test_maintenance.py 
> c4677fc2cf4cfa792823cd0660c13371ec28301f 
> 
> Diff: https://reviews.apache.org/r/23244/diff/
> 
> 
> Testing
> ---
> 
> gradle -Pq build
> ./pants src/test/python:all
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 23244: Fixing return value in _check_sla.

2014-07-22 Thread Maxim Khutornenko


> On July 22, 2014, 8:07 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/admin/host_maintenance.py, line 131
> > 
> >
> > Oh, I see. So why not just do "if host_groups and len(host_groups) > 1"?
> >

The logic there is a bit more complex. If host_groups is not empty then 
format_sla_results needs to be called to optionally return unsafe_hostnames. 
Only then the internal block exits. Otherwise, if host_groups is empty OR the 
inner block has not exited yet an empty set needs to be returned. 

Thanks for asking, added a unit test to validate multiple group failure 
condition.


- Maxim


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


On July 22, 2014, 4:41 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23244/
> ---
> 
> (Updated July 22, 2014, 4:41 p.m.)
> 
> 
> Review request for Aurora, Joe Smith and Mark Chu-Carroll.
> 
> 
> Bugs: AURORA-571
> https://issues.apache.org/jira/browse/AURORA-571
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Fixing return value in _check_sla. Also, adding logging in drainHosts RPC to 
> help troubleshooting occasional LOST tasks when draining.
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java 
> bf48db97cf882105c0b2e6b70f9a4612ce60dbe8 
>   src/main/python/apache/aurora/admin/host_maintenance.py 
> b5b1375b1bbaed833acf2d17ec432b3d99145fab 
>   src/test/python/apache/aurora/client/commands/test_maintenance.py 
> c4677fc2cf4cfa792823cd0660c13371ec28301f 
> 
> Diff: https://reviews.apache.org/r/23244/diff/
> 
> 
> Testing
> ---
> 
> gradle -Pq build
> ./pants src/test/python:all
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 23244: Fixing return value in _check_sla.

2014-07-22 Thread Maxim Khutornenko

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

(Updated July 22, 2014, 8:40 p.m.)


Review request for Aurora, Joe Smith and Mark Chu-Carroll.


Changes
---

CR comments.


Bugs: AURORA-571
https://issues.apache.org/jira/browse/AURORA-571


Repository: aurora


Description
---

Fixing return value in _check_sla. Also, adding logging in drainHosts RPC to 
help troubleshooting occasional LOST tasks when draining.


Diffs (updated)
-

  src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java 
bf48db97cf882105c0b2e6b70f9a4612ce60dbe8 
  src/main/python/apache/aurora/admin/host_maintenance.py 
b5b1375b1bbaed833acf2d17ec432b3d99145fab 
  src/test/python/apache/aurora/client/commands/test_maintenance.py 
c4677fc2cf4cfa792823cd0660c13371ec28301f 

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


Testing
---

gradle -Pq build
./pants src/test/python:all


Thanks,

Maxim Khutornenko



Re: Review Request 23244: Fixing return value in _check_sla.

2014-07-22 Thread Mark Chu-Carroll

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



src/main/python/apache/aurora/admin/host_maintenance.py


Oh, I see. So why not just do "if host_groups and len(host_groups) > 1"?



- Mark Chu-Carroll


On July 22, 2014, 12:41 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23244/
> ---
> 
> (Updated July 22, 2014, 12:41 p.m.)
> 
> 
> Review request for Aurora, Joe Smith and Mark Chu-Carroll.
> 
> 
> Bugs: AURORA-571
> https://issues.apache.org/jira/browse/AURORA-571
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Fixing return value in _check_sla. Also, adding logging in drainHosts RPC to 
> help troubleshooting occasional LOST tasks when draining.
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java 
> bf48db97cf882105c0b2e6b70f9a4612ce60dbe8 
>   src/main/python/apache/aurora/admin/host_maintenance.py 
> b5b1375b1bbaed833acf2d17ec432b3d99145fab 
>   src/test/python/apache/aurora/client/commands/test_maintenance.py 
> c4677fc2cf4cfa792823cd0660c13371ec28301f 
> 
> Diff: https://reviews.apache.org/r/23244/diff/
> 
> 
> Testing
> ---
> 
> gradle -Pq build
> ./pants src/test/python:all
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 23244: Fixing return value in _check_sla.

2014-07-22 Thread Maxim Khutornenko


> On July 22, 2014, 7:59 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/admin/host_maintenance.py, line 131
> > 
> >
> > What is this initialization doing? I don't see what it changes - it's 
> > reassigned just below, in code which executes unconditionally.
> >

Ah, that's the actual bug I fixed. In case the inner IF block does not return, 
the control falls through to the method return statement, which blows with 
"'unsafe_hostnames' is not defined" error.


- Maxim


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


On July 22, 2014, 4:41 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23244/
> ---
> 
> (Updated July 22, 2014, 4:41 p.m.)
> 
> 
> Review request for Aurora, Joe Smith and Mark Chu-Carroll.
> 
> 
> Bugs: AURORA-571
> https://issues.apache.org/jira/browse/AURORA-571
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Fixing return value in _check_sla. Also, adding logging in drainHosts RPC to 
> help troubleshooting occasional LOST tasks when draining.
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java 
> bf48db97cf882105c0b2e6b70f9a4612ce60dbe8 
>   src/main/python/apache/aurora/admin/host_maintenance.py 
> b5b1375b1bbaed833acf2d17ec432b3d99145fab 
>   src/test/python/apache/aurora/client/commands/test_maintenance.py 
> c4677fc2cf4cfa792823cd0660c13371ec28301f 
> 
> Diff: https://reviews.apache.org/r/23244/diff/
> 
> 
> Testing
> ---
> 
> gradle -Pq build
> ./pants src/test/python:all
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 23244: Fixing return value in _check_sla.

2014-07-22 Thread Mark Chu-Carroll

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



src/main/python/apache/aurora/admin/host_maintenance.py


What is this initialization doing? I don't see what it changes - it's 
reassigned just below, in code which executes unconditionally.



- Mark Chu-Carroll


On July 22, 2014, 12:41 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23244/
> ---
> 
> (Updated July 22, 2014, 12:41 p.m.)
> 
> 
> Review request for Aurora, Joe Smith and Mark Chu-Carroll.
> 
> 
> Bugs: AURORA-571
> https://issues.apache.org/jira/browse/AURORA-571
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Fixing return value in _check_sla. Also, adding logging in drainHosts RPC to 
> help troubleshooting occasional LOST tasks when draining.
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java 
> bf48db97cf882105c0b2e6b70f9a4612ce60dbe8 
>   src/main/python/apache/aurora/admin/host_maintenance.py 
> b5b1375b1bbaed833acf2d17ec432b3d99145fab 
>   src/test/python/apache/aurora/client/commands/test_maintenance.py 
> c4677fc2cf4cfa792823cd0660c13371ec28301f 
> 
> Diff: https://reviews.apache.org/r/23244/diff/
> 
> 
> Testing
> ---
> 
> gradle -Pq build
> ./pants src/test/python:all
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 23244: Fixing return value in _check_sla.

2014-07-22 Thread Maxim Khutornenko

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

(Updated July 22, 2014, 4:41 p.m.)


Review request for Aurora, Joe Smith and Mark Chu-Carroll.


Changes
---

Added more logging.


Bugs: AURORA-571
https://issues.apache.org/jira/browse/AURORA-571


Repository: aurora


Description
---

Fixing return value in _check_sla. Also, adding logging in drainHosts RPC to 
help troubleshooting occasional LOST tasks when draining.


Diffs (updated)
-

  src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java 
bf48db97cf882105c0b2e6b70f9a4612ce60dbe8 
  src/main/python/apache/aurora/admin/host_maintenance.py 
b5b1375b1bbaed833acf2d17ec432b3d99145fab 
  src/test/python/apache/aurora/client/commands/test_maintenance.py 
c4677fc2cf4cfa792823cd0660c13371ec28301f 

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


Testing
---

gradle -Pq build
./pants src/test/python:all


Thanks,

Maxim Khutornenko



Re: Review Request 23244: Fixing return value in _check_sla.

2014-07-21 Thread Maxim Khutornenko

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

(Updated July 21, 2014, 9:39 p.m.)


Review request for Aurora, Joe Smith and Mark Chu-Carroll.


Changes
---

+ Mark.


Bugs: AURORA-571
https://issues.apache.org/jira/browse/AURORA-571


Repository: aurora


Description
---

Fixing return value in _check_sla. Also, adding logging in drainHosts RPC to 
help troubleshooting occasional LOST tasks when draining.


Diffs
-

  src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java 
bf48db97cf882105c0b2e6b70f9a4612ce60dbe8 
  src/main/python/apache/aurora/admin/host_maintenance.py 
b5b1375b1bbaed833acf2d17ec432b3d99145fab 
  src/test/python/apache/aurora/client/commands/test_maintenance.py 
c4677fc2cf4cfa792823cd0660c13371ec28301f 

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


Testing
---

gradle -Pq build
./pants src/test/python:all


Thanks,

Maxim Khutornenko



Review Request 23244: Fixing return value in _check_sla.

2014-07-02 Thread Maxim Khutornenko

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

Review request for Aurora and Joe Smith.


Bugs: AURORA-571
https://issues.apache.org/jira/browse/AURORA-571


Repository: aurora


Description
---

Fixing return value in _check_sla. Also, adding logging in drainHosts RPC to 
help troubleshooting occasional LOST tasks when draining.


Diffs
-

  src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java 
bf48db97cf882105c0b2e6b70f9a4612ce60dbe8 
  src/main/python/apache/aurora/admin/host_maintenance.py 
b5b1375b1bbaed833acf2d17ec432b3d99145fab 
  src/test/python/apache/aurora/client/commands/test_maintenance.py 
c4677fc2cf4cfa792823cd0660c13371ec28301f 

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


Testing
---

gradle -Pq build
./pants src/test/python:all


Thanks,

Maxim Khutornenko