Merge pull request #83867 from yutedz/snapshot-restore-err

Check error return from snapshot Restore
This commit is contained in:
Kubernetes Prow Robot 2019-10-15 23:06:59 -07:00 committed by GitHub
commit f64c631cd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,7 +225,9 @@ func (r *Range) Restore(net *net.IPNet, data []byte) error {
if !ok {
return fmt.Errorf("not a snapshottable allocator")
}
snapshottable.Restore(net.String(), data)
if err := snapshottable.Restore(net.String(), data); err != nil {
return fmt.Errorf("restoring snapshot encountered %v", err)
}
return nil
}