Describe the bug
Route is not getting updated on Envoy when added to a router with no routes.
This happens to applications that use a backend virtual-service that is associated with virtual-router with no routes.
Platform
ECS (but believe it is platform independent)
To Reproduce
Steps to reproduce the behavior:
cd walkthrough/route-bugdeploy.sh: This will create a mesh and its parts where color-app's virtual-router has no routes.L-206 deploy_color_routesdeploy.sh: This will add the route for color-appNote that if you have an existing app using router with routes and delete all the routes this issue will not reproduce.
By reproducing the whole steps in this Github issue for a few times along side with other validations, we didn鈥檛 meet the bug and we confirmed that the bug is fixed now. Below is an example of one of the reproduce processes:
deploy infra...
Waiting for changeset to be created..
Waiting for stack create/update to complete
Successfully created/updated stack - route-bug-infra
{
"mesh": {
"meshName": "route-bug",
...
}
}
deploy app...
{
"virtualNode": {
"meshName": "route-bug",
...
"virtualNodeName": "color-node"
}
}
{
"virtualRouter": {
"meshName": "route-bug",
...
"virtualRouterName": "color-router"
}
}
{
"virtualService": {
"meshName": "route-bug",
...
"virtualServiceName": "color.route-bug.local"
}
}
{
"virtualNode": {
"meshName": "route-bug",
...
"virtualNodeName": "front-node"
}
}
Waiting for changeset to be created..
Waiting for stack create/update to complete
Successfully created/updated stack - route-bug-app
Public endpoint:
http://route-Publi-YFQYS65PNL5S-834992577.us-west-2.elb.amazonaws.com/color
aws appmesh-preview list-routes --mesh-name route-bug --virtual-router color-router
{
"routes": []
}
curl http://route-Publi-YFQYS65PNL5S-834992577.us-west-2.elb.amazonaws.com/color
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Error response</title>
</head>
<body>
<h1>Error response</h1>
<p>Error code: 404</p>
<p>Message: Not Found.</p>
<p>Error code explanation: 404 - Nothing matches the given URI.</p>
</body>
</html>
deploy.sh and run it again to add the route for color-app:deploy infra...
Waiting for changeset to be created..
No changes to deploy. Stack route-bug-infra is up to date
deploy app...
{
"route": {
"meshName": "route-bug",
"metadata": {
"arn": "arn:aws:appmesh-preview:us-west-2:*:mesh/route-bug/virtualRouter/color-router/route/color-route",
"uid": "746d35d1-e8ad-4801-ab2b-77cd1c56c09f",
"version": 1
},
"routeName": "color-route",
"spec": {
"httpRoute": {
"action": {
"weightedTargets": [
{
"virtualNode": "color-node",
"weight": 100
}
]
},
"match": {
"prefix": "/"
}
}
},
"status": {
"status": "ACTIVE"
},
"virtualRouterName": "color-router"
}
}
Waiting for changeset to be created..
No changes to deploy. Stack route-bug-app is up to date
Public endpoint:
http://route-Publi-YFQYS65PNL5S-834992577.us-west-2.elb.amazonaws.com/color
aws appmesh-preview list-routes --mesh-name route-bug --virtual-router color-router
{
"routes": [
{
"arn": "arn:aws:appmesh-preview:us-west-2:*:mesh/route-bug/virtualRouter/color-router/route/color-route",
"meshName": "route-bug",
"meshOwner": "370566534788",
"resourceOwner": "370566534788",
"routeName": "color-route",
"virtualRouterName": "color-router"
}
]
}
green from the color service:curl http://route-Publi-YFQYS65PNL5S-834992577.us-west-2.elb.amazonaws.com/color
green%
From the results above, we can observe that the route is successfully getting updated on Envoy when we added route to a router with no routes before, and this bug is fixed now.
thanks for diving into this and closing it out @flashyang
Most helpful comment
By reproducing the whole steps in this Github issue for a few times along side with other validations, we didn鈥檛 meet the bug and we confirmed that the bug is fixed now. Below is an example of one of the reproduce processes:
deploy.shand run it again to add the route for color-app:greenfrom the color service:From the results above, we can observe that the route is successfully getting updated on Envoy when we added route to a router with no routes before, and this bug is fixed now.