]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson, monmap: inform about errors in MonMap::init_with_dns_srv(). 43448/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 7 Oct 2021 11:12:48 +0000 (11:12 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 7 Oct 2021 11:20:03 +0000 (11:20 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/mon/MonMap.cc

index 12dce76c32b50f37f81189e741d3f1bb235dfa30..44c863875e25e20b7eb27402abe43549a895d940 100644 (file)
@@ -38,6 +38,15 @@ using std::vector;
 using ceph::DNSResolver;
 using ceph::Formatter;
 
+#ifdef WITH_SEASTAR
+namespace {
+  seastar::logger& logger()
+  {
+    return crimson::get_logger(ceph_subsys_monc);
+  }
+}
+#endif
+
 void mon_info_t::encode(ceph::buffer::list& bl, uint64_t features) const
 {
   uint8_t v = 5;
@@ -778,9 +787,14 @@ seastar::future<> MonMap::init_with_dns_srv(bool for_mkfs, const std::string& na
                             record.priority,
                             record.weight,
                             false);
+      }).handle_exception_type([t=record.target](const std::system_error& e) {
+        logger().debug("{}: unable to resolve name for {}: {}",
+                       "init_with_dns_srv", t, e);
       });
     });
-  }).handle_exception_type([](const std::system_error& e) {
+  }).handle_exception_type([name](const std::system_error& e) {
+    logger().debug("{}: unable to get monitor info from DNS SRV with {}: {}",
+                 "init_with_dns_srv", name, e);
     // ignore DNS failures
     return seastar::make_ready_future<>();
   });