[ 
https://issues.apache.org/jira/browse/SLIDER-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14163695#comment-14163695
 ] 

Steve Loughran commented on SLIDER-274:
---------------------------------------

what's happened here is that an invalid config has been generated, failing is 
nominally "the correct" thing to do. Once the spec has been saved, cluster 
restarts will be invalid as well.

What could be done is validate and correct at flex time, one of

# create the client-side provider in {{actionFlex()}} and use that to validate 
the specification
# implement a provider-neutral policy, such as "you can't add new role types in 
a flex". I have mixed feelings there...it is something you could want to do, 
especially when the cluster is down.

> Flex'ing with unknown role name results in BadConfigException
> -------------------------------------------------------------
>
>                 Key: SLIDER-274
>                 URL: https://issues.apache.org/jira/browse/SLIDER-274
>             Project: Slider
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Gour Saha
>             Fix For: Slider 0.50
>
>
> I used 'slider flex' command with unknown role name - 'worker'
> I got the following exception:
> {code}
> org.apache.hadoop.ipc.RemoteException(org.apache.slider.core.exceptions.BadConfigException):
>  Missing option yarn.role.priority
>       at 
> org.apache.slider.core.conf.MapOperations.getMandatoryOption(MapOperations.java:92)
>       at 
> org.apache.slider.server.appmaster.state.AppState.createDynamicProviderRole(AppState.java:559)
>       at 
> org.apache.slider.server.appmaster.state.AppState.buildRoleRequirementsFromResources(AppState.java:669)
>       at 
> org.apache.slider.server.appmaster.state.AppState.updateResourceDefinitions(AppState.java:631)
>       at 
> org.apache.slider.server.appmaster.SliderAppMaster.flexCluster(SliderAppMaster.java:1090)
>       at 
> org.apache.slider.server.appmaster.SliderAppMaster.flexCluster(SliderAppMaster.java:1209)
>       at 
> org.apache.slider.server.appmaster.rpc.SliderClusterProtocolPBImpl.flexCluster(SliderClusterProtocolPBImpl.java:68)
>       at 
> org.apache.slider.api.proto.SliderClusterAPI$SliderClusterProtocolPB$2.callBlockingMethod(SliderClusterAPI.java:262)
> {code}
> However, this resulted in the addition of following section to 
> /user/yarn/.slider/cluster/cl4/resources.json:
> {code}
>     "worker" : {
>       "yarn.component.instances" : "1"
>     }
> {code}
> This means that subsequent flex commands would always fail because of the 
> above section which doesn't have yarn.role.priority



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to