mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-27 16:50:23 +00:00
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 <prasanna.kalever@redhat.com>
(cherry picked from commit 6470cf3343
)
This commit is contained in:
parent
a67bf8928c
commit
9f5908d873
@ -17,7 +17,9 @@ limitations under the License.
|
|||||||
package rbddriver
|
package rbddriver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
|
||||||
casrbd "github.com/ceph/ceph-csi/internal/csi-addons/rbd"
|
casrbd "github.com/ceph/ceph-csi/internal/csi-addons/rbd"
|
||||||
csiaddons "github.com/ceph/ceph-csi/internal/csi-addons/server"
|
csiaddons "github.com/ceph/ceph-csi/internal/csi-addons/server"
|
||||||
@ -144,7 +146,7 @@ func (r *Driver) Run(conf *util.Config) {
|
|||||||
}
|
}
|
||||||
var attr string
|
var attr string
|
||||||
attr, err = rbd.GetKrbdSupportedFeatures()
|
attr, err = rbd.GetKrbdSupportedFeatures()
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, os.ErrNotExist) {
|
||||||
log.FatalLogMsg(err.Error())
|
log.FatalLogMsg(err.Error())
|
||||||
}
|
}
|
||||||
var krbdFeatures uint
|
var krbdFeatures uint
|
||||||
|
Loading…
Reference in New Issue
Block a user