-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not handling properly deployment events for apps with custom parent groups in Marathon #35
Comments
I think I found a bug. It might not be related to this PR (need to check it). Consider following situation: echo '{
"id": "product",
"groups": [{
"id": "service",
"groups": [{
"id": "us-east",
"apps": [{
"id": "app1",
"cmd": "python -m SimpleHTTPServer $PORT0",
"labels": {"consul":"A"},
"healthChecks": [
{
"path": "/",
"protocol": "HTTP",
"portIndex": 0,
"gracePeriodSeconds": 3,
"intervalSeconds": 20,
"timeoutSeconds": 20,
"maxConsecutiveFailures": 3,
"ignoreHttp1xx": false
}
]
},
{
"id": "app2",
"cmd": "python -m SimpleHTTPServer $PORT0",
"labels": {"consul": "A"},
"healthChecks": [
{
"path": "/",
"protocol": "HTTP",
"portIndex": 0,
"gracePeriodSeconds": 3,
"intervalSeconds": 20,
"timeoutSeconds": 20,
"maxConsecutiveFailures": 3,
"ignoreHttp1xx": false
}
]
}]
}],
"dependencies": ["/product/database", "../backend"]
}
]
}' | http PUT http://localhost:8080/v2/groups content-type:application/json It works perfectly. Both applications are registered in consul. Now, let's update consul service name for one of this apps. echo '{
"id": "product",
"groups": [{
"id": "service",
"groups": [{
"id": "us-east",
"apps": [{
"id": "app1",
"cmd": "python -m SimpleHTTPServer $PORT0",
"labels": {"consul":"B"},
"healthChecks": [
{
"path": "/",
"protocol": "HTTP",
"portIndex": 0,
"gracePeriodSeconds": 3,
"intervalSeconds": 20,
"timeoutSeconds": 20,
"maxConsecutiveFailures": 3,
"ignoreHttp1xx": false
}
]
},
{
"id": "app2",
"cmd": "python -m SimpleHTTPServer $PORT0",
"labels": {"consul": "A"},
"healthChecks": [
{
"path": "/",
"protocol": "HTTP",
"portIndex": 0,
"gracePeriodSeconds": 3,
"intervalSeconds": 20,
"timeoutSeconds": 20,
"maxConsecutiveFailures": 3,
"ignoreHttp1xx": false
}
]
}]
}],
"dependencies": ["/product/database", "../backend"]
}
]
}' | http PUT http://localhost:8080/v2/groups content-type:application/json We end up with only one service registered in Consul and it's service B. |
I think this is the "many apps -> one service name" case that we currently don't support. We may open an issue for this. |
Beside above issue and issue with stopping deployments, it looks good. I think we should write them down somewhere. |
I tested case described above it's working for #73 |
Currently
RestartedConsulApps
/StoppedConsulApps
/RenamedConsulApps
api of deployment events search for the apps in/Plan/Original/Apps
of the event - this is will catch only apps that are created in root of the deployment plan.When application has a different parent group, for example
/com.example.tech/applicationName
we should look in/Plan/Original/Groups[{group_index}]/Apps
where{group_index}
points a record havingid: /com.example.tech
.The text was updated successfully, but these errors were encountered: