Unverified Commit 94a699e8 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #55203 from hzxuzhonghu/azure-bug

Automatic merge from submit-queue (batch tested with PRs 54177, 55203, 55120, 55275, 55260). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. [bug fix]invalid memory address or nil pointer dereference when mounting azure disk **What this PR does / why we need it**: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #55199 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents 93ef57a1 b87c16e6
...@@ -45,7 +45,9 @@ var _ volume.Mounter = &azureDiskMounter{} ...@@ -45,7 +45,9 @@ var _ volume.Mounter = &azureDiskMounter{}
func (m *azureDiskMounter) GetAttributes() volume.Attributes { func (m *azureDiskMounter) GetAttributes() volume.Attributes {
readOnly := false readOnly := false
volumeSource, err := getVolumeSource(m.spec) volumeSource, err := getVolumeSource(m.spec)
if err != nil && volumeSource.ReadOnly != nil { if err != nil {
glog.Infof("azureDisk - mounter failed to get volume source for spec %s %v", m.spec.Name(), err)
} else if volumeSource.ReadOnly != nil {
readOnly = *volumeSource.ReadOnly readOnly = *volumeSource.ReadOnly
} }
return volume.Attributes{ return volume.Attributes{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment