Skip to content

crimson/osd, osd: bring snap trimming to crimson - #49286

Merged
rzarzynski merged 52 commits into
ceph:mainfrom
rzarzynski:wip-crimson-snaptrimmer
Mar 1, 2023
Merged

rzarzynski merged 52 commits into
ceph:mainfrom
rzarzynski:wip-crimson-snaptrimmer

Conversation

@rzarzynski

@rzarzynski rzarzynski commented Dec 6, 2022 •

Copy link
Copy Markdown
Contributor

TODO

  • Rename SnapTrimRequest to SnapTrimOp SnapTrimEvent.
  • Implement the time-based throttling.

Contribution Guidelines

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

@rzarzynski
rzarzynski force-pushed the wip-crimson-snaptrimmer branch 3 times, most recently from 5ffb306 to 349d600 Compare December 13, 2022 21:16
@rzarzynski

Copy link
Copy Markdown
Contributor Author

Fixing Clang's errors (GCC 11.2.1 hasn't pointed them out).

@rzarzynski
rzarzynski force-pushed the wip-crimson-snaptrimmer branch from 8e647d5 to ef92e75 Compare December 14, 2022 20:29
@athanatos

Copy link
Copy Markdown
Contributor

@rzarzynski Is this ready for review?

@rzarzynski

Copy link
Copy Markdown
Contributor Author

@athanatos: yes, it's ready (though still waiting for the Clang-based check bot).

@rzarzynski
rzarzynski force-pushed the wip-crimson-snaptrimmer branch from ef92e75 to e0b8250 Compare December 15, 2022 15:30
@rzarzynski

Copy link
Copy Markdown
Contributor Author

Squashed the Clang fixes.

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

LGTM, run it through the crimson-rados suite and we can merge it assuming that the result is similar to current main.

Comment thread src/common/map_cacher.hpp
std::pair<K, V> *next ///< [out] first key after key
) = 0; ///< @return 0 on success, -ENOENT if there is no next

virtual int get_next_or_current(

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.

/// returns least entry >= key

Comment thread src/crimson/osd/pg.cc
const auto needs_pause = !snap_trimq.empty();
return seastar::repeat([to_trim, needs_pause, this] {
logger().debug("{}: going to start SnapTrimEvent, to_trim={}",
*this, to_trim);

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.

pg->state_set(PG_STATE_SNAPTRIM);?
By tracking snaptrim pg state we will be able to properly test wait_snap_trimming_complete when running tests.
AFAIK, there aren't any snptrim specific tests so it might be worth to at least support this.

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.

Yup, thanks! I will add a commit here or send a follow-up for it as well as for PG_STATE_SNAPTRIM_ERROR and PG_STATE_SNAPTRIM_WAIT.

@github-actions

github-actions Bot commented Feb 2, 2023

Copy link
Copy Markdown

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

@rzarzynski
rzarzynski force-pushed the wip-crimson-snaptrimmer branch from a0ae9ea to 52057a8 Compare February 3, 2023 15:39
Comment thread src/crimson/osd/ops_executer.h Outdated

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.

After fixing this problem the snaptrimmer branch fails the workunits/rados/test.sh exactly like a fresh main:

[rzarzynski@o06 build]$ grep -A10 terminate out/osd.1.stdout 
terminate called after throwing an instance of 'std::runtime_error'
  what():  read gave enoent on #-1:a95ba935:::osdmap.579:0#
Aborting on shard 0.
Backtrace:
 0# gsignal in /lib64/libc.so.6
 1# abort in /lib64/libc.so.6
 2# 0x00007F16BDA2709B in /lib64/libstdc++.so.6
 3# 0x00007F16BDA2D53C in /lib64/libstdc++.so.6
 4# 0x00007F16BDA2C559 in /lib64/libstdc++.so.6
 5# __gxx_personality_v0 in /lib64/libstdc++.so.6
 6# 0x00007F16BC6EBB03 in /lib64/libgcc_s.so.1
[rzarzynski@o06 build]$ git describe
v18.0.0-2140-gfa8a9c73ae3
[rzarzynski@o06 build]$ git log | head -n 4
commit fa8a9c73ae3a5cc905789e96e76c4f9d3a0b0573
Merge: 8b5ab2bc038 9d1fb1bc39a
Author: zdover23 <[email protected]>
Date:   Fri Feb 3 04:20:48 2023 +1000

@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

…remove_head_whiteout()

Signed-off-by: Radoslaw Zarzynski <[email protected]>
It doesn't work.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
`crimson::interruptible` does not support that. See the
`DISABLED_nested_interruptors` unit test.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
Throwing away the NOP-looking-like `maybe_delay` concept became
possible after eradication of the `with_interruption` call nested
within `SnapTrimSubEvent`. Before, on Ubuntu and GCC 11.2.1, lack
of it was the reson behind assertion failures on resetting the
`thread_local` intteruption condition.

Signed-off-by: Radoslaw Zarzynski <[email protected]>
```
/home/jenkins-build/build/workspace/ceph-pull-requests/src/crimson/osd/osd_operations/snaptrim_event.cc:38:33: note: while checking constraint satisfaction for template 'operator|<const std::ranges::views::_Elements<0> &, const std::vector<std::pair<unsigned long, crimson::interruptible::interruptible_future_detail<crimson::osd::IOInterruptCondition, seastar::future<>>>> &>' required here
    for (const auto &i : subops | std::views::keys) {
                                ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/crimson/osd/osd_operations/snaptrim_event.cc:38:33: note: in instantiation of function template specialization 'std::ranges::views::__adaptor::operator|<const std::ranges::views::_Elements<0> &, const std::vector<std::pair<unsigned long, crimson::interruptible::interruptible_future_detail<crimson::osd::IOInterruptCondition, seastar::future<>>>> &>' requested here
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/iterator_concepts.h:963:7: note: candidate template ignored: constraints not satisfied [with _Tp = std::ranges::ref_view<const std
```

Signed-off-by: Radoslaw Zarzynski <[email protected]>
After a few tries:

```
$ bin/ceph -s
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
2022-12-19T20:18:21.856+0000 7ff87b46f700 -1 WARNING: all dangerous and experimental features are enabled.
2022-12-19T20:18:21.857+0000 7ff87b46f700  1 build_initial for_mkfs: 0
2022-12-19T20:18:21.860+0000 7ff87b46f700 -1 WARNING: all dangerous and experimental features are enabled.
2022-12-19T20:18:21.861+0000 7ff87b46f700  1 build_initial for_mkfs: 0
  cluster:
    id:     347aedc9-d72f-4a34-98fc-26cb04b0c2fc
    health: HEALTH_WARN
            11 mgr modules have failed dependencies
            1 pool(s) do not have an application enabled
            1 pool(s) have no replicas configured

  services:
    mon: 1 daemons, quorum a (age 3m)
    mgr: x(active, since 3m)
    osd: 1 osds: 1 up (since 3m), 1 in (since 3m)

  data:
    pools:   1 pools, 1 pgs
    objects: 95 objects, 6 B
    usage:   1.0 GiB used, 100 GiB / 101 GiB avail
    pgs:     1 active+clean+snaptrim

  io:
    client:   1.2 KiB/s wr, 0 op/s rd, 1 op/s wr
```

Signed-off-by: Radoslaw Zarzynski <[email protected]>
Signed-off-by: Radoslaw Zarzynski <[email protected]>
@rzarzynski

Copy link
Copy Markdown
Contributor Author
The following tests FAILED:
	 16 - run-tox-mgr-dashboard-openapi (Failed)

@rzarzynski

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@neha-ojha

Copy link
Copy Markdown
Member

make check failure is due to TEST_multimon timing out, checking if retriggering helps

/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/smoke.sh:56: TEST_multimon:  timeout 20 rados -p foo bench 4 write -b 4096 --no-cleanup
hints = 1
Maintaining 16 concurrent writes of 4096 bytes to objects of size 4096 for up to 4 seconds or 0 objects
Object prefix: benchmark_data_irvingi06.front.sepia.ceph.co_2423448
  sec Cur ops   started  finished  avg MB/s  cur MB/s last lat(s)  avg lat(s)
    0       0         0         0         0         0           -           0
    1      16       112        96  0.374926     0.375    0.133683     0.16301
    2      16       153       137  0.267537  0.160156    0.635009    0.220679
    3      16       163       147  0.191379 0.0390625     1.09917    0.281125
    4      16       163       147  0.143535         0           -    0.281125
    5      16       163       147  0.114828         0           -    0.281125
    6      16       163       147 0.0956906         0           -    0.281125
    7      16       163       147 0.0820208         0           -    0.281125
    8      16       163       147 0.0717683         0           -    0.281125
    9      16       163       147 0.0637941         0           -    0.281125
   10      16       163       147 0.0574147         0           -    0.281125
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/smoke.sh:56: TEST_multimon:  return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/smoke.sh:20: run:  return 1

@neha-ojha

Copy link
Copy Markdown
Member

jenkins test make check

@rzarzynski

Copy link
Copy Markdown
Contributor Author

Helped!

@rzarzynski
rzarzynski merged commit 0ad6038 into ceph:main Mar 1, 2023
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.

5 participants