mesos git commit: Added the JIRA link for MESOS-3938 in quota.md.

2016-09-19 Thread alexr
Repository: mesos Updated Branches: refs/heads/master be81a924a -> 7a5ec4987 Added the JIRA link for MESOS-3938 in quota.md. Review: https://reviews.apache.org/r/52023/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[2/5] mesos git commit: Expose full reservation info in the agent's http endpoint.

2016-09-19 Thread yan
Expose full reservation info in the agent's http endpoint. Review: https://reviews.apache.org/r/51868 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/06eea532 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/06eea532

[4/5] mesos git commit: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-19 Thread yan
Export "reserved_resources" in the agent HTTP endpoint. Also the 'resource' field now exposes the total resources, which is consistent with the same field in the master's /slaves endpoint. Review: https://reviews.apache.org/r/51869 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo

[3/5] mesos git commit: Made the agent verify resource compatibility in checkpointResources().

2016-09-19 Thread yan
Made the agent verify resource compatibility in checkpointResources(). In handling CheckpointResourcesMessage, the agent should first make sure the checkpointed resources are compatible before it syncs local disk state. Review: https://reviews.apache.org/r/51866 Project:

[1/5] mesos git commit: Added a test for reservation info in the agent's endpoint.

2016-09-19 Thread yan
Repository: mesos Updated Branches: refs/heads/master e65933c9a -> e3aa2e76c Added a test for reservation info in the agent's endpoint. Review: https://reviews.apache.org/r/51870 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[5/5] mesos git commit: Add a member variable for the agent's total resources.

2016-09-19 Thread yan
Add a member variable for the agent's total resources. `totalResources` is updated by CheckpointResourcesMessages and doesn't have to be re-calculated in Slave::usage(). This change allows us to expose `totalResources` for other purposes. Review: https://reviews.apache.org/r/51867 Project:

[3/4] mesos git commit: Added << operator to stringify v1::TaskGroupInfo protobuf.

2016-09-19 Thread vinodkone
Added << operator to stringify v1::TaskGroupInfo protobuf. This patch is needed as Flags add() function needs to stringify v1::TaskGroupInfo before it is parsed to a variable of that type. Review: https://reviews.apache.org/r/51990/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo

[3/4] mesos git commit: Checked correct file descriptor after call to `dup`.

2016-09-19 Thread josephwu
Checked correct file descriptor after call to `dup`. Review: https://reviews.apache.org/r/51839/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/54695e5b Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/54695e5b Diff:

[3/5] mesos git commit: Fixed potential FD double close in the libevent socket.

2016-09-19 Thread josephwu
Fixed potential FD double close in the libevent socket. `evbuffer_add_file` will take ownership of the file descriptor passed into it. Normally, this file descriptor is owned by the `FileEncoder` in the libprocess's `SocketManager`. Since there are two owners, one of the owners may close the

[2/5] mesos git commit: Added check in FileEncoder's destructor.

2016-09-19 Thread josephwu
Added check in FileEncoder's destructor. This check will force libprocess to fail fast if a file descriptor is closed underneath it. Review: https://reviews.apache.org/r/51511/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[5/5] mesos git commit: Backported MESOS-5986, MESOS-6104, and MESOS-6152 to 0.28.x.

2016-09-19 Thread josephwu
Backported MESOS-5986, MESOS-6104, and MESOS-6152 to 0.28.x. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/91845ec2 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/91845ec2 Diff:

[1/5] mesos git commit: Removed incorrect CHECK in SSL socket `send()`.

2016-09-19 Thread josephwu
Repository: mesos Updated Branches: refs/heads/0.28.x a82539ff2 -> 91845ec22 Removed incorrect CHECK in SSL socket `send()`. The lambda placed on the event loop by the libevent SSL socket's `send()` method previously used a `CHECK` to ensure that the socket's `send_request` member was not

[4/5] mesos git commit: Checked correct file descriptor after call to `dup`.

2016-09-19 Thread josephwu
Checked correct file descriptor after call to `dup`. Review: https://reviews.apache.org/r/51839/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/be440ec2 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/be440ec2 Diff:

mesos git commit: Moved `CHECK_NE` close to the `if (task.isSome())`.

2016-09-19 Thread vinodkone
Repository: mesos Updated Branches: refs/heads/master 29236068f -> ac2e9e2ac Moved `CHECK_NE` close to the `if (task.isSome())`. Review: https://reviews.apache.org/r/52069/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

mesos git commit: Add Mao Geng into contributors.

2016-09-19 Thread vinodkone
Repository: mesos Updated Branches: refs/heads/master ac2e9e2ac -> 1bc3b913e Add Mao Geng into contributors. This closes #167 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1bc3b913 Tree:

[1/2] mesos git commit: Fixed a typo in subprocess.hpp.

2016-09-19 Thread alexr
Repository: mesos Updated Branches: refs/heads/master 7a5ec4987 -> be5b76bbd Fixed a typo in subprocess.hpp. Review: https://reviews.apache.org/r/51786/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cf718111 Tree:

[2/2] mesos git commit: Fixed typos in subprocess_base.hpp.

2016-09-19 Thread alexr
Fixed typos in subprocess_base.hpp. Review: https://reviews.apache.org/r/51804/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/be5b76bb Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/be5b76bb Diff:

[2/5] mesos git commit: Fixed potential FD double close in the libevent socket.

2016-09-19 Thread josephwu
Fixed potential FD double close in the libevent socket. `evbuffer_add_file` will take ownership of the file descriptor passed into it. Normally, this file descriptor is owned by the `FileEncoder` in the libprocess's `SocketManager`. Since there are two owners, one of the owners may close the

[1/5] mesos git commit: Removed incorrect CHECK in SSL socket `send()`.

2016-09-19 Thread josephwu
Repository: mesos Updated Branches: refs/heads/0.27.x 329aca4a9 -> ed0a8762e Removed incorrect CHECK in SSL socket `send()`. The lambda placed on the event loop by the libevent SSL socket's `send()` method previously used a `CHECK` to ensure that the socket's `send_request` member was not

[5/5] mesos git commit: Backported MESOS-5986, MESOS-6104, and MESOS-6152 to 0.27.x.

2016-09-19 Thread josephwu
Backported MESOS-5986, MESOS-6104, and MESOS-6152 to 0.27.x. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ed0a8762 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ed0a8762 Diff:

[4/4] mesos git commit: Updated mesos-execute to support task groups.

2016-09-19 Thread vinodkone
Updated mesos-execute to support task groups. Through this patch, mesos-execute supports running task groups. Single task provided through command line option is supported as well for backward compatibility. Review: https://reviews.apache.org/r/51623/ Project:

[2/4] mesos git commit: Added parse function in flags namespace for v1::TaskGroupInfo protobuf.

2016-09-19 Thread vinodkone
Added parse function in flags namespace for v1::TaskGroupInfo protobuf. Review: https://reviews.apache.org/r/51991/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9a9610d0 Tree:

[4/5] mesos git commit: Checked correct file descriptor after call to `dup`.

2016-09-19 Thread josephwu
Checked correct file descriptor after call to `dup`. Review: https://reviews.apache.org/r/51839/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d9a9b47d Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d9a9b47d Diff:

[1/4] mesos git commit: Fixed potential FD double close in the libevent socket.

2016-09-19 Thread josephwu
Repository: mesos Updated Branches: refs/heads/1.0.x c76a3d355 -> d6132c58c Fixed potential FD double close in the libevent socket. `evbuffer_add_file` will take ownership of the file descriptor passed into it. Normally, this file descriptor is owned by the `FileEncoder` in the libprocess's

[4/4] mesos git commit: Backported MESOS-6104 and MESOS-6152 to 1.0.x.

2016-09-19 Thread josephwu
Backported MESOS-6104 and MESOS-6152 to 1.0.x. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d6132c58 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d6132c58 Diff:

[2/4] mesos git commit: Added check in FileEncoder's destructor.

2016-09-19 Thread josephwu
Added check in FileEncoder's destructor. This check will force libprocess to fail fast if a file descriptor is closed underneath it. Review: https://reviews.apache.org/r/51511/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

mesos git commit: Added backports for a potential double-close in libevent sockets.

2016-09-19 Thread josephwu
Repository: mesos Updated Branches: refs/heads/master f162ade0f -> e65933c9a Added backports for a potential double-close in libevent sockets. This backports MESOS-5986 to 0.27.4 and 0.28.3. This backports MESOS-6104 and MESOS-6152 to 0.27.4, 0.28.3, and 1.0.2. Review:

[3/4] mesos git commit: Windows: Fixed warnings in `windows/os.hpp`.

2016-09-19 Thread josephwu
Windows: Fixed warnings in `windows/os.hpp`. Captured the result of `Process32First` via its return type `BOOL` rather than implicitly casting to `bool`. Review: https://reviews.apache.org/r/52063/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[1/4] mesos git commit: Added Ilya Pronin to contributors.

2016-09-19 Thread josephwu
Repository: mesos Updated Branches: refs/heads/master e3aa2e76c -> 34e1240d5 Added Ilya Pronin to contributors. This closes #166 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/34e1240d Tree:

[4/4] mesos git commit: Cleaned up initialization of atomic fields in ProcessManager.

2016-09-19 Thread josephwu
Cleaned up initialization of atomic fields in ProcessManager. `std::atomic` has a trivial default constructor, which means `std::atomic` values are left uninitialized by default. `ProcessManager` uses two atomic fields that are default-constructed; although we `store` to them before reading from

[2/4] mesos git commit: Windows: Fixed warnings in `duration.hpp`.

2016-09-19 Thread josephwu
Windows: Fixed warnings in `duration.hpp`. Captures the result of `std::ostream::precision` via its return type `std::streamsize` rather than implicitly casting to `long`. Review: https://reviews.apache.org/r/52061/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[13/27] mesos git commit: Added GC of unreachable agent metadata from the registry.

2016-09-19 Thread vinodkone
Added GC of unreachable agent metadata from the registry. Information about agents that have been marked unreachable is stored in the registry. Since the number of unreachable agents can grow without bound, this commit implements a garbage collection scheme. The current leading master will

[15/27] mesos git commit: Handled agents failing health checks multiple times.

2016-09-19 Thread vinodkone
Handled agents failing health checks multiple times. Now that we wait for the agent to be removed from the registry before stopping the SlaveObserver, it is possible for an agent to fail health checks multiple times if the registry operation takes longer than `agent_ping_timeout`. This commit

[16/27] mesos git commit: Fixed races between "unreachable" and "unregister" slave transitions.

2016-09-19 Thread vinodkone
Fixed races between "unreachable" and "unregister" slave transitions. Now that we update the registry before updating the master's state when performing these transitions, it is possible for the master to already be marking a slave unreachable when an `UnregisterSlaveMessage` is received, or vice

[01/27] mesos git commit: Changed master to allow partitioned slaves to reregister.

2016-09-19 Thread vinodkone
Repository: mesos Updated Branches: refs/heads/master 34e1240d5 -> 29236068f Changed master to allow partitioned slaves to reregister. The previous behavior was to shutdown partitioned agents that attempt to reregister---unless the master has failed over, in which case the reregistration is

[09/27] mesos git commit: Change registry update order on removal, mark-unreachable.

2016-09-19 Thread vinodkone
Change registry update order on removal, mark-unreachable. This commit changes the master so that we always update the registry for an important change (e.g., removing an agent or marking an agent unreachable), before updating the important parts of the master's in-memory state (e.g., the

[20/27] mesos git commit: Added benchmarks for new registry operations.

2016-09-19 Thread vinodkone
Added benchmarks for new registry operations. These benchmarks cover: 1. The time taken to make all registered agents unreachable and then reachable. This is similar to what happens during a severe network partition. 2. The time taken to GC a significant fraction (50%) of the

[04/27] mesos git commit: Fixed outdated comment.

2016-09-19 Thread vinodkone
Fixed outdated comment. Review: https://reviews.apache.org/r/50844/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/06506fae Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/06506fae Diff:

[22/27] mesos git commit: Changed registrar operations to no longer depend on "strict" flag.

2016-09-19 Thread vinodkone
Changed registrar operations to no longer depend on "strict" flag. Registrar operations to admit and remove slaves now behave the same way, regardless of the value of the "strict" flag. This commit changes the behavior of these operations by enabling the previous "strict" behavior. For example,

[07/27] mesos git commit: Clarified a log message.

2016-09-19 Thread vinodkone
Clarified a log message. Review: https://reviews.apache.org/r/51020/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/df037de6 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/df037de6 Diff:

[17/27] mesos git commit: Updated master to send TASK_UNREACHABLE task state.

2016-09-19 Thread vinodkone
Updated master to send TASK_UNREACHABLE task state. When a task launched by a partition-aware framework is running on an agent that becomes partitioned from the master, the framework will now receive TASK_UNREACHABLE, not TASK_LOST. Similarly, when a partition-aware framework does explicit

[23/27] mesos git commit: Removed the "strict" flag from the registry operation interface.

2016-09-19 Thread vinodkone
Removed the "strict" flag from the registry operation interface. This flag is now ignored by all registry operations, so this should not result in a functional change. Review: https://reviews.apache.org/r/51954/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[05/27] mesos git commit: Added `unreachable_time` to TaskStatus.

2016-09-19 Thread vinodkone
Added `unreachable_time` to TaskStatus. This field contains the time at which the master marked an agent as unreachable. It will only be set for status updates (including reconciliation updates) that describe tasks running on unreachable (e.g., partitioned) agents. The intent is to help

[02/27] mesos git commit: Added test cases for PARTITION_AWARE behavior.

2016-09-19 Thread vinodkone
Added test cases for PARTITION_AWARE behavior. Review: https://reviews.apache.org/r/50706/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9ba79dae Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9ba79dae Diff:

[14/27] mesos git commit: Tweaked logging for UnregisterSlaveMessage handler.

2016-09-19 Thread vinodkone
Tweaked logging for UnregisterSlaveMessage handler. Remove a redundant log line: rather than logging when we receive an UnregisterSlaveMessage, it is sufficient to log how we handle that message. Also ensure that we log when ignoring an agent unregister message for an unknown agent, and do some

[21/27] mesos git commit: Ignored agent registrations with duplicate agent IDs.

2016-09-19 Thread vinodkone
Ignored agent registrations with duplicate agent IDs. If an agent attempts to register and is assigned an agent ID that already appears in the registry, the likely cause is a UUID collision: slave IDs are prefixed with master IDs, and master IDs are randomly generated UUIDs. UUID collisions are

[26/27] mesos git commit: Removed "strictness" parameter from RegistrarTest and PartitionTest.

2016-09-19 Thread vinodkone
Removed "strictness" parameter from RegistrarTest and PartitionTest. This parameter should no longer result in any difference in behavior. Review: https://reviews.apache.org/r/51957/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[18/27] mesos git commit: Improved SlaveTest.HealthCheckUnregisterRace.

2016-09-19 Thread vinodkone
Improved SlaveTest.HealthCheckUnregisterRace. Now that the MockRegistrar has been introduced, we can assert that the master doesn't do a registry operation in certain situations. Review: https://reviews.apache.org/r/51845/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[27/27] mesos git commit: Removed use of "--registry_strict" master flag.

2016-09-19 Thread vinodkone
Removed use of "--registry_strict" master flag. The flag will remain for a few more months per the deprecation policy, but we no longer need to set it in the unit tests. Providing an extensive usage summary in "--help" output also doesn't seem useful. Review: https://reviews.apache.org/r/51958/

[24/27] mesos git commit: Removed dependency on "registry_strict" in master failover.

2016-09-19 Thread vinodkone
Removed dependency on "registry_strict" in master failover. When the master fails over, agents have `agent_reregister_timeout` to reregister with the new master. Any agents that fail to reregister within the timeout will be marked unreachable in the registry. Previously, frameworks would only

[25/27] mesos git commit: Squelched GMock warning in MasterTest.RecoveredSlaveCanReregister.

2016-09-19 Thread vinodkone
Squelched GMock warning in MasterTest.RecoveredSlaveCanReregister. After the slave reregisters, the framework might receive an offer for the resources on that slave. Review: https://reviews.apache.org/r/51956/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit:

[11/27] mesos git commit: Adjusted existing tests to use MockRegistrar.

2016-09-19 Thread vinodkone
Adjusted existing tests to use MockRegistrar. This means that `Master::_reregisterSlave` can be made private. Review: https://reviews.apache.org/r/51376/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/87b94314 Tree:

[19/27] mesos git commit: Added test case for registry GC race condition.

2016-09-19 Thread vinodkone
Added test case for registry GC race condition. If GC occurs concurrently with another operation that changes the registry (e.g., reregistration of an agent that is also going to be removed by the GC operation), the GC might not be able to prune as many entries as expected from the registry.

[06/27] mesos git commit: Added more assertions to the master.

2016-09-19 Thread vinodkone
Added more assertions to the master. Review: https://reviews.apache.org/r/50846/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3cecdbdd Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3cecdbdd Diff:

[12/27] mesos git commit: Added test for HTTP endpoints during slave removal.

2016-09-19 Thread vinodkone
Added test for HTTP endpoints during slave removal. When a slave is being removed but before the registry operation to remove it has completed, querying the HTTP endpoints at the master should not indicate that the slave has been removed yet. This is important because the registry update might