]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-fuse: exit with failure on failed mount
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 12 Apr 2018 17:14:18 +0000 (10:14 -0700)
committerPrashant D <pdhange@redhat.com>
Thu, 31 May 2018 09:37:44 +0000 (05:37 -0400)
Fixes: https://tracker.ceph.com/issues/23665
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 7740fcde942603750029322ad2c16c18a7b546ab)

Conflicts:
src/ceph_fuse.cc : Resolved in main

src/ceph_fuse.cc

index 851425af097017b6d7d475bef3e53bf76fe1bdf1..f37130a52c5eb78d37f804f2bd6d70112987cea4 100644 (file)
@@ -254,9 +254,11 @@ int main(int argc, const char **argv, const char *envp[]) {
     r = client->mount(g_conf->client_mountpoint.c_str(), perms,
                      g_ceph_context->_conf->fuse_require_active_mds);
     if (r < 0) {
-      if (r == CEPH_FUSE_NO_MDS_UP)
+      if (r == CEPH_FUSE_NO_MDS_UP) {
         cerr << "ceph-fuse[" << getpid() << "]: probably no MDS server is up?" << std::endl;
-      cerr << "ceph-fuse[" << getpid() << "]: ceph mount failed with " << cpp_strerror(-r) << std::endl;
+      }
+      cerr << "ceph-fuse[" << getpid() << "]: ceph mount failed with " << cpp_strerror(-r) << std::endl;r = EXIT_FAILURE;
+      r = EXIT_FAILURE;
       goto out_shutdown;
     }