]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph_volume_client: fix log messages
authorRamana Raja <rraja@redhat.com>
Thu, 23 Jun 2016 11:25:30 +0000 (16:55 +0530)
committerRamana Raja <rraja@redhat.com>
Mon, 18 Jul 2016 11:08:32 +0000 (16:38 +0530)
Log the path of the volume during creation and deletion of volumes.

Signed-off-by: Ramana Raja <rraja@redhat.com>
src/pybind/ceph_volume_client.py

index 1a5b3dc21d4b569124cd50542eff69c52036bf69..6387c23849b7789e69e912d2f132adbc01a41b87 100644 (file)
@@ -582,8 +582,8 @@ class CephFSVolumeClient(object):
         :param data_isolated: If true, create a separate OSD pool for this volume
         :return:
         """
-        log.info("create_volume: {0}".format(volume_path))
         path = self._get_path(volume_path)
+        log.info("create_volume: {0}".format(path))
 
         self._mkdir_p(path)
 
@@ -627,7 +627,8 @@ class CephFSVolumeClient(object):
         :return:
         """
 
-        log.info("delete_volume: {0}".format(volume_path))
+        path = self._get_path(volume_path)
+        log.info("delete_volume: {0}".format(path))
 
         # Create the trash folder if it doesn't already exist
         trash = os.path.join(self.volume_prefix, "_deleting")
@@ -637,7 +638,6 @@ class CephFSVolumeClient(object):
         trashed_volume = os.path.join(trash, volume_path.volume_id)
 
         # Move the volume's data to the trash folder
-        path = self._get_path(volume_path)
         try:
             self.fs.stat(path)
         except cephfs.ObjectNotFound: