Skip to content

Commit

Permalink
Check return value from volume.SetVolumeOwnership() in downwardAPI
Browse files Browse the repository at this point in the history
The function can fail, so we must check the return code.
  • Loading branch information
rata authored and pmorie committed Aug 17, 2016
1 parent 568f4c2 commit 5637569
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/volume/downwardapi/downwardapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ func (b *downwardAPIVolumeMounter) SetUpAt(dir string, fsGroup *int64) error {
return err
}

volume.SetVolumeOwnership(b, fsGroup)
err = volume.SetVolumeOwnership(b, fsGroup)
if err != nil {
glog.Errorf("Error applying volume ownership settings for group: %v", fsGroup)
return err
}

return nil
}
Expand Down

0 comments on commit 5637569

Please sign in to comment.