]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: fix librbdpy example 20019/head
authorYuan Zhou <yuan.zhou@intel.com>
Fri, 19 Jan 2018 02:41:03 +0000 (10:41 +0800)
committerYuan Zhou <yuan.zhou@intel.com>
Fri, 19 Jan 2018 02:41:03 +0000 (10:41 +0800)
need to connect cluster before opening ioctx

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
doc/rbd/api/librbdpy.rst

index fa903312557fea5bc2c0e93fca757fdcb16fa71e..981235f87d7545a33feccc927fc96329116f91ec 100644 (file)
@@ -45,6 +45,7 @@ block::
 
     cluster = rados.Rados(conffile='my_ceph_conf')
     try:
+        cluster.connect()
         ioctx = cluster.open_ioctx('my_pool')
         try:
             rbd_inst = rbd.RBD()