Merge pull request #7804 from yousong/bugfix/yousong-vpcagent

vpcagent: guard against foul eip records
This commit is contained in:
yunion-ci-robot
2020-09-07 21:05:46 +08:00
committed by GitHub
+4
View File
@@ -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
}