summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
Commit message (Collapse)AuthorAgeFilesLines
* mgmt/glusterd: send the duplicate brick info to the cliRaghavendra Bhat2011-10-171-0/+2
| | | | | | | | | | | | suppose one gives create volume from a peer whose bricks are hostname:/a/b hostname:/a/b/c, then send that error information to the cli. Change-Id: Ic2149647f753fcf9218e468f13c52d0fc013a5d3 BUG: 2803 Reviewed-on: http://review.gluster.com/582 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: replace-brick status was not 'shared' with peer.Krishnan Parthasarathi2011-08-201-12/+87
| | | | | | | | Change-Id: Ia2d89fd919b077232a37debc2aebe1bc72150856 BUG: 3432 Reviewed-on: http://review.gluster.com/264 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: fix for volume stop causing inconsistent volume statusKaushal M2011-08-171-1/+4
| | | | | | | | | | | | | This fixes problem caused by race between glusterd and glusterfsd occuring when they try to unlink pidfile during volume stop, which led to the volume being stopped, but the status of the volume remained in started state. Change-Id: Ibf88b61dc66be4ddff9050a0359636675de558a2 BUG: 3147 Reviewed-on: http://review.gluster.com/246 Reviewed-by: Vijay Bellur <vijay@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Change Copyright current yearPranith Kumar K2011-08-101-1/+1
| | | | | | | | Change-Id: Id1f1a91cf15d933d5621a0073ddaebe02df0f159 BUG: 3348 Reviewed-on: http://review.gluster.com/198 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* LICENSE: s/GNU Affero General Public/GNU General Public/Pranith Kumar K2011-08-061-3/+3
| | | | | | | | Change-Id: Ibf5f45431d7a55b70d7304649af652d6f25bb688 BUG: 3348 Reviewed-on: http://review.gluster.com/183 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterd rebalance: handle a race condition while starting a rebalanceAmar Tumballi2011-08-031-2/+1
| | | | | | | | | | | | | due to the race, there was a possibility of having two (or more) threads doing glusterd_defrag_start(), which would cause different thread to access same pointer, and at some point making it NULL, causing other threads to crash with SEGV. Change-Id: Id05b99dd6f33329027b8a07f1c8da5a65fd6dae9 BUG: 3295 Reviewed-on: http://review.gluster.com/139 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* mgmt/glusterd: Ignore case in friend find by hostnamePranith Kumar K2011-08-031-4/+4
| | | | | | | | Change-Id: Id24627b5a59ef21a799b6a4da8cd063966cad3b9 BUG: 3309 Reviewed-on: http://review.gluster.com/146 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* fix multiple transport related portmap issues in client handshakeAmar Tumballi2011-06-081-6/+23
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2294 (Currently there is no way through cli to make a volume listen on both the transports (socket/rdma)) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2294
* glusterd: add upgrade/downgrade xlator optionsshishir gowda2011-05-311-0/+64
| | | | | | | | | | | | | If started with upgrade-option, the current behavior is to recreate brick volfiles, as from 3.2 marker xlator is default. downgrade option is not functionally supported. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2904 (glusterd should have upgrade/downgrade xlator options) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2904
* mgmt/glusterd: Start nfs after all bricks are started on glusterd re-startPranith Kumar K2011-05-311-1/+4
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2941 (glusterd breaks when starting ~100 volumes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2941
* mgmt/glusterd: Fix ret value in importing of options/gsync slavesPranith Kumar K2011-04-221-1/+1
| | | | | | | | | | | In case the volume options or gsync slaves are absent the import should succeed. Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2832 (peer probe hangs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2832
* do not allow create volume or add-brick if given path or any brick is a part ↵Raghavendra Bhat2011-04-211-0/+30
| | | | | | | | | | of either Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2803 ([glusterfs-3.2.0qa14]: volume create succeeds even though there is a volume with an export directory in the path of current volume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2803
* glusterd / geo-rep: do all gsyncd pre-configuration in glusterd initCsaba Henk2011-04-191-117/+28
| | | | | | | | | | | | | | | | | | | This is made possible by gsyncd config templating, by which session specific settings can be expressed in a generic form. Benefits: - in glusterd we use only generic (rx pattern based) config settings so we don't violate users' freedom to make settigs for their sessions - don't have to invoke gsyncd in excess to prepare a session - we can pre-configure slave side too (relying on the templates and gsyncd service auto-discovery) - much leaner, much more expressive code Signed-off-by: Csaba Henk <csaba@lowlife.hu> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2785 (gsyncd logs on slave side go to /dev/null) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
* mgmt/glusterd: Fix compiler warningPranith Kumar K2011-04-191-1/+0
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2797 ([glusterfs-3.2.0qa13]: peer probe fails with gsync running) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2797
* mgmt/glusterd: Send the gsync sessions that are running to the new peer.Kaushik BV2011-04-191-39/+96
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2797 ([glusterfs-3.2.0qa13]: peer probe fails with gsync running) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2797
* cli: UI cleanup for geo-replication commandv3.2.0qa14Kaushik BV2011-04-171-21/+29
| | | | | | | | | | | | | * provide a unified output in case of failure of geo-replication session * provide a better formatting of the output geo-replication status command * update the help option of geo-replication command * fix few typos Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2536 (gsync service introspection) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536
* mgmt/glusterd : change of syntax of geo-replication commandKaushik BV2011-04-171-18/+26
| | | | | | | | | | | | | | | | | | master is referred as a volume name rather than a URL scheme. old syntax: > volume geo-replication start :vol-foo /bar/boo new syntax: > volume geo-replication start vol-foo /bar/boo Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2786 (Having to prepend geo-replication master vol with colon spoils the UI) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2786
* mgmt/glusterd: Send the error msg to user if gsync start failsPranith Kumar K2011-04-161-20/+26
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2781 (geo-replication start error message) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2781
* mgmt/glusterd: Memory leak and message cleanupPranith Kumar K2011-04-151-1/+4
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2764 (Cleanup memory leaks seen in quota and gsync code paths) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2764
* mgmt/glusterd: restart gsyncd on glusterd restartPranith Kumar K2011-04-141-1/+195
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2761 (Restart gsyncd processes on glusterd restart) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2761
* mgmt/glusterd: Implementation of volume gsync status [master [slave]]Kaushik BV2011-04-141-0/+8
| | | | | | | | | | | | | | Changes made in the path of gsync start/stop as well, where we maintain a list of active gsync sessions, hence gsync stop could be executed at all nodes. A new dict in glusterd_volinfo_t added to maintain an active list of gsync slaves running on each master. Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2536 (gsync service introspection) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536
* glusterd: Respond to cli with empty iobref is serialize fails.shishir gowda2011-04-141-4/+4
| | | | | | | | | | | This usually happens if the size exceeds 128k. Earlier the cli used to hang if the response exceeded 128k size. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2725 (volume top displays "error" for path max) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2725
* mgmt/glusterd: Remove excessive INFO logsPranith Kumar K2011-04-131-3/+6
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
* build fixesVenky Shankar2011-04-111-2/+6
| | | | | | | | Signed-off-by: Venky Shankar <venky@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2550 (build warnings) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2550
* removed reference to GF_LOG_NORMALAmar Tumballi2011-04-071-14/+14
| | | | | | | | | | instead used GF_LOG_INFO, which is more standard log level. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2669 (RuntimeError: cannot recognize log level "normal") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2669
* mgmt/glusterd: Mark the brick stopped when kill -SIGTERM is donePranith Kumar K2011-03-311-0/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2621 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2621
* mgmt/glusterd: Fix import friend volumesPranith K2011-03-251-115/+431
| | | | | | | | | | | | | - Sync transport type of the volume - Stop stale bricks - start new bricks if the volume is started - Restart/Stop nfs server based on the new information Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2549 (Quota[glusterfs-3.2.1qa3]: enable/disable crashes the glusterd on other node) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2549
* mgmt/glusterd: Dont reset the port on brick stopPranith K2011-03-201-1/+0
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2564 (replace brick fails on master) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2564
* mgmt/glusterd: remodel glusterd storePranith K2011-03-141-16/+22
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1754 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1754
* mgmt/glusterd: gluster profile implementationPranith K2011-03-101-14/+143
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1965 (need a cmd to get io-stat details) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1965
* gluster rebalance: give option to split the commandAmar Tumballi2011-03-011-2/+2
| | | | | | | | | | | | | | | | | the 'gluster volume rebalance <VOLNAME> start' is enhanced with two more options: * 'gluster volume rebalance <VOLNAME> fix-layout start' (for fixing layout only) * 'gluster volume rebalance <VOLNAME> migrate-data start' (for migrating data only) Also the old way of running rebalance in one shot will still work fine * 'gluster volume rebalance <VOLNAME> start' Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2258 (enhance gluster volume rebalance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
* CLI : NFS persistent local/global options.Gaurav2011-03-011-0/+1
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2064 (NFS options are removed upon glusterd restart) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2064
* mgmt/glusterd: prevent spurious cmd unlocksPranith K2011-02-281-24/+0
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2460 ([glusterfs-3.2.0-gsync1]: gluserd crashed trying to access freed request) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2460
* Typo fixes in log and cli messages.Sachidananda2011-02-171-1/+1
| | | | | | | | Signed-off-by: Sachidananda Urs <sac@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2321 (Typo in logs and cli messages) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2321
* Logging : Use of uuid_utoa and uuid_utoa_r.Gaurav2011-02-041-11/+7
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2308 (Threadsafe uuid to string conversion function) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2308
* glusterd: de-register nfs rpcs when it is stoppedPranith K2011-01-241-1/+31
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1783 (kill glusterd and stop the cluster and start again - check nfs process) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1783
* logging: fix format warningsAmar Tumballi2011-01-061-1/+1
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2211 ((re)introduce warnings for format string/parameter mismatch) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2211
* mgmt/glusterd: Use a static buffer to perform ioctl with SIOCGIFCONFVijay Bellur2010-12-071-10/+14
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2163 (Can't create volume using 3.1.1qa11 on OpenSolaris 2009.6) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2163
* Remove symlnk of default log dir to /etc/glusterdshishir gowda2010-11-151-3/+3
| | | | | | | | | | Hence forth the default log dir will be /usr/local/var/log/glusterfs Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2109 (Remove symbolic link of log directory from /etc/glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2109
* mgmt/glusterd: "peer probe new-hostname" should replace old-hostname of friendPranith K2010-11-131-35/+12
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1995 (Gluster Peer probe command keeps ip address instead of server name in the destination server) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1995
* check if the brick being added is the destination brick of replace brickRaghavendra Bhat2010-11-091-2/+39
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2033 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2033
* mgmt/glusterd: Honor log filename set during add-brickVijay Bellur2010-10-301-1/+7
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2042 (No volume log files found in the specified directory for the newly added bricks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2042
* cli,mgmt/glusterd: fsm log implementationPranith K2010-10-291-38/+258
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1966 (Unnecessarily verbose logs at the default log level) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1966
* mgmt/glusterd: glusterd_is_local_addr implementationPranith K2010-10-271-64/+73
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1855 (Initial server in a cluster not a friend) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1855
* mgmt/glusterd: resolve the bricks before comparing uuidPranith K2010-10-241-1/+11
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1985 (peer detach fails if bricks are not resolved) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1985
* Solaris build: Remove sigtimewaitdshishir gowda2010-10-211-13/+0
| | | | | | | | | | | This part of code was stale as a result of fixes for volume start force changes. Removing the unwanted code Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1990 (Gluster mainline build on solaris fails with errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1990
* mgmt/glusterd: create brick path if does not existPranith K2010-10-121-0/+36
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@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
* Copyright changesVijay Bellur2010-10-111-1/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@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
* rpc-clnt: do rpc_transport_destroy() in rpc_clnt_destroy()Amar Tumballi2010-10-081-1/+1
| | | | | | | | | | handles the case of peer detach properly Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@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
* mgmt/glusterd: Fix replace brick to pass src-brick and dst-brick port nos ↵v3.1.0qa42Pavan Sondur2010-10-081-0/+50
| | | | | | | | | | | | properly. Fix also contains patch from shishir ng for maintaining replace-brick states in glusterd. Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235