Permalink
Commits on Feb 25, 2017
  1. Made sure process::Loop instances can only be created as shared_ptrs.

    process::Loop is a std::enable_shared_from_this. Using stack-allocated
    instances of classes derived from std::enable_shared_from_this is
    undefined behavior.
    
    Prevent creation of stack-allocated process::Loop instances by hiding
    the constructors and providing a factory method to be used instead.
    
    Review: https://reviews.apache.org/r/54825/
    bbannier committed with benh Feb 25, 2017
Commits on Feb 24, 2017
  1. Cleaned up an error message formatting.

    This places the open and closing quotes on the same line.
    bmahler committed Feb 24, 2017
  2. Added allocation role validation for Create operation.

    With support for multi-role frameworks, we need to make sure that
    individual create operation cannot mix allocation roles.
    
    Review: https://reviews.apache.org/r/57032/
    guoger committed with bmahler Feb 24, 2017
  3. Added allocation role validation for Reserve operation.

    With support for multi-role frameworks, we need to make sure that
    individual reserve operation cannot mix allocation roles.
    
    Review: https://reviews.apache.org/r/57031/
    guoger committed with bmahler Feb 24, 2017
  4. Added allocation role validation for TaskInfo.

    With support for multi-role frameworks, we need to make sure that
    individual task cannot mix allocation roles.
    
    Review: https://reviews.apache.org/r/57030/
    guoger committed with bmahler Feb 24, 2017
  5. Added allocation role validation for ExecutorInfo.

    With support for multi-role frameworks, we need to make sure that
    individual executors cannot mix allocation roles.
    
    Review: https://reviews.apache.org/r/56939/
    guoger committed with bmahler Feb 24, 2017
  6. Wrapped IOSwitchboard.connect() in a dispatch.

    Since the IOSwitchboard is implemented as a MesosIsolatorProcess, most
    of its API calls are automatically dispatched onto its underlying
    process by an Isolator wrapper. However, the IOSwitchboard also
    includes an additional connect() call which is not accessed through
    the Isolator wrapper. As such, we need to wrap it in a dispatch call
    manually.
    
    Review: https://reviews.apache.org/r/56814/
    klueska committed with adam-mesos Feb 24, 2017
  7. Renamed 'Headers' class templete method to 'get()'.

    This patch changed the 'Headers' class templete method from 'header()'
    to 'get()' since 'get' is more accurate for grabbing a header object
    while it can be defined as different type (e.g., WWWAuthenticate).
    
    Review: https://reviews.apache.org/r/57014/
    Gilbert88 committed with jieyu Feb 24, 2017
  8. Changed the http::Headers to be a derived class from Hashmap.

    The http::Headers should simply derive from the Hashmap class so that
    all other projects (e.g., an isolator module using libprocess) will
    not be broken by the recent http::Headers change (it was changed from
    a hashmap to a class recently in https://reviews.apache.org/r/56116/).
    
    Review: https://reviews.apache.org/r/56609/
    Gilbert88 committed with jieyu Feb 24, 2017
Commits on Feb 23, 2017
  1. Add a test for a MULTI_ROLE master re-registering an old agent.

    When a non-MULTI_ROLE agent with running tasks re-registers, master
    should inject allocation roles for tasks/executors sent during
    re-registration.
    
    Review: https://reviews.apache.org/r/56941/
    guoger committed with bmahler Feb 23, 2017
  2. Dealt with some type casting warnings in common/values.cpp.

    This fixes the type of the local variable we use to store an
    IO stream's original precision while outputing a `Scalar` value.
    We extraneously cast from a `std::streamsize` (`int`) to `long`.
    
    Also, this removes an extranous cast from `size_t` to `int` in
    a vector iteration loop.
    
    Review: https://reviews.apache.org/r/56675/
    hausdorff committed with kaysoky Feb 18, 2017
  3. Windows: Silenced protobuf compilation warnings.

    Generated code from protobufs generate warnings on MSVC and other
    compilers.  On MSVC, this clutters the final list of warnings with
    many (mostly harmless) warnings that we cannot address, due to
    the fact that protobuf code is generated code.
    
    Review: https://reviews.apache.org/r/56675/
    hausdorff committed with kaysoky Feb 18, 2017
  4. Windows: Added build check for %PreferredToolArchitecture% == x64.

    Before building Mesos on a Windows machine, it is necessary to set
    %PreferredToolArchitecture% to the value "x64". This is necessary to
    work around (at least) two bugs in the MSVC backend: in particular, the
    linker can sometimes take hours or days to link `mesos-x.x.x.lib`, and
    the build system occasionally finds it self spuriously unable to find
    file `mesos-x.x.x.lib` to link against.
    
    These issues are well-known and documented (e.g., in the official Mesos
    "getting started" document), but it is better to simply refuse to build
    Mesos at all on Windows unless that environment variable is set.
    
    This commit will introduce such a check.
    
    Review: https://reviews.apache.org/r/55543/
    hausdorff committed with kaysoky Feb 17, 2017
  5. Windows: Undefined `ACL` macro defined in Zookeeper headers.

    On Windows, Zookeeper will define a `ACL` macro because `Windows.h`
    defines a `struct ACL`, different from Zookeeper's `struct ACL`.
    Since this is a macro, it bleeds into other sources and ends up
    replacing odd bits of code, such as when we access our namespaced
    `ACL`s.  i.e. `mesos::ACL::RunTask`.
    
    This commit undefines the `ACL` macro after the inclusion of the
    Zookeeper headers in two places, while redefining the macro in the
    one source file where we use Zookeeper's `struct ACL`.
    
    Review: https://reviews.apache.org/r/56962
    kaysoky committed Feb 23, 2017
  6. Exposed agent capabilities via SlaveInfo::Capability directly.

    Instead of storing a vector of `SlaveInfo::Capability::Type` and
    converting to `SlaveInfo::Capability` in the code, we now store
    a vector of `SlaveInfo::Capabilility` directly for easier use.
    
    Review: https://reviews.apache.org/r/56967/
    guoger committed with bmahler Feb 23, 2017
  7. Added allocation role to tasks/executors in v0 /state API.

    Added allocation role of tasks/executors to the /state v0 API. Unlike
    v1 API where allocation_info is nested in each one of resources, we
    add that information at task/executor level for v0 API since the JSON
    format for resources cannot be extended to support allocation role.
    Note that resources of one task/executor are guaranteed to have same
    allocation role.
    
    Review: https://reviews.apache.org/r/56938/
    guoger committed with bmahler Feb 23, 2017
  8. Disallowed some special path components in IDs.

    - Such IDs should lead to surprising or even dangerous agent side
      directory structure.
    
    Review: https://reviews.apache.org/r/56527
    xujyan committed with xujyan Feb 8, 2017
Commits on Feb 22, 2017
  1. Fixed nested container agent flapping issue after reboot.

    When recovering containers in provisioner, there is a particular case
    that after the machine reboots the container runtime directory and
    slave state is gone but the provisioner directory still exists since
    it is under the agent work_dir(e.g., agent work_dir is /var/lib/mesos).
    Then, all checkpointed containers will be cleaned up as unknown
    containers in provisioner during recovery. However, the semantic that
    a child container is always cleaned up before its parent container
    cannot be guaranteed for this particular case. Ideally, we should
    put the provisioner directory under the container runtime dir but this
    is not backward compactible. It is an unfortunate that we have to
    make the provisioner::destroy() to be recursive.
    
    Review: https://reviews.apache.org/r/56808/
    Gilbert88 committed with jieyu Feb 22, 2017
Commits on Feb 21, 2017
  1. Added a test to ensure offers with different roles cannot be combined.

    Multi-role framework cannot combine offers allocated to different
    roles of that framework in a single launchTask call.
    
    Review: https://reviews.apache.org/r/56375/
    guoger committed with bmahler Feb 21, 2017
  2. Added a test to ensure framework can upgrade into MULTI_ROLE.

    A framework can be upgraded to be MULTI_ROLE capable even with
    a task running, as long as it does not change role while upgrading.
    
    Review: https://reviews.apache.org/r/56537/
    guoger committed with bmahler Feb 21, 2017
  3. Added a constant to store agent capabilities.

    Instead of hardcoding in code, agent capabilities are stored in a
    constant and could be used by both agent initialization and http
    response generation.
    
    Review: https://reviews.apache.org/r/56644/
    guoger committed with bmahler Feb 21, 2017