Skip to content

Commit

Permalink
vpcagent: models: ignore possible external guests
Browse files Browse the repository at this point in the history
  • Loading branch information
yousong committed May 8, 2020
1 parent 0c45818 commit 4496a7b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/vpcagent/models/modelset.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,20 @@ func (set Guests) joinHosts(subEntries Hosts) bool {
for gId, g := range set {
hId := g.HostId
if hId == "" {
// This is possible at guest creation time when host_id
// is not decided yet
continue
}
if g.ExternalId != "" {
// It was observed that we may receive pubcloud guests
// with host_id set from region API
continue
}
h, ok := subEntries[hId]
if !ok {
log.Warningf("guest %s(%s): host id %s not found",
gId, g.Name, hId)
correct = false
delete(set, gId)
continue
}
g.Host = h
Expand Down

0 comments on commit 4496a7b

Please sign in to comment.