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/08/25 03:51:04 UTC

[GitHub] [apisix-ingress-controller] xianshun163 opened a new issue, #1269: bug: Unstable when configuring HTTP and grpc at the same time

xianshun163 opened a new issue, #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269

   ### Issue description
   
   1、I have a  service , it have a port for  http,  and  other port for grpc
   2、when  I config  the apisixupstream  and  apisixroute, And then  I go to the  apisix dashboard  to check  the config ,
         the  result is unstable
   3、some times the upstream of the  grpc route in  the dashboard is grpc, and sometimes it is http.
   
   here is my config 
   ```
    kubectl describe apisixupstreams  xstesta    -n test-devops
   Name:         xstesta
   Namespace:    test-devops
   Labels:       <none>
   Annotations:  <none>
   API Version:  apisix.apache.org/v2beta3
   Kind:         ApisixUpstream
   Metadata:
     Creation Timestamp:  2022-08-25T01:03:05Z
     Generation:          5
     Resource Version:    340777668
     Self Link:           /apis/apisix.apache.org/v2beta3/namespaces/test-devops/apisixupstreams/xstesta
     UID:                 519e9580-9eeb-413a-b7f8-263f49982fe6
   Spec:
     Port Level Settings:
       Port:    2080
       Scheme:  grpc
       Port:    9001
       Scheme:  http
     Timeout:
       Connect:  4s
       Read:     4s
       Send:     4s
   Events:
     Type    Reason           Age                   From           Message
     ----    ------           ----                  ----           -------
     Normal  ResourcesSynced  9m31s (x5 over 131m)  ApisixIngress  ApisixIngress synced successfully
   
   
   
   kubectl describe apisixroute xstesta-2080 -n test-devops
   Name:         xstesta-2080
   Namespace:    test-devops
   Labels:       <none>
   Annotations:  <none>
   API Version:  apisix.apache.org/v2beta3
   Kind:         ApisixRoute
   Metadata:
     Creation Timestamp:  2022-08-25T03:16:57Z
     Generation:          1
     Resource Version:    340783586
     Self Link:           /apis/apisix.apache.org/v2beta3/namespaces/test-devops/apisixroutes/xstesta-2080
     UID:                 757bd0e6-ed91-46fe-800b-aa5c69b79f85
   Spec:
     Http:
       Backends:
         Service Name:  xstesta
         Service Port:  2080
       Match:
         Paths:
           /xstestagrpc/*
       Name:  rule1
       Plugins:
       Priority:  0
   Status:
     Conditions:
       Message:              Sync Successfully
       Observed Generation:  1
       Reason:               ResourcesSynced
       Status:               True
       Type:                 ResourcesAvailable
   Events:
     Type    Reason           Age                From           Message
     ----    ------           ----               ----           -------
     Normal  ResourcesSynced  47s (x2 over 47s)  ApisixIngress  ApisixIngress synced successfully
   
   ````
   ![image](https://user-images.githubusercontent.com/32457473/186567814-c4aa0a8a-50e3-479f-8cf5-bda5c158cedc.png)
   
   ![image](https://user-images.githubusercontent.com/32457473/186569863-6ff9bb66-b5c4-4f8d-bff2-f80e9c70c098.png)
   
   
   
   ### Environment
   
   - your apisix-ingress-controller version (output of apisix-ingress-controller version --long):1.4
   - your Kubernetes cluster version (output of kubectl version):  test env 1.17.9,   prod env 1.21
   - if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
   
   
   ### Minimal test code / Steps to reproduce
   
   1、deploy a service  with  2 port
   2、config  apisixupstream 
   3、config apisixroute for http
   4、config apisixroute for grpc
   goto the  apisix dashboard  to  see the upstream  .
   
   you can do more  test  by  delete the apisixroute of grpc,  and create it again.
   
   
   
   ### Actual result
   
   in  the  dashboard   the  grpc route‘s upstream  have  the schema  grpc。
   
   
   ### Error log
   
   in  the  dashboard   the  grpc route‘s upstream  have  the schema  http  some  times , 
   it is Unstable 
   
   
   ### Expected result
   
   _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.apache.org

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


[GitHub] [apisix-ingress-controller] xianshun163 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1242923066

   ok, I will do 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-ingress-controller] tao12345666333 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1242603918

   We checked the code and found that there is indeed a bug here, and the solution is very simple, would you like to submit a PR to fix it? @xianshun163 
   
   just change it to `portLevelSettings[port.Port] = port.ApisixUpstreamConfig`
   
   https://github.com/apache/apisix-ingress-controller/blob/9d663abec02f09ece4af9aa99713de3e878146f6/pkg/providers/apisix/apisix_upstream.go#L165
   
   https://github.com/apache/apisix-ingress-controller/blob/9d663abec02f09ece4af9aa99713de3e878146f6/pkg/providers/apisix/apisix_upstream.go#L249


-- 
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-ingress-controller] tao12345666333 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1245110089

   yes. 
   
   We plan to release v1.5.0 this week. If this issue can be fixed, we can cherry-pick it into v1.5.0.


-- 
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-ingress-controller] AlinsRan commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
AlinsRan commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1245057484

   > hi,@tao12345666333 , I want to know how the other branch will fix the bug, after the code is commit to the master branch.
   
   After merge the master, use ` git cherry pick <commit>` in the target branch.


-- 
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-ingress-controller] tao12345666333 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1239374851

   Thanks for your report! 
   
   This is useful


-- 
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-ingress-controller] xianshun163 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1239207471

   @tao12345666333  hi, I make a  debug at my local env,   may be this is a err :
   look at the image  below, 
   the code:     portLevelSettings[port.Port] = &port.ApisixUpstreamConfig
   
   the  value of the portLevelSettings will be  the same as  the au.Spec.PortLevelSettings ,
   but as the show in the image ,  the value of the schema is not the same  for port 2080. 
   one is http, and  other is grpc.
   
   
   ![MJ~F%LYDTT9 RJI%8P0M4_F](https://user-images.githubusercontent.com/32457473/188856042-d72f7d15-29b1-4791-8719-b2c708a13990.png)
   
   


-- 
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-ingress-controller] tao12345666333 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1316586690

   I will backport this one to v1.5.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-ingress-controller] xianshun163 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1229956373

   Hi, is that  any doc  about how to developer the apisix-ingress-controller,  especially, can it  be run by  local ide  ,outside  the  k8s.  
   If there are some explanations,  so that I can try to debug it myself, and check the  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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-ingress-controller] xianshun163 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1245048453

   hi,@tao12345666333   , I want to know  how the other branch  will  fix the bug,   after the code is commit to the master branch.


-- 
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-ingress-controller] tao12345666333 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1230386890

   Refer to https://github.com/apache/apisix-ingress-controller/blob/master/docs/en/latest/contribute.md


-- 
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-ingress-controller] xianshun163 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1239228576

   I have  write some logs, make be it is more clear
   
   
   ![image](https://user-images.githubusercontent.com/32457473/188860719-ca52549d-984c-4604-9cfb-15510cf53fce.png)
   


-- 
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-ingress-controller] xianshun163 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1245240818

   ![image](https://user-images.githubusercontent.com/32457473/189883412-29af3740-0125-432b-9019-1ad4d0de1d92.png)
   
   that seems  a problem, what can I  do for 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-ingress-controller] tao12345666333 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1226743038

   In fact I don't recommend you mix it up.
   But if you really want to use it like this, the function should work fine.
   
   
   Please add the minimal steps to reproduce (including the YAML used) so others don't have to waste time reproducing this issue.
   It can also be used to check if the problem is caused by you using the wrong configuration


-- 
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-ingress-controller] xianshun163 commented on issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #1269:
URL: https://github.com/apache/apisix-ingress-controller/issues/1269#issuecomment-1226771912

   
   Minimal test code / Steps to reproduce
   1、deploy a service with 2 port
   2、config apisixupstream
   3、config apisixroute for http
   4、config apisixroute for grpc
   goto the apisix dashboard to see the upstream .
   you can do more test by delete the apisixroute of grpc, and create it again.
   
   
   my  yaml file  is  like this: 
   ```
    cat xstest-up.yaml
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixUpstream
   metadata:
     name: xstestjavademo
     namespace: test-devops
   spec:
     portLevelSettings:
     - port: 9001
       scheme: http
     - port: 2080
       scheme: grpc
     timeout:
       connect: 1s
       read: 3s
       send: 3s
   
   ---
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     name: xstestjavademo9001
     namespace: test-devops
   spec:
     http:
     - name: rule1
       match:
         hosts:
         - local.xsapp2.org
         paths:
         - /arch/xsapp2/*
       backends:
          - serviceName: xstestjavademo
            servicePort: 9001
       plugins:
          - name: proxy-rewrite
            enable: true
            config:
              regex_uri:
              - "^/arch/xsapp2/*"
              - "/${1}"
   ---
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     name: xstestjavademo
     namespace: test-devops
   spec:
     http:
     - name: rule2
       match:
         paths:
         - /xsappgrpc/*
       backends:
          - serviceName: xstestjavademo
            servicePort: 2080
   
   


-- 
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-ingress-controller] tao12345666333 closed issue #1269: bug: Unstable when configuring HTTP and grpc at the same time

Posted by GitBox <gi...@apache.org>.
tao12345666333 closed issue #1269: bug:  Unstable when configuring HTTP and grpc at the same time
URL: https://github.com/apache/apisix-ingress-controller/issues/1269


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