You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "grootTwig (via GitHub)" <gi...@apache.org> on 2023/11/21 07:44:05 UTC
[I] bug: ResourceVersion comparisioin caused cr not synced [apisix-ingress-controller]
grootTwig opened a new issue, #2060:
URL: https://github.com/apache/apisix-ingress-controller/issues/2060
### Current Behavior
Sometimes cr updated events is not synced without any error log.
Reason:
When a cr update event arrived,apisix-ingress-controller will compare the current resourceVersion and old resourceVersion, if current resourceVersion is less than or equal to old resourceVersion, this event will be discarded. However, the comparision here is using string comparision, which will lead to a wrong result.
example:
old resourceVersion: 999999
new resourceVersion: 1000000
"999999" >= "1000000" will be true in golang ,and the event would be discarded.
### Expected Behavior
_No response_
### Error Logs
_No response_
### Steps to Reproduce
create enough events in k8s so that the length of cr's resourceVerison will increase.
### Environment
apisix-ingress-controller version:1.7.0
kubernetes version: 1.24.4
--
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
Re: [I] bug: ResourceVersion comparisioin caused cr not synced [apisix-ingress-controller]
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #2060:
URL: https://github.com/apache/apisix-ingress-controller/issues/2060#issuecomment-1820788668
@grootTwig Thanks for pointing out the bug and the reason! I will create a fix for this.
--
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
Re: [I] bug: ResourceVersion comparisioin caused cr not synced [apisix-ingress-controller]
Posted by "grootTwig (via GitHub)" <gi...@apache.org>.
grootTwig commented on issue #2060:
URL: https://github.com/apache/apisix-ingress-controller/issues/2060#issuecomment-1820410826
> ### Current Behavior
> Sometimes cr updated events is not synced without any error log.
>
> Reason: When a cr update event arrived,apisix-ingress-controller will compare the current resourceVersion and old resourceVersion, if current resourceVersion is less than or equal to old resourceVersion, this event will be discarded. However, the comparision here is using string comparision, which will lead to a wrong result.
>
> example: old resourceVersion: 999999 new resourceVersion: 1000000 "999999" >= "1000000" will be true in golang ,and the event would be discarded.
>
> ### Expected Behavior
> _No response_
>
> ### Error Logs
> _No response_
>
> ### Steps to Reproduce
> create enough events in k8s so that the length of cr's resourceVerison will increase.
>
> ### Environment
> apisix-ingress-controller version:1.7.0 kubernetes version: 1.24.4
code in v1.7.0:
pkg/providers/apisix/apisix_cluster_config.go:L280
pkg/providers/apisix/apisix_consumer.go:L246
pkg/providers/apisix/apisix_global_rule.go:L277
pkg/providers/apisix/apisix_plugin_config.go:L320
pkg/providers/apisix/apisix_route.go:L533
pkg/providers/apisix/apisix_tls.go:L329
pkg/providers/apisix/apisix_upstream.go:L539
--
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
Re: [I] bug: ResourceVersion comparison caused cr not synced [apisix-ingress-controller]
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup closed issue #2060: bug: ResourceVersion comparison caused cr not synced
URL: https://github.com/apache/apisix-ingress-controller/issues/2060
--
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