Skip to content

mon/FSCommands: fix variable names and function names in calls - #53321

Merged
rishabh-d-dave merged 2 commits into
ceph:mainfrom
rishabh-d-dave:fix-mon-fscmds
Sep 7, 2023
Merged

rishabh-d-dave merged 2 commits into
ceph:mainfrom
rishabh-d-dave:fix-mon-fscmds

Conversation

@rishabh-d-dave

@rishabh-d-dave rishabh-d-dave commented Sep 6, 2023 •

Copy link
Copy Markdown
Contributor

mon/FSCommands.cc: fix variable names and function names in calls

PR #51942 today and PR #52409 was merged last week. Latter PR changed
"fs" to "fsp" and made mds_map and fscid private and introduced
get_mds_map() and get_fsicd() methods instead.

Combination of former and latter PR introduced compilation errors & made
it impossible to build the binaries on the latest main branch. This
commit attemps to fix this issue.

Fixes: https://tracker.ceph.com/issues/62729
Signed-off-by: Rishabh Dave [email protected]


src/test: fix test_bluefs.cc

BlueFS.add_block_device() doesn't accept an integer in parameters.

Introduced-by: 3cc75e8
Fixes: https://tracker.ceph.com/issues/62734

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

@rishabh-d-dave
rishabh-d-dave requested a review from a team as a code owner September 6, 2023 22:29
@rishabh-d-dave rishabh-d-dave changed the title <!-- - Please give your pull request a title like mon/FSCommands.cc: fix variable names and function names in calls Sep 6, 2023
@rishabh-d-dave
rishabh-d-dave requested review from a team, batrick, gregsfortytwo and vshankar and removed request for a team September 6, 2023 22:31
@ljflores

ljflores commented Sep 6, 2023

Copy link
Copy Markdown
Member

Testing the build here: https://shaman.ceph.com/builds/ceph/wip-lflores-testing-2023-09-06-2249/c0bc8a6e41156eb3d0e172abd84de1a021dec8a2/

@rishabh-d-dave I think you also had a test branch, so up to you which one you want to use. This one's on the very tip of main.

@ljflores

ljflores commented Sep 6, 2023

Copy link
Copy Markdown
Member

Make check failure:

FAILED: src/test/objectstore/CMakeFiles/unittest_bluefs.dir/test_bluefs.cc.o 
/usr/bin/ccache /usr/bin/clang++-14 -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_RANDOM_DYN_LINK -DBOOST_RANDOM_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -I/home/jenkins-build/build/workspace/ceph-pull-requests/build/src/include -I/home/jenkins-build/build/workspace/ceph-pull-requests/src -isystem /opt/ceph/include -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/build/include -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/xxHash -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/fmt/include -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googlemock/include -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googlemock -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/rocksdb/include -isystem /usr/include/fuse -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/jaegertracing/opentelemetry-cpp/api/include -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/include -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/jaegertracing/opentelemetry-cpp/ext/include -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/src/jaegertracing/opentelemetry-cpp/sdk/include -g -Werror -fPIE -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DBOOST_PHOENIX_STL_TUPLE_H_ -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wpessimizing-move -Wredundant-move -Wno-inconsistent-missing-override -Wno-mismatched-tags -Wno-unused-private-field -Wno-address-of-packed-member -Wno-unused-function -Wno-unused-local-typedef -Wno-varargs -Wno-gnu-designator -Wno-missing-braces -Wno-parentheses -Wno-deprecated-register -DCEPH_DEBUG_MUTEX -D_GLIBCXX_ASSERTIONS -fdiagnostics-color=auto -std=c++20 -MD -MT src/test/objectstore/CMakeFiles/unittest_bluefs.dir/test_bluefs.cc.o -MF src/test/objectstore/CMakeFiles/unittest_bluefs.dir/test_bluefs.cc.o.d -o src/test/objectstore/CMakeFiles/unittest_bluefs.dir/test_bluefs.cc.o -c /home/jenkins-build/build/workspace/ceph-pull-requests/src/test/objectstore/test_bluefs.cc
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/objectstore/test_bluefs.cc:1415:71: error: cannot initialize a parameter of type 'bluefs_shared_alloc_context_t *' with an rvalue of type 'int'
  ASSERT_EQ(0, fs.add_block_device(BlueFS::BDEV_DB, bdev.path, false, 1048576));

Seems like a different, unrelated issue.

@ljflores

ljflores commented Sep 6, 2023

Copy link
Copy Markdown
Member

@ljflores ljflores closed this Sep 6, 2023
@ljflores ljflores reopened this Sep 6, 2023
@vshankar

vshankar commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

Changes look fine.

@joscollin joscollin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me.

@github-actions github-actions Bot added the tests label Sep 7, 2023
PR ceph#51942 today and PR ceph#52409 was merged last week. Latter PR changed
"fs" to "fsp" and made mds_map and fscid private and introduced
get_mds_map() and get_fsicd() methods instead.

Combination of former and latter PR introduced compilation errors & made
it impossible to build the binaries on the latest main branch. This
commit attemps to fix this issue.

Fixes: https://tracker.ceph.com/issues/62729
Signed-off-by: Rishabh Dave <[email protected]>
@rishabh-d-dave rishabh-d-dave changed the title mon/FSCommands.cc: fix variable names and function names in calls mon/FSCommands: fix variable names and function names in calls Sep 7, 2023
BlueFS.add_block_device() doesn't accept an integer in parameters.

Introduced-by: 3cc75e8
Fixes: https://tracker.ceph.com/issues/62734
Signed-off-by: Rishabh Dave <[email protected]>
@rishabh-d-dave

rishabh-d-dave commented Sep 7, 2023 •

Copy link
Copy Markdown
Contributor Author

Previous make check failure was due to https://tracker.ceph.com/issues/62734. I've added a fix for it here since without both on same branch, make check won't pass.

https://jenkins.ceph.com/job/ceph-pull-requests/121472/consoleFull#11866423862a811ea2-3e7b-466b-84b4-d13df7e35809

FAILED: src/test/objectstore/CMakeFiles/unittest_bluefs.dir/test_bluefs.cc.o 
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/objectstore/test_bluefs.cc:1415:71: error: cannot initialize a parameter of type 'bluefs_shared_alloc_context_t *' with an rvalue of type 'int'
  ASSERT_EQ(0, fs.add_block_device(BlueFS::BDEV_DB, bdev.path, false, 1048576));
                                                                      ^~~~~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest.h:2069:54: note: expanded from macro 'ASSERT_EQ'
# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
                                                     ^~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest.h:2053:69: note: expanded from macro 'GTEST_ASSERT_EQ'
  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                                    ^~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest_pred_impl.h:168:40: note: expanded from macro 'ASSERT_PRED_FORMAT2'
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
                                       ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest_pred_impl.h:149:43: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \
                                          ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_'
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                   ^~~~~~~~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/os/bluestore/BlueFS.h:639:41: note: passing argument to parameter '_shared_alloc' here
                       bluefs_shared_alloc_context_t* _shared_alloc = nullptr);
                                                      ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/objectstore/test_bluefs.cc:1456:71: error: cannot initialize a parameter of type 'bluefs_shared_alloc_context_t *' with an rvalue of type 'int'
  ASSERT_EQ(0, fs.add_block_device(BlueFS::BDEV_DB, bdev.path, false, 1048576));
                                                                      ^~~~~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest.h:2069:54: note: expanded from macro 'ASSERT_EQ'
# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
                                                     ^~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest.h:2053:69: note: expanded from macro 'GTEST_ASSERT_EQ'
  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                                    ^~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest_pred_impl.h:168:40: note: expanded from macro 'ASSERT_PRED_FORMAT2'
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
                                       ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest_pred_impl.h:149:43: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \
                                          ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_'
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                   ^~~~~~~~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/os/bluestore/BlueFS.h:639:41: note: passing argument to parameter '_shared_alloc' here
                       bluefs_shared_alloc_context_t* _shared_alloc = nullptr);
                                                      ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/objectstore/test_bluefs.cc:1515:71: error: cannot initialize a parameter of type 'bluefs_shared_alloc_context_t *' with an rvalue of type 'int'
  ASSERT_EQ(0, fs.add_block_device(BlueFS::BDEV_DB, bdev.path, false, 1048576));
                                                                      ^~~~~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest.h:2069:54: note: expanded from macro 'ASSERT_EQ'
# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
                                                     ^~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest.h:2053:69: note: expanded from macro 'GTEST_ASSERT_EQ'
  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                                    ^~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest_pred_impl.h:168:40: note: expanded from macro 'ASSERT_PRED_FORMAT2'
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
                                       ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest_pred_impl.h:149:43: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \
                                          ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/include/gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_'
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                   ^~~~~~~~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/os/bluestore/BlueFS.h:639:41: note: passing argument to parameter '_shared_alloc' here
                       bluefs_shared_alloc_context_t* _shared_alloc = nullptr);
                                                      ^
3 errors generated.
[2068/2689] Linking CXX executable bin/unittest_rocksdb_option

@vshankar

vshankar commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

@rishabh-d-dave please run this through fs:workload and if things look good, its ready for merge.

@joscollin joscollin mentioned this pull request Sep 7, 2023
4 of 14 tasks
@idryomov

idryomov commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

@rishabh-d-dave please run this through fs:workload and if things look good, its ready for merge.

@vshankar How big is fs:workload and how long is that expected to take? I'm asking because build breakage like this affects everyone (testing branches, etc). Obvious fixups should be merged ASAP.

@vshankar

vshankar commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

@rishabh-d-dave please run this through fs:workload and if things look good, its ready for merge.

@vshankar How big is fs:workload and how long is that expected to take? I'm asking because build breakage like this affects everyone (testing branches, etc). Obvious fixups should be merged ASAP.

~20 odd jobs is normally what gets scheduled. Another option is to merge this to get stuff unblocked as Laura already mentioned that it builds fine. We can catch and fix any failures that crop up with tests.

@vshankar

vshankar commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

@rishabh-d-dave let's merge this in the interest on time and then watch out for any test failure fallouts in fs suite runs.

@vshankar

vshankar commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

@rishabh-d-dave let's merge this in the interest on time and then watch out for any test failure fallouts in fs suite runs.

nvm - I'm merging this. Note that this also includes the test failure fix and if that breaks we can always revert or fix it, but the build breakage is a bigger concern for now.

@rishabh-d-dave
rishabh-d-dave merged commit f4c5809 into ceph:main Sep 7, 2023
@rishabh-d-dave

rishabh-d-dave commented Sep 7, 2023 •

Copy link
Copy Markdown
Contributor Author

@vshankar

@rishabh-d-dave let's merge this in the interest on time and then watch out for any test failure fallouts in fs suite runs.

nvm - I'm merging this. Note that this also includes the test failure fix and if that breaks we can always revert or fix it, but the build breakage is a bigger concern for now.

I just saw this comment. That's why I pinged you, @gregsfortytwo and @batrick yesterday late night.

@vshankar

vshankar commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

@vshankar

@rishabh-d-dave let's merge this in the interest on time and then watch out for any test failure fallouts in fs suite runs.

nvm - I'm merging this. Note that this also includes the test failure fix and if that breaks we can always revert or fix it, but the build breakage is a bigger concern for now.

I just saw this comment. That's why I pinged you, @gregsfortytwo and @batrick yesterday late night.

no worries -- I thought we could use Laura's build and do a quick fs:workload test run.

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

Building latest master was successful.

@rishabh-d-dave
rishabh-d-dave deleted the fix-mon-fscmds branch September 7, 2023 12:52
@ljflores

ljflores commented Sep 7, 2023

Copy link
Copy Markdown
Member

Thanks @rishabh-d-dave !

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