From 9f5908d873977e390820edfa947ee3e001720d5e Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Thu, 14 Apr 2022 15:19:17 +0530 Subject: [PATCH] rbd: fix bug handling GetKrbdSupportedFeatures() continue running rbd driver when /sys/bus/rbd/supported_features file is missing, do not bailout. Fixes: #2678 Signed-off-by: Prasanna Kumar Kalever (cherry picked from commit 6470cf334307965ccc859a88df49cabd6351ab7c) --- internal/rbd/driver/driver.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/rbd/driver/driver.go b/internal/rbd/driver/driver.go index 9cff40f3d..06a526819 100644 --- a/internal/rbd/driver/driver.go +++ b/internal/rbd/driver/driver.go @@ -17,7 +17,9 @@ limitations under the License. package rbddriver import ( + "errors" "fmt" + "os" casrbd "github.com/ceph/ceph-csi/internal/csi-addons/rbd" csiaddons "github.com/ceph/ceph-csi/internal/csi-addons/server" @@ -144,7 +146,7 @@ func (r *Driver) Run(conf *util.Config) { } var attr string attr, err = rbd.GetKrbdSupportedFeatures() - if err != nil { + if err != nil && !errors.Is(err, os.ErrNotExist) { log.FatalLogMsg(err.Error()) } var krbdFeatures uint