[jira] [Updated] (YARN-9986) signalToContainer REST API does not work even if requested by the app owner

2019-11-19 Thread Prabhu Joseph (Jira)


 [ 
https://issues.apache.org/jira/browse/YARN-9986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Prabhu Joseph updated YARN-9986:

Labels: Reviewed  (was: )

> signalToContainer REST API does not work even if requested by the app owner
> ---
>
> Key: YARN-9986
> URL: https://issues.apache.org/jira/browse/YARN-9986
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: restapi
>Reporter: kyungwan nam
>Assignee: kyungwan nam
>Priority: Major
>  Labels: Reviewed
> Attachments: YARN-9986.001.patch, YARN-9986.002.patch
>
>
> signalToContainer REST API introduced in YARN-8693 does not work even if 
> requested by the app owner. 
> It works well only if requested by an admin user
> {code}
> $ kinit kwnam
> Password for kw...@test.org:
> $ curl  -H 'Content-Type: application/json' --negotiate -u : -X POST 
> https://rm002.test.org:8088/ws/v1/cluster/containers/container_e58_1573625560605_29927_01_01/signal/GRACEFUL_SHUTDOWN
> {"RemoteException":{"exception":"ForbiddenException","message":"java.lang.Exception:
>  Only admins can carry out this 
> operation.","javaClassName":"org.apache.hadoop.yarn.webapp.ForbiddenException"}}$
> $ kinit admin
> Password for ad...@test.org:
> $
> $ curl  -H 'Content-Type: application/json' --negotiate -u : -X POST 
> https://rm002.test.org:8088/ws/v1/cluster/containers/container_e58_1573625560605_29927_01_01/signal/GRACEFUL_SHUTDOWN
> $
> {code}
> in contrast, the app owner can do it using the command line as below.
> {code}
> $ kinit kwnam
> Password for kw...@test.org:
> $ yarn container -signal container_e58_1573625560605_29927_01_02  
> GRACEFUL_SHUTDOWN
> Signalling container container_e58_1573625560605_29927_01_02
> 2019-11-19 09:12:29,797 INFO impl.YarnClientImpl: Signalling container 
> container_e58_1573625560605_29927_01_02 with command GRACEFUL_SHUTDOWN
> 2019-11-19 09:12:29,920 INFO client.ConfiguredRMFailoverProxyProvider: 
> Failing over to rm2
> $
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (YARN-9986) signalToContainer REST API does not work even if requested by the app owner

2019-11-19 Thread kyungwan nam (Jira)


 [ 
https://issues.apache.org/jira/browse/YARN-9986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

kyungwan nam updated YARN-9986:
---
Attachment: YARN-9986.002.patch

> signalToContainer REST API does not work even if requested by the app owner
> ---
>
> Key: YARN-9986
> URL: https://issues.apache.org/jira/browse/YARN-9986
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: restapi
>Reporter: kyungwan nam
>Assignee: kyungwan nam
>Priority: Major
> Attachments: YARN-9986.001.patch, YARN-9986.002.patch
>
>
> signalToContainer REST API introduced in YARN-8693 does not work even if 
> requested by the app owner. 
> It works well only if requested by an admin user
> {code}
> $ kinit kwnam
> Password for kw...@test.org:
> $ curl  -H 'Content-Type: application/json' --negotiate -u : -X POST 
> https://rm002.test.org:8088/ws/v1/cluster/containers/container_e58_1573625560605_29927_01_01/signal/GRACEFUL_SHUTDOWN
> {"RemoteException":{"exception":"ForbiddenException","message":"java.lang.Exception:
>  Only admins can carry out this 
> operation.","javaClassName":"org.apache.hadoop.yarn.webapp.ForbiddenException"}}$
> $ kinit admin
> Password for ad...@test.org:
> $
> $ curl  -H 'Content-Type: application/json' --negotiate -u : -X POST 
> https://rm002.test.org:8088/ws/v1/cluster/containers/container_e58_1573625560605_29927_01_01/signal/GRACEFUL_SHUTDOWN
> $
> {code}
> in contrast, the app owner can do it using the command line as below.
> {code}
> $ kinit kwnam
> Password for kw...@test.org:
> $ yarn container -signal container_e58_1573625560605_29927_01_02  
> GRACEFUL_SHUTDOWN
> Signalling container container_e58_1573625560605_29927_01_02
> 2019-11-19 09:12:29,797 INFO impl.YarnClientImpl: Signalling container 
> container_e58_1573625560605_29927_01_02 with command GRACEFUL_SHUTDOWN
> 2019-11-19 09:12:29,920 INFO client.ConfiguredRMFailoverProxyProvider: 
> Failing over to rm2
> $
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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