DefaultNamespaceEnsurer makes sure that default namespace exists. If it fails, it silently retries. We do this because maybe dataset service isn't ready yet, and will be in another few minutes. This can lead to infinite retries in the following cases -
- CDAP does not have permissions to create default namespace
- CDAP is stopped soon after startup (before all services have started successfully)
The infinite retries do not let CDAP Master shutdown completely. This can lead to CDAP Master hanging when shutting down, or CDAP Master hanging when it becomes a follower on losing Zookeeper session.