summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-mgmt.c
Commit message (Collapse)AuthorAgeFilesLines
* build: MacOSX Porting fixesHarshavardhana2014-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | git@forge.gluster.org:~schafdog/glusterfs-core/osx-glusterfs Working functionality on MacOSX - GlusterD (management daemon) - GlusterCLI (management cli) - GlusterFS FUSE (using OSXFUSE) - GlusterNFS (without NLM - issues with rpc.statd) Change-Id: I20193d3f8904388e47344e523b3787dbeab044ac BUG: 1089172 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Signed-off-by: Dennis Schafroth <dennis@schafroth.com> Tested-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Dennis Schafroth <dennis@schafroth.com> Reviewed-on: http://review.gluster.org/7503 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gfapi: glfs_set_volfile_server() now entertains multiple callsHarshavardhana2014-04-011-17/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | Previous API: glfs_set_volfile_server (..., const char *host, ...) - single call New API's: glfs_set_volfile_server (..., const char *host1, ...) glfs_set_volfile_server (..., const char *host2, ...) Multiple calls to this function with different volfile servers, port or transport-type would create a list of volfile servers which would be polled during `volfile_fetch_attempts()` glfs_unset_volfile_server (..., const char *host, ...) to remove a server from the list (this is provided for future usage) Change-Id: I313efbd3efbd0214e2a71465f33195788df406cc BUG: 986429 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7317 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* api: add glfs_get_volfileJeff Darcy2014-03-051-0/+4
| | | | | | | | | | | | | | | | | | From the API-header description: > Sometimes it's useful e.g. for scripts to see the volfile, so that > they can parse it and find subvolumes to do things like split-brain > resolution or custom layouts. The API here was specifically intended > to make access e.g. from Python as simple as possible. > > Note that the volume must be started (not necessarily mounted) for > this to work. Change-Id: If3f55ee9611cdf4b77aa53659f0af0d21957817d Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/7183 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* libgfapi: Add proper NULL checksJose A. Rivera2014-02-141-18/+30
| | | | | | | | | | | | | | | | | | Two spots check for NULL after the pointer in question has already been dereferenced. Checked for NULL (and set errno when needed) at appripriate spots, added a few NULL checks further up the stack, and some whitespace cleanup. BUG: 789278 CID: 1124800 CID: 1124805 Change-Id: I1dd4ad3f285cca36f4e3f739288f154ec120aebb Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-on: http://review.gluster.org/6908 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfsd, libgfapi: destroy the temporary graphs constructed for comparisonRaghavendra Bhat2013-10-031-157/+2
| | | | | | | | | | | | | | * The new and the oldgraphs which have been constructed whenever there is a volfile change (either reconfigure of the existing graph or creating a new graph) for comparison should be freed. Otherwise frequent graph changes will lead to huge memory leak Change-Id: I4faddb1aa9393b34cd2de6732e537a60f600026a BUG: 948178 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/5388 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfs, gfapi: fix symbol clashAnand Avati2013-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The callback structures in both protocol/client and glusterfsd, gfapi used the same name for the actor table - gluster_cbk_actors. CBKs are required only for the management connection, and the actors of protocol/client are NOP functions. This supposed-to-be NOP function dispatch tabble is actually ending up pointing to the actor table of glusterfsd or gfapi. These functions, even though set wrongly, are not even expected to be called through the protocol/client callback path. Glusterd however sends the FETCHSPEC (and other) notify callbacks to *all* connected clients unconditionally, and there is a small period of time when protocol/client is connected to glusterd for PORTMAP query. If the FETCHSPEC callback notify is issued in this window of time, we end up calling the wrong actor in the client side resulting in a crash. Change-Id: I605ff7df64c7faf4607369bbf275aedec28e1778 BUG: 1004091 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5767 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* api: Set errno before invoking glfs_init_done()Vijay Bellur2013-08-251-4/+11
| | | | | | | | | Change-Id: I3f4d3cfaf7078e126881111eb840d854b0b6466d BUG: 860212 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5704 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd,glusterfsd,libgfapi: Client op-versionKaushal M2013-02-061-1/+40
| | | | | | | | | | | | | | | This patch introduces op-version support for glusterfs clients. Now, a client sends its supported op-versions during the volfile fetch request and glusterd will return the volfile only if the client can support the current op-version of the cluster. Change-Id: Iab1f1f1706802962bcf27058657c44e8a344d2f6 BUG: 907311 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4247 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gfapi: let glfs_init() return on non-RPC errorsAnand Avati2012-08-021-0/+4
| | | | | | | | | Change-Id: Ic3a15044434926127b8de273b1033b8ad452290c BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3732 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* gfapi: unglobalize oldvol{file,len}Anand Avati2012-07-271-12/+31
| | | | | | | | | | | Multiple initialization of volumes works fine now. Change-Id: Ibc16957b39325817bc6f9ab90ebac9cefdafabf8 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3734 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* gfapi: API/library for accessing gluster volumesAnand Avati2012-07-181-0/+629
Change-Id: Ie4cbcf91b58218bebf23cf951c313aceeb29f311 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3664 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Bharata B Rao <bharata.rao@gmail.com>