Skip to content

client: return EOPNOTSUPP for fallocate with mode 0 - #59725

Merged
vshankar merged 4 commits into
ceph:mainfrom
mchangir:mds-fallocate-return-EOPNOTSUPP-for-mode-0
Nov 4, 2024
Merged

vshankar merged 4 commits into
ceph:mainfrom
mchangir:mds-fallocate-return-EOPNOTSUPP-for-mode-0

Conversation

@mchangir

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/68026
Signed-off-by: Milind Changire [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@github-actions github-actions Bot added the cephfs Ceph File System label Sep 11, 2024
@mchangir
mchangir force-pushed the mds-fallocate-return-EOPNOTSUPP-for-mode-0 branch from 624ce51 to 1eb6cee Compare September 11, 2024 10:39
@mchangir

Copy link
Copy Markdown
Contributor Author

for doc updates, please see the cephfs.pyx file change

@dparmar18
dparmar18 requested a review from a team September 11, 2024 12:53
@gregsfortytwo

Copy link
Copy Markdown
Member

This should get a PendingReleaseNote since we're changing the API

@mchangir
mchangir force-pushed the mds-fallocate-return-EOPNOTSUPP-for-mode-0 branch from 1eb6cee to b6bae5b Compare September 19, 2024 04:25
@mchangir

Copy link
Copy Markdown
Contributor Author
  • rebased
  • added PendingReleaseNote

@mchangir

Copy link
Copy Markdown
Contributor Author

@anthonyeleven please review PendingReleaseNotes

@vshankar

Copy link
Copy Markdown
Contributor

oh, I tried this on a vstart cluster with strace'ing fallocate on ceph-fuse:

openat(AT_FDCWD, "./test", O_RDWR|O_CREAT, 0666) = 3
fallocate(3, 0, 0, 10485760)            = 0
fsync(3)                                = 0

mode is 0 and only a single rados object corresponding to the file is allocated on the data pool with size:0

./bin/rados -p cephfs.a.data stat 10000000000.00000000
cephfs.a.data/10000000000.00000000 mtime 2024-09-19T09:50:28.000000+0000, size 0

This is handle in kclient as per: ceph/ceph-client@bddff63 (taken from the mail you sent to ceph-users, subject "RFC: cephfs fallocate" - mentioning it here for brevity).

Comment thread PendingReleaseNotes Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: just mention that the default case is mode:0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated the PendingReleaseNotes with mode == 0

@mchangir
mchangir force-pushed the mds-fallocate-return-EOPNOTSUPP-for-mode-0 branch from b6bae5b to e059578 Compare September 19, 2024 10:27
@anthonyeleven

Copy link
Copy Markdown
Contributor

Docs lgtm, note to self to wordsmith after merge.

@vshankar

Copy link
Copy Markdown
Contributor

@mchangir
mchangir force-pushed the mds-fallocate-return-EOPNOTSUPP-for-mode-0 branch from e059578 to cb21b64 Compare September 24, 2024 10:14
@github-actions github-actions Bot added the tests label Sep 24, 2024
@mchangir

Copy link
Copy Markdown
Contributor Author
  • rebased
  • added workunit for testing fallocate mode 0

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@mchangir
mchangir force-pushed the mds-fallocate-return-EOPNOTSUPP-for-mode-0 branch from cb21b64 to 739ee10 Compare September 25, 2024 07:34
@mchangir

Copy link
Copy Markdown
Contributor Author
  • rebased

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The python binding tests needs fixing. See:

vshankar-2024-09-24_04:11:42-fs-wip-vshankar-testing-20240923.114534-debug-testing-default-smithi/7917550

2024-09-24T08:52:17.447 INFO:tasks.workunit.client.0.smithi059.stdout:
2024-09-24T08:52:17.447 INFO:tasks.workunit.client.0.smithi059.stdout:=================================== FAILURES ===================================
2024-09-24T08:52:17.447 INFO:tasks.workunit.client.0.smithi059.stdout:________________________________ test_fallocate ________________________________
2024-09-24T08:52:17.448 INFO:tasks.workunit.client.0.smithi059.stdout:
2024-09-24T08:52:17.448 INFO:tasks.workunit.client.0.smithi059.stdout:testdir = None
2024-09-24T08:52:17.448 INFO:tasks.workunit.client.0.smithi059.stdout:
2024-09-24T08:52:17.448 INFO:tasks.workunit.client.0.smithi059.stdout:    def test_fallocate(testdir):
2024-09-24T08:52:17.448 INFO:tasks.workunit.client.0.smithi059.stdout:        fd = cephfs.open(b'/file-fallocate', 'w', 0o755)
2024-09-24T08:52:17.448 INFO:tasks.workunit.client.0.smithi059.stdout:        assert_raises(TypeError, cephfs.fallocate, b'/file-fallocate', 0, 10)
2024-09-24T08:52:17.449 INFO:tasks.workunit.client.0.smithi059.stdout:>       cephfs.fallocate(fd, 0, 10)
2024-09-24T08:52:17.449 INFO:tasks.workunit.client.0.smithi059.stdout:
2024-09-24T08:52:17.449 INFO:tasks.workunit.client.0.smithi059.stdout:../../../clone.client.0/src/test/pybind/test_cephfs.py:613:
2024-09-24T08:52:17.449 INFO:tasks.workunit.client.0.smithi059.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2024-09-24T08:52:17.449 INFO:tasks.workunit.client.0.smithi059.stdout:
2024-09-24T08:52:17.449 INFO:tasks.workunit.client.0.smithi059.stdout:>   ???
2024-09-24T08:52:17.450 INFO:tasks.workunit.client.0.smithi059.stdout:E   cephfs.OperationNotSupported: fallocate failed: Operation not supported [Errno 95]
2024-09-24T08:52:17.450 INFO:tasks.workunit.client.0.smithi059.stdout:
2024-09-24T08:52:17.450 INFO:tasks.workunit.client.0.smithi059.stdout:cephfs.pyx:955: OperationNotSupported

@mchangir
mchangir force-pushed the mds-fallocate-return-EOPNOTSUPP-for-mode-0 branch from 739ee10 to f6a79e1 Compare September 30, 2024 10:10
@mchangir

Copy link
Copy Markdown
Contributor Author
  • rebased
  • update to pybind test for mode 0

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vshankar

Copy link
Copy Markdown
Contributor

@mchangir could you rebase this please? (minor pending release notes conflict).

@mchangir
mchangir force-pushed the mds-fallocate-return-EOPNOTSUPP-for-mode-0 branch from ffa37aa to 9244f0a Compare October 30, 2024 10:12
@mchangir

Copy link
Copy Markdown
Contributor Author

rebased

@vshankar

Copy link
Copy Markdown
Contributor

jenkins test make check

1 similar comment
@vshankar

vshankar commented Nov 4, 2024

Copy link
Copy Markdown
Contributor

jenkins test make check

@vshankar

vshankar commented Nov 4, 2024

Copy link
Copy Markdown
Contributor

jenkins test windows

Comment thread PendingReleaseNotes
widely adopted among the Ceph user community.

* CephFS: EOPNOTSUPP (Operation not supported ) is now returned by the CephFS
fuse client for `fallocate` for the default case (i.e. mode == 0) since

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mchangir - Sorry for the late remark but I just found out about this change. This change is causing a failure in the go-ceph ci (see ceph/go-ceph#1044 ). The change itself is not a problem, we will deal with it. My request is to tweak the release note because 'fuse client' is a bit misleading as this change doesn't only impact fuse. Maybe tweak it to say 'fuse client or other libcephfs clients'? Thanks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review.
fyi - #60665

anoopcs9 added a commit to anoopcs9/go-ceph that referenced this pull request Nov 12, 2024
There has been an internal change with fallocate API[1] forcing us not
to run those fallocate tests which uses mode as 0. For now we skip those
tests on main branch.

[1] ceph/ceph#59725

Signed-off-by: Anoop C S <[email protected]>
anoopcs9 added a commit to anoopcs9/go-ceph that referenced this pull request Nov 12, 2024
There are backports created for fallocate API changes[1] that got merged
recently. Considering the time taken for these backports to get in to
release branches and finally as a released version we create a separate
test file to have more fine grained control over various pre-release CI
jobs with the help of corresponding build tags.

Modification of build tags should go hand-in-hand with the version
detection logic used in file_test.go once a backport is available in
released version.

[1] ceph/ceph#59725

Signed-off-by: Anoop C S <[email protected]>
anoopcs9 added a commit to anoopcs9/go-ceph that referenced this pull request Nov 12, 2024
There has been an internal change with fallocate API[1] forcing us not
to run those fallocate tests which uses mode as 0. For now we skip those
tests on main branch.

[1] ceph/ceph#59725

Signed-off-by: Anoop C S <[email protected]>
anoopcs9 added a commit to anoopcs9/go-ceph that referenced this pull request Nov 12, 2024
There are backports created for fallocate API changes[1] that got merged
recently. Considering the time taken for these backports to get in to
release branches and finally as a released version we create a separate
test file to have more fine grained control over various pre-release CI
jobs with the help of corresponding build tags.

Modification of build tags should go hand-in-hand with the version
detection logic used in file_test.go once a backport is available in
released version.

[1] ceph/ceph#59725

Signed-off-by: Anoop C S <[email protected]>
anoopcs9 added a commit to anoopcs9/go-ceph that referenced this pull request Nov 12, 2024
There are backports created for fallocate API changes[1] that got merged
recently. Considering the time taken for these backports to get in to
release branches and finally as a released version we create a separate
test file to have more fine grained control over various pre-release CI
jobs with the help of corresponding build tags.

Modification of build tags should go hand-in-hand with the version
detection logic used in file_test.go once a backport is available in
released version.

[1] ceph/ceph#59725

Signed-off-by: Anoop C S <[email protected]>
mergify Bot pushed a commit to ceph/go-ceph that referenced this pull request Nov 12, 2024
There has been an internal change with fallocate API[1] forcing us not
to run those fallocate tests which uses mode as 0. For now we skip those
tests on main branch.

[1] ceph/ceph#59725

Signed-off-by: Anoop C S <[email protected]>
mergify Bot pushed a commit to ceph/go-ceph that referenced this pull request Nov 12, 2024
There are backports created for fallocate API changes[1] that got merged
recently. Considering the time taken for these backports to get in to
release branches and finally as a released version we create a separate
test file to have more fine grained control over various pre-release CI
jobs with the help of corresponding build tags.

Modification of build tags should go hand-in-hand with the version
detection logic used in file_test.go once a backport is available in
released version.

[1] ceph/ceph#59725

Signed-off-by: Anoop C S <[email protected]>
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.

6 participants