forked from mesosphere/marathon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
leader.raml
67 lines (59 loc) · 2.16 KB
/
leader.raml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
get:
description: Returns the current leader.
responses:
200:
description: The host and port of the current leading master.
body:
application/json:
example: |
{
"leader": "marathon.globalcorp.com:8080"
}
404:
description: If there is no current leader.
body:
application/json:
example: |
{
"message":"There is no leader"
}
delete:
description: |
Causes the current leader to abdicate, triggering a new election.
Abdicating a Marathon instance causes this instance to exit.
The underlying system is responsible for restarting this instance.
Every abdication triggers a new leader election.
The next elected leader will read the state from the persistent store and continue the work from the previous leader.
It is possible to use this endpoint to trigger a backup or restore operation for the persistent data store.
The requested operation will be perfomed by the next leading Marathon master.
Currently two providers are allowed:
- File provider: file:///path/to/file
- S3 provider (experimental): s3://bucket-name/key-in-bucket?access_key=xxx&secret_key=xxx®ion=eu-central-1
Please note: access_key and secret_key are optional.
If not provided, the [AWS default credentials provider chain](http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html) is used to look up aws credentials.
queryParameters:
backup?:
required: false
description: URI to backup zk state.
example: file:///var/backup/marathon/backup
restore?:
required: false
description: URI to restore zk state.
example: file:///var/backup/marathon/backup
responses:
200:
description: The abdication message from the current leader.
body:
application/json:
example: |
{
"message": "Leadership abdicated"
}
404:
description: If there is no current leader.
body:
application/json:
example: |
{
"message":"There is no leader"
}