Repository navigation
Bug: dump missing upstreams and routes #218
Copy link
Copy link
Open
Labels
wontfixThis will not be worked onThis will not be worked on
Description
Current Behavior
./adc dump --tls-skip-verify --verbose 2 -o service-configuration.yaml
generate empty output for upstreams and routes.
Debug log shown the server return upstreams and routes correctly.
[7:23:16 PM] [APISIX] › ⬤ debug Get upstreams
GET https://10.0.0.1:9180/apisix/admin/upstreams
Accept: application/json, text/plain, */*
Content-Type: application/json
X-API-KEY: *****
User-Agent: axios/1.7.2
Accept-Encoding: gzip, compress, deflate, br
200 OK
Date: Tue, 17 Dec 2024 11:23:16 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Server: APISIX/3.9.1
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: *
Access-Control-Max-Age: 3600
X-Api-Version: v3
{
"total": 1,
"list": [
{
"value": {
"hash_on": "vars",
"type": "roundrobin",
"checks": {
"active": {
"https_verify_certificate": true,
"healthy": {
"http_statuses": [
200,
302
],
"interval": 1,
"successes": 2
},
"type": "tcp",
"http_path": "/",
"unhealthy": {
"http_statuses": [
429,
404,
500,
501,
502,
503,
504,
505
],
"http_failures": 5,
"tcp_failures": 2,
"timeouts": 3,
"interval": 1
},
"concurrency": 10,
"timeout": 1
}
},
"create_time": 1718966926,
"id": "472184775684129492",
"update_time": 1718966926,
"keepalive_pool": {
"size": 320,
"idle_timeout": 60,
"requests": 1000
},
"nodes": [
{
"weight": 1,
"port": 80,
"priority": 0,
"host": "10.0.0.206"
},
{
"weight": 1,
"port": 80,
"priority": 0,
"host": "10.0.0.82"
}
],
"pass_host": "pass",
"scheme": "http",
"name": "ocr-http",
"timeout": {
"send": 6,
"connect": 6,
"read": 120
}
},
"key": "/apisix/upstreams/472184775684129492",
"createdIndex": 35,
"modifiedIndex": 35
}
]
}
Exxpected Behavior
Dump all upstreams and routes.
Steps to Reproduce
./adc dump --tls-skip-verify --verbose 2 -o service-configuration.yaml
Environment
- APISIX version: 3.9.1
- ADC version (run
adc version): 0.16.2 - Operating system (run
uname -a): Linux manjaro 6.1.119-1-MANJARO x86_64 GNU/Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
wontfixThis will not be worked onThis will not be worked on
Activity
bzp2010 commentedon Dec 27, 2024
According to the description in the https://github.com/api7/adc/blob/main/libs/backend-apisix/README.md#the-output-of-dump-is-not-same-which-apache-apisix, this is what is expected. The current ADC design follows a fixed paradigm, and regardless of the backend, they all use a common YAML format. The flexible configuration format of APISIX prevents it from being fully structured and therefore cannot be converted to a configuration as is.
Instead, the requirement that routes must be associated to a service provides a more flexible model where you can configure upstream and shared plugin configurations for a batch of routes without the need to use plugin templates (plugin_config, which is in fact not a resource supported by the ADC; no need to worry about the inherent complexity in overriding the logic of prioritization-based overrides for plugin configurations).
This does not prevent certain features from being implemented, and therefore does not pose a barrier to scratch use.
Currently this is a fixed design and there are no ideas to change it for the time being, so this won't get improved straight away for a while. However, the APISIX exporter logic could be improved to allow more best-effort conversion of unorganized configurations.
This issue will remain open for more discussion.
juzn01 commentedon May 16, 2025
i use apisix 3.9.1 and get same error, only consumer and tls info, not route,upstream show.
Please update bro. Thank you !
zachsirotto commentedon Sep 24, 2025
I and others would like to see this too 👍