mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 12:41:58 +00:00
updated cluster/mesos/docker and contrib/mesos for mesos-0.26 compat
This commit is contained in:
@@ -13,7 +13,7 @@ etcd:
|
||||
--initial-cluster-state new
|
||||
mesosmaster1:
|
||||
hostname: mesosmaster1
|
||||
image: mesosphere/mesos:0.24.0-1.0.27.ubuntu1404
|
||||
image: mesosphere/mesos:0.26.0-0.2.145.ubuntu1404
|
||||
entrypoint: [ "mesos-master" ]
|
||||
ports: [ "5050:5050" ]
|
||||
environment:
|
||||
@@ -30,7 +30,7 @@ mesosmaster1:
|
||||
mesosslave:
|
||||
hostname: mesosslave
|
||||
privileged: true
|
||||
image: mesosphere/mesos-slave-dind:0.2.2_mesos-0.24.0_docker-1.8.2_ubuntu-14.04.3
|
||||
image: mesosphere/mesos-slave-dind:0.2.4_mesos-0.26.0_docker-1.8.2_ubuntu-14.04.3
|
||||
ports: [ "10248","10249" ]
|
||||
entrypoint:
|
||||
- bash
|
||||
|
@@ -56,10 +56,11 @@ type extendedMock struct {
|
||||
|
||||
// Upon returns a chan that closes upon the execution of the most recently registered call.
|
||||
func (m *extendedMock) Upon() <-chan struct{} {
|
||||
// TODO(jdef) this isn't thread safe, should make it so
|
||||
ch := make(chan struct{})
|
||||
call := &m.ExpectedCalls[len(m.ExpectedCalls)-1]
|
||||
f := call.Run
|
||||
call.Run = func(args mock.Arguments) {
|
||||
call := m.ExpectedCalls[len(m.ExpectedCalls)-1]
|
||||
f := call.RunFn
|
||||
call.RunFn = func(args mock.Arguments) {
|
||||
defer close(ch)
|
||||
if f != nil {
|
||||
f(args)
|
||||
@@ -107,6 +108,11 @@ func (m *MockSchedulerDriver) RequestResources(r []*mesos.Request) (mesos.Status
|
||||
return status(args, 0), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockSchedulerDriver) AcceptOffers(ids []*mesos.OfferID, ops []*mesos.Offer_Operation, f *mesos.Filters) (mesos.Status, error) {
|
||||
args := m.Called(ids, ops, f)
|
||||
return status(args, 0), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockSchedulerDriver) ReconcileTasks(statuses []*mesos.TaskStatus) (mesos.Status, error) {
|
||||
args := m.Called(statuses)
|
||||
return status(args, 0), args.Error(1)
|
||||
|
@@ -18,7 +18,6 @@ package service
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
@@ -926,16 +925,15 @@ func (s *SchedulerServer) buildFrameworkInfo() (info *mesos.FrameworkInfo, cred
|
||||
|
||||
if s.mesosAuthPrincipal != "" {
|
||||
info.Principal = proto.String(s.mesosAuthPrincipal)
|
||||
if s.mesosAuthSecretFile == "" {
|
||||
return nil, nil, errors.New("authentication principal specified without the required credentials file")
|
||||
}
|
||||
secret, err := ioutil.ReadFile(s.mesosAuthSecretFile)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
cred = &mesos.Credential{
|
||||
Principal: proto.String(s.mesosAuthPrincipal),
|
||||
Secret: secret,
|
||||
}
|
||||
if s.mesosAuthSecretFile != "" {
|
||||
secret, err := ioutil.ReadFile(s.mesosAuthSecretFile)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
cred.Secret = proto.String(string(secret))
|
||||
}
|
||||
}
|
||||
return
|
||||
|
Reference in New Issue
Block a user