void OSD::_collect_metadata(map<string,string> *pm)
{
  // config info
  (*pm)["osd_data"] = dev_path;
  if (store->get_type() == "filestore") {
    // not applicable for bluestore
    (*pm)["osd_journal"] = journal_path;
  }
  (*pm)["front_addr"] = stringify(client_messenger->get_myaddr());
  (*pm)["back_addr"] = stringify(cluster_messenger->get_myaddr());
  (*pm)["hb_front_addr"] = stringify(hb_front_server_messenger->get_myaddr());
  (*pm)["hb_back_addr"] = stringify(hb_back_server_messenger->get_myaddr());

  // backend
  (*pm)["osd_objectstore"] = store->get_type();
  (*pm)["rotational"] = store_is_rotational ? "1" : "0";
  (*pm)["journal_rotational"] = journal_is_rotational ? "1" : "0";
  (*pm)["default_device_class"] = store->get_default_device_class();
  store->collect_metadata(pm);

  collect_sys_info(pm, cct);

  std::string front_iface, back_iface;
  /*
  pick_iface(cct,
      CEPH_PICK_ADDRESS_PUBLIC | CEPH_PICK_ADDRESS_CLUSTER,
      &front_iface, &back_iface);
      */
  (*pm)["front_iface"] = pick_iface(cct,
      client_messenger->get_myaddr().get_sockaddr_storage());
  (*pm)["back_iface"] = pick_iface(cct,
      cluster_messenger->get_myaddr().get_sockaddr_storage());

  dout(10) << __func__ << " " << *pm << dendl;
}
void OSD::_collect_metadata(map<string,string> *pm)
{
   
  (*pm)["osd_data"] = dev_path;
  if (store->get_type() == "filestore") {
     
    (*pm)["osd_journal"] = journal_path;
  }
  (*pm)["front_addr"] = stringify(client_messenger->get_myaddr());
  (*pm)["back_addr"] = stringify(cluster_messenger->get_myaddr());
  (*pm)["hb_front_addr"] = stringify(hb_front_server_messenger->get_myaddr());
  (*pm)["hb_back_addr"] = stringify(hb_back_server_messenger->get_myaddr());

   
  (*pm)["osd_objectstore"] = store->get_type();
  (*pm)["rotational"] = store_is_rotational ? "1" : "0";
  (*pm)["journal_rotational"] = journal_is_rotational ? "1" : "0";
  (*pm)["default_device_class"] = store->get_default_device_class();
  store->collect_metadata(pm);

  collect_sys_info(pm, cct);

  std::string front_iface, back_iface;
   
  (*pm)["front_iface"] = pick_iface(cct,
      client_messenger->get_myaddr().get_sockaddr_storage());
  (*pm)["back_iface"] = pick_iface(cct,
      cluster_messenger->get_myaddr().get_sockaddr_storage());

  dout(10) << __func__ << " " << *pm << dendl;
}