<div dir="ltr">Hello!<div><br></div><div>I observe a weird behavior of glfs_init call. I&#39;m using it in the following way: </div><div><br></div><div><div>        fs = self._glfs_new(path)</div><div>        ret = self._glfs_set_volfile_server(fs, &quot;tcp&quot;,</div><div>                                            address, self.GLUSTER_DEFAULT_PORT)</div><div>        if ret == -1:</div><div>            err = ctypes.get_errno()</div><div>            raise IOError(</div><div>                &quot;glfs_set_volfile_server failed: %s&quot; % os.strerror(err))</div><div><br></div><div>        ret = self._glfs_init(fs)</div><div>        if ret == -1:</div><div>            err = ctypes.get_errno()</div><div>            raise IOError(</div><div>                &quot;glfs_init failed: %s&quot; % os.strerror(err))</div><div>        self.fs = fs</div></div><div><br></div><div><br></div><div>The code above is in Python and libgfapi is used via cpython using following definitions:</div><div><br></div><div><div>   # C function prototypes for using the library gfapi</div><div>    _lib = ctypes.CDLL(&quot;libgfapi.so.0&quot;, use_errno=True)</div><div><br></div><div>    _glfs_new = ctypes.CFUNCTYPE(</div><div>        ctypes.c_void_p, ctypes.c_char_p)((&#39;glfs_new&#39;, _lib))</div><div><br></div><div>    _glfs_set_volfile_server = ctypes.CFUNCTYPE(</div><div>        ctypes.c_int,</div><div>        ctypes.c_void_p,</div><div>        ctypes.c_char_p,</div><div>        ctypes.c_char_p,</div><div>        ctypes.c_int)((&#39;glfs_set_volfile_server&#39;, _lib))</div><div><br></div><div>    _glfs_init = ctypes.CFUNCTYPE(</div><div>        ctypes.c_int, ctypes.c_void_p)((&#39;glfs_init&#39;, _lib))</div></div><div><br></div><div>Address is &#39;<a href="http://brq-gluster01.rhev.lab.eng.brq.redhat.com">brq-gluster01.rhev.lab.eng.brq.redhat.com</a>&#39; and path is &#39;/testiso&#39;. Volume is up and running:</div><div><br></div><div><div>Status of volume: testiso</div><div>Gluster process                             TCP Port  RDMA Port  Online  Pid</div><div>------------------------------------------------------------------------------</div><div>Brick brq-gluster01.rhev.lab.eng.brq.redhat</div><div>.com:/data/testiso/brick1/brick             49152     0          Y       13641</div><div>Brick brq-gluster02.rhev.lab.eng.brq.redhat</div><div>.com:/data/testiso/brick1/brick             49152     0          Y       13519</div><div>Brick brq-gluster03.rhev.lab.eng.brq.redhat</div><div>.com:/data/testiso/brick1/brick             49152     0          Y       23145</div><div>Self-heal Daemon on localhost               N/A       N/A        Y       24975</div><div>Self-heal Daemon on brq-gluster02.rhev.lab.</div><div><a href="http://eng.brq.redhat.com">eng.brq.redhat.com</a>                          N/A       N/A        Y       23572</div><div>Self-heal Daemon on brq-gluster03.rhev.lab.</div><div><a href="http://eng.brq.redhat.com">eng.brq.redhat.com</a>                          N/A       N/A        Y       24603</div><div> </div><div>Task Status of Volume testiso</div><div>------------------------------------------------------------------------------</div><div>There are no active volume tasks</div></div><div><br></div><div><br></div><div>The problem is that glfs_init call fail with return value of &#39;-1&#39; and errno set to 0. There is nothing in logs on the gluster side. I also tried running it with strace, nothing suspicious - connection to glusterd is established successfully, there is some data transfer followed by load of several translators.</div><div><br></div><div>The questions is  - what can be wrong and how to debug it?</div><div><br></div><div>Gluster version is 3.12.1-2.el7 on both client and server side.</div></div>