]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add logging to NFSGanesha class
authorMichael Fritch <mfritch@suse.com>
Thu, 27 Feb 2020 14:48:58 +0000 (07:48 -0700)
committerMichael Fritch <mfritch@suse.com>
Wed, 25 Mar 2020 22:26:13 +0000 (16:26 -0600)
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/pybind/mgr/cephadm/nfs.py

index 75caf6caec3282f1853f3ad39b1612e29c51b78a..77d1b46a4a4665e7906b623abc204f7feeae9f94 100644 (file)
@@ -1,7 +1,11 @@
+import logging
+
 from typing import Dict, Optional
 
 import cephadm
 
+logger = logging.getLogger(__name__)
+
 class NFSGanesha(object):
     def __init__(self,
                  mgr,
@@ -40,6 +44,7 @@ class NFSGanesha(object):
 
     def create_keyring(self):
         # type: () -> str
+        logger.info('Create keyring for user: %s' % self.get_rados_user())
         ret, keyring, err = self.mgr.mon_command({
             'prefix': 'auth get',
             'entity': 'client.' + self.get_rados_user(),
@@ -49,6 +54,7 @@ class NFSGanesha(object):
     def create_rados_config_obj(self):
         # type: () -> None
         obj = self.get_rados_config_name()
+        logger.info('Create rados config object: %s' % obj)
         with self.mgr.rados.open_ioctx(self.pool) as ioctx:
             if self.namespace:
                 ioctx.set_namespace(self.namespace)
@@ -73,4 +79,5 @@ RADOS_URLS {{
         config['files'] = {
             'ganesha.conf' : self.get_ganesha_conf(),
         }
+        logger.debug('Generated cephadm config-json: %s' % config)
         return config