Skip to content

Commit

Permalink
Merge pull request #3912 from ty-dc/release-v0.9
Browse files Browse the repository at this point in the history
[cherry-pick] fix: Spiderpool GC incorrect IP address during statefulset Pod scale up/down, causing IP conflict
  • Loading branch information
weizhoublue committed Aug 21, 2024
2 parents 722b411 + 4eecd38 commit f46c0f5
Show file tree
Hide file tree
Showing 150 changed files with 11,484 additions and 2,091 deletions.
4 changes: 4 additions & 0 deletions docs/usage/install/upgrade-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ kubectl patch sp ${auto-pool} --type merge --patch '{"metadata": {"labels": {"ip

由于在 0.9.0 的版本中,我们给 [SpiderCoordinator CRD](./../../reference/crd-spidercoordinator.md) 补充了 `txQueueLen` 字段,但由于执行升级时 Helm 不支持升级或删除 CRD,因此在升级前需要你手动更新一下 CRD。(建议越过 0.9.0 直接升级至 0.9.1 版本)

### 低于 0.9.4 (包含 0.9.4) 升级到最高版本的注意事项

在 0.9.4 以下的版本中,statefulSet 应用在快速扩缩容场景下,Spiderpool GC 可能会错误的回收掉 IPPool 中的 IP 地址,导致同一个 IP 被分配给 K8S 集群的多个 Pod,从而出现 IP 地址冲突。该问题已修复,参考[修复](https://github.com/spidernet-io/spiderpool/pull/3778),但在升级后,冲突的 IP 地址并不能自动被 Spiderpool 纠正回来,您需要通过手动重启冲突 IP 的 Pod 来辅助解决,在新版本中不会再出现错误 GC IP 而导致 IP 冲突的问题。

### 更多版本升级的注意事项

*TODO.*
4 changes: 4 additions & 0 deletions docs/usage/install/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ In versions higher than 0.5.0, the [SpiderMultusConfig](../spider-multus-config.
Due to the addition of the `txQueueLen` field to the [SpiderCoordinator CRD](./../../reference/crd-spidercoordinator.md) in version 0.9.0, you need to manually update the CRD before upgrading as Helm does not support upgrading or deleting CRDs during the upgrade process.(We suggest skipping version 0.9.0 and upgrading directly to version 0.9.1)
### Upgrading from a version below 0.9.4 (Includes 0.9.4) to a higher version
In versions below 0.9.4, when statefulSet is rapidly scaling up or down, Spiderpool GC may mistakenly reclaim IP addresses in IPPool, causing the same IP to be assigned to multiple Pods in the K8S cluster, resulting in IP address conflicts. This issue has been fixed, see [Fix](https://github.com/spidernet-io/spiderpool/pull/3778), but after the upgrade, the conflicting IP addresses cannot be automatically corrected by Spiderpool. You need to manually restart the Pod with the conflicting IP to assist in resolving the issue. In the new version, there will no longer be an issue with IP conflicts caused by incorrect GC IPs.
### More notes on version upgrades
*TODO.*
39 changes: 21 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ require (
github.com/sasha-s/go-deadlock v0.3.1
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spidernet-io/e2eframework v0.0.0-20240130031916-71bf7b1ddd00
github.com/tigera/operator v1.32.4
github.com/spidernet-io/e2eframework v0.0.0-20240816061218-9ba7f53b8c73
github.com/tigera/operator v1.33.0
github.com/vishvananda/netlink v1.2.1-beta.2.0.20230621221334-77712cff8739
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/prometheus v0.44.0
Expand All @@ -45,17 +45,17 @@ require (
go.uber.org/atomic v1.10.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.25.0
golang.org/x/net v0.20.0
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.17.0
golang.org/x/tools v0.16.1
golang.org/x/net v0.23.0
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0
golang.org/x/tools v0.18.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.29.1
k8s.io/api v0.29.4
k8s.io/apiextensions-apiserver v0.29.1
k8s.io/apimachinery v0.29.1
k8s.io/client-go v0.29.1
k8s.io/apimachinery v0.29.4
k8s.io/client-go v0.29.4
k8s.io/code-generator v0.29.1
k8s.io/kubernetes v1.29.0
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
Expand All @@ -67,11 +67,15 @@ require (

require (
github.com/go-logr/logr v1.4.1
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
)

require github.com/google/go-cmp v0.6.0 // indirect

require k8s.io/component-base v0.29.4 // indirect

require k8s.io/kubectl v0.26.3

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
Expand Down Expand Up @@ -99,7 +103,7 @@ require (
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gobuffalo/flect v0.3.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20230323073829-e72429f035bd // indirect
Expand Down Expand Up @@ -163,22 +167,21 @@ require (
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.mongodb.org/mongo-driver v1.13.1 // indirect
go.uber.org/dig v1.17.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
k8s.io/component-base v0.29.1 // indirect
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/kubectl v0.26.3 // indirect
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 // indirect
kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
Expand Down
Loading

0 comments on commit f46c0f5

Please sign in to comment.