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

Master doesn't properly handle SUBSCRIBE call

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: None
    • Labels:
      None

      Description

      Master::subscribe() incorrectly handles re-registration. It handles it as a registration request (not "re-registration") because of a bug in the if loop (should have been !frameworkInfo.has_id()).

      void Master::subscribe(
          const UPID& from,
          const scheduler::Call::Subscribe& subscribe)
      {
        const FrameworkInfo& frameworkInfo = subscribe.framework_info();
      
        // TODO(vinod): Instead of calling '(re-)registerFramework()' from
        // here refactor those methods to call 'subscribe()'.
        if (frameworkInfo.has_id() || frameworkInfo.id() == "") {
          registerFramework(from, frameworkInfo);
        } else {
          reregisterFramework(from, frameworkInfo, subscribe.force());
        }
      }
      
      

        Attachments

          Activity

            People

            • Assignee:
              vinodkone Vinod Kone
              Reporter:
              vinodkone Vinod Kone
              Shepherd:
              Benjamin Mahler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: