mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
Merge pull request #7804 from yousong/bugfix/yousong-vpcagent
vpcagent: guard against foul eip records
This commit is contained in:
@@ -526,6 +526,10 @@ func (set Elasticips) NewModel() db.IModel {
|
||||
|
||||
func (set Elasticips) AddModel(i db.IModel) {
|
||||
m := i.(*Elasticip)
|
||||
if m.IpAddr == "" || m.NetworkId == "" {
|
||||
// eip records can exist with network id and ip addr not set
|
||||
return
|
||||
}
|
||||
set[m.Id] = m
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user