neverCase commented on pull request #791:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/791#issuecomment-999516556


   I meet a problem.
   ```sh
   2021-12-22T17:18:11+08:00    debug   ingress/apisix_route.go:312     
ApisixRoute add event arrived   {"object": 
{"metadata":{"name":"httpbin-route","namespace":"ingress-apisix-e2e-tests-default-266676929","uid":"e7a46a77-83a3-4f0f-b66e-9ffacdb79470","resourceVersion":"11216","generation":1,"creationTimestamp":"2021-12-22T09:18:11Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apisix.apache.org/v2beta3\",\"kind\":\"ApisixRoute\",\"metadata\":{\"annotations\":{},\"name\":\"httpbin-route\",\"namespace\":\"ingress-apisix-e2e-tests-default-266676929\"},\"spec\":{\"http\":[{\"backends\":[{\"serviceName\":\"httpbin-service-e2e-test\",\"servicePort\":80}],\"match\":{\"hosts\":[\"httpbin.com\"],\"paths\":[\"/ip\"]},\"name\":\"rule1\"}]}}\n"},"managedFields":[{"manager":"kubectl-client-side-apply","operation":"Update","apiVersion":"apisix.apache.org/v2beta3","time":"2021-12-22T09:18:11Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"
 
f:kubectl.kubernetes.io/last-applied-configuration":{}}},"f:spec":{".":{},"f:http":{}}}}]},"spec":{"http":[{"name":"rule1","match":{"paths":["/ip"],"hosts":["httpbin.com"]},"backends":[{"serviceName":"httpbin-service-e2e-test","servicePort":80,"weight":null}],"websocket":false,"authentication":{"enable":false,"type":"","keyauth":{}}}]},"status":{}}}
   2021-12-22T17:18:11+08:00    debug   ingress/apisix_route.go:177     
translated ApisixRoute  {"routes": 
[{"id":"399a015c","name":"ingress-apisix-e2e-tests-default-266676929_httpbin-route_rule1","desc":"Created
 by apisix-ingress-controller, DO NOT modify it 
manually","labels":{"managed-by":"apisix-ingress-controller"},"hosts":["httpbin.com"],"uris":["/ip"],"upstream_id":"a54fd7e2","plugin_config_id":"3441d0d1"}],
 "upstreams": 
[{"id":"a54fd7e2","name":"ingress-apisix-e2e-tests-default-266676929_httpbin-service-e2e-test_80","desc":"Created
 by apisix-ingress-controller, DO NOT modify it 
manually","labels":{"managed-by":"apisix-ingress-controller"},"type":"roundrobin","nodes":[{"host":"10.244.3.54","port":80,"weight":100}],"scheme":"http"}],
 "apisix_route": {}}
   2021-12-22T17:18:11+08:00    debug   apisix/upstream.go:136  try to create 
upstream  {"name": 
"ingress-apisix-e2e-tests-default-266676929_httpbin-service-e2e-test_80", 
"url": "http://apisix-service-e2e-test:9180/apisix/admin/upstreams";, "cluster": 
"default"}
   2021-12-22T17:18:11+08:00    debug   apisix/upstream.go:151  creating 
upstream       {"body": 
"{\"id\":\"a54fd7e2\",\"name\":\"ingress-apisix-e2e-tests-default-266676929_httpbin-service-e2e-test_80\",\"desc\":\"Created
 by apisix-ingress-controller, DO NOT modify it 
manually\",\"labels\":{\"managed-by\":\"apisix-ingress-controller\"},\"type\":\"roundrobin\",\"nodes\":[{\"host\":\"10.244.3.54\",\"port\":80,\"weight\":100}],\"scheme\":\"http\"}",
 "url": "http://apisix-service-e2e-test:9180/apisix/admin/upstreams/a54fd7e2"}
   2021-12-22T17:18:11+08:00    debug   apisix/resource.go:123  got upstream: 
{"desc":"Created by apisix-ingress-controller, DO NOT modify it 
manually","hash_on":"vars","id":"a54fd7e2","scheme":"http","pass_host":"pass","nodes":[{"host":"10.244.3.54","port":80,"weight":100,"priority":0}],"name":"ingress-apisix-e2e-tests-default-266676929_httpbin-service-e2e-test_80","update_time":1640164691,"type":"roundrobin","create_time":1640164691,"labels":{"managed-by":"apisix-ingress-controller"}}
   2021-12-22T17:18:11+08:00    debug   apisix/route.go:144     try to create 
route     {"hosts": ["httpbin.com"], "name": 
"ingress-apisix-e2e-tests-default-266676929_httpbin-route_rule1", "cluster": 
"default", "url": "http://apisix-service-e2e-test:9180/apisix/admin/routes"}
   2021-12-22T17:18:11+08:00    debug   apisix/route.go:160     creating route  
{"body": 
"{\"id\":\"399a015c\",\"name\":\"ingress-apisix-e2e-tests-default-266676929_httpbin-route_rule1\",\"desc\":\"Created
 by apisix-ingress-controller, DO NOT modify it 
manually\",\"labels\":{\"managed-by\":\"apisix-ingress-controller\"},\"hosts\":[\"httpbin.com\"],\"uris\":[\"/ip\"],\"upstream_id\":\"a54fd7e2\",\"plugin_config_id\":\"3441d0d1\"}",
 "url": "http://apisix-service-e2e-test:9180/apisix/admin/routes/399a015c"}
   2021-12-22T17:18:11+08:00    error   apisix/route.go:164     failed to 
create route: unexpected status code 400; error message: {"error_msg":"failed 
to fetch plugin config info by plugin config id [3441d0d1], response code: 404"}
   
   2021-12-22T17:18:11+08:00    debug   apisix/pluginconfig.go:144      try to 
create pluginConfig      {"name": 
"ingress-apisix-e2e-tests-default-266676929_httpbin-service-e2e-test", 
"plugins": {}, "cluster": "default", "url": 
"http://apisix-service-e2e-test:9180/apisix/admin/plugin_configs"}
   2021-12-22T17:18:11+08:00    debug   apisix/pluginconfig.go:160      
creating pluginConfig   {"body": 
"{\"id\":\"3441d0d1\",\"name\":\"ingress-apisix-e2e-tests-default-266676929_httpbin-service-e2e-test\",\"desc\":\"Created
 by apisix-ingress-controller, DO NOT modify it 
manually\",\"labels\":{\"managed-by\":\"apisix-ingress-controller\"},\"plugins\":{}}",
 "url": 
"http://apisix-service-e2e-test:9180/apisix/admin/plugin_configs/3441d0d1"}
   2021-12-22T17:18:11+08:00    debug   apisix/resource.go:179  got 
pluginConfig: 
{"update_time":1640164691,"labels":{"managed-by":"apisix-ingress-controller"},"name":"ingress-apisix-e2e-tests-default-266676929_httpbin-service-e2e-test","plugins":{},"id":"3441d0d1","create_time":1640164691,"desc":"Created
 by apisix-ingress-controller, DO NOT modify it manually"}
   2021-12-22T17:18:11+08:00    warn    ingress/apisix_route.go:276     sync 
ApisixRoute failed, will retry     {"object": 
{"Type":1,"Object":{"Key":"ingress-apisix-e2e-tests-default-266676929/httpbin-route","OldObject":null,"GroupVersion":"apisix.apache.org/v2beta3"},"Tombstone":null},
 "error": "1 error occurred:\n\t* unexpected status code 400; error message: 
{\"error_msg\":\"failed to fetch plugin config info by plugin config id 
[3441d0d1], response code: 404\"}\n\n\n"}
   2021-12-22T17:18:11+08:00    debug   ingress/apisix_route.go:341     
ApisixRoute update event arrived        {"new object": {}, "old object": {}}
   ```
   I had push many times just for fixing a series of errors about `failed to 
create route: unexpected status code 400; ****` .
   But it failed again and again.
   Cause I still can't understand the process of the whole system.
   From the ci error above, I found that the creation of the `pluginconfig` 
just after the creation of the `route`,
   it never triggered at the same time with the `upstream`.
   So the route always failed to create route.
   Maybe if the creation of the `pluginconfig` happen before the `route`, then 
the ci run success.
   Obviously, there were some errors in my commits, please give me some help
   @tao12345666333 
   
   
   
   
   
   
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to