2022-11-25 15:16:25 |
Mikolaj Golub |
description |
In the rbd driver, when enabling multiattach it tries to disable some rbd image features (which are in MULTIATTACH_EXCLUSIONS list). If the image does not have any of these features (like in the case when it was created with rbd_default_features = 3), it still tries to call "update_features" librbd function with "changed_features = 0". And the librbd does not like this, considering this as invalid [2].
As a result it fails with an error like below:
[errno 22] RBD invalid argument (error updating features for image b'volume-f664bb1c-7217-4c5a-8867-b36766afcde6')
The fix could be just to skip calling librbd's `update_feature` if there is nothing to update ("changed_features" is 0).
[1] https://github.com/openstack/cinder/blob/24f43918eacad6db89d613d11f9cd7f796208e9c/cinder/volume/drivers/rbd.py#L952
[2] https://github.com/ceph/ceph/blob/2a9fac2cc4b10af04c52e12f34932e6d2d91441f/src/librbd/Operations.cc#L1503 |
In the rbd driver, when enabling multiattach it tries to disable some rbd image features (which are in MULTIATTACH_EXCLUSIONS list) [1]. If the image does not have any of these features (like in the case when it was created with rbd_default_features = 3), it still tries to call "update_features" librbd function with "changed_features = 0". And the librbd does not like this, considering this as invalid [2].
As a result it fails with an error like below:
[errno 22] RBD invalid argument (error updating features for image b'volume-f664bb1c-7217-4c5a-8867-b36766afcde6')
The fix could be just to skip calling librbd's `update_feature` if there is nothing to update ("changed_features" is 0).
[1] https://github.com/openstack/cinder/blob/24f43918eacad6db89d613d11f9cd7f796208e9c/cinder/volume/drivers/rbd.py#L952
[2] https://github.com/ceph/ceph/blob/2a9fac2cc4b10af04c52e12f34932e6d2d91441f/src/librbd/Operations.cc#L1503 |
|
2022-11-25 15:25:52 |
Mikolaj Golub |
description |
In the rbd driver, when enabling multiattach it tries to disable some rbd image features (which are in MULTIATTACH_EXCLUSIONS list) [1]. If the image does not have any of these features (like in the case when it was created with rbd_default_features = 3), it still tries to call "update_features" librbd function with "changed_features = 0". And the librbd does not like this, considering this as invalid [2].
As a result it fails with an error like below:
[errno 22] RBD invalid argument (error updating features for image b'volume-f664bb1c-7217-4c5a-8867-b36766afcde6')
The fix could be just to skip calling librbd's `update_feature` if there is nothing to update ("changed_features" is 0).
[1] https://github.com/openstack/cinder/blob/24f43918eacad6db89d613d11f9cd7f796208e9c/cinder/volume/drivers/rbd.py#L952
[2] https://github.com/ceph/ceph/blob/2a9fac2cc4b10af04c52e12f34932e6d2d91441f/src/librbd/Operations.cc#L1503 |
In the rbd driver, when enabling multiattach it tries to disable some rbd image features (which are in MULTIATTACH_EXCLUSIONS list) [1]. If the image does not have any of these features (like in the case when it was created with rbd_default_features = 3), it still tries to call "update_features" librbd function with "changed_features = 0". And the librbd does not like this, considering this as invalid [2].
As a result it fails with an error like below:
[errno 22] RBD invalid argument (error updating features for image b'volume-f664bb1c-7217-4c5a-8867-b36766afcde6')
The fix could be just to skip calling librbd's `update_feature` if there is nothing to update ("changed_features" is 0). (And the same should be done in _disable_multiattach).
[1] https://github.com/openstack/cinder/blob/24f43918eacad6db89d613d11f9cd7f796208e9c/cinder/volume/drivers/rbd.py#L952
[2] https://github.com/ceph/ceph/blob/2a9fac2cc4b10af04c52e12f34932e6d2d91441f/src/librbd/Operations.cc#L1503 |
|