Skip to content

rbd: add the validate of the format and clone_format - #58180

Merged
idryomov merged 2 commits into
ceph:mainfrom
guojidan:format
Jul 20, 2024
Merged

idryomov merged 2 commits into
ceph:mainfrom
guojidan:format

Conversation

@guojidan

@guojidan guojidan commented Jun 21, 2024 •

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/65744

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

@guojidan
guojidan requested a review from a team as a code owner June 21, 2024 02:18
Comment thread src/librbd/api/Image.cc Resolved
Comment thread src/librbd/image/CloneRequest.cc Resolved
Comment thread src/librbd/internal.cc Resolved
Comment thread src/test/pybind/test_rbd.py Resolved
Comment thread src/test/pybind/test_rbd.py Resolved
Comment thread src/librbd/image/CloneRequest.cc Resolved

@idryomov idryomov 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.

src/librbd changes LGTM.

Do you mind if I take over the test (i.e. replace it with my own)? I think it's better done against the C++ API and I want to check that images created with different formats are actually different as well as a bunch of other nits that would easier for me to address directly.

@guojidan

Copy link
Copy Markdown
Contributor Author

src/librbd changes LGTM.

Do you mind if I take over the test (i.e. replace it with my own)? I think it's better done against the C++ API and I want to check that images created with different formats are actually different as well as a bunch of other nits that would easier for me to address directly.

it's ok, I am not good at writing test cases , thank you 😄

guojidan and others added 2 commits June 27, 2024 13:59
[ idryomov: squash test_unsupported_clone_format() into
  test_clone_format() ]

Fixes: https://tracker.ceph.com/issues/65744
Signed-off-by: junxiang Mu <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
Co-authored-by: junxiang Mu <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
@idryomov

Copy link
Copy Markdown
Contributor

it's ok, I am not good at writing test cases

You did a pretty good job -- I kept the skeleton, covered a few more scenarios and added those additional checks mentioned in the previous comment (see verify_format_{1,2}() and calls to get_op_features() in the new test). Also, opts happens to be a rather weird in-out parameter, which makes reusing opts instance that was previously passed to e.g. rbd_copy3() for rbd_deep_copy() unreliable, so I patched that as well. Please take a look!

@guojidan

Copy link
Copy Markdown
Contributor Author

it's ok, I am not good at writing test cases

You did a pretty good job -- I kept the skeleton, covered a few more scenarios and added those additional checks mentioned in the previous comment (see verify_format_{1,2}() and calls to get_op_features() in the new test). Also, opts happens to be a rather weird in-out parameter, which makes reusing opts instance that was previously passed to e.g. rbd_copy3() for rbd_deep_copy() unreliable, so I patched that as well. Please take a look!

LGTM,Much better than my test cases, and more in the style of C++. and sorry,I wrongly submitted the commit. I will roll it back later.

Comment thread src/test/librbd/test_librbd.cc Resolved
@idryomov

Copy link
Copy Markdown
Contributor

No related failures:

https://pulpito.ceph.com/dis-2024-07-18_22:11:30-rbd-wip-dis-testing-distro-default-smithi/
https://pulpito.ceph.com/dis-2024-07-19_12:06:54-rbd-wip-dis-testing-distro-default-smithi/
https://pulpito.ceph.com/dis-2024-07-19_20:40:00-rbd-wip-dis-testing-distro-default-smithi/

(Jobs where TestLibRBD.TestEncryptionLUKS1 triggers an assert

2024-07-19T12:48:08.399 INFO:tasks.ceph.osd.3.smithi110.stderr:/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos9/DIST/centos9/MACHINE_SIZE/gigantic/release/19.0.0-5126-g01e1aa05/rpm/el9/BUILD/ceph-19.0.0-5126-g01e1aa05/src/osd/ECCommon.cc: In function 'static void ECCommon::ReadPipeline::get_min_want_to_read_shards(uint64_t, uint64_t, const ECUtil::stripe_info_t&, const std::vector<int>&, std::set<int>*)' thread 7f9b60945640 time 2024-07-19T12:48:08.398035+0000
2024-07-19T12:48:08.399 INFO:tasks.ceph.osd.3.smithi110.stderr:/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos9/DIST/centos9/MACHINE_SIZE/gigantic/release/19.0.0-5126-g01e1aa05/rpm/el9/BUILD/ceph-19.0.0-5126-g01e1aa05/src/osd/ECCommon.cc: 336: FAILED ceph_assert(want_to_read->size() == sinfo.get_data_chunk_count())
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: ceph version 19.0.0-5126-g01e1aa05 (01e1aa052c15e2a077a20de402d3ae763de4a30d) squid (dev)
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x11e) [0x56123c9a347e]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 2: ceph-osd(+0x3fd63a) [0x56123c9a363a]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 3: ceph-osd(+0x3a4a88) [0x56123c94aa88]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 4: (ECCommon::ReadPipeline::get_min_want_to_read_shards(unsigned long, unsigned long, std::set<int, std::less<int>, std::allocator<int> >*)+0x56) [0x56123cc9b886]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 5: (ECCommon::ReadPipeline::objects_read_and_reconstruct(std::map<hobject_t, std::__cxx11::list<ECCommon::ec_align_t, std::allocator<ECCommon::ec_align_t> >, std::less<hobject_t>, std::allocator<std::pair<hobject_t const, std::__cxx11::list<ECCommon::ec_align_t, std::allocator<ECCommon::ec_align_t> > > > > const&, bool, std::unique_ptr<GenContext<std::map<hobject_t, ECCommon::ec_extent_t, std::less<hobject_t>, std::allocator<std::pair<hobject_t const, ECCommon::ec_extent_t> > >&&>, std::default_delete<GenContext<std::map<hobject_t, ECCommon::ec_extent_t, std::less<hobject_t>, std::allocator<std::pair<hobject_t const, ECCommon::ec_extent_t> > >&&> > >&&)+0x8f7) [0x56123cca48a7]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 6: (ECBackend::objects_read_async(hobject_t const&, std::__cxx11::list<std::pair<ECCommon::ec_align_t, std::pair<ceph::buffer::v15_2_0::list*, Context*> >, std::allocator<std::pair<ECCommon::ec_align_t, std::pair<ceph::buffer::v15_2_0::list*, Context*> > > > const&, Context*, bool)+0x5a0) [0x56123ceb8240]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 7: (PrimaryLogPG::OpContext::start_async_reads(PrimaryLogPG*)+0x179) [0x56123cbda069]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 8: (PrimaryLogPG::execute_ctx(PrimaryLogPG::OpContext*)+0x474) [0x56123cc0adc4]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 9: (PrimaryLogPG::do_op(boost::intrusive_ptr<OpRequest>&)+0x342b) [0x56123cc036ab]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 10: (OSD::dequeue_op(boost::intrusive_ptr<PG>, boost::intrusive_ptr<OpRequest>, ThreadPool::TPHandle&)+0x197) [0x56123cb41697]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 11: (ceph::osd::scheduler::PGOpItem::run(OSD*, OSDShard*, boost::intrusive_ptr<PG>&, ThreadPool::TPHandle&)+0x69) [0x56123cd864d9]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 12: (OSD::ShardedOpWQ::_process(unsigned int, ceph::heartbeat_handle_d*)+0xd07) [0x56123cb5ade7]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 13: (ShardedThreadPool::shardedthreadpool_worker(unsigned int)+0x2aa) [0x56123d05ef6a]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 14: ceph-osd(+0xab9514) [0x56123d05f514]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 15: /lib64/libc.so.6(+0x89c02) [0x7f9b83a89c02]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 16: /lib64/libc.so.6(+0x10ec40) [0x7f9b83b0ec40]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr:*** Caught signal (Aborted) **

in the OSD were excluded from last the rerun. This issue is being looked at by the RADOS team.)

@idryomov
idryomov merged commit 8914b25 into ceph:main Jul 20, 2024
@guojidan
guojidan deleted the format branch July 23, 2024 01:43
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.

2 participants