Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbd: fix bug with missing supported_features #3033

Merged
merged 3 commits into from
May 15, 2022

Conversation

pkalever
Copy link

@pkalever pkalever commented Apr 14, 2022

Describe what this PR does

  • continue running rbd driver when /sys/bus/rbd/supported_features file is
    missing, do not bail out.
  • handle when krbdFeatures is zero

Related issues

Fixes: #2678


Show available bot commands

These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

  • /retest ci/centos/<job-name>: retest the <job-name> after unrelated
    failure (please report the failure too!)
  • /retest all: run this in case the CentOS CI failed to start/report any test
    progress or results

@pkalever pkalever requested review from Madhu-1, nixpanic, humblec and a team April 14, 2022 09:57
@mergify mergify bot added the bug Something isn't working label Apr 14, 2022
internal/rbd/rbd_util.go Outdated Show resolved Hide resolved
@nixpanic nixpanic changed the title fix bug with missing supported_features rbd: fix bug with missing supported_features Apr 14, 2022
@mergify mergify bot added the component/rbd Issues related to RBD label Apr 14, 2022
@pkalever pkalever force-pushed the fix-supportedfile branch 2 times, most recently from ccfc0d9 to 9ce561b Compare April 14, 2022 11:49
@pkalever pkalever requested a review from Madhu-1 April 14, 2022 11:58
internal/rbd/rbd_util_test.go Show resolved Hide resolved
internal/rbd/nodeserver.go Outdated Show resolved Hide resolved
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Apr 20, 2022

@Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented Apr 20, 2022

rebase

✅ Branch has been successfully rebased

@Madhu-1 Madhu-1 mentioned this pull request Apr 20, 2022
10 tasks
@Madhu-1 Madhu-1 added the ci/retry/e2e Label to retry e2e retesting on approved PR's label Apr 20, 2022
@pkalever
Copy link
Author

@Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented Apr 21, 2022

rebase

✅ Branch has been successfully rebased

Madhu-1
Madhu-1 previously approved these changes Apr 21, 2022
if errors.Is(err, os.ErrNotExist) {
// do not fallback if /sys/bus/rbd/supported_features is absent and we are
// not in a position to prepare krbd feature attributes
isFeatureExist = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still waiting for a reply on this, thanks!

@humblec
Copy link
Collaborator

humblec commented May 13, 2022

@pkalever linter is faililng..

internal/rbd/nodeserver.go Outdated Show resolved Hide resolved
librbd.FeatureNameDeepFlatten: {
needRbdNbd: false,
},
var (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkalever can we also document the justifying link as source code comment for below version mapping as referecnce ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing as such, I had to go to linux tree and find it myself :-(

internal/rbd/rbd_util.go Outdated Show resolved Hide resolved
Upstream /sys/bus/rbd/supported_features is part of Linux kernel v4.11.0
Prepare the attributes and use them in case if
/sys/bus/rbd/supported_features is missing.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Prasanna Kumar Kalever added 2 commits May 13, 2022 13:18
krbdFeatures is set to zero when kernel version < 3.8, i.e. in  case where
/sys/bus/rbd/supported_features is absent and we are unable to prepare
the krbd attributes based on kernel version.

When krbdFeatures is set to zero fallback to NBD only when autofallback
is turned ON.

Fixes: ceph#2678
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
continue running rbd driver when /sys/bus/rbd/supported_features file is
missing, do not bailout.

Fixes: ceph#2678
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
@nixpanic nixpanic requested a review from a team May 13, 2022 10:21
@pkalever
Copy link
Author

/restest ci/centos/mini-e2e-helm/k8s-1.21
/restest ci/centos/mini-e2e-helm/k8s-1.22
/restest ci/centos/mini-e2e-helm/k8s-1.23

May 13 10:31:50.222: FAIL: backend images not matching kubernetes resource count,image count 11 kubernetes resource count 10

@pkalever
Copy link
Author

/retest ci/centos/mini-e2e-helm/k8s-1.22

@pkalever
Copy link
Author

/retest ci/centos/mini-e2e-helm/k8s-1.23

@pkalever
Copy link
Author

/retest ci/centos/mini-e2e-helm/k8s-1.21

@humblec humblec added this to the release-3.7 milestone May 13, 2022
@nixpanic nixpanic added the ci/retry/e2e Label to retry e2e retesting on approved PR's label May 13, 2022
@nixpanic
Copy link
Member

/retest ci/centos/mini-e2e-helm/k8s-1.21

@nixpanic
Copy link
Member

/retest ci/centos/mini-e2e-helm/k8s-1.23

@nixpanic
Copy link
Member

/retest ci/centos/mini-e2e-helm/k8s-1.21

2 similar comments
@nixpanic
Copy link
Member

/retest ci/centos/mini-e2e-helm/k8s-1.21

@nixpanic
Copy link
Member

/retest ci/centos/mini-e2e-helm/k8s-1.21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci/retry/e2e Label to retry e2e retesting on approved PR's component/rbd Issues related to RBD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

csi-rbdplugin "supported_features: no such file or directory" error.
5 participants