Skip to content

Commit

Permalink
Merge pull request #673 from ioito/hotfix/qx-hw-skip-ipv6-eip
Browse files Browse the repository at this point in the history
fix(huawei): skip sync huawei ipv6 eip
  • Loading branch information
ioito authored Dec 27, 2023
2 parents 40a1db0 + d0745c4 commit 6625665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/multicloud/huawei/eip.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ func (self *SRegion) GetEips(portId string, addrs []string) ([]SEipAddress, erro
if len(portId) > 0 {
query.Set("port_id", portId)
}
query.Set("ip_version", "4")
eips := []SEipAddress{}
for {
resp, err := self.list(SERVICE_VPC_V3, "eip/publicips", query)
Expand Down
2 changes: 1 addition & 1 deletion pkg/multicloud/huawei/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ func (self *SInstance) GetIEIP() (cloudprovider.ICloudEIP, error) {
ips := make([]string, 0)
for _, addresses := range self.Addresses {
for _, address := range addresses {
if address.OSEXTIPSType != "fixed" && !strings.HasPrefix(address.Addr, "100.") {
if address.OSEXTIPSType != "fixed" && !strings.HasPrefix(address.Addr, "100.") && address.Version == "4" {
ips = append(ips, address.Addr)
}
}
Expand Down

0 comments on commit 6625665

Please sign in to comment.