Gerrylinux opened a new issue, #7322:
URL: https://github.com/apache/apisix/issues/7322

   ### Description
   
   apisix route yaml file name test.yaml
   ```
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     name: testsssss
     namespace: default
   spec:
     http:
       - name: "be"
         match:
           hosts:
             - 'a.testsssss.com'
           paths:
             - "/*"
         backends:
           - serviceName: nginx-v1
             servicePort: 80
         priority: 5
       - name: "be1"
         match:
           hosts:
             - b.testsssss.com
           paths:
             - "/*"
         backends:
           - serviceName: nginx-v1
             servicePort: 80
       - name: "be2"
         match:
           hosts:
             - 'c.testsssss.com'
           paths:
             - "/*"
         backends:
           - serviceName: nginx-v1
             servicePort: 80
       - name: "be3"
         match:
           hosts:
             - d.testsssss.com
           paths:
             - "/*"
         backends:
           - serviceName: nginx-v1
             servicePort: 80
   ```
   Added debug logging in apisix/core/config_etcd.lua  351-356
   ```
   348     if not res then
   349         return false, err
   350     end
   351    if res[1] and res[1].value and res[1].value.hosts then
   352         local host = res[1].value.host or res[1].value.hosts[1]
   353         if ngx.re.find(host, [[^[a-z]\.testsssss\.com$]], "jo") then
   354             log.error("new data coming ", ngx.worker.id(), " pid ", 
ngx.worker.pid() , " host ", host)
   355         end
   356     end
   357
   358     local res_copy = res
   359     -- waitdir will return [res] even for self.single_item = true
   360     for _, res in ipairs(res_copy) do
   ```
   
   The number of workers is 4
   Log output after an Apisix route is created
   ```
   2022/06/24 07:13:46 [error] 45#45: *203467 [lua] config_etcd.lua:354: 
sync_data(): new data coming 1 pid 45 host a.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 46#46: *203557 [lua] config_etcd.lua:354: 
sync_data(): new data coming 2 pid 46 host a.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 50#50: *203538 [lua] config_etcd.lua:354: 
sync_data(): new data coming nil pid 50 host a.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 44#44: *205783 [lua] config_etcd.lua:354: 
sync_data(): new data coming 0 pid 44 host a.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 47#47: *202984 [lua] config_etcd.lua:354: 
sync_data(): new data coming 3 pid 47 host a.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 45#45: *203467 [lua] config_etcd.lua:354: 
sync_data(): new data coming 1 pid 45 host b.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 46#46: *203557 [lua] config_etcd.lua:354: 
sync_data(): new data coming 2 pid 46 host b.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 45#45: *203467 [lua] config_etcd.lua:354: 
sync_data(): new data coming 1 pid 45 host c.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 46#46: *203557 [lua] config_etcd.lua:354: 
sync_data(): new data coming 2 pid 46 host c.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 46#46: *203557 [lua] config_etcd.lua:354: 
sync_data(): new data coming 2 pid 46 host d.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 45#45: *203467 [lua] config_etcd.lua:354: 
sync_data(): new data coming 1 pid 45 host d.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 44#44: *205783 [lua] config_etcd.lua:354: 
sync_data(): new data coming 0 pid 44 host b.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 47#47: *202984 [lua] config_etcd.lua:354: 
sync_data(): new data coming 3 pid 47 host b.testsssss.com, context: ngx.timer
   2022/06/24 07:13:46 [error] 50#50: *203538 [lua] config_etcd.lua:354: 
sync_data(): new data coming nil pid 50 host b.testsssss.com, context: ngx.timer
   ```
   
   The third and fourth routes created are not synchronized and exist in the 
ETCD data
   Is that a problem? Or am I using it the wrong way, and so far I have both 
environments that can reproduce.
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): :2.11.0
   - Operating system (run `uname -a`): k8s v1.22.7
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): 2.11.0
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`): v3.5.4
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to