Blame SOURCES/0019-MONITOR-Propagate-error-when-resolv.conf-does-not-ex.patch

464b57
From 6e82ba82e4f2ce1440588437ca9e23a1b159df09 Mon Sep 17 00:00:00 2001
464b57
From: Samuel Cabrero <scabrero@suse.de>
464b57
Date: Fri, 19 Jul 2019 12:19:53 +0200
464b57
Subject: [PATCH 19/21] MONITOR: Propagate error when resolv.conf does not
464b57
 exists in polling mode
464b57
MIME-Version: 1.0
464b57
Content-Type: text/plain; charset=UTF-8
464b57
Content-Transfer-Encoding: 8bit
464b57
464b57
Return ENOENT when resolv.conf is missing after falling back to polling
464b57
mode. This way missing_resolv_conf will schedule a timer to check again
464b57
after some seconds.
464b57
464b57
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
464b57
464b57
Reviewed-by: Sumit Bose <sbose@redhat.com>
464b57
(cherry picked from commit d20a7f9d5e56d1e9af273d97c7fd42fe8b2eda47)
464b57
464b57
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
464b57
---
464b57
 src/monitor/monitor.c | 10 +++-------
464b57
 1 file changed, 3 insertions(+), 7 deletions(-)
464b57
464b57
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
464b57
index 12250a15e..04e0017a2 100644
464b57
--- a/src/monitor/monitor.c
464b57
+++ b/src/monitor/monitor.c
464b57
@@ -1908,18 +1908,14 @@ static errno_t monitor_config_file_fallback(TALLOC_CTX *parent_ctx,
464b57
     if (ret < 0) {
464b57
         err = errno;
464b57
         if (err == ENOENT) {
464b57
-             DEBUG(SSSDBG_MINOR_FAILURE,
464b57
-                   "file [%s] is missing. Will not update online status "
464b57
-                   "based on watching the file\n", file);
464b57
-             return EOK;
464b57
-
464b57
+            DEBUG(SSSDBG_CRIT_FAILURE,
464b57
+                  "file [%s] is missing. Will try again later.\n", file);
464b57
         } else {
464b57
             DEBUG(SSSDBG_FATAL_FAILURE,
464b57
                   "Could not stat file [%s]. Error [%d:%s]\n",
464b57
                   file, err, strerror(err));
464b57
-
464b57
-            return err;
464b57
         }
464b57
+        return err;
464b57
     }
464b57
 
464b57
     file_ctx->poll_check.parent_ctx = parent_ctx;
464b57
-- 
464b57
2.21.1
464b57