mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 13:12:20 +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
|
--initial-cluster-state new
|
||||||
mesosmaster1:
|
mesosmaster1:
|
||||||
hostname: 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" ]
|
entrypoint: [ "mesos-master" ]
|
||||||
ports: [ "5050:5050" ]
|
ports: [ "5050:5050" ]
|
||||||
environment:
|
environment:
|
||||||
@@ -30,7 +30,7 @@ mesosmaster1:
|
|||||||
mesosslave:
|
mesosslave:
|
||||||
hostname: mesosslave
|
hostname: mesosslave
|
||||||
privileged: true
|
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" ]
|
ports: [ "10248","10249" ]
|
||||||
entrypoint:
|
entrypoint:
|
||||||
- bash
|
- bash
|
||||||
|
@@ -56,10 +56,11 @@ type extendedMock struct {
|
|||||||
|
|
||||||
// Upon returns a chan that closes upon the execution of the most recently registered call.
|
// Upon returns a chan that closes upon the execution of the most recently registered call.
|
||||||
func (m *extendedMock) Upon() <-chan struct{} {
|
func (m *extendedMock) Upon() <-chan struct{} {
|
||||||
|
// TODO(jdef) this isn't thread safe, should make it so
|
||||||
ch := make(chan struct{})
|
ch := make(chan struct{})
|
||||||
call := &m.ExpectedCalls[len(m.ExpectedCalls)-1]
|
call := m.ExpectedCalls[len(m.ExpectedCalls)-1]
|
||||||
f := call.Run
|
f := call.RunFn
|
||||||
call.Run = func(args mock.Arguments) {
|
call.RunFn = func(args mock.Arguments) {
|
||||||
defer close(ch)
|
defer close(ch)
|
||||||
if f != nil {
|
if f != nil {
|
||||||
f(args)
|
f(args)
|
||||||
@@ -107,6 +108,11 @@ func (m *MockSchedulerDriver) RequestResources(r []*mesos.Request) (mesos.Status
|
|||||||
return status(args, 0), args.Error(1)
|
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) {
|
func (m *MockSchedulerDriver) ReconcileTasks(statuses []*mesos.TaskStatus) (mesos.Status, error) {
|
||||||
args := m.Called(statuses)
|
args := m.Called(statuses)
|
||||||
return status(args, 0), args.Error(1)
|
return status(args, 0), args.Error(1)
|
||||||
|
@@ -18,7 +18,6 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
@@ -926,16 +925,15 @@ func (s *SchedulerServer) buildFrameworkInfo() (info *mesos.FrameworkInfo, cred
|
|||||||
|
|
||||||
if s.mesosAuthPrincipal != "" {
|
if s.mesosAuthPrincipal != "" {
|
||||||
info.Principal = proto.String(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{
|
cred = &mesos.Credential{
|
||||||
Principal: proto.String(s.mesosAuthPrincipal),
|
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
|
return
|
||||||
|
Reference in New Issue
Block a user