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 2022/02/24 02:01:58 UTC

[GitHub] [apisix-dashboard] liangliang4ward opened a new issue #2338: when upstream pass_host="node" only support one node

liangliang4ward opened a new issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338


   ### Issue description
   
   ![image](https://user-images.githubusercontent.com/3895272/155442941-dfdd06fc-9c57-426e-9b62-e7e46720d2f0.png)
   
   but use apisix admin api is ok
   ```shell
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
     "uris": [
       "/blog/*"
     ],
     "name": "11",
     "plugins": {
       "proxy-rewrite": {
         "regex_uri": [
           "/blog/(.*)",
           "/$1"
         ],
         "scheme": "http"
       }
     },
     "upstream": {
       "nodes": [
         {
           "host": "192.168.0.1",
           "port": 80,
           "weight": 1
         },
         {
           "host": "192.168.0.2",
           "port": 80,
           "weight": 1
         }
       ],
       "type": "roundrobin",
       "hash_on": "vars",
       "scheme": "http",
       "pass_host": "node"
     },
     "status": 1
   }'
   
   ```
   
   ### Expected behavior
   
   through dashboard can add upstream multi node when pass_host=node
   
   ### How to Reproduce
   
   ...
   
   ### Screenshots
   
   _No response_
   
   ### Environment
   
   - apisix version (cmd: `apisix version`): 2.12.1
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `etcd --version`):
   - apisix-dashboard version, if have:
   - Browser version, if have:
   
   
   ### Additional context
   
   _No response_


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1053872080


   > 😂,I want to know what is the `balancer.recreate_request ==true`, I just read openresty docs, but I still don't understand the operation of this judgment in the manager-api.
   
   see https://github.com/apache/apisix/blob/master/apisix/balancer.lua#L331-L347 would help you understand. but we cannot do this in Manager API.
   
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zaunist commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
zaunist commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049523024


   Sorry, I'm not familiar with ngx.balancer, but it does seem to be a bug here. @starsz Please take a look, thanks.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zaunist edited a comment on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
zaunist edited a comment on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049523024


   Sorry, I'm not familiar with `ngx.balancer`, but it does seem to be a bug here. @starsz Please take a look, thanks.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zaunist commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
zaunist commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049619410


   > Hi, please provide the `apisix-dashboard` version.
   
   The master branch has the same problem, so we need to discuss how to solve it.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zaunist commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
zaunist commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1058026889


   > > 😂,I want to know what is the `balancer.recreate_request ==true`, I just read openresty docs, but I still don't understand the operation of this judgment in the manager-api.
   > 
   > see https://github.com/apache/apisix/blob/master/apisix/balancer.lua#L331-L347 would help you understand. but we cannot do this in Manager API.
   
   So do we have another way to solve this problem, this bug needs to be solved.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] liangliang4ward commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
liangliang4ward commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049512615


   > Hi, @liangliang4ward. Please ref here https://github.com/apache/apisix/blob/abc20bb38ec663186ef225dc1b50f9cfaf15c21c/apisix/upstream.lua#L424 , dashboard just follow APISIX rules.
   
   when `balancer.recreate_request ==true `, Multiple nodes can be supported
   
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] Baoyuantop commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049553104


   Hi, please provide the `apisix-dashboard` 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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
starsz commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1053783177


   > apisix-dashboard/api/internal/core/store/validate.go
   
   So do I. @nic-chen Can you give the answer? I see it's written by you.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz edited a comment on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
starsz edited a comment on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049722091


   Hi @zaunist.
   The error is returned here:
   
   https://github.com/apache/apisix-dashboard/blob/88f323285f2bdbafca027da9aef357b2e3eb4008/api/internal/core/store/validate.go#L168-L170
   
   > The master branch has the same problem, so we need to discuss how to solve it.
   
   I think we should keep the same as APISIX, APISIX can, APISIX-Dashboard should also can.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] starsz commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
starsz commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049722091


   Hi @zaunist.
   The error is returned here:
   
   https://github.com/apache/apisix-dashboard/blob/88f323285f2bdbafca027da9aef357b2e3eb4008/api/internal/core/store/validate.go#L168-L170
   
   > The master branch has the same problem, so we need to discuss how to solve it.
   I think we should keep the same as APISIX, APISIX can, APISIX-Dashboard should also can.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] liangliang4ward commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
liangliang4ward commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049557172


   > Hi, please provide the `apisix-dashboard` version.
   
   2.10.1


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zaunist commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
zaunist commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049465460


   Hi, @liangliang4ward. Please ref here https://github.com/apache/apisix/blob/abc20bb38ec663186ef225dc1b50f9cfaf15c21c/apisix/upstream.lua#L424 , dashboard just follow APISIX rules.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zaunist commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
zaunist commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049959995


   > Hi @zaunist. The error is returned here:
   > 
   > https://github.com/apache/apisix-dashboard/blob/88f323285f2bdbafca027da9aef357b2e3eb4008/api/internal/core/store/validate.go#L168-L170
   > 
   > > The master branch has the same problem, so we need to discuss how to solve it.
   > 
   > I think we should keep the same as APISIX, APISIX can, APISIX-Dashboard should also can.
   
   😂,I want to know what is the `balancer.recreate_request ==true`, I just read openresty docs, but I still don't understand the operation of this judgment in the manager-api.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] liangliang4ward commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
liangliang4ward commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1049512088


   > Hi, @liangliang4ward. Please ref here https://github.com/apache/apisix/blob/abc20bb38ec663186ef225dc1b50f9cfaf15c21c/apisix/upstream.lua#L424 , dashboard just follow APISIX rules.
   
   yes,but apisix not only check nodes!=1,also has other conditions  
   ```lua
   not balancer.recreate_request
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen edited a comment on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
nic-chen edited a comment on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1059170481


   Manager API cannot interact directly with APISIX. Maybe we could add configuration to let users decide for themselves.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #2338: when upstream pass_host="node" only support one node

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #2338:
URL: https://github.com/apache/apisix-dashboard/issues/2338#issuecomment-1059170481


   Manager APIs cannot interact directly with APISIX. Maybe we could add configuration item to let users decide for themselves.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org