You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Suma Shivaprasad (JIRA)" <ji...@apache.org> on 2018/05/25 22:39:00 UTC

[jira] [Commented] (YARN-8360) Yarn service conflict between restart policy and NM configuration

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

Suma Shivaprasad commented on YARN-8360:
----------------------------------------

[~csingh] Thanks for filing this. The properties 

          "yarn.service.container-failure.retry.max": 1,
          "yarn.service.container-failure.validity-interval-ms": 5000

control how many NM retries are attempted.

Option 1: Retain the existing properties as-is as part of component configuration section with the following behaviour

a. for RestartPolicy=NEVER, no retries will be attempted and these properties will be ignored
b. For RestartPolicy=ALWAYS/ON_FAILURE, we retain current behaviour and attempt NM retries as per 
"yarn.service.container-failure.retry.max" and AM will always add the containers and retry until yarn.service.container-failure-per-component threshold is reached.

Option 2:
Make the container failure retry parameters part of the restart policy context which is a good suggestion but this would be a backward in-compatible change and would require spec migration for existing applications. If this is acceptable, then we can think of what the configuration parameters for restart policy would make sense.

Thoughts [~billie.rinaldi] [~eyang] [~gsaha] [~wangda] ?
 

> Yarn service conflict between restart policy and NM configuration 
> ------------------------------------------------------------------
>
>                 Key: YARN-8360
>                 URL: https://issues.apache.org/jira/browse/YARN-8360
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: yarn
>            Reporter: Chandni Singh
>            Assignee: Suma Shivaprasad
>            Priority: Major
>
> For the below spec, the service will not stop even after container failures because of the NM auto retry properties :
>  * "yarn.service.container-failure.retry.max": 1,
>  * "yarn.service.container-failure.validity-interval-ms": 5000
>  The NM will continue auto-restarting containers.
>  {{fail_after 20}} fails after 20 seconds. Since the validity failure interval is 5 seconds, NM will auto restart the container.
> {code:java}
> {
>   "name": "fail-demo2",
>   "version": "1.0.0",
>   "components" :
>   [
>     {
>       "name": "comp1",
>       "number_of_containers": 1,
>       "launch_command": "fail_after 20",
>       "restart_policy": "NEVER",
>       "resource": {
>         "cpus": 1,
>         "memory": "256"
>       },
>       "configuration": {
>         "properties": {
>           "yarn.service.container-failure.retry.max": 1,
>           "yarn.service.container-failure.validity-interval-ms": 5000
>         }
>       }
>     }
>   ]
> }
> {code}
> If {{restart_policy}} is NEVER, then the service should stop after the container fails.
> Since we have introduced, the service level Restart Policies, I think we should make the NM auto retry configurations part of the {{RetryPolicy}} and get rid of all {{yarn.service.container-failure.**}} properties. Otherwise it gets confusing.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org