Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-28 Thread Attila Doroszlai

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


Ship it!




Ship It!

- Attila Doroszlai


On Sept. 28, 2016, 11:57 a.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52266/
> ---
> 
> (Updated Sept. 28, 2016, 11:57 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-18467
> https://issues.apache.org/jira/browse/AMBARI-18467
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problems during cluster install can result in clusters without a cluster 
> version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
> NPE check is added
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
>  1413c66 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
>  9c54a88 
> 
> Diff: https://reviews.apache.org/r/52266/diff/
> 
> 
> Testing
> ---
> 
> - Added a new unit test
> - All unit tests in ambari-server passed
> - Did manual testing to verify (removed cluster version from the DB and 
> restarted the server)
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-28 Thread Attila Doroszlai

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




ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
 (line 147)


Two unnecessary blank lines.


- Attila Doroszlai


On Sept. 28, 2016, 11:57 a.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52266/
> ---
> 
> (Updated Sept. 28, 2016, 11:57 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-18467
> https://issues.apache.org/jira/browse/AMBARI-18467
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problems during cluster install can result in clusters without a cluster 
> version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
> NPE check is added
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
>  1413c66 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
>  9c54a88 
> 
> Diff: https://reviews.apache.org/r/52266/diff/
> 
> 
> Testing
> ---
> 
> - Added a new unit test
> - All unit tests in ambari-server passed
> - Did manual testing to verify (removed cluster version from the DB and 
> restarted the server)
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-28 Thread Balázs Bence Sári

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

(Updated Sept. 28, 2016, 9:57 a.m.)


Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
Sebastian Toader.


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


Repository: ambari


Description
---

Problems during cluster install can result in clusters without a cluster 
version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
NPE check is added


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
 1413c66 
  
ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
 9c54a88 

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


Testing
---

- Added a new unit test
- All unit tests in ambari-server passed
- Did manual testing to verify (removed cluster version from the DB and 
restarted the server)


Thanks,

Balázs Bence Sári



Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-28 Thread Sebastian Toader

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


Ship it!




Ship It!

- Sebastian Toader


On Sept. 26, 2016, 8:23 p.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52266/
> ---
> 
> (Updated Sept. 26, 2016, 8:23 p.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-18430
> https://issues.apache.org/jira/browse/AMBARI-18430
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problems during cluster install can result in clusters without a cluster 
> version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
> NPE check is added
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
>  1413c66 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
>  9c54a88 
> 
> Diff: https://reviews.apache.org/r/52266/diff/
> 
> 
> Testing
> ---
> 
> - Added a new unit test
> - All unit tests in ambari-server passed
> - Did manual testing to verify (removed cluster version from the DB and 
> restarted the server)
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-28 Thread Balázs Bence Sári


> On Sept. 26, 2016, 9:33 p.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java,
> >  line 97
> > 
> >
> > When I tried this on my cluster that was installed failed by making a 
> > jar, it did not come out of the bad state. Just want to make sure the 
> > manual testing on this was good.
> 
> Balázs Bence Sári wrote:
> I tested it by installing the cluster, then deleting the cluster version 
> from the DB, then restarting the server. The server was able to restart. 
> I don't know what other problems missing cluster versions can cause, but 
> the startup issue is fixed by this patch. Could you describe what errors you 
> saw after applying the patch?
> 
> Sid Wagle wrote:
> Unfortunately, I already duid a reset so do not have exact failure but on 
> the repro, could you simulate a failure via stack script? That would be a 
> exact repro.
> 
> I have attached logs to the external Jira: AMBARI-18467. The attached 
> link on the RB is incorrect.
> If you search for UpdateActiveRepoVersionOnStartup, second to last 
> occurence and look at the restart after that, it might provide some clues.

I did a simulated installation failure as discussed and then restarted Ambari. 
The server came up without apparent problems, on the UI I was able to continue 
(retry) with the installation wizard.


- Balázs Bence


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


On Sept. 26, 2016, 6:23 p.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52266/
> ---
> 
> (Updated Sept. 26, 2016, 6:23 p.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-18430
> https://issues.apache.org/jira/browse/AMBARI-18430
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problems during cluster install can result in clusters without a cluster 
> version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
> NPE check is added
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
>  1413c66 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
>  9c54a88 
> 
> Diff: https://reviews.apache.org/r/52266/diff/
> 
> 
> Testing
> ---
> 
> - Added a new unit test
> - All unit tests in ambari-server passed
> - Did manual testing to verify (removed cluster version from the DB and 
> restarted the server)
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-27 Thread Sid Wagle


> On Sept. 26, 2016, 9:33 p.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java,
> >  line 97
> > 
> >
> > When I tried this on my cluster that was installed failed by making a 
> > jar, it did not come out of the bad state. Just want to make sure the 
> > manual testing on this was good.
> 
> Balázs Bence Sári wrote:
> I tested it by installing the cluster, then deleting the cluster version 
> from the DB, then restarting the server. The server was able to restart. 
> I don't know what other problems missing cluster versions can cause, but 
> the startup issue is fixed by this patch. Could you describe what errors you 
> saw after applying the patch?

Unfortunately, I already duid a reset so do not have exact failure but on the 
repro, could you simulate a failure via stack script? That would be a exact 
repro.

I have attached logs to the external Jira: AMBARI-18467. The attached link on 
the RB is incorrect.
If you search for UpdateActiveRepoVersionOnStartup, second to last occurence 
and look at the restart after that, it might provide some clues.


- Sid


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


On Sept. 26, 2016, 6:23 p.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52266/
> ---
> 
> (Updated Sept. 26, 2016, 6:23 p.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-18430
> https://issues.apache.org/jira/browse/AMBARI-18430
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problems during cluster install can result in clusters without a cluster 
> version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
> NPE check is added
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
>  1413c66 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
>  9c54a88 
> 
> Diff: https://reviews.apache.org/r/52266/diff/
> 
> 
> Testing
> ---
> 
> - Added a new unit test
> - All unit tests in ambari-server passed
> - Did manual testing to verify (removed cluster version from the DB and 
> restarted the server)
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-27 Thread Balázs Bence Sári


> On Sept. 26, 2016, 9:33 p.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java,
> >  line 97
> > 
> >
> > When I tried this on my cluster that was installed failed by making a 
> > jar, it did not come out of the bad state. Just want to make sure the 
> > manual testing on this was good.

I tested it by installing the cluster, then deleting the cluster version from 
the DB, then restarting the server. The server was able to restart. 
I don't know what other problems missing cluster versions can cause, but the 
startup issue is fixed by this patch. Could you describe what errors you saw 
after applying the patch?


- Balázs Bence


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


On Sept. 26, 2016, 6:23 p.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52266/
> ---
> 
> (Updated Sept. 26, 2016, 6:23 p.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-18430
> https://issues.apache.org/jira/browse/AMBARI-18430
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problems during cluster install can result in clusters without a cluster 
> version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
> NPE check is added
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
>  1413c66 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
>  9c54a88 
> 
> Diff: https://reviews.apache.org/r/52266/diff/
> 
> 
> Testing
> ---
> 
> - Added a new unit test
> - All unit tests in ambari-server passed
> - Did manual testing to verify (removed cluster version from the DB and 
> restarted the server)
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-26 Thread Sid Wagle

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




ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
 (line 97)


When I tried this on my cluster that was installed failed by making a jar, 
it did not come out of the bad state. Just want to make sure the manual testing 
on this was good.


- Sid Wagle


On Sept. 26, 2016, 6:23 p.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52266/
> ---
> 
> (Updated Sept. 26, 2016, 6:23 p.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-18430
> https://issues.apache.org/jira/browse/AMBARI-18430
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problems during cluster install can result in clusters without a cluster 
> version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
> NPE check is added
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
>  1413c66 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
>  9c54a88 
> 
> Diff: https://reviews.apache.org/r/52266/diff/
> 
> 
> Testing
> ---
> 
> - Added a new unit test
> - All unit tests in ambari-server passed
> - Did manual testing to verify (removed cluster version from the DB and 
> restarted the server)
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-26 Thread Alejandro Fernandez


> On Sept. 26, 2016, 6:34 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java,
> >  line 103
> > 
> >
> > This should be LOG.error in my opinion

Actually, a standalone Ambari Server for views will not have any cluster 
versions, so warn is ok.


- Alejandro


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


On Sept. 26, 2016, 6:23 p.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52266/
> ---
> 
> (Updated Sept. 26, 2016, 6:23 p.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-18430
> https://issues.apache.org/jira/browse/AMBARI-18430
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problems during cluster install can result in clusters without a cluster 
> version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
> NPE check is added
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
>  1413c66 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
>  9c54a88 
> 
> Diff: https://reviews.apache.org/r/52266/diff/
> 
> 
> Testing
> ---
> 
> - Added a new unit test
> - All unit tests in ambari-server passed
> - Did manual testing to verify (removed cluster version from the DB and 
> restarted the server)
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-26 Thread Alejandro Fernandez

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
 (line 103)


This should be LOG.error in my opinion


- Alejandro Fernandez


On Sept. 26, 2016, 6:23 p.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52266/
> ---
> 
> (Updated Sept. 26, 2016, 6:23 p.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-18430
> https://issues.apache.org/jira/browse/AMBARI-18430
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Problems during cluster install can result in clusters without a cluster 
> version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
> NPE check is added
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
>  1413c66 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
>  9c54a88 
> 
> Diff: https://reviews.apache.org/r/52266/diff/
> 
> 
> Testing
> ---
> 
> - Added a new unit test
> - All unit tests in ambari-server passed
> - Did manual testing to verify (removed cluster version from the DB and 
> restarted the server)
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Review Request 52266: Ambari server does not come up after restart if cluster install fails

2016-09-26 Thread Balázs Bence Sári

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

Review request for Ambari, Attila Doroszlai, Jayush Luniya, Oliver Szabo, and 
Sebastian Toader.


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


Repository: ambari


Description
---

Problems during cluster install can result in clusters without a cluster 
version. UpdateActiveRepoVersionOnStartup.process() threw NPE in these case. 
NPE check is added


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
 1413c66 
  
ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
 9c54a88 

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


Testing
---

- Added a new unit test
- All unit tests in ambari-server passed
- Did manual testing to verify (removed cluster version from the DB and 
restarted the server)


Thanks,

Balázs Bence Sári