Skip to content

Commit 6db24bf

Browse files
committed
Merge branch 'dev' into 'master'
remove useless config params See merge request !143
2 parents a58dead + 4f18f68 commit 6db24bf

File tree

5 files changed

+5
-14
lines changed

5 files changed

+5
-14
lines changed

core.yaml.sample

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
bind: ":5001"
1+
bind: ":5002"
2+
agent_port: "12345"
23
appdir: "/home"
4+
backupdir: "/data/backup"
35
permdir: "/mnt/mfs/permdirs"
4-
backupdir: "/mnt/mfs/backupdirs"
56
etcd:
67
- "http://127.0.0.1:2379"
78
etcd_lock_prefix: "/eru-core/_lock"
8-
9-
resource_alloc: "cpu-period"
109
statsd: "statsd2.ricebook.net:8125"
1110

12-
zone: "c1"
13-
11+
zone: "test-zone"
1412
image_cache: 2
13+
global_timeout: 300
1514

1615
git:
1716
public_key: "***REMOVED***"
@@ -31,7 +30,6 @@ docker:
3130
scheduler:
3231
lock_key: "_scheduler_lock"
3332
lock_ttl: 10
34-
type: "complex"
3533
maxshare: -1
3634
sharebase: 10
3735

rpc/rpc_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ func initConfig(mStore *mockstore.MockStore) (types.Config, *vibranium) {
193193
BackupDir: "/tmp", // Backup dir on host
194194
EtcdMachines: []string{"MOCK"}, // etcd cluster addresses
195195
EtcdLockPrefix: "/eru-core/_lock", // etcd lock prefix, all locks will be created under this dir
196-
ResourceAlloc: "cpu-period", // scheduler or cpu-period TODO give it a good name
197196
Statsd: "localhost:1080", // Statsd host and port
198197
Zone: "c1", // zone for core, e.g. C1, C2
199198

@@ -203,7 +202,6 @@ func initConfig(mStore *mockstore.MockStore) (types.Config, *vibranium) {
203202
Scheduler: types.SchedConfig{
204203
LockKey: "_scheduler_lock",
205204
LockTTL: 10,
206-
Type: "complex",
207205
},
208206
Syslog: types.SyslogConfig{
209207
Address: "udp://localhost:5111",

scheduler/complex/potassium_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ func newPotassium() (*potassium, error) {
2525
Scheduler: types.SchedConfig{
2626
LockKey: "/coretest",
2727
LockTTL: 1,
28-
Type: "complex",
2928
ShareBase: 10,
3029
MaxShare: -1,
3130
},
@@ -189,7 +188,6 @@ func TestComplexNodes(t *testing.T) {
189188
Scheduler: types.SchedConfig{
190189
LockKey: "/coretest",
191190
LockTTL: 1,
192-
Type: "complex",
193191
ShareBase: 10,
194192
MaxShare: -1,
195193
},

scheduler/scheduler_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ func TestSchedulerInvoke(t *testing.T) {
1515
Scheduler: types.SchedConfig{
1616
LockKey: "/coretest",
1717
LockTTL: 1,
18-
Type: "complex",
1918
ShareBase: 10,
2019
MaxShare: -1,
2120
},

types/config.go

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ type Config struct {
1010
BackupDir string `yaml:"backupdir"` // Backup dir on host
1111
EtcdMachines []string `yaml:"etcd"` // etcd cluster addresses
1212
EtcdLockPrefix string `yaml:"etcd_lock_prefix"` // etcd lock prefix, all locks will be created under this dir
13-
ResourceAlloc string `yaml:"resource_alloc"` // scheduler or cpu-period TODO give it a good name
1413
Statsd string `yaml:"statsd"` // Statsd host and port
1514
Zone string `yaml:"zone"` // zone for core, e.g. C1, C2
1615
ImageCache int `yaml:"image_cache"` // cache image count
@@ -46,7 +45,6 @@ type DockerConfig struct {
4645
type SchedConfig struct {
4746
LockKey string `yaml:"lock_key"` // key for etcd lock
4847
LockTTL int `yaml:"lock_ttl"` // TTL for etcd lock
49-
Type string `yaml:"type"` // choose simple or complex scheduler
5048
MaxShare int64 `yaml:"maxshare"` // comlpex scheduler use maxshare
5149
ShareBase int64 `yaml:"sharebase"` // how many pieces for one core
5250
}

0 commit comments

Comments
 (0)