mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zameer Manji <zma...@apache.org>
Subject Re: Review Request 51342: Printed out the received stream ID in scheduler API.
Date Tue, 23 Aug 2016 17:44:49 GMT

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


Ship it!




Ship It!

- Zameer Manji


On Aug. 23, 2016, 10:34 a.m., Abhishek Dasgupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51342/
> -----------------------------------------------------------
> 
> (Updated Aug. 23, 2016, 10:34 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Vinod Kone, and Zameer Manji.
> 
> 
> Bugs: MESOS-6041
>     https://issues.apache.org/jira/browse/MESOS-6041
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch prints out the received stream ID in error output
> caused by Mesos-Stream-Id mismatch in calls to
> scheduler http api.
> Expected stream ID is not printed in error output as
> it may cause security leak.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp 52dd80b856cf2317c0b73ba54bf501696786088d 
> 
> Diff: https://reviews.apache.org/r/51342/diff/
> 
> 
> Testing
> -------
> 
> On Ubuntu 16.04:
> sudo make -j4 check
> 
> Manual testing as well.
> Steps to reproduce:
> 1. Run mesos master.
> 2. Run Mesos Slave.
> 3. Subscribe a framework with the command : curl -v  -H  "Accept: application/json" -H
"Content-Type: application/json" -d "@subscribe.json" http://127.0.0.1:5050/api/v1/scheduler
> 
> subscribe.json :
> {
>    "type"       : "SUBSCRIBE",
>    "subscribe"  : {
>       "framework_info"  : {
>         "user" :  "bar",
>         "name" :  "Example HTTP Framework1"
>       }
>   }
> }
> 4. Accept an offer by following command : curl -v  -H  "Accept: application/json" -H
"Content-Type: application/json" -H "Mesos-Stream-Id: 000a38b7-8a2a-4c8f-a374-f782d6ea617f"
-d "@accept.json" http://127.0.0.1:5050/api/v1/scheduler
> 
> accept.json:
> {
> 	"framework_id": {
> 		"value": "ee29ca2a-c56b-4a24-bba1-4919afae813e-0000"
> 	},
> 	"type": "ACCEPT",
> 	"accept": {
> 		"offer_ids": [{
> 			"value": "369108e7-2bff-4a54-aca0-4f63b11a9361-O0"
> 		}],
> 		"operations": [{
> 			"type": "LAUNCH",
> 			"launch": {
> 				"task_infos": [{
> 					"name": "My Task",
> 					"task_id": {
> 						"value": "12220-3440-12532-my-task"
> 					},
> 					"agent_id": {
> 						"value": "94d32bba-2bb4-461f-bd96-30d155fe5965-S0"
> 					},
> 					"executor": {
> 						"command": {
> 							"shell": true,
> 							"value": "sleep 1000"
> 						},
> 						"executor_id": {
> 							"value": "12214-23523-my-executor"
> 						}
> 					},
> 					"resources": [{
> 						"name": "cpus",
> 						"role": "*",
> 						"type": "SCALAR",
> 						"scalar": {
> 							"value": 1.0
> 						}
> 					}, {
> 						"name": "mem",
> 						"role": "*",
> 						"type": "SCALAR",
> 						"scalar": {
> 							"value": 128.0
> 						}
> 					}]
> 				}]
> 			}
> 		}],
> 		"filters": {
> 			"refuse_seconds": 5.0
> 		}
> 	}
> }
> 
> Note: Mesos-Stream-Id passed through header in this curl command is left mismatched to
that received from the response to subscribe call.
> 5. Following error output is received as response: 
>    The stream ID '000a38b7-8a2a-4c8f-a374-f782d6ea617f' included in this request didn't
match the stream ID currently associated with framework ID 'd2740805-e94a-4dc0-ad9f-96ffe3daedb3-0000'
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>


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