-
Notifications
You must be signed in to change notification settings - Fork 842
Removal of env variables does not trigger deployment #1238
Comments
have you tried setting |
Just tried, |
Which version are you seeing this with? Could you add some of your HTTP interactions with the API? For example, in my local marathon-0.8.0: First, clearing the environment map for an app, yielding a deployment: PUT /v2/apps/http HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Content-Length: 11
Content-Type: application/json; charset=utf-8
Host: localhost:8080
User-Agent: HTTPie/0.8.0
{
"env": {}
} HTTP/1.1 200 OK
Content-Type: application/json
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"deploymentId": "bb194013-8992-4a11-a4fe-a7329a4129bd",
"version": "2015-02-26T06:54:02.187Z"
} Fetching the app to see the deployment and the soon-to-be-replaced task: HTTP/1.1 200 OK
Content-Type: application/json
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"app": {
"args": null,
"backoffFactor": 1.15,
"backoffSeconds": 1,
"cmd": "python -m SimpleHTTPServer $PORT",
"constraints": [],
"container": null,
"cpus": 0.1,
"dependencies": [],
"deployments": [
{
"id": "bb194013-8992-4a11-a4fe-a7329a4129bd"
}
],
"disk": 0.0,
"env": {},
"executor": "",
"healthChecks": [],
"id": "/http",
"instances": 1,
"labels": {},
"lastTaskFailure": null,
"maxLaunchDelaySeconds": 3600,
"mem": 50.0,
"ports": [
10000
],
"requirePorts": false,
"storeUrls": [],
"tasks": [
{
"appId": "/http",
"host": "localhost",
"id": "http.327db799-bd84-11e4-b0b5-c27fee8cb118",
"ports": [
31000
],
"stagedAt": "2015-02-26T06:53:40.840Z",
"startedAt": "2015-02-26T06:53:40.908Z",
"version": "2015-02-26T06:53:39.367Z"
}
],
"tasksRunning": 1,
"tasksStaged": 0,
"upgradeStrategy": {
"maximumOverCapacity": 1.0,
"minimumHealthCapacity": 1.0
},
"uris": [],
"user": null,
"version": "2015-02-26T06:54:02.187Z"
}
} Fetching the app once more to observe that the deployment has been completed and the task has been replaced with a new instance. HTTP/1.1 200 OK
Content-Type: application/json
Server: Jetty(8.y.z-SNAPSHOT)
Transfer-Encoding: chunked
{
"app": {
"args": null,
"backoffFactor": 1.15,
"backoffSeconds": 1,
"cmd": "python -m SimpleHTTPServer $PORT",
"constraints": [],
"container": null,
"cpus": 0.1,
"dependencies": [],
"deployments": [],
"disk": 0.0,
"env": {},
"executor": "",
"healthChecks": [],
"id": "/http",
"instances": 1,
"labels": {},
"lastTaskFailure": null,
"maxLaunchDelaySeconds": 3600,
"mem": 50.0,
"ports": [
10000
],
"requirePorts": false,
"storeUrls": [],
"tasks": [
{
"appId": "/http",
"host": "localhost",
"id": "http.41657b8a-bd84-11e4-b0b5-c27fee8cb118",
"ports": [
31938
],
"stagedAt": "2015-02-26T06:54:05.846Z",
"startedAt": "2015-02-26T06:54:05.926Z",
"version": "2015-02-26T06:54:02.187Z"
}
],
"tasksRunning": 1,
"tasksStaged": 0,
"upgradeStrategy": {
"maximumOverCapacity": 1.0,
"minimumHealthCapacity": 1.0
},
"uris": [],
"user": null,
"version": "2015-02-26T06:54:02.187Z"
}
} |
I'm running e6cd021 (that was master at Tue Feb 17 17:52:21 2015 -0800) + patch from @sttts: #1082 (comment) Since Timestamp issue is fixed in master, I can rebuild and give it a try.
Here's how {
"container": {
"docker": {
"image": "myimage"
},
"type": "DOCKER"
},
"mem": 64,
"backoffSeconds": 5,
"cmd": "exec /bin/lenny -something something",
"cpus": 0.2,
"id": "/topface/lenny",
"instances": 18,
"healthChecks": [
{
"protocol": "HTTP",
"timeoutSeconds": 5,
"intervalSeconds": 2,
"gracePeriodSeconds": 15,
"maxConsecutiveFailures": 3,
"path": "/?n=marathon_healthcheck"
}
],
"backoffFactor": 1,
"ports": [
12001
],
"constraints": [
[
"hostname",
"UNIQUE"
]
]
} Here's what I get in return:
After a minute or so I check my app: {
"app": {
"id": "/topface/lenny",
"cmd": "exec /bin/lenny -something something",
"args": null,
"user": null,
"env": {
"TZ2": "Europe/Moscow"
},
"instances": 18,
"cpus": 0.2,
"mem": 64,
"disk": 0,
"executor": "",
"constraints": [
[
"hostname",
"UNIQUE"
]
],
"uris": [],
"storeUrls": [],
"ports": [
12001
],
"requirePorts": false,
"backoffSeconds": 5,
"backoffFactor": 1,
"maxLaunchDelaySeconds": 3600,
"container": {
"type": "DOCKER",
"volumes": [],
"docker": {
"image": "myimage",
"privileged": false,
"parameters": []
}
},
"healthChecks": [
{
"path": "/?n=marathon_healthcheck",
"protocol": "HTTP",
"portIndex": 0,
"gracePeriodSeconds": 15,
"intervalSeconds": 2,
"timeoutSeconds": 5,
"maxConsecutiveFailures": 3
}
],
"dependencies": [],
"upgradeStrategy": {
"minimumHealthCapacity": 1,
"maximumOverCapacity": 1
},
"labels": {},
"version": "2015-02-24T15:22:12.826Z",
"tasksStaged": 0,
"tasksRunning": 18,
"tasksHealthy": 18,
"tasksUnhealthy": 0,
"deployments": [],
"tasks": [
{
"id": "topface_lenny.e8bbce63-bc38-11e4-b191-56847afe9799",
"host": "web452",
"ports": [
31126
],
"startedAt": "2015-02-24T15:22:20.295Z",
"stagedAt": "2015-02-24T15:22:13.678Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:21.053Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8bbce63-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8bc6aa5-bc38-11e4-b191-56847afe9799",
"host": "web385",
"ports": [
31850
],
"startedAt": "2015-02-24T15:22:19.463Z",
"stagedAt": "2015-02-24T15:22:13.681Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:21.052Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8bc6aa5-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8bc1c84-bc38-11e4-b191-56847afe9799",
"host": "web14",
"ports": [
31915
],
"startedAt": "2015-02-24T15:22:17.784Z",
"stagedAt": "2015-02-24T15:22:13.680Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:19.038Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8bc1c84-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8ba6ecf-bc38-11e4-b191-56847afe9799",
"host": "web305",
"ports": [
31880
],
"startedAt": "2015-02-24T15:22:18.504Z",
"stagedAt": "2015-02-24T15:22:13.668Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:19.035Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.715Z",
"taskId": "topface_lenny.e8ba6ecf-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.f002e78b-bc38-11e4-b191-56847afe9799",
"host": "web572",
"ports": [
31525
],
"startedAt": "2015-02-24T15:22:26.925Z",
"stagedAt": "2015-02-24T15:22:25.887Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:27.143Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.f002e78b-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8b9ab7c-bc38-11e4-b191-56847afe9799",
"host": "web221",
"ports": [
31003
],
"startedAt": "2015-02-24T15:22:19.418Z",
"stagedAt": "2015-02-24T15:22:13.663Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:21.052Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8b9ab7c-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8bc91b6-bc38-11e4-b191-56847afe9799",
"host": "web386",
"ports": [
31821
],
"startedAt": "2015-02-24T15:22:18.778Z",
"stagedAt": "2015-02-24T15:22:13.683Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:19.038Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8bc91b6-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8b8e829-bc38-11e4-b191-56847afe9799",
"host": "web220",
"ports": [
31994
],
"startedAt": "2015-02-24T15:22:17.101Z",
"stagedAt": "2015-02-24T15:22:13.659Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:19.035Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8b8e829-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8bdf14a-bc38-11e4-b191-56847afe9799",
"host": "web169",
"ports": [
31356
],
"startedAt": "2015-02-24T15:22:20.240Z",
"stagedAt": "2015-02-24T15:22:13.691Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:21.052Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8bdf14a-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8bda329-bc38-11e4-b191-56847afe9799",
"host": "web399",
"ports": [
31824
],
"startedAt": "2015-02-24T15:22:19.262Z",
"stagedAt": "2015-02-24T15:22:13.690Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:21.052Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8bda329-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8ba20ae-bc38-11e4-b191-56847afe9799",
"host": "web388",
"ports": [
31515
],
"startedAt": "2015-02-24T15:22:17.487Z",
"stagedAt": "2015-02-24T15:22:13.667Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:19.035Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8ba20ae-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8b9364b-bc38-11e4-b191-56847afe9799",
"host": "web368",
"ports": [
31963
],
"startedAt": "2015-02-24T15:22:18.680Z",
"stagedAt": "2015-02-24T15:22:13.661Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:19.037Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8b9364b-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8b90f3a-bc38-11e4-b191-56847afe9799",
"host": "web319",
"ports": [
31801
],
"startedAt": "2015-02-24T15:22:18.054Z",
"stagedAt": "2015-02-24T15:22:13.660Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:19.036Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8b90f3a-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8ba95e0-bc38-11e4-b191-56847afe9799",
"host": "web351",
"ports": [
31796
],
"startedAt": "2015-02-24T15:22:23.095Z",
"stagedAt": "2015-02-24T15:22:13.669Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:25.093Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8ba95e0-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8bd06e7-bc38-11e4-b191-56847afe9799",
"host": "web182",
"ports": [
31992
],
"startedAt": "2015-02-24T15:22:21.598Z",
"stagedAt": "2015-02-24T15:22:13.686Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:23.080Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8bd06e7-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8bd5508-bc38-11e4-b191-56847afe9799",
"host": "web317",
"ports": [
31119
],
"startedAt": "2015-02-24T15:22:22.460Z",
"stagedAt": "2015-02-24T15:22:13.687Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:23.082Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8bd5508-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8bba752-bc38-11e4-b191-56847afe9799",
"host": "web324",
"ports": [
31364
],
"startedAt": "2015-02-24T15:22:19.410Z",
"stagedAt": "2015-02-24T15:22:13.676Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:21.053Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8bba752-bc38-11e4-b191-56847afe9799"
}
]
},
{
"id": "topface_lenny.e8b9d28d-bc38-11e4-b191-56847afe9799",
"host": "web217",
"ports": [
31987
],
"startedAt": "2015-02-24T15:22:17.513Z",
"stagedAt": "2015-02-24T15:22:13.665Z",
"version": "2015-02-24T15:22:12.826Z",
"appId": "/topface/lenny",
"healthCheckResults": [
{
"alive": true,
"consecutiveFailures": 0,
"firstSuccess": "2015-02-24T15:22:19.039Z",
"lastFailure": null,
"lastSuccess": "2015-02-26T07:56:46.714Z",
"taskId": "topface_lenny.e8b9d28d-bc38-11e4-b191-56847afe9799"
}
]
}
],
"lastTaskFailure": {
"appId": "/topface/lenny",
"host": "web450",
"message": "Abnormal executor termination",
"state": "TASK_FAILED",
"taskId": "topface_lenny.19929f55-bc37-11e4-b191-56847afe9799",
"timestamp": "2015-02-24T15:09:17.960Z",
"version": "2015-02-24T15:09:15.350Z"
}
}
} |
Here's a simple app that reproduces the issue: {"container": {"docker": {"image": "busybox:ubuntu-14.04"}, "type": "DOCKER"}, "mem": 64, "cmd": "tail -f /etc/hosts", "cpus": 0.1, "env": {"SOMETHING": "IS_WRONG"}, "id": "/wtf"} |
I am not able to reproduce this with current master and your app definition. |
I just deployed current master and problem is still there:
{"version":"2015-02-26T10:37:47.650Z","deploymentId":"eaab6362-520c-47eb-9d82-477497f8d680"}
{"versions":["2015-02-26T10:37:47.650Z"]}
{"version":"2015-02-26T10:38:01.843Z","deploymentId":"1e59eb92-f607-4124-8aa7-a4cae50c22f9"}
{"versions":["2015-02-26T10:37:47.650Z"]} Relevant log lines:
|
This is what I get:
|
You used Is omitting means "keep it as it was" in |
Yes, the PUT works more like a PATCH. We have been discussing this for quite some time and it may change in the future. |
Then feel free to close this issue if there's another one. |
Yes, rather unfortunately our PUT behaves like a badly implemented PATCH. That's what allows you to only supply values that change in the JSON.
|
env
section from app definition, deploy again.Changing of env variables triggers deploy as it should.
The text was updated successfully, but these errors were encountered: