You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/22 05:59:49 UTC
[GitHub] [apisix-ingress-controller] tao12345666333 opened a new issue #125: route value.id lost
tao12345666333 opened a new issue #125:
URL: https://github.com/apache/apisix-ingress-controller/issues/125
I have successfully created the data in APISIX by creating CustomResource (ar, au etc.).
```
[root@apisix-gw-deployment-d4dd7bcc7-77hnw apisix]# curl -s apisix-gw-lb.infraop.svc:9080/apisix/admin/upstreams| python -m json.tool
{
"action": "get",
"count": "2",
"header": {
"cluster_id": "12975046451272761543",
"member_id": "11390638367855649387",
"raft_term": "112",
"revision": "275"
},
"node": {
"createdIndex": 4,
"dir": true,
"key": "/apisix/upstreams",
"modifiedIndex": 254,
"nodes": [
{
"createdIndex": 265,
"key": "/apisix/upstreams/00000000000000000264",
"modifiedIndex": 273,
"value": {
"create_time": 1608287161,
"desc": "matrix_matrix-fe_80",
"hash_on": "vars",
"id": "00000000000000000264",
"nodes": {
"10.109.47.175:80": 100
},
"pass_host": "pass",
"type": "roundrobin",
"update_time": 1608523331
}
}
]
}
}
```
```
[root@apisix-gw-deployment-d4dd7bcc7-77hnw apisix]# curl -s apisix-gw-lb.infraop.svc:9080/apisix/admin/routes| python -m json.tool
{
"action": "get",
"count": "3",
"header": {
"cluster_id": "12975046451272761543",
"member_id": "412403688866977809",
"raft_term": "112",
"revision": "275"
},
"node": {
"createdIndex": 3,
"dir": true,
"key": "/apisix/routes",
"modifiedIndex": 253,
"nodes": [
{
"createdIndex": 275,
"key": "/apisix/routes/00000000000000000274",
"modifiedIndex": 275,
"value": {
"create_time": 1608523331,
"desc": "matrix-fe.test.k8s-dev2.com/*",
"host": "matrix-fe.test.k8s-dev2.com",
"plugins": {},
"priority": 0,
"service_id": "00000000000000000266",
"update_time": 1608523331,
"uri": "/*"
}
},
{
"createdIndex": 228,
"key": "/apisix/routes/333434021121884573",
"modifiedIndex": 228,
"value": {
"create_time": 1608271763,
"id": "333434021121884573",
"methods": [
"GET",
"HEAD",
"POST",
"PUT",
"DELETE",
"OPTIONS",
"PATCH"
],
"name": "ead-cdn-upload",
"update_time": 1608271763,
"upstream": {
"nodes": [
{
"host": "foo.com",
"port": 80,
"weight": 1
}
],
"timeout": {
"connect": 6000,
"read": 6000,
"send": 6000
},
"type": "roundrobin"
},
"uris": [
"/*"
],
"vars": {}
}
}
]
}
}
```
I want to view its details in the [apisix-dashboard](https://github.com/apache/apisix-dashboard).
But through the dashboard's `/apisix/admin/routes?page=1&page_size=20` API, I got the following data.
The route's **id** is empty.
```
{
"code": 0,
"message": "",
"data": {
"rows": [
{
"id": "333434021121884573",
"create_time": 1608271763,
"update_time": 1608271763,
"uris": [
"/*"
],
"name": "ead-cdn-upload",
"methods": [
"GET",
"HEAD",
"POST",
"PUT",
"DELETE",
"OPTIONS",
"PATCH"
],
"vars": [],
"upstream": {
"nodes": [
{
"host": "foo.com",
"port": 80,
"weight": 1
}
],
"timeout": {
"connect": 6000,
"read": 6000,
"send": 6000
},
"type": "roundrobin"
}
},
{
"id": "",
"create_time": 1608523331,
"update_time": 1608523331,
"uri": "/*",
"desc": "matrix-fe.test.k8s-dev2.com/*",
"host": "matrix-fe.test.k8s-dev2.com",
"service_id": "00000000000000000266"
}
],
"total_size": 2
},
"request_id": "83d2fb6b-c69e-40c4-a51a-7fc944dbb2ba"
}
```
I understand that we are currently using the lua API of APISIX instead of the go API of the dashboard, which causes these differences.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] spacewander commented on issue #125: route value.id lost
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #125:
URL: https://github.com/apache/apisix-ingress-controller/issues/125#issuecomment-749377754
> It seems that admin api in lua and golang has different logic on generating route id
Yes.
> The id will not be set when use POST method to create route with lua admin api
No. The Lua admin API will generate the id, but in a different way from Go version.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] nic-chen commented on issue #125: route value.id lost
Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #125:
URL: https://github.com/apache/apisix-ingress-controller/issues/125#issuecomment-749390000
yes, it's a bug here.
we are fixing it in https://github.com/apache/apisix-dashboard/pull/1063
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] gxthrj closed issue #125: route value.id lost
Posted by GitBox <gi...@apache.org>.
gxthrj closed issue #125:
URL: https://github.com/apache/apisix-ingress-controller/issues/125
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] gxthrj commented on issue #125: route value.id lost
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #125:
URL: https://github.com/apache/apisix-ingress-controller/issues/125#issuecomment-751480148
Close this issue as fixed in https://github.com/apache/apisix-dashboard/pull/1063, feel free to reopen if you find any problem.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] spacewander commented on issue #125: route value.id lost
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #125:
URL: https://github.com/apache/apisix-ingress-controller/issues/125#issuecomment-749380214
Maybe the dashboard API can't handle id in "00000000000000000274" format?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] gxthrj commented on issue #125: route value.id lost
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #125:
URL: https://github.com/apache/apisix-ingress-controller/issues/125#issuecomment-749360310
It seems that admin api in lua and golang has different logic on generating route id.
The id will not be set when use POST method to create route with lua admin api. In this case, `route` will not be list in dashboard.
Please take a look, if you have time. @spacewander @nic-chen
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org