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

cephfs: add SelectFilesystem, a 2nd fs to micro-osd.sh etc, and tests #827

Merged
merged 7 commits into from
Feb 13, 2023

Conversation

phlogistonjohn
Copy link
Collaborator

@phlogistonjohn phlogistonjohn commented Feb 6, 2023

This PR updates the micro-osd.sh script to host an alternate cephfs filesystem, on pacific and later.
The entrypoint.sh and makefile are updated to plumb information about the alternate fs to the test suite.
The SelecFilesystem function is added implementing ceph_select_filesystem.
A group of tests, gated by the name of the alternate filesystem being provided, is added, along with API status updates.

Fixes: #262
Fixes: #818
Original-Version-By: "Arvid E. Picciani" arvid@kraud.cloud
Original-PR-URL: #819

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'sGuide 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.

@phlogistonjohn phlogistonjohn added the API This PR includes a change to the public API of a go-ceph package label Feb 6, 2023
@phlogistonjohn
Copy link
Collaborator Author

Keeping it in draft to run the CI on the various branches which I haven't done locally.

@phlogistonjohn
Copy link
Collaborator Author

Mystery failures on nautilus and octopus. Failures in cephfs admin tests that assume there's exactly one fs. The latter should be easy to fix. I'll investigate the former soon. Watch this space! ;-)

Add a function to bring up a 2nd cephfs file system. Execute it on
ceph versions pacific and later.

While the API exists on nautilus and octopus those versions are already
deprecated in go-ceph. Additionally, the ceph docs for "multifs" state,
"Beginning with the Pacific release, multiple file system support is
stable and ready to use." [1] Therefore we won't bother running our test
automation on anything earlier.

1 - https://docs.ceph.com/en/latest/cephfs/multifs/#multiple-ceph-file-systems

Signed-off-by: John Mulligan <jmulligan@redhat.com>
With micro-osd.sh supporting a 2nd alternate fs we add basic support to
entrypoint.sh to help the tests find and use that alternate fs.
The command line option is flexible, you can supply it with a literal fs
name or, when prefixed with an `@`, it will read the name from a file.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
ansiwen
ansiwen previously approved these changes Feb 8, 2023
Copy link
Collaborator

@ansiwen ansiwen left a comment

Choose a reason for hiding this comment

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

LGTM, set DNM label to give you a chance to read my nit comments.

cephfs/admin/volume_test.go Show resolved Hide resolved
cephfs/admin/volume_test.go Show resolved Hide resolved
cephfs/select_fs.go Show resolved Hide resolved
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.

All good, just a minor comment(see below).

docs/api-status.json Outdated Show resolved Hide resolved
Add SelectFileystem implementing ceph_select_filesystem which can be
used to select a cephfs by name, prior to calling mount, when the ceph
cluster hosts more than one cephfs file system.

Fixes: ceph#262
Fixes: ceph#818
Original-Version-By: "Arvid E. Picciani" <arvid@kraud.cloud>
Original-PR-URL: ceph#819
Signed-off-by: John Mulligan <jmulligan@redhat.com>
These tests are all scoped within a test function that will only run if
the alternate fs name is supplied through the environment. This way the
tests can be run by hand on older versions if need be.

The tests verify the use of the SelectFilesystem function and that the
file systems are distinct namespaces.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
If the ceph cluster we're testing against supports more then one
fs our tests shouldn't fail. Update the tests to ensure a cephfs
exists as expected but don't assume it's the only one (or that
it's the first one returned).

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
@phlogistonjohn
Copy link
Collaborator Author

I updated the doc comment. To save a little time I already set the version numbers in the API status by running make api-fix-versions myself. IF we don't merge before the release I'll manually adjust the numbers myself. I just hope this isn't needed (nudge, nudge :-))

This has dismissed the previous reviews, so @ansiwen @anoopcs9 please take another look. Thanks.

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.

@ansiwen
Copy link
Collaborator

ansiwen commented Feb 13, 2023

@Mergifyio rebase

@ansiwen
Copy link
Collaborator

ansiwen commented Feb 13, 2023

@Mergifyio refresh

@ansiwen
Copy link
Collaborator

ansiwen commented Feb 13, 2023

Mergify is on vacation?

@phlogistonjohn
Copy link
Collaborator Author

Looks like we need to make a change to mergify config. It shows the following when I look at the status:



    The configuration uses the deprecated rebase_fallback mode of the queue and/or merge action.
    A brownout is planned on February 13th, 2023.
    This option will be removed on March 13th, 2023.
    For more information: https://docs.mergify.com/actions/queue/ or https://docs.mergify.com/actions/merge/

So we're hitting this brownout I guess. As I would like to expidite this PR for the review. I am going to hit the merge button as I have two approvals for this PR. I will follow up with a fix for mergify config later today, but that won't be desired for the release this week.

@phlogistonjohn phlogistonjohn merged commit 45e9a80 into ceph:master Feb 13, 2023
@mergify
Copy link

mergify bot commented Feb 16, 2023

rebase

☑️ Nothing to do

  • -closed [:pushpin: rebase requirement]

@mergify
Copy link

mergify bot commented Feb 16, 2023

refresh

✅ Pull request refreshed

@phlogistonjohn phlogistonjohn deleted the jjm-alt-fs branch March 6, 2023 15:18
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
3 participants