summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
Commit message (Collapse)AuthorAgeFilesLines
* volgen: reimplement volgenCsaba Henk2010-10-021-11/+5
| | | | | | | | | | | | | | | | | Generating a volfile occurs in two steps: - Build a graph (ie, glusterfs_graph_t instance) by graph manipulation primitives - Write out the graph to a file by the the graph printing API. Graph builder routines can optionally make use of a "modifier dict", which can contain overrides wrt. volume options. This can be used for a "dry-run" graph generation. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1750 (clean up volgen) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1750
* mgmt/glusterd: handle glusterfs crashes for start/stop of bricksPranith K2010-10-011-61/+66
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1741 (gluster volume stop after one process crashed.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1741
* Block add, remove and replace brick ops when rebalance is in progressshishir gowda2010-09-301-0/+6
| | | | | | | | | | Also fixing msg, changing defrag to rebalance Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* start the per brick process with 'glusterfsd' instead of 'glusterfs'Amar Tumballi2010-09-301-1/+1
| | | | | | | | | | | for users, it becomes easy to differenciate which process is exporting bricks, and which is used as a client process. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* mgmt/glusterd: remove debug messages in cleanup_and_exitPranith K2010-09-301-1/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1746 (volume delete fails after volume stop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1746
* mgmt/glusterd: resolve uuid if nullPranith K2010-09-291-0/+5
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1734 (replace brick should accept both ipaddress and hostname for bricks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1734
* mgmt/glusterd: set the error before starting checksPranith K2010-09-291-0/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1734 (replace brick should accept both ipaddress and hostname for bricks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1734
* mgmt/glusterd: volume start forcePranith K2010-09-291-35/+139
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1736 (implement volume start force) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1736
* mgmt/glusterd: brick info get should compare uuid instead of hostnamePranith K2010-09-281-3/+6
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1734 (replace brick should accept both ipaddress and hostname for bricks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1734
* mgmt/glusterd: prevent detach of peer with its bricks existing in clusterPranith K2010-09-281-18/+164
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1681 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1681
* mgmt/glusterd: delay probe till connection happensPranith K2010-09-271-10/+6
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1607 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1607
* check if the bricks provided are the same and are alredy being usedRaghavendra Bhat2010-09-241-3/+3
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1682 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1682
* mgmt/glusterd: add option to force kill gnfs processPranith Kumar K2010-09-241-17/+20
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1517 (gluster volume stop - starts a new nfs server.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1517
* Restart all bricks which are down when glusterd comes upshishir gowda2010-09-221-0/+109
| | | | | | | | | | This is only done is the volume is started. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1562 (insufficient consistency check on start of glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1562
* mgmt/glusterd: replace-brick validationsPranith Kumar K2010-09-221-0/+34
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1657 (validations for replace-brick while stage op) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1657
* cli, mgmt/glusterd: volume sync commandPranith Kumar K2010-09-201-23/+48
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1310 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1310
* Glusterd: gluster volume set <volume> <option> <value>Kaushik BV2010-09-181-0/+2
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159
* glusterd: refactor service terminationCsaba Henk2010-09-171-97/+62
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
* reorganize /etc/glusterd/logs, add nfs log tooCsaba Henk2010-09-171-3/+6
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1319 (gnfs support in gluster command line) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1319
* cli, mgmt/glusterd: disallow probe to a clusterPranith Kumar K2010-09-151-1/+26
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1594 (make probe oneway) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1594
* Volume stop/start fails sometimesshishir gowda2010-09-151-0/+5
| | | | | | | | | | If the pid file is not present, do not fail the volume stop. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1602 (Volume start/stop sometime fails.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1602
* mgmt/glusterd: free xdr allocationsPranith Kumar K2010-09-141-2/+4
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1186 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1186
* rpc: in rpc_clnt_destroy(), cleanup the transport tooAmar Tumballi2010-09-131-0/+1
| | | | | | | | | | | * if we don't cleanup the transport, it will trigger false events on the free'd transport which causes crash Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1423 (Crash in gf_timer_call_cancel) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1423
* free the tmp string allocated while getting brick informationv3.1.0qa20Raghavendra Bhat2010-09-091-3/+11
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1580 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1580
* mgmt/glusterd: Send volume-id during volume exchangev3.1.0qa19Vijay Bellur2010-09-081-0/+21
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1480 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1480
* mgmt/glusterd: retrieve version upon restartv3.1.0qa14Vijay Bellur2010-09-021-0/+3
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1265 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1265
* mgmt/glusterd: memory leak fixesPranith Kumar K2010-09-021-0/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1186 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1186
* update the volume information first before checksumRaghavendra Bhat2010-09-021-2/+5
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1504 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1504
* cli, mgmt/glusterd: Added replace brick cli responsePranith Kumar K2010-09-021-0/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1322 (Replace brick should show status of paused and abort states) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1322
* mgmt/glusterd: gnfs support in gluster command linePranith Kumar K2010-09-011-0/+189
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1319 (gnfs support in gluster command line) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1319
* mgmt/glusterd: memory leak fixesPranith Kumar K2010-08-311-3/+6
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1186 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1186
* 'gluster volume log' feature addedAmar Tumballi2010-08-311-8/+15
| | | | | | | | | * 'gluster volume log filename <VOLNAME> [BRICK] <path>' * 'gluster volume log locate <VOLNAME> [BRICK]' * 'gluster volume log rotate <VOLUME> [BRICK]' Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
* mgmt/glusterd: Update store on start/stop volumeVijay Bellur2010-08-301-1/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1480 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1480
* mgmt/glusterd: handle port allocation so ports are reused for same brickv3.1.0qa11Amar Tumballi2010-08-291-1/+3
| | | | | | | | | | | * if 'brickinfo->port' exists use it instead of pmap_registry_alloc(), hence a brick after stop/start starts on same port Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1473 (reuse the ports while starting 'glusterfsd') URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1473
* mgmt/glusterd: look for local hostname in is_local_addr()v3.1.0qa10Vijay Bellur2010-08-271-0/+10
| | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
* check for ENOENT after unlink system call in stop volume functionRaghavendra Bhat2010-08-271-1/+2
| | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
* rpc: server to client callback mechanismAmar Tumballi2010-08-271-1/+1
| | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
* mgmt/glusterd: fixes in volgen file pathsAmar Tumballi2010-08-271-6/+15
| | | | | | | | | * fixed argument to few xlator options generated by volgen * commented out many options which we want to be default * pid file and volume file name to contain export path info in them Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
* cli, mgmt/glusterd: validate brickPranith Kumar K2010-08-271-2/+7
| | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
* mgmt/glusterd: Use a C based volgen and support various xlator options.Pavan Sondur2010-08-261-1/+11
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1429 (Use a C based volgen) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1429
* glusterd: handle failure of 'getspec' in case of '-' in volume nameAmar Tumballi2010-08-261-2/+2
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1433 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1433
* glusterd: avoid cleaning up rpc during peer detachVijay Bellur2010-08-241-1/+0
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1423 (Crash in gf_timer_call_cancel) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1423
* glusterd: support for volume version and cksumv3.1.0qa8Vijay Bellur2010-08-231-0/+488
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1310 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1310
* gf_system: fork/exec instead of systemAmar Tumballi2010-08-211-1/+1
| | | | | | | | | | * most of the glusterd 'system()' are replaced with 'gf_system()' Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1292 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1292
* glusterd: prefix added to gluster commandsAmar Tumballi2010-08-211-2/+2
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1283 ([3.1.0qa3] gluster volume create and volume start fail on when glusterfs is installed on prefixed path) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1283
* portmapper program added to glusterfsd mgmt rpcAmar Tumballi2010-08-211-5/+9
| | | | | | | | | | | * some bug fixes glusterd-pmap.c * also renamed 'fetch-spec.c' -> 'glusterfsd-mgmt.c' Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1314 (portmapper functionality) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1314
* rpc - cleanup and changes related to rdmaRaghavendra G2010-08-181-1/+1
| | | | | | | | | | | | - remove rpc_conn_state structure. - add a member to point struct rpc_req in rpc_transport_req structure. This is needed for rdma to store rdma specific per request data. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* changed GNU General Public License to GNU Affero General Public LicensePranith Kumar K2010-08-171-3/+3
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1388 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1388
* mgmt/glusterd: cli: Various fixes for replace brick.Pavan Sondur2010-08-161-1/+3
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1304 (Free state info for replace brick) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1304
* mgmt/glusterd: Cleanup replace brick.Pavan Sondur2010-08-161-1/+14
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1303 (Cleanup replace-brick state info) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1303