Skip to content

Commit 45526ea

Browse files
authored
Merge pull request #1462 from ioito/hotfix/qx-aws-backend-ip
fix(region): sync aws lb backend ip
2 parents 3803496 + efca3ff commit 45526ea

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/multicloud/aws/loadbalancerbackend.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
api "yunion.io/x/cloudmux/pkg/apis/compute"
2222
"yunion.io/x/cloudmux/pkg/cloudprovider"
2323
"yunion.io/x/cloudmux/pkg/multicloud"
24+
"yunion.io/x/pkg/util/netutils"
2425
)
2526

2627
type SElbBackends struct {
@@ -100,7 +101,11 @@ func (self *SElbBackend) Update(ctx context.Context, opts *cloudprovider.SLoadba
100101
}
101102

102103
func (self *SElbBackend) GetIpAddress() string {
103-
return ""
104+
_, err := netutils.NewIPV4Addr(self.Target.Id)
105+
if err != nil {
106+
return ""
107+
}
108+
return self.Target.Id
104109
}
105110

106111
func (self *SRegion) SyncElbBackend(backendId, serverId string, oldPort, newPort int) error {

0 commit comments

Comments
 (0)