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

quincy: client, mds: update mtime and change attr for snapdir when snaps are created, deleted and renamed #50730

Merged
merged 7 commits into from Mar 28, 2024

Conversation

vshankar
Copy link
Contributor

https://tracker.ceph.com/issues/59041

@lxbsz This will conflict with https://tracker.ceph.com/issues/58825 when its backported - Let's merge your backport first.

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

@vshankar vshankar added the cephfs Ceph File System label Mar 29, 2023
@vshankar vshankar requested a review from a team March 29, 2023 06:05
@github-actions github-actions bot added this to the quincy milestone Mar 29, 2023
@vshankar vshankar changed the title quincy: client, mds: update mtime and change attr for snapdir when snaps are created, deleted and renamed [DNM] quincy: client, mds: update mtime and change attr for snapdir when snaps are created, deleted and renamed Mar 30, 2023
@vshankar vshankar added the DNM label Mar 30, 2023
@github-actions
Copy link

github-actions bot commented Jun 8, 2023

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

@vshankar vshankar changed the title [DNM] quincy: client, mds: update mtime and change attr for snapdir when snaps are created, deleted and renamed quincy: client, mds: update mtime and change attr for snapdir when snaps are created, deleted and renamed Jun 21, 2023
@vshankar
Copy link
Contributor Author

@yuriw please include this change in your next quincy test run.

return std::make_pair(ninfo.info, SnapRealmInfoMeta(ninfo.last_modified, ninfo.change_attr));
} else {
SnapRealmInfo info;
decode(info, p);
Copy link
Contributor

@ljflores ljflores Jul 12, 2023

Choose a reason for hiding this comment

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

@vshankar looks like the coredump is an issue with this line (see frame 15):

(gdb) bt
#0  __GI___pthread_once (once_control=0x7fbc6f8f2088 <once>, init_routine=0x7fbc6f669f10 <__option_is_end>) at pthread_once.c:139
#1  0x00007fbc6f66a074 in init () at backtrace.c:61
#2  0x0000557275a2af32 in ceph::ClibBackTrace::ClibBackTrace (s=1, this=0x7fbc2c1f5d80) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/common/BackTrace.h:44
#3  handle_oneshot_fatal_signal (signum=6) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/global/signal_handler.cc:325
#4  <signal handler called>
#5  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#6  0x00007fbc6f550ea5 in __GI_abort () at abort.c:79
#7  0x00007fbc6ff1e09b in __gnu_cxx::__verbose_terminate_handler() [clone .cold.1] () from /lib64/libstdc++.so.6
#8  0x00007fbc6ff2453c in std::rethrow_exception(std::__exception_ptr::exception_ptr) () from /lib64/libstdc++.so.6
#9  0x00007fbc6ff247f8 in __cxa_throw () from /lib64/libstdc++.so.6
#10 0x00007fbc71cc3e95 in ceph::buffer::v15_2_0::list::iterator_impl<true>::copy (this=this@entry=0x7fbc2c1f9ee0, len=26, len@entry=48, dest=0x7fbc2c1f9d66 "", dest@entry=0x7fbc2c1f9d50 "")
    at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/common/buffer.cc:752
#11 0x00007fbc71aac811 in ceph::decode_raw<ceph_mds_snap_realm> (p=..., t=...) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/include/encoding.h:77
#12 decode (p=..., v=...) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/include/types.h:333
#13 SnapRealmInfo::decode (this=this@entry=0x7fbc2c1f9d50, bl=...) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/common/snap_types.cc:20
#14 0x00007fbc5fb80e7e in decode (p=..., c=...) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/common/snap_types.h:41
#15 get_snap_realm_info (session=<optimized out>, p=...) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/client/Client.cc:5038
#16 0x00007fbc5fbd7f11 in Client::update_snap_trace (this=0x55727caa4000, session=0x55727b74cc60, bl=..., realm_ret=0x0, flush=true) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/client/Client.cc:5053
#17 0x00007fbc5fbd8dd8 in Client::handle_snap (this=0x55727caa4000, m=...) at /opt/rh/gcc-toolset-11/root/usr/include/c++/11/bits/shared_ptr_base.h:1295
#18 0x00007fbc5fc0ab45 in Client::ms_dispatch2 (this=0x55727caa4000, m=...) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/x86_64-redhat-linux-gnu/boost/include/boost/smart_ptr/intrusive_ptr.hpp:131
#19 0x00007fbc71b6ee78 in Messenger::ms_deliver_dispatch (this=0x55727ca70900, m=...) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/msg/Messenger.h:720
#20 0x00007fbc71b6c2bf in DispatchQueue::entry (this=0x55727ca70c80) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/msg/DispatchQueue.cc:201
#21 0x00007fbc71c36131 in DispatchQueue::DispatchThread::entry (this=<optimized out>) at /usr/src/debug/ceph-17.2.6-785.g0040a8bd.el8.x86_64/src/msg/DispatchQueue.h:101
#22 0x00007fbc70b1a1ca in start_thread (arg=<optimized out>) at pthread_create.c:479
#23 0x00007fbc6f568e73 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vshankar looks like the coredump is an issue with this line (see frame 15):

OK. That could be buggy. But why were the core files getting shown as ceph-mgr?

Copy link
Contributor

Choose a reason for hiding this comment

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

The coredump showed up as mgr because the crash occurred when a command was issued on the ceph-mgr binary. So, it turned out not to be a problem with the mgr, but I needed the ceph-mgr binary to decode the coredump.

@vshankar vshankar added the DNM label Jul 13, 2023
@vshankar vshankar changed the title quincy: client, mds: update mtime and change attr for snapdir when snaps are created, deleted and renamed [DNM] quincy: client, mds: update mtime and change attr for snapdir when snaps are created, deleted and renamed Jul 13, 2023
@yuriw yuriw removed the needs-qa label Jul 27, 2023
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

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

@vshankar
Copy link
Contributor Author

@vshankar
Copy link
Contributor Author

Needs to be retested once #54244 is merged.

@vshankar
Copy link
Contributor Author

#54244 is merged - I'll push a rebase.

…de (srnode)

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit a119f23)
…prealm

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 77f7b21)
…aprealm

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit f3c0d3b)
…ode in snap trace reply

To handle older clients, introduce a cephfs feature bit. The MDS encodes a "new"
SNapRealmInfo structure for clients supporting this feature (which includes the
last modification timestamp and a version/change_attr for the snap realm). For
clients not advertising this feature, the MDS uses the existing SnapRealmInfo
structure for snapshot traces.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 7a4c509)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit cdf4ae4)
…cation time of a snap realm

For MDS that do not encode the "new" SnapReamInfo strucutre, fallback to
using SnapRealmInfo.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit af4739b)
Fixes: http://tracker.ceph.com/issues/54501
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit f1f6da1)
@vshankar vshankar changed the title [DNM] quincy: client, mds: update mtime and change attr for snapdir when snaps are created, deleted and renamed quincy: client, mds: update mtime and change attr for snapdir when snaps are created, deleted and renamed Feb 28, 2024
@vshankar
Copy link
Contributor Author

jenkins test make check

@vshankar
Copy link
Contributor Author

@vshankar
Copy link
Contributor Author

Reviewed-by: Venky Shankar vshankar@redhat.com

@vshankar
Copy link
Contributor Author

@mchangir @lxbsz Please approve if it looks fine. fs suite runs fine - #50730 (comment)

Copy link
Member

@lxbsz lxbsz left a comment

Choose a reason for hiding this comment

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

LGTM.

@vshankar vshankar merged commit 03950ff into ceph:quincy Mar 28, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants