Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-2499

SOURCE_EXECUTOR not set properly in slave.cpp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • agent
    • None

    Description

      Slave::statusUpdate attempts to set the Source of the TaskStatus to either SOURCE_SLAVE or SOURCE_EXECUTOR:

      https://github.com/apache/mesos/blob/0.21.0/src/slave/slave.cpp#L2222

          TaskStatus status = update.status();
          status.set_source(pid == UPID() ? TaskStatus::SOURCE_SLAVE
                                        : TaskStatus::SOURCE_EXECUTOR);
      

      Unfortunately it make this change to a copy of the TaskStatus that's later discarded and the change is never saved to the parent StatusUpdate. This results in slave-forward()ed status updates that lack a proper source value.

      The likely fix is that the set_source() update should be invoked on a TaskStatus* that's obtained via StatusUpdate.mutable_status() so that the new source is saved properly. It's not clear to me if StatusUpdate should be obtained via mutable_update().

      It would also be helpful to have a unit test for this scenario.

      Attachments

        Activity

          People

            alexr Alex R
            jdef James DeFelice
            Vinod Kone Vinod Kone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: