Skip to content

Fix output of command 'ceph osd tree --format=json'#96

Merged
liewegas merged 1 commit intoceph:masterfrom
concubidated:master
Mar 8, 2013
Merged

Fix output of command 'ceph osd tree --format=json'#96
liewegas merged 1 commit intoceph:masterfrom
concubidated:master

Conversation

@concubidated
Copy link
Contributor

Two values which were suppose to be part of the osd array were being printed after the osd section was closed which resulted in output like this,

{ "id": 19,
  "name": "osd.19",
  "exists": 1,
  "type": "osd",
  "type_id": 0,
  "status": "up",
  "reweight": "1.000000"},
"1.000000",
3,

New output now looks like this,

{ "id": 19,
  "name": "osd.19",
  "exists": 1,
  "type": "osd",
  "type_id": 0,
  "status": "up",
  "reweight": "1.000000",
  "crush_weight": "1.000000",
  "depth": 3},

Signed-off-by: Tyler Brekke <tyler.brekke@inktank.com>
liewegas added a commit that referenced this pull request Mar 8, 2013
Fix output of command 'ceph osd tree --format=json'

Reviewed-by: Sage Weil <sage@inktank.com>
@liewegas liewegas merged commit 2c40124 into ceph:master Mar 8, 2013
liewegas pushed a commit that referenced this pull request Dec 14, 2016
rgw.yaml: keep the client.0 key even if empty
tspmelo pushed a commit to tspmelo/ceph that referenced this pull request Feb 15, 2018
mgr/dashboard_v2: Highlight clickable datatable rows if mouse hovers over them
rzarzynski added a commit to rzarzynski/ceph that referenced this pull request Feb 12, 2020
Helgrind complains about:

  ```
  ==00:00:04:55.495 510301== Possible data race during read of size 8 at 0x1EF1B0B0 by thread ceph#96
  ==00:00:04:55.495 510301== Locks held: 3, at addresses 0xEE8D650 0xEE8D748 0x1FFEFFEE08
  ==00:00:04:55.495 510301==    at 0x107F5C5: ~unique_ptr (unique_ptr.h:273)
  ==00:00:04:55.495 510301==    by 0x107F5C5: ~AuthConnectionMeta (Auth.h:163)
  ==00:00:04:55.495 510301==    by 0x107F5C5: std::_Sp_counted_ptr<AuthConnectionMeta*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:377)
  ==00:00:04:55.495 510301==    by 0x10C19EE: _M_release (shared_ptr_base.h:155)
  ==00:00:04:55.495 510301==    by 0x10C19EE: _M_release (shared_ptr_base.h:148)
  ==00:00:04:55.495 510301==    by 0x10C19EE: ~__shared_count (shared_ptr_base.h:728)
  ==00:00:04:55.495 510301==    by 0x10C19EE: ~__shared_ptr (shared_ptr_base.h:1167)
  ==00:00:04:55.495 510301==    by 0x10C19EE: ~shared_ptr (shared_ptr.h:103)
  ==00:00:04:55.495 510301==    by 0x10C19EE: Protocol::~Protocol() (Protocol.cc:14)
  ==00:00:04:55.495 510301==    by 0x1081A5C: ProtocolV2::~ProtocolV2() (ProtocolV2.cc:100)
  ==00:00:04:55.495 510301==    by 0x105AA48: operator() (unique_ptr.h:81)
  ==00:00:04:55.495 510301==    by 0x105AA48: ~unique_ptr (unique_ptr.h:274)
  ==00:00:04:55.495 510301==    by 0x105AA48: AsyncConnection::~AsyncConnection() (AsyncConnection.cc:149)
  ==00:00:04:55.495 510301==    by 0x105ABAC: AsyncConnection::~AsyncConnection() (AsyncConnection.cc:154)
  ==00:00:04:55.495 510301==    by 0xD2BAA0: RefCountedObject::put() const (RefCountedObj.cc:27)
  ==00:00:04:55.495 510301==    by 0xEB1E58: intrusive_ptr_release (RefCountedObj.h:193)
  ==00:00:04:55.495 510301==    by 0xEB1E58: ~intrusive_ptr (intrusive_ptr.hpp:98)
  ==00:00:04:55.495 510301==    by 0xEB1E58: ~pair (stl_pair.h:208)
  ==00:00:04:55.495 510301==    by 0xEB1E58: destroy<std::pair<const entity_addrvec_t, boost::intrusive_ptr<AsyncConnection> > > (new_allocator.h:140)
  ==00:00:04:55.495 510301==    by 0xEB1E58: destroy<std::pair<const entity_addrvec_t, boost::intrusive_ptr<AsyncConnection> > > (alloc_traits.h:487)
  ==00:00:04:55.495 510301==    by 0xEB1E58: _M_deallocate_node (hashtable_policy.h:2100)
  ==00:00:04:55.495 510301==    by 0xEB1E58: _M_erase (hashtable.h:1909)
  ==00:00:04:55.495 510301==    by 0xEB1E58: std::_Hashtable<entity_addrvec_t, std::pair<entity_addrvec_t const, boost::intrusive_ptr<AsyncConnection> >, std::allocator<std::pair<entity_addrvec_t const, boost
  ::intrusive_ptr<AsyncConnection> > >, std::__detail::_Select1st, std::equal_to<entity_addrvec_t>, std::hash<entity_addrvec_t>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__
  detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::erase(std::__detail::_Node_const_iterator<std::pair<entity_addrvec_t const, boost::intrusive_ptr<AsyncConnection> >, fals
  e, true>) (hashtable.h:1884)
  ==00:00:04:55.495 510301==    by 0xEB24EA: erase (hashtable.h:762)
  ==00:00:04:55.495 510301==    by 0xEB24EA: erase (unordered_map.h:798)
  ==00:00:04:55.495 510301==    by 0xEB24EA: AsyncMessenger::_lookup_conn(entity_addrvec_t const&) (AsyncMessenger.h:312)
  ==00:00:04:55.495 510301==    by 0xEAA08A: AsyncMessenger::connect_to(int, entity_addrvec_t const&, bool, bool) (AsyncMessenger.cc:701)
  ==00:00:04:55.495 510301==    by 0xEF7477: connect_to_mon (Messenger.h:530)
  ==00:00:04:55.495 510301==    by 0xEF7477: MonClient::_add_conn(unsigned int, unsigned long) (MonClient.cc:716)
  ==00:00:04:55.495 510301==    by 0xEF7C30: MonClient::_add_conns(unsigned long) (MonClient.cc:779)
  ==00:00:04:55.495 510301==    by 0xEFDED6: MonClient::_reopen_session(int) (MonClient.cc:691)
  ==00:00:04:55.495 510301==    by 0xF025F2: MonClient::tick() (MonClient.cc:925)
  ==00:00:04:55.495 510301==    by 0x72A06C: Context::complete(int) (Context.h:77)
  ==00:00:04:55.495 510301==    by 0xD35276: SafeTimer::timer_thread() (Timer.cc:96)
  ==00:00:04:55.495 510301==    by 0xD36850: SafeTimerThread::entry() (Timer.cc:30)
  ==00:00:04:55.495 510301==    by 0xA7E1203: mythread_wrapper (hg_intercepts.c:389)
  ==00:00:04:55.495 510301==    by 0xC6182DD: start_thread (in /usr/lib64/libpthread-2.28.so)
  ==00:00:04:55.495 510301==    by 0xD8B34B2: clone (in /usr/lib64/libc-2.28.so)
  ==00:00:04:55.495 510301==  Address 0x1ef1b0b0 is 128 bytes inside a block of size 136 alloc'd
  ==00:00:04:55.495 510301==    at 0xA7DC0C3: operator new[](unsigned long) (vg_replace_malloc.c:433)
  ==00:00:04:55.495 510301==    by 0x1082094: ProtocolV2::reset_recv_state()::{lambda()#2}::operator()() const [clone .isra.916] (ProtocolV2.cc:240)
  ==00:00:04:55.495 510301==    by 0x108244B: EventCenter::C_submit_event<ProtocolV2::reset_recv_state()::{lambda()#2}>::do_request(unsigned long) (Event.h:228)
  ==00:00:04:55.495 510301==    by 0xEB7465: EventCenter::process_events(unsigned int, std::chrono::duration<unsigned long, std::ratio<1l, 1000000000l> >*) (Event.cc:433)
  ==00:00:04:55.495 510301==    by 0xEBC1BB: operator() (Stack.cc:53)
  ==00:00:04:55.495 510301==    by 0xEBC1BB: std::_Function_handler<void (), NetworkStack::add_thread(unsigned int)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (std_function.h:297)
  ==00:00:04:55.495 510301==    by 0xCF4AA32: ??? (in /usr/lib64/libstdc++.so.6.0.25)
  ==00:00:04:55.495 510301==    by 0xA7E1203: mythread_wrapper (hg_intercepts.c:389)
  ==00:00:04:55.495 510301==    by 0xC6182DD: start_thread (in /usr/lib64/libpthread-2.28.so)
  ==00:00:04:55.495 510301==    by 0xD8B34B2: clone (in /usr/lib64/libc-2.28.so)
  ==00:00:04:55.495 510301==  Block was alloc'd by thread ceph#3
  ```

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
rzarzynski added a commit to rzarzynski/ceph that referenced this pull request Feb 12, 2020
Helgrind complains about:

  ```
  ==00:00:04:55.495 510301== Possible data race during read of size 8 at 0x1EF1B0B0 by thread ceph#96
  ==00:00:04:55.495 510301== Locks held: 3, at addresses 0xEE8D650 0xEE8D748 0x1FFEFFEE08
  ==00:00:04:55.495 510301==    at 0x107F5C5: ~unique_ptr (unique_ptr.h:273)
  ==00:00:04:55.495 510301==    by 0x107F5C5: ~AuthConnectionMeta (Auth.h:163)
  ==00:00:04:55.495 510301==    by 0x107F5C5: std::_Sp_counted_ptr<AuthConnectionMeta*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:377)
  ==00:00:04:55.495 510301==    by 0x10C19EE: _M_release (shared_ptr_base.h:155)
  ==00:00:04:55.495 510301==    by 0x10C19EE: _M_release (shared_ptr_base.h:148)
  ==00:00:04:55.495 510301==    by 0x10C19EE: ~__shared_count (shared_ptr_base.h:728)
  ==00:00:04:55.495 510301==    by 0x10C19EE: ~__shared_ptr (shared_ptr_base.h:1167)
  ==00:00:04:55.495 510301==    by 0x10C19EE: ~shared_ptr (shared_ptr.h:103)
  ==00:00:04:55.495 510301==    by 0x10C19EE: Protocol::~Protocol() (Protocol.cc:14)
  ==00:00:04:55.495 510301==    by 0x1081A5C: ProtocolV2::~ProtocolV2() (ProtocolV2.cc:100)
  ==00:00:04:55.495 510301==    by 0x105AA48: operator() (unique_ptr.h:81)
  ==00:00:04:55.495 510301==    by 0x105AA48: ~unique_ptr (unique_ptr.h:274)
  ==00:00:04:55.495 510301==    by 0x105AA48: AsyncConnection::~AsyncConnection() (AsyncConnection.cc:149)
  ==00:00:04:55.495 510301==    by 0x105ABAC: AsyncConnection::~AsyncConnection() (AsyncConnection.cc:154)
  ==00:00:04:55.495 510301==    by 0xD2BAA0: RefCountedObject::put() const (RefCountedObj.cc:27)
  ==00:00:04:55.495 510301==    by 0xEB1E58: intrusive_ptr_release (RefCountedObj.h:193)
  ==00:00:04:55.495 510301==    by 0xEB1E58: ~intrusive_ptr (intrusive_ptr.hpp:98)
  ==00:00:04:55.495 510301==    by 0xEB1E58: ~pair (stl_pair.h:208)
  ==00:00:04:55.495 510301==    by 0xEB1E58: destroy<std::pair<const entity_addrvec_t, boost::intrusive_ptr<AsyncConnection> > > (new_allocator.h:140)
  ==00:00:04:55.495 510301==    by 0xEB1E58: destroy<std::pair<const entity_addrvec_t, boost::intrusive_ptr<AsyncConnection> > > (alloc_traits.h:487)
  ==00:00:04:55.495 510301==    by 0xEB1E58: _M_deallocate_node (hashtable_policy.h:2100)
  ==00:00:04:55.495 510301==    by 0xEB1E58: _M_erase (hashtable.h:1909)
  ==00:00:04:55.495 510301==    by 0xEB1E58: std::_Hashtable<entity_addrvec_t, std::pair<entity_addrvec_t const, boost::intrusive_ptr<AsyncConnection> >, std::allocator<std::pair<entity_addrvec_t const, boost
  ::intrusive_ptr<AsyncConnection> > >, std::__detail::_Select1st, std::equal_to<entity_addrvec_t>, std::hash<entity_addrvec_t>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__
  detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::erase(std::__detail::_Node_const_iterator<std::pair<entity_addrvec_t const, boost::intrusive_ptr<AsyncConnection> >, fals
  e, true>) (hashtable.h:1884)
  ==00:00:04:55.495 510301==    by 0xEB24EA: erase (hashtable.h:762)
  ==00:00:04:55.495 510301==    by 0xEB24EA: erase (unordered_map.h:798)
  ==00:00:04:55.495 510301==    by 0xEB24EA: AsyncMessenger::_lookup_conn(entity_addrvec_t const&) (AsyncMessenger.h:312)
  ==00:00:04:55.495 510301==    by 0xEAA08A: AsyncMessenger::connect_to(int, entity_addrvec_t const&, bool, bool) (AsyncMessenger.cc:701)
  ==00:00:04:55.495 510301==    by 0xEF7477: connect_to_mon (Messenger.h:530)
  ==00:00:04:55.495 510301==    by 0xEF7477: MonClient::_add_conn(unsigned int, unsigned long) (MonClient.cc:716)
  ==00:00:04:55.495 510301==    by 0xEF7C30: MonClient::_add_conns(unsigned long) (MonClient.cc:779)
  ==00:00:04:55.495 510301==    by 0xEFDED6: MonClient::_reopen_session(int) (MonClient.cc:691)
  ==00:00:04:55.495 510301==    by 0xF025F2: MonClient::tick() (MonClient.cc:925)
  ==00:00:04:55.495 510301==    by 0x72A06C: Context::complete(int) (Context.h:77)
  ==00:00:04:55.495 510301==    by 0xD35276: SafeTimer::timer_thread() (Timer.cc:96)
  ==00:00:04:55.495 510301==    by 0xD36850: SafeTimerThread::entry() (Timer.cc:30)
  ==00:00:04:55.495 510301==    by 0xA7E1203: mythread_wrapper (hg_intercepts.c:389)
  ==00:00:04:55.495 510301==    by 0xC6182DD: start_thread (in /usr/lib64/libpthread-2.28.so)
  ==00:00:04:55.495 510301==    by 0xD8B34B2: clone (in /usr/lib64/libc-2.28.so)
  ==00:00:04:55.495 510301==  Address 0x1ef1b0b0 is 128 bytes inside a block of size 136 alloc'd
  ==00:00:04:55.495 510301==    at 0xA7DC0C3: operator new[](unsigned long) (vg_replace_malloc.c:433)
  ==00:00:04:55.495 510301==    by 0x1082094: ProtocolV2::reset_recv_state()::{lambda()#2}::operator()() const [clone .isra.916] (ProtocolV2.cc:240)
  ==00:00:04:55.495 510301==    by 0x108244B: EventCenter::C_submit_event<ProtocolV2::reset_recv_state()::{lambda()#2}>::do_request(unsigned long) (Event.h:228)
  ==00:00:04:55.495 510301==    by 0xEB7465: EventCenter::process_events(unsigned int, std::chrono::duration<unsigned long, std::ratio<1l, 1000000000l> >*) (Event.cc:433)
  ==00:00:04:55.495 510301==    by 0xEBC1BB: operator() (Stack.cc:53)
  ==00:00:04:55.495 510301==    by 0xEBC1BB: std::_Function_handler<void (), NetworkStack::add_thread(unsigned int)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (std_function.h:297)
  ==00:00:04:55.495 510301==    by 0xCF4AA32: ??? (in /usr/lib64/libstdc++.so.6.0.25)
  ==00:00:04:55.495 510301==    by 0xA7E1203: mythread_wrapper (hg_intercepts.c:389)
  ==00:00:04:55.495 510301==    by 0xC6182DD: start_thread (in /usr/lib64/libpthread-2.28.so)
  ==00:00:04:55.495 510301==    by 0xD8B34B2: clone (in /usr/lib64/libc-2.28.so)
  ==00:00:04:55.495 510301==  Block was alloc'd by thread ceph#3
  ```

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
liewegas pushed a commit to liewegas/ceph that referenced this pull request Nov 5, 2021
News publications layout, richtext CSS updates.
tobias-urdin pushed a commit to tobias-urdin/ceph that referenced this pull request Aug 2, 2023
Test copy if-match and if-none-match
Moisi pushed a commit to Moisi/ceph that referenced this pull request Jun 30, 2025
…NoSuchUpload

Merge in STORAGEENG/ceph from CEPH-111-multipart-NoSuchUpload to aka_version_18.2.1

* commit '4528f8a12aa3e2637aedef230cc63dc056b1ed16':
  Change error for multipart uploads to NoSuchUplaod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants