You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2019/07/30 02:09:07 UTC

[GitHub] [incubator-livy] xuzikun2003 opened a new pull request #172: allow proxy user to view or modify his session

xuzikun2003 opened a new pull request #172: allow proxy user to view or modify his session
URL: https://github.com/apache/incubator-livy/pull/172
 
 
   ## What changes were proposed in this pull request?
   Allow proxy user to view or modify his session. Here is the link to the corresponding Jira
   https://issues.apache.org/jira/browse/LIVY-592
   
   ## How was this patch tested?
   Manually tested.
   
   (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
   Here is the script for manual test. Basically the accepting criteria is that each proxy user can view (or modify) his session, but he cannot view other users' session log.
   ########################################################################
   root@storage-0-0:~# echo Yukon900 | kinit bob
   Password for bob@AZDATA.LOCAL:
   Warning: Your password will expire in 41 days on Mon Jun 10 19:54:02 2019
   root@storage-0-0:~# curl -k -X POST --negotiate -u : --data '{"kind": "pyspark", "proxyUser": "bob"}' -H "Content-Type:
   application/json" 'https://gateway-0.gateway-svc.test.svc.cluster.local:8443/gateway/default/livy/v1/sessions'
   {"id":3,"name":null,"appId":null,"owner":"knox","proxyUser":"bob","state":"starting","kind":"pyspark","appInfo":{"driverLogUrl":null,"sparkUiUrl":null},"log":["stdout: ","\nstderr: ","\nYARN Diagnostics: "]}
   
   root@storage-0-0:~# curl -k --negotiate -u : 'https://gateway-0.gateway-svc.test.svc.cluster.local:8443/gateway/default/livy/v1/sessions' | grep log
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
   100   377  100   377    0     0   1638      0 --:--:-- --:--:-- --:--:--  1639
   100  2717  100  2717    0     0   8462      0 --:--:-- --:--:-- --:--:--  8462
   {"from":0,"total":4,"sessions":[{"id":0,"name":null,"appId":"application_1556568005453_0001","owner":"admin","proxyUser":"admin","state":"idle","kind":"pyspark","appInfo":{"driverLogUrl":"http://storage-0-1.storage-0-svc.test.svc.cluster.local:8042/node/containerlogs/container_1556568005453_0001_01_000001/admin","sparkUiUrl":"http://master-svc.test.svc.cluster.local:8088/proxy/application_1556568005453_0001/"},"log":[]},{"id":1,"name":null,"appId":"application_1556568005453_0002","owner":"bob","proxyUser":"bob","state":"idle","kind":"pyspark","appInfo":{"driverLogUrl":"http://storage-0-1.storage-0-svc.test.svc.cluster.local:8042/node/containerlogs/container_1556568005453_0002_01_000001/bob","sparkUiUrl":"http://master-svc.test.svc.cluster.local:8088/proxy/application_1556568005453_0002/"},"log":["\t ApplicationMaster RPC port: -1","\t queue: default","\t start time: 1556568124444","\t final status: UNDEFINED","\t tracking URL: http://master-svc.test.svc.cluster.local:8088/proxy/application_1556568005453_0002/","\t user: bob","19/04/29 20:02:04 INFO util.ShutdownHookManager: Shutdown hook called","19/04/29 20:02:04 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-7e43a04f-7c03-431d-933c-9a297f45f6cc","19/04/29 20:02:04 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-530d70db-6f51-4923-a669-12ad3cce49b6","\nYARN Diagnostics: "]},{"id":2,"name":null,"appId":"application_1556568005453_0003","owner":"knox","proxyUser":"admin","state":"idle","kind":"pyspark","appInfo":{"driverLogUrl":"http://storage-0-0.storage-0-svc.test.svc.cluster.local:8042/node/containerlogs/container_1556568005453_0003_01_000001/admin","sparkUiUrl":"http://master-svc.test.svc.cluster.local:8088/proxy/application_1556568005453_0003/"},"log":[]},{"id":3,"name":null,"appId":"application_1556568005453_0004","owner":"knox","proxyUser":"bob","state":"idle","kind":"pyspark","appInfo":{"driverLogUrl":"http://storage-0-1.storage-0-svc.test.svc.cluster.local:8042/node/containerlogs/container_1556568005453_0004_01_000001/bob","sparkUiUrl":"http://master-svc.test.svc.cluster.local:8088/proxy/application_1556568005453_0004/"},"log":["\t ApplicationMaster RPC port: -1","\t queue: default","\t start time: 1556570499259","\t final status: UNDEFINED","\t tracking URL: http://master-svc.test.svc.cluster.local:8088/proxy/application_1556568005453_0004/","\t user: bob","19/04/29 20:41:39 INFO util.ShutdownHookManager: Shutdown hook called","19/04/29 20:41:39 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-805ca9cc-3c9a-4951-bf05-1cae960987bf","19/04/29 20:41:39 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-42744a2e-bda0-4316-a2ff-21d5fe0afcd3","\nYARN Diagnostics: "]}]}
   ########################################################################

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services