[5/8] mesos git commit: Added some assertions to the switchboard request handler.

2017-01-29 Thread anand
Added some assertions to the switchboard request handler. Some of the request parameters e.g., request method/header values are already validated by the agent. We can replace them with explicit assertions in the IO switchboard. Review: https://reviews.apache.org/r/55978/ Project:

[8/8] mesos git commit: Added a test for validating streaming request/response headers.

2017-01-29 Thread anand
Added a test for validating streaming request/response headers. Review: https://reviews.apache.org/r/55942/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cb12060a Tree:

[6/8] mesos git commit: Added support for the new streaming request/response headers.

2017-01-29 Thread anand
Added support for the new streaming request/response headers. Modified the Agent API/Switchboard handlers to support the "Message-Accept"/"Message-Content-Type" headers for request/response streaming. Also, adds general validations to ensure that non-streaming requests/responses don't have these

[7/8] mesos git commit: Modified existing tests to support new headers for request streaming.

2017-01-29 Thread anand
Modified existing tests to support new headers for request streaming. These tests now set the "Message-Accept", "Message-Content-Type" headers correctly for streaming responses/requests. Review: https://reviews.apache.org/r/55941/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo

[4/8] mesos git commit: Introduced `RequestMediaTypes`.

2017-01-29 Thread anand
Introduced `RequestMediaTypes`. This structure stores the "Content-*", "Message-*", "Accept-*" prefixed request headers in our internal representation. Review: https://reviews.apache.org/r/55939/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[2/8] mesos git commit: Added constants for referring to request/response streaming headers.

2017-01-29 Thread anand
Added constants for referring to request/response streaming headers. Removed the previous streaming headers and added constants for "Message-Accept and "Message-Content-Type" headers allowing us to refer to them later in the agent API handlers. Also, modified the stream operators as well as the

[1/8] mesos git commit: Added an overload for `acceptsMediaType()`.

2017-01-29 Thread anand
Repository: mesos Updated Branches: refs/heads/master d261076ed -> cb12060a4 Added an overload for `acceptsMediaType()`. This overload allows us to see if a header name with similar semantics as the "Accept" header is acceptable in the response. This would be used for the "Message-Accept"

[3/8] mesos git commit: Renamed `streamingRequest` to `streamingMediaType`.

2017-01-29 Thread anand
Renamed `streamingRequest` to `streamingMediaType`. This allows the method to be used both for detecting if the media type can be used for streaming requests and responses. Also, the method now returns true for `ContentType::RECORDIO` media type. Review: https://reviews.apache.org/r/55938/

[1/2] mesos git commit: Added a safety CHECK when accessing activeRoles in the master.

2017-01-29 Thread bmahler
Repository: mesos Updated Branches: refs/heads/master e591e4177 -> e8460826f Added a safety CHECK when accessing activeRoles in the master. Currently there is a use of the [] operator that is not preceded by a CHECK that the key is contained in the map. This leads to a hard to diagnose issue

mesos git commit: Supported auto backend in MesosContainerizer.

2017-01-29 Thread jieyu
Repository: mesos Updated Branches: refs/heads/master cb12060a4 -> e591e4177 Supported auto backend in MesosContainerizer. Select a backend smartly. Currently, the logic is really simple: 1. Use overlayfs backend if it exists. 2. Use aufs backend if the overlayfs does not exists. 3. Use

[3/3] mesos git commit: Updated resources quantity stripping to strip AllocationInfo.

2017-01-29 Thread bmahler
Updated resources quantity stripping to strip AllocationInfo. Currently, `Resources::createStrippedScalarQuantity()` attempts to create a notion of a "quantity" of resources. In order to do this, all distinguishing metadata between resources of the same name are stripped. This currently includes,

[1/3] mesos git commit: Added helpers to allocate / unallocate Resources.

2017-01-29 Thread bmahler
Repository: mesos Updated Branches: refs/heads/master e8460826f -> 9df201ff2 Added helpers to allocate / unallocate Resources. Review: https://reviews.apache.org/r/54836 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[2/3] mesos git commit: Augmented printing of Resources to include AllocationInfo.

2017-01-29 Thread bmahler
Augmented printing of Resources to include AllocationInfo. Ignoring whether there is a disk info, the format is as follows: name(reservedrole[, principal[, labels]])(allocatedrole):value Review: https://reviews.apache.org/r/55825 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo

[2/2] mesos git commit: Added TODOs to make the master code safer.

2017-01-29 Thread bmahler
Added TODOs to make the master code safer. The executor and tasks fields in the master's structs for agents and frameworks are publicly visible, but yet for correctness it is required that callers made modifications through the member functions which carry additional logic (e.g. tracking

mesos git commit: Improved executor, scheduler v1 API docs.

2017-01-29 Thread anand
Repository: mesos Updated Branches: refs/heads/master 9df201ff2 -> 7077e4779 Improved executor, scheduler v1 API docs. These APIs are no longer in beta. Also make various fixes and cleanups for grammar and writing style, and fix typos in a few other doc pages. Review: