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

file: ignore exit code 22 when addding datapool #12725

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented Aug 15, 2023

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:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: If this is only a documentation change, add the label skip-ci on the PR.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@@ -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.
Copy link
Member

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.

Suggested change
// 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.

@@ -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) {
Copy link
Member

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]>
@travisn travisn merged commit be4e60b into rook:master Aug 15, 2023
48 of 49 checks passed
travisn added a commit that referenced this pull request Aug 15, 2023
file: ignore exit code 22 when addding datapool (backport #12725)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CephFS reconcile failure, possibly after upgrade
2 participants