Skip to content

Conversation

@Champ-Goblem
Copy link
Contributor

Add go-ceph binding for rbd_get_data_pool_id which is required to fetch the data pool for erasure coded volumes

Checklist

  • Added tests for features and functional changes
  • Public functions and types are documented
  • Standard formatting is applied to Go code
  • Is this a new API? Added a new file that begins with //go:build ceph_preview
  • Ran make api-update to record new APIs

New or infrequent contributors may want to review the go-ceph Developer's Guide including the section on how we track API Status and the API Stability Plan.

The go-ceph project uses mergify. View the mergify command guide for information on how to interact with mergify. Add a comment with @Mergifyio rebase to rebase your PR when github indicates that the PR is out of date with the base branch.

@Champ-Goblem Champ-Goblem force-pushed the feat/rbd-get-data-pool-id branch from bcb7ed4 to 3c15386 Compare August 22, 2025 17:04
@Champ-Goblem
Copy link
Contributor Author

I was not able to run the tests as this seems to timeout for me, even after attempting to increase the timeout:

+ timeout 300 sh -c 'until [ $(ceph -s | grep -c "rgw:") -eq 1 ]; do echo "waiting for rgw to show up" && sleep 1; done'
waiting for rgw to show up
make: *** [Makefile:147: test-container] Error 124

@phlogistonjohn phlogistonjohn added the API This PR includes a change to the public API of a go-ceph package label Aug 22, 2025
@phlogistonjohn
Copy link
Collaborator

CI has already found an error in the code, looks like you forgot to import C in the file.

# [github.com/ceph/go-ceph/rbd]
vet: rbd/data_pool_id.go:15:15: undefined: C
*** ERROR: returned 1

an example:

import "C"

You need the import and a special comment above it to do the C level includes needed, again my link can serve as an example.

Process wise you are on track w/ the preview API stuff, thanks!

A nitpick about the commit message. Here's how the patch looks in my terminal:

commit 3c153860f9ee4d2197438ca3407d1b89ea1fe8f2 (HEAD -> pr.1164)
Author: Champ-Goblem <cameron@northflank.com>
Date:   Fri Aug 22 18:04:11 2025 +0100

    rbd: implement `rbd_get_data_pool_id`
    Add go-ceph binding for `rbd_get_data_pool_id` which is required to fetch the data pool for erasure coded volumes
    
    Signed-off-by: Champ-Goblem <cameron@northflank.com>

I'd request not to include backticks in the subject line as they introduce a 'markdownism' that is not needed in plain text and make typing the subject a little bit harder. Also, ideally there's a blank line between the subject and the next line. Also also, ideally a signed-off-by includes one's real name, some projects enforce it but we generally don't chase after people for it.

@Champ-Goblem Champ-Goblem force-pushed the feat/rbd-get-data-pool-id branch from 3c15386 to 6d7b6fb Compare August 22, 2025 19:39
@Champ-Goblem
Copy link
Contributor Author

I have addressed your comments @phlogistonjohn, and apologies for the missing imports.
Let me know if anything else needs to be fixed!

@Champ-Goblem Champ-Goblem force-pushed the feat/rbd-get-data-pool-id branch 2 times, most recently from fcafae1 to f924e46 Compare August 24, 2025 15:31
@Champ-Goblem
Copy link
Contributor Author

I pushed a potential fix yesterday for the failing test. Hopefully that fixes it.

Add go-ceph binding for rbd_get_data_pool_id which is required to fetch the data pool for erasure coded volumes

Signed-off-by: Cameron McDermott <cameron@northflank.com>
@Champ-Goblem Champ-Goblem force-pushed the feat/rbd-get-data-pool-id branch from f924e46 to e3f4078 Compare August 25, 2025 16:51
Copy link
Collaborator

@anoopcs9 anoopcs9 left a comment

Choose a reason for hiding this comment

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

lgtm, thanks.

@mergify mergify bot merged commit b840e88 into ceph:master Aug 26, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API This PR includes a change to the public API of a go-ceph package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants