Re: Review Request 47014: Blueprint processor should create ConfigGroup even with only one host registered

2016-05-05 Thread Srimanth Gunturi

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


Ship it!




Ship It!

- Srimanth Gunturi


On May 5, 2016, 3:55 p.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47014/
> ---
> 
> (Updated May 5, 2016, 3:55 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Laszlo Puskas, Sandor Magyari, 
> Srimanth Gunturi, and Sid Wagle.
> 
> 
> Bugs: AMBARI-16270
> https://issues.apache.org/jira/browse/AMBARI-16270
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When the first host for a host group registers with the cluster and is 
> assigned to host group Ambari checks if there is any config group to be 
> created for that host group. If it has to than create a config group and 
> assigning to it all hosts that are expected for the parent host group. 
> However it not checks is all of the expected hosts of the host group have 
> already been associated with the cluster thus the config group creation fails 
> as config groups can have only hosts added that already are associated with 
> the cluster.
> 
> This has been changed to add only those hosts to config group that already 
> have been associated with the cluster and update the created config group 
> with the remaing hosts as these become available and register with the 
> cluster.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
>  cf1a6ac 
>   
> ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
>  1613d11 
> 
> Diff: https://reviews.apache.org/r/47014/diff/
> 
> 
> Testing
> ---
> 
> Manual testing done.
> 
> Unit test results:
> Results :
> 
> Tests run: 3568, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>



Re: Review Request 47014: Blueprint processor should create ConfigGroup even with only one host registered

2016-05-05 Thread Sebastian Toader


> On May 5, 2016, 6:19 p.m., Sid Wagle wrote:
> > Don't the subsequent CG calls need to do an update vs create? Unless we are 
> > always creating CG with configs and no hosts and then update request with 
> > hosts.

The CG is created when there is a host matched to the host request. While 
processing the tasks for the host request it checks if the host group this host 
request came from requires a CG created or not. If it requires than if a CG 
already exists that just updates the CG with the new host. If the CG deoesn't 
exist that creates new one with the current host. See 
```AmbariContext.registerHostWithConfigGroup```


- Sebastian


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


On May 5, 2016, 5:55 p.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47014/
> ---
> 
> (Updated May 5, 2016, 5:55 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Laszlo Puskas, Sandor Magyari, 
> Srimanth Gunturi, and Sid Wagle.
> 
> 
> Bugs: AMBARI-16270
> https://issues.apache.org/jira/browse/AMBARI-16270
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When the first host for a host group registers with the cluster and is 
> assigned to host group Ambari checks if there is any config group to be 
> created for that host group. If it has to than create a config group and 
> assigning to it all hosts that are expected for the parent host group. 
> However it not checks is all of the expected hosts of the host group have 
> already been associated with the cluster thus the config group creation fails 
> as config groups can have only hosts added that already are associated with 
> the cluster.
> 
> This has been changed to add only those hosts to config group that already 
> have been associated with the cluster and update the created config group 
> with the remaing hosts as these become available and register with the 
> cluster.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
>  cf1a6ac 
>   
> ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
>  1613d11 
> 
> Diff: https://reviews.apache.org/r/47014/diff/
> 
> 
> Testing
> ---
> 
> Manual testing done.
> 
> Unit test results:
> Results :
> 
> Tests run: 3568, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>



Re: Review Request 47014: Blueprint processor should create ConfigGroup even with only one host registered

2016-05-05 Thread Sid Wagle

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



Don't the subsequent CG calls need to do an update vs create? Unless we are 
always creating CG with configs and no hosts and then update request with hosts.

- Sid Wagle


On May 5, 2016, 3:55 p.m., Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47014/
> ---
> 
> (Updated May 5, 2016, 3:55 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Laszlo Puskas, Sandor Magyari, 
> Srimanth Gunturi, and Sid Wagle.
> 
> 
> Bugs: AMBARI-16270
> https://issues.apache.org/jira/browse/AMBARI-16270
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When the first host for a host group registers with the cluster and is 
> assigned to host group Ambari checks if there is any config group to be 
> created for that host group. If it has to than create a config group and 
> assigning to it all hosts that are expected for the parent host group. 
> However it not checks is all of the expected hosts of the host group have 
> already been associated with the cluster thus the config group creation fails 
> as config groups can have only hosts added that already are associated with 
> the cluster.
> 
> This has been changed to add only those hosts to config group that already 
> have been associated with the cluster and update the created config group 
> with the remaing hosts as these become available and register with the 
> cluster.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
>  cf1a6ac 
>   
> ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
>  1613d11 
> 
> Diff: https://reviews.apache.org/r/47014/diff/
> 
> 
> Testing
> ---
> 
> Manual testing done.
> 
> Unit test results:
> Results :
> 
> Tests run: 3568, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>



Re: Review Request 47014: Blueprint processor should create ConfigGroup even with only one host registered

2016-05-05 Thread Sebastian Toader

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

(Updated May 5, 2016, 5:55 p.m.)


Review request for Ambari, Daniel Gergely, Laszlo Puskas, Sandor Magyari, 
Srimanth Gunturi, and Sid Wagle.


Changes
---

Added unit test results.


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


Repository: ambari


Description
---

When the first host for a host group registers with the cluster and is assigned 
to host group Ambari checks if there is any config group to be created for that 
host group. If it has to than create a config group and assigning to it all 
hosts that are expected for the parent host group. However it not checks is all 
of the expected hosts of the host group have already been associated with the 
cluster thus the config group creation fails as config groups can have only 
hosts added that already are associated with the cluster.

This has been changed to add only those hosts to config group that already have 
been associated with the cluster and update the created config group with the 
remaing hosts as these become available and register with the cluster.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
 cf1a6ac 
  
ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
 1613d11 

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


Testing (updated)
---

Manual testing done.

Unit test results:
Results :

Tests run: 3568, Failures: 0, Errors: 0, Skipped: 36


Thanks,

Sebastian Toader



Re: Review Request 47014: Blueprint processor should create ConfigGroup even with only one host registered

2016-05-05 Thread Sebastian Toader

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

(Updated May 5, 2016, 4:44 p.m.)


Review request for Ambari, Daniel Gergely, Laszlo Puskas, Sandor Magyari, 
Srimanth Gunturi, and Sid Wagle.


Changes
---

Separated the assert into 3 asserts in the unit test.


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


Repository: ambari


Description
---

When the first host for a host group registers with the cluster and is assigned 
to host group Ambari checks if there is any config group to be created for that 
host group. If it has to than create a config group and assigning to it all 
hosts that are expected for the parent host group. However it not checks is all 
of the expected hosts of the host group have already been associated with the 
cluster thus the config group creation fails as config groups can have only 
hosts added that already are associated with the cluster.

This has been changed to add only those hosts to config group that already have 
been associated with the cluster and update the created config group with the 
remaing hosts as these become available and register with the cluster.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
 cf1a6ac 
  
ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
 1613d11 

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


Testing
---

Manual testing done.

Unit tests are in progress.


Thanks,

Sebastian Toader



Re: Review Request 47014: Blueprint processor should create ConfigGroup even with only one host registered

2016-05-05 Thread Daniel Gergely

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


Fix it, then Ship it!





ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
 (line 394)


Use 3 separated Asserts to help debugging in case on an error.


- Daniel Gergely


On máj. 5, 2016, 2:12 du, Sebastian Toader wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47014/
> ---
> 
> (Updated máj. 5, 2016, 2:12 du)
> 
> 
> Review request for Ambari, Daniel Gergely, Laszlo Puskas, Sandor Magyari, 
> Srimanth Gunturi, and Sid Wagle.
> 
> 
> Bugs: AMBARI-16270
> https://issues.apache.org/jira/browse/AMBARI-16270
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When the first host for a host group registers with the cluster and is 
> assigned to host group Ambari checks if there is any config group to be 
> created for that host group. If it has to than create a config group and 
> assigning to it all hosts that are expected for the parent host group. 
> However it not checks is all of the expected hosts of the host group have 
> already been associated with the cluster thus the config group creation fails 
> as config groups can have only hosts added that already are associated with 
> the cluster.
> 
> This has been changed to add only those hosts to config group that already 
> have been associated with the cluster and update the created config group 
> with the remaing hosts as these become available and register with the 
> cluster.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
>  cf1a6ac 
>   
> ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
>  1613d11 
> 
> Diff: https://reviews.apache.org/r/47014/diff/
> 
> 
> Testing
> ---
> 
> Manual testing done.
> 
> Unit tests are in progress.
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>