Project: mesos
Issue MESOS-3055: Master doesn't properly handle SUBSCRIBE call
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()). {code} 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()); } } {code}
Story points: 2