Re: Review Request 52411: If ambari-server fails to start, appropriate error message should be displayed.

2016-09-30 Thread Vitalyi Brodetskyi


> On Вер. 30, 2016, 5:28 після полудня, Alejandro Fernandez wrote:
> > ambari-server/src/main/python/ambari_server/utils.py, line 158
> > 
> >
> > pids isn't changing inside the while block, can move the check 
> > len(pids) > 0 before it.

In loop we are checking if process is alive, using pid.


- Vitalyi


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


On Вер. 30, 2016, 9:35 після полудня, Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52411/
> ---
> 
> (Updated Вер. 30, 2016, 9:35 після полудня)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18501
> https://issues.apache.org/jira/browse/AMBARI-18501
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If due to some error, ambari-server JAR exits with -1, we still display 
> “Ambari Server ‘start’ completed successfully”
> In AmbariServer.java::main(), if an exception occurs, the program exits with 
> -1. Howerver, the caller ambari-server.py::main() displays the status message 
> as "Ambari Server 'start' completed successfully".
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/python/ambari_server/utils.py 012d428 
>   ambari-server/src/main/python/ambari_server_main.py 57ec58d 
>   ambari-server/src/test/python/TestUtils.py db94d92 
> 
> Diff: https://reviews.apache.org/r/52411/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 52411: If ambari-server fails to start, appropriate error message should be displayed.

2016-09-30 Thread Vitalyi Brodetskyi

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

(Updated Вер. 30, 2016, 9:35 після полудня)


Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.


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


Repository: ambari


Description
---

If due to some error, ambari-server JAR exits with -1, we still display “Ambari 
Server ‘start’ completed successfully”
In AmbariServer.java::main(), if an exception occurs, the program exits with 
-1. Howerver, the caller ambari-server.py::main() displays the status message 
as "Ambari Server 'start' completed successfully".


Diffs (updated)
-

  ambari-server/src/main/python/ambari_server/utils.py 012d428 
  ambari-server/src/main/python/ambari_server_main.py 57ec58d 
  ambari-server/src/test/python/TestUtils.py db94d92 

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


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi



Re: Review Request 52411: If ambari-server fails to start, appropriate error message should be displayed.

2016-09-30 Thread Alejandro Fernandez

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


Fix it, then Ship it!





ambari-server/src/main/python/ambari_server/utils.py (line 153)


convert to int here instead of inside while



ambari-server/src/main/python/ambari_server/utils.py (line 158)


pids isn't changing inside the while block, can move the check len(pids) > 
0 before it.



ambari-server/src/main/python/ambari_server/utils.py (line 179)


Don't hardcode the "55" seconds



ambari-server/src/main/python/ambari_server_main.py (line 104)


Add comment that these are in seconds.


- Alejandro Fernandez


On Sept. 30, 2016, 1:50 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52411/
> ---
> 
> (Updated Sept. 30, 2016, 1:50 p.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18501
> https://issues.apache.org/jira/browse/AMBARI-18501
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If due to some error, ambari-server JAR exits with -1, we still display 
> “Ambari Server ‘start’ completed successfully”
> In AmbariServer.java::main(), if an exception occurs, the program exits with 
> -1. Howerver, the caller ambari-server.py::main() displays the status message 
> as "Ambari Server 'start' completed successfully".
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/python/ambari_server/utils.py 012d428 
>   ambari-server/src/main/python/ambari_server_main.py 57ec58d 
>   ambari-server/src/test/python/TestUtils.py db94d92 
> 
> Diff: https://reviews.apache.org/r/52411/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 52411: If ambari-server fails to start, appropriate error message should be displayed.

2016-09-30 Thread Vitalyi Brodetskyi

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

(Updated Вер. 30, 2016, 1:50 після полудня)


Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.


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


Repository: ambari


Description
---

If due to some error, ambari-server JAR exits with -1, we still display “Ambari 
Server ‘start’ completed successfully”
In AmbariServer.java::main(), if an exception occurs, the program exits with 
-1. Howerver, the caller ambari-server.py::main() displays the status message 
as "Ambari Server 'start' completed successfully".


Diffs (updated)
-

  ambari-server/src/main/python/ambari_server/utils.py 012d428 
  ambari-server/src/main/python/ambari_server_main.py 57ec58d 
  ambari-server/src/test/python/TestUtils.py db94d92 

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


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi



Re: Review Request 52411: If ambari-server fails to start, appropriate error message should be displayed.

2016-09-30 Thread Vitalyi Brodetskyi


> On Вер. 30, 2016, 2:20 до полудня, Sid Wagle wrote:
> > ambari-server/src/main/python/ambari_server/utils.py, line 169
> > 
> >
> > Doesn't this connect need a timeout?

It depends on mode (blocking/non blocking) and it works fine but to be sure and 
safe i've added timeout.


> On Вер. 30, 2016, 2:20 до полудня, Sid Wagle wrote:
> > ambari-server/src/main/python/ambari_server/utils.py, line 179
> > 
> >
> > We are waiting for pid already right, so why wait again?

Here we are waiting for 10 seconds to initialize WEB UI after port was 
occupied. And in this loop i'm checking pid and process is alive.


- Vitalyi


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


On Вер. 30, 2016, 10:07 до полудня, Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52411/
> ---
> 
> (Updated Вер. 30, 2016, 10:07 до полудня)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18501
> https://issues.apache.org/jira/browse/AMBARI-18501
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If due to some error, ambari-server JAR exits with -1, we still display 
> “Ambari Server ‘start’ completed successfully”
> In AmbariServer.java::main(), if an exception occurs, the program exits with 
> -1. Howerver, the caller ambari-server.py::main() displays the status message 
> as "Ambari Server 'start' completed successfully".
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/python/ambari_server/utils.py 012d428 
>   ambari-server/src/main/python/ambari_server_main.py 57ec58d 
>   ambari-server/src/test/python/TestUtils.py db94d92 
> 
> Diff: https://reviews.apache.org/r/52411/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 52411: If ambari-server fails to start, appropriate error message should be displayed.

2016-09-30 Thread Vitalyi Brodetskyi

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

(Updated Вер. 30, 2016, 10:07 до полудня)


Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.


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


Repository: ambari


Description
---

If due to some error, ambari-server JAR exits with -1, we still display “Ambari 
Server ‘start’ completed successfully”
In AmbariServer.java::main(), if an exception occurs, the program exits with 
-1. Howerver, the caller ambari-server.py::main() displays the status message 
as "Ambari Server 'start' completed successfully".


Diffs (updated)
-

  ambari-server/src/main/python/ambari_server/utils.py 012d428 
  ambari-server/src/main/python/ambari_server_main.py 57ec58d 
  ambari-server/src/test/python/TestUtils.py db94d92 

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


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi



Re: Review Request 52411: If ambari-server fails to start, appropriate error message should be displayed.

2016-09-29 Thread Sid Wagle

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




ambari-server/src/main/python/ambari_server/utils.py (line 177)


Shorter message: server not yet listening http port 8080 after 45 seconds. 
Exiting


- Sid Wagle


On Sept. 29, 2016, 10:58 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52411/
> ---
> 
> (Updated Sept. 29, 2016, 10:58 p.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18501
> https://issues.apache.org/jira/browse/AMBARI-18501
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If due to some error, ambari-server JAR exits with -1, we still display 
> “Ambari Server ‘start’ completed successfully”
> In AmbariServer.java::main(), if an exception occurs, the program exits with 
> -1. Howerver, the caller ambari-server.py::main() displays the status message 
> as "Ambari Server 'start' completed successfully".
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/python/ambari_server/utils.py 012d428 
>   ambari-server/src/main/python/ambari_server_main.py 57ec58d 
>   ambari-server/src/test/python/TestUtils.py db94d92 
> 
> Diff: https://reviews.apache.org/r/52411/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 52411: If ambari-server fails to start, appropriate error message should be displayed.

2016-09-29 Thread Sid Wagle

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




ambari-server/src/main/python/ambari_server/utils.py (line 169)


Doesn't this connect need a timeout?



ambari-server/src/main/python/ambari_server/utils.py (line 170)


Typo: Server started listening on port



ambari-server/src/main/python/ambari_server/utils.py (line 179)


We are waiting for pid already right, so why wait again?


- Sid Wagle


On Sept. 29, 2016, 10:58 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52411/
> ---
> 
> (Updated Sept. 29, 2016, 10:58 p.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18501
> https://issues.apache.org/jira/browse/AMBARI-18501
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> If due to some error, ambari-server JAR exits with -1, we still display 
> “Ambari Server ‘start’ completed successfully”
> In AmbariServer.java::main(), if an exception occurs, the program exits with 
> -1. Howerver, the caller ambari-server.py::main() displays the status message 
> as "Ambari Server 'start' completed successfully".
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/python/ambari_server/utils.py 012d428 
>   ambari-server/src/main/python/ambari_server_main.py 57ec58d 
>   ambari-server/src/test/python/TestUtils.py db94d92 
> 
> Diff: https://reviews.apache.org/r/52411/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Review Request 52411: If ambari-server fails to start, appropriate error message should be displayed.

2016-09-29 Thread Vitalyi Brodetskyi

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

Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.


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


Repository: ambari


Description
---

If due to some error, ambari-server JAR exits with -1, we still display “Ambari 
Server ‘start’ completed successfully”
In AmbariServer.java::main(), if an exception occurs, the program exits with 
-1. Howerver, the caller ambari-server.py::main() displays the status message 
as "Ambari Server 'start' completed successfully".


Diffs
-

  ambari-server/src/main/python/ambari_server/utils.py 012d428 
  ambari-server/src/main/python/ambari_server_main.py 57ec58d 
  ambari-server/src/test/python/TestUtils.py db94d92 

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


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi