ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shantanu Mundkur" <ant...@gmail.com>
Subject Re: Review Request 40527: AMBARI-11825: Failure to add or install component defined with cardinality ALL
Date Tue, 24 Nov 2015 03:15:59 GMT


> On Nov. 23, 2015, 4:03 a.m., Jaimin Jetly wrote:
> > ambari-web/app/controllers/wizard/step8_controller.js, lines 1059-1068
> > <https://reviews.apache.org/r/40527/diff/1/?file=1133828#file1133828line1059>
> >
> >     If we are going to support "ALL" cardinlaity for master components then lets
not show any master host component with "ALL" cardinality on "Assign Masters page". It will
be confusing if end-user deselects host components on "Assign Master" page and even after
that ambari creates host component on those hosts.

Hi Jaimin,

Thank you for reviewing the changes.

I thought cardinality "ALL" was already supported for MASTER (as well as for SLAVE and CLIENT)
component type. It is a different matter that it probably has not worked or been usable with
ALL because of the current defect we are trying to fix. Here are some of the issues around
cardinality that I took note of while working on the current problem (including the one that
you have raised). I think you will understand why I am suggesting that they should be tackled
independent of this issue.

1) As you pointed out as well, the MASTER component is shown on the Assign Masters page with
a selection that does not match the minimum cardinality specified in the service definition.
However, this is not just for ALL but any other cardinality > 1. For instance, 2+ will
still result in only 1 host being assigned for the component. The user has to manually click
on + and add additional hosts. There is no warning either that the selection does not match
the requirement (e.g. minimum of 2).

2) For SLAVE and for CLIENT, ALL is enforced by skipping Slaves and Clients Page. This is
fine. However, if the SLAVE of any selected service has some cardinality other than ALL then
the page is not skipped. This means somebody could try selecting the number of clients as
well (though that would not be honored).

3) For SLAVE - ALL is enforced by the SLAVE for the corresponding service(s) with cardinality
ALL not being listed on Assign Slaves and Clients Page. This is fine.

4) For CLIENT the defined cardinality of the client while honored eventually is inconsistent
with the selection (number of checked checkboxes) on Assign Slaves and Clients Page. This
is explained in point 2) above.

5) If an attempt is made to add multiple services and the CLIENT for these services have conflicting
cardinality, the user would not be able to completely get rid of the warning message such
as " Exactly 3 Service1 Client components should be installed in cluster.
Exactly 2 Service2 Client components should be installed in cluster." 

6) From debugging, it appears as though the stack advisor does not do validation for cardinality
of MASTER and nor for CLIENT. (or at least there is something not correct in how it is processing
the components).
 
My recommendation would be to open separate Jira(s) for them. I plan to open one (or probably
more) for the issues I highlighted above.

If you agree can you please approve the changes and push the changes into trunk? Thanks.

Shantanu


- Shantanu


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


On Nov. 20, 2015, 7:11 a.m., Shantanu Mundkur wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40527/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2015, 7:11 a.m.)
> 
> 
> Review request for Ambari and Jaimin Jetly.
> 
> 
> Bugs: AMBARI-11825
>     https://issues.apache.org/jira/browse/AMBARI-11825
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> A MASTER, SLAVE or CLIENT component defined with a cardinality of ALL results in a failure
while adding the service, upon clicking Deploy, with an error like:
> 
> org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException: Attempted to
create host_component's which already exist: [clusterName=CLUSTER1, hostName=node1.domain.com,
componentName=MYSERVICE_MASTER],[clusterName=CLUSTER1, hostName=node1.domain.com, componentName=MYSERVICE_MASTER]
> 
> or
> 
> org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException: Attempted to
create a host_component which already exists: [clusterName=CLUSTER2, hostName=node10.domain.com,
componentName=MYSERVICE_SLAVE]
> 
> 
> Diffs
> -----
> 
>   ambari-web/app/controllers/wizard/step8_controller.js 5c4baa3 
>   ambari-web/test/controllers/wizard/step8_test.js 9331db5 
> 
> Diff: https://reviews.apache.org/r/40527/diff/
> 
> 
> Testing
> -------
> 
> (1) "mvn clean test" under ambari-web
>    
>   Results:
>   10388 tests complete (16 seconds)
>   115 tests pending
> 
> (2) Test sin (1) included new test-cases that were added for the Jira.
> 
> (3) Manually tested different scenarios using a custom service with MASTER, SLAVE and
CLIENT components using different combinations of cardinality and using ALL for the defined
components.
> 
> 
> Thanks,
> 
> Shantanu Mundkur
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message