summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
Commit message (Collapse)AuthorAgeFilesLines
* cli: UI cleanup for geo-replication commandv3.2.0qa14Kaushik BV2011-04-171-1/+3
| | | | | | | | | | | | | * 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-210/+67
| | | | | | | | | | | | | | | | | | 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: unify the geo-replication status rpc messages.Kaushik BV2011-04-171-39/+10
| | | | | | | | | | | the intelligence of determining the type of status command is now at glusterd, rather then explicitly setting it while parsing at cli. 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: some cleanups needed for 70adbe7b [refactor gsync_status() ...]Csaba Henk2011-04-171-14/+16
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2780 (geo-replication operations take too much time to complete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2780
* glusterd: refactor gsync_status() so that we can get at the pidfileCsaba Henk2011-04-161-46/+47
| | | | | | | | | | | This is useful for iterated polling of gsyncd's status, without having to incoke gsyncd to find out about the pidfile. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2780 (geo-replication operations take too much time to complete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2780
* mgmt/glusterd: Send the error msg to user if gsync start failsPranith Kumar K2011-04-161-1/+1
| | | | | | | | 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: does not allow disabling of indexing (xtime marking), if a ↵Kaushik BV2011-04-151-3/+1
| | | | | | | | | | gsync session is active. Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2559 (provide two options in CLI for gluster volume gsync indexing <volname> <enable|disable>) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2559
* mgmt/glusterd: handle error condition in quota fs crawlPranith Kumar K2011-04-151-1/+7
| | | | | | | | | | | | Quota enable starts a crawl on the maintenance mount point, but if the chdir to the mount point fails it will start the crawl on '/'. So the child should exit with EXIT_FAILURE when the chdir fails. Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2770 (Handle error cases in quota fs crawl) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2770
* mgmt/glusterd: fix double free.v3.2.0qa13Raghavendra G2011-04-151-3/+11
| | | | | | | | | | | | | - the limit-usage string should be stored as static, since remove-limits will be modifying it and probably freeing it. - this static string should also be explicitly freed in glusterd_quota_disable since dict_del won't free it. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2776 (gluster quota remove crashed glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2776
* mgmt/glusterd: Memory leak and message cleanupPranith Kumar K2011-04-151-19/+15
| | | | | | | | 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
* use "geo-replication" all over as the official name of this featureCsaba Henk2011-04-151-33/+31
| | | | | | | | | | Use GEOREP macro if you want to refer to the feature in code. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2757 (refactory gsync/gsyncd/syncdaemon/whatever to geo-replication) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2757
* glusterd/volgen: refactor some thingsCsaba Henk2011-04-151-38/+22
| | | | | | | | | | | | | | | | - use macros for exported volume tunables - introduce glusterd_volinfo_get_boolean as retrieval of boolean optuions was a recurring pattern and became somewhat cumbersome Also fixed illegal access to volinfo dict. @pranith: use always the glusterd_volinfo_get* API for that purpose so that defaults are taken to consideration. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2757 (refactory gsync/gsyncd/syncdaemon/whatever to geo-replication) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2757
* mgmt/glusterd: restart gsyncd on glusterd restartPranith Kumar K2011-04-141-2/+5
| | | | | | | | 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: fail the volume stop opeeration if Gsync sessions are active.Kaushik BV2011-04-141-0/+36
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2751 (Volme stop must not be proceeded if gsync sessions are active for the volume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2751
* mgmt/glusterd: Implementation of volume gsync status [master [slave]]Kaushik BV2011-04-141-156/+918
| | | | | | | | | | | | | | 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
* mgmt/glusterd: check for 'peerinfo->mgmt' before accessing itAmar Tumballi2011-04-141-4/+4
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2728 ([glusterfs-3.2.0qa11]: glusterd crashed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2728
* glusterd: report the user if disable quota is given on already disabled quotaRaghavendra Bhat2011-04-131-0/+6
| | | | | | | | Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2620 (CLI improvements in quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2620
* cli: join value arguments of "gsync config-set" with spacesKaushik BV2011-04-131-1/+1
| | | | | | | | | | | | | When a given gsync tunable is supposed to hold a command (which can take options), it's quite possible that it spaces in its value. Try to approximate this situation by joining the leftover arguments. Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2713 ([glusterfs-3.2.0qa10]: config-set works only for one value) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2713
* glusterd: sanitize gsyncd config option validationCsaba Henk2011-04-131-22/+37
| | | | | | | | | | | | | - rely on --config-check functionality of gsyncd to find out if option exists - maintain a list of those options with which we don't want the user to fiddle with (glusterd internals imply these so it' just the proper component for it) - fail if user does a set/del on these Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2659 (gsync config-del option is not working properly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2659
* mgmt/glusterd: volume reset force implementationPranith Kumar K2011-04-131-10/+24
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2729 (Implement force option for volume reset) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2729
* temporary workaround for mtab update race thingyCsaba Henk2011-04-121-0/+1
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2690 (race between mtab updates of mount and umount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2690
* mgmt/glusterd: Mount a maintainance client only on the glusterd which ↵Junaid2011-04-121-2/+2
| | | | | | | | | | received quota enable through cli. Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
* mgmt/glusterd: Fix warning in glusterd buildPranith Kumar K2011-04-111-0/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2718 (Fix warning in glusterd build) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2718
* mgmt/glusterd: Quota client lazy umount.v3.2.0qa11Junaid2011-04-111-32/+77
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2560 (Lazy umount should be done for the maintainance mode mountpoint) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2560
* mgmt/Glusterd: Do not disable marker on gsync stop.Kaushik BV2011-04-111-30/+30
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2559 (provide two options in CLI for gluster volume gsync indexing <volname> <enable|disable>) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2559
* mgmt/glusterd: Fix op_ctx issue with replace brickv3.2.0qa10Pranith Kumar K2011-04-081-8/+46
| | | | | | | | | | | | | | Replace brick recognizes command originator by the presence of op_ctx. Brick op uses the op_ctx to collect the brick response on all the machines in cluster. This patch satisfies both these assumptions to make glusterd functional in replace-brick. This is a hack for 3.2.0. Need to Fix the assumptions in later release. Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2691 ([glusterfs-3.2.0qa9]: glusterd error) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2691
* mgmt/glusterd: Quota cli message improvements.Junaid2011-04-081-10/+17
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2620 (CLI improvements in quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2620
* removed reference to GF_LOG_NORMALAmar Tumballi2011-04-071-10/+10
| | | | | | | | | | 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: Fix gluster-profile performance issuesPranith Kumar K2011-04-071-3/+3
| | | | | | | | | | | Add count-fop-hits option to io-stats use count-fop-hits instead of dump-fd-stats for profile Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2636 ("profile info" lists 'nan' in latency when heavy i/o is running) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2636
* mgmt/glusterd: Reset context upon operation completionVijay Bellur2011-04-071-12/+33
| | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2650 (replace brick failed in distributed-replicated setup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2650
* change occurrences of marker_gsync to marker-gsyncVijay Bellur2011-04-061-2/+2
| | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
* syncdaemon: add monitor mode to support autorestartCsaba Henk2011-04-041-3/+15
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2537 (gsync autorestart) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2537
* syncdaemon; adding corresponding pcloses to gsyncd invocation via popenCsaba Henk2011-04-011-8/+10
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2427 (set a proper default for remote syncdaemon) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2427
* syncdaemon: fix gsyncd invocation for config-setCsaba Henk2011-03-311-1/+1
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2555 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2555
* mgmt/glusterd: Delete volume profile options on profile stopPranith Kumar K2011-03-311-72/+50
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2638 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2638
* mgmt/glusterd: Improve profile output messagesPranith Kumar K2011-03-311-47/+49
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2616 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2616
* mgmt/glusterd: Fix space in error messagePranith Kumar K2011-03-311-1/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2623 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2623
* 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: prevent memory overflowKaushik BV2011-03-301-1/+1
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2632 (possible memory overflow in one of the code paths in volume gsync stop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2632
* mgmt/Glusterd: add pid extension to the pid file of the gsyncdKaushik BV2011-03-301-1/+1
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2538 (pidfile naming) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2538
* mgmt/glusterd: Fix double free on quota limit-usage.Mohammed Junaid Ahmed2011-03-291-3/+3
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2595 (Quota: re-setting the space-limit crashes the glusterd on the same node) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2595
* mgmt/glusterd: Add the new volume only after all ops succeedPranith K2011-03-271-6/+11
| | | | | | | | | | | - Print errors to the user when any of the op fails in create volume - Add the volume to the list only after all the ops succeed Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1888 (volfile generation error ignored) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1888
* mgmt/glusterd: Fix double memory free.Junaid2011-03-261-0/+1
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
* mgmt/glusterd: Fix import friend volumesPranith K2011-03-251-107/+44
| | | | | | | | | | | | | - 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: fail create volume on create-volfiles failurePranith K2011-03-251-0/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1888 (volfile generation error ignored) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1888
* spelling errors fixed across the code baseAmar Tumballi2011-03-221-25/+25
| | | | | | | | | | | | | recieve -> receive maintainence -> maintenance verison -> version commited -> committed Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2262 (Spelling errors in source) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2262
* mgmt/glusterd: Glusterfsd not restarted on changes to marker option.Mohammed Junaid Ahmed2011-03-221-81/+25
| | | | | | | | | | | Bricks are not restarted when some marker options are changed and the Marker translator is included statically in the server volfile. Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2529 (Starting Gsync causes ENOTCONN to glusterfs client) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2529
* CLI : Fix memory free for key_fixed.Gaurav2011-03-181-5/+5
| | | | | | | | Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2554 (Invalid memory access in glusterd.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2554
* mgmt/glusterd: Use PATH_MAX for pid_file.Mohammed Junaid Ahmed2011-03-161-1/+1
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2534 (Glusterd crashes on gsync stop.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2534
* mgmt/glusterd: Use dict_set_dynstr in place of dict_set_str.Mohammed Junaid Ahmed2011-03-161-44/+76
| | | | | | | | Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473