-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
file: ignore exit code 22 when addding datapool #12725
Conversation
pkg/daemon/ceph/client/filesystem.go
Outdated
@@ -168,6 +169,10 @@ func AddDataPoolToFilesystem(context *clusterd.Context, clusterInfo *ClusterInfo | |||
args := []string{"fs", "add_data_pool", name, poolName} | |||
_, err := NewCephCommand(context, clusterInfo, args).Run() | |||
if err != nil { | |||
// TODO: remove this once https://github.com/rook/rook/issues/12673 is fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the expected error from Reef, not sure we'll have any other fix than this.
// TODO: remove this once https://github.com/rook/rook/issues/12673 is fixed. | |
// Reef disallows calling add_data_pool for a pool that has already been added, so ignore the error code. | |
// Previous releases do not return an error when an existing data pool is added. |
pkg/daemon/ceph/client/filesystem.go
Outdated
@@ -168,6 +169,10 @@ func AddDataPoolToFilesystem(context *clusterd.Context, clusterInfo *ClusterInfo | |||
args := []string{"fs", "add_data_pool", name, poolName} | |||
_, err := NewCephCommand(context, clusterInfo, args).Run() | |||
if err != nil { | |||
// TODO: remove this once https://github.com/rook/rook/issues/12673 is fixed. | |||
if code, ok := exec.ExitStatus(err); ok && code == int(syscall.EINVAL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's only ignore this code for Reef: if clusterInfo.CephVersion.IsAtLeastReef()
Ignore the exit code 22 when adding the datapool to a filesystem. updates: rook#12673 Signed-off-by: Madhu Rajanna <[email protected]>
file: ignore exit code 22 when addding datapool (backport #12725)
Description of your changes:
Ignore the exit code 22 when adding the datapool to a filesystem.
Which issue is resolved by this Pull Request:
Resolves: #12673
Checklist:
skip-ci
on the PR.