]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge PR #41899 into master
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 19 Jun 2021 02:52:54 +0000 (19:52 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Sat, 19 Jun 2021 02:52:54 +0000 (19:52 -0700)
* refs/pull/41899/head:
mon/MDSMonitor: check fscid exists for legacy case

Reviewed-by: Ramana Raja <rraja@redhat.com>
1  2 
src/mon/MDSMonitor.cc

index 44cb21459d518c64f110db2f40ce1756f90949e7,07a790fc17907b5a7d4613531a16ff4f94030858..3c08979c63655ba8de58633fc41a086a782a0a37
@@@ -1775,8 -1766,17 +1766,17 @@@ void MDSMonitor::check_sub(Subscriptio
            return;
          }
        }
+       if (!fsmap.filesystem_exists(fscid)) {
+         // Client asked for a non-existent namespace, send them nothing
+         // TODO: something more graceful for when a client has a filesystem
+         // mounted, and the fileysstem is deleted.  Add a "shut down you fool"
+         // flag to MMDSMap?
+         dout(1) << "Client subscribed to non-existent namespace '" <<
+                 fscid << "'" << dendl;
+         return;
+       }
      }
 -    dout(10) << __func__ << ": is_mds=" << is_mds << ", fscid= " << fscid << dendl;
 +    dout(10) << __func__ << ": is_mds=" << is_mds << ", fscid=" << fscid << dendl;
  
      // Work out the effective latest epoch
      const MDSMap *mds_map = nullptr;