From ee309f3cffebe826b7e7dff8dfacace82d446af8 Mon Sep 17 00:00:00 2001 From: James DeFelice Date: Thu, 11 Jun 2015 12:41:50 +0000 Subject: [PATCH] add TODOs --- contrib/mesos/pkg/scheduler/constraint/doc.go | 2 ++ contrib/mesos/pkg/scheduler/plugin.go | 4 ++++ contrib/mesos/pkg/scheduler/podtask/pod_task.go | 1 + 3 files changed, 7 insertions(+) diff --git a/contrib/mesos/pkg/scheduler/constraint/doc.go b/contrib/mesos/pkg/scheduler/constraint/doc.go index 76f021328b0..c21082848b7 100644 --- a/contrib/mesos/pkg/scheduler/constraint/doc.go +++ b/contrib/mesos/pkg/scheduler/constraint/doc.go @@ -16,4 +16,6 @@ limitations under the License. // Package constraint exposes Marathon-like constraints for scheduling pods. // Incomplete. +// TODO(jdef) We need better alignment between k8s-mesos and k8s scheduling +// constraints (read: a common constraints API). package constraint diff --git a/contrib/mesos/pkg/scheduler/plugin.go b/contrib/mesos/pkg/scheduler/plugin.go index 27027148c02..45f23cc7a26 100644 --- a/contrib/mesos/pkg/scheduler/plugin.go +++ b/contrib/mesos/pkg/scheduler/plugin.go @@ -326,6 +326,10 @@ func (k *kubeScheduler) doSchedule(task *podtask.T, err error) (string, error) { return "", fmt.Errorf("task.offer assignment must be idempotent, task %+v: offer %+v", task, offer) } task.Offer = offer + //TODO(jdef) FillFromDetails currently allocates fixed (hardwired) cpu and memory resources for all + //tasks. This will be fixed once we properly integrate parent-cgroup support into the kublet-executor. + //For now we are completely ignoring the resources specified in the pod. + //see: https://github.com/mesosphere/kubernetes-mesos/issues/68 task.FillFromDetails(details) if err := k.api.tasks().Update(task); err != nil { offer.Release() diff --git a/contrib/mesos/pkg/scheduler/podtask/pod_task.go b/contrib/mesos/pkg/scheduler/podtask/pod_task.go index 79f5edaf719..a90aa1d3c00 100644 --- a/contrib/mesos/pkg/scheduler/podtask/pod_task.go +++ b/contrib/mesos/pkg/scheduler/podtask/pod_task.go @@ -153,6 +153,7 @@ func (t *T) BuildTaskInfo() *mesos.TaskInfo { // Fill the Spec in the T, should be called during k8s scheduling, // before binding. +// TODO(jdef): remove hardcoded values and make use of actual pod resource settings func (t *T) FillFromDetails(details *mesos.Offer) error { if details == nil { //programming error