summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
Commit message (Collapse)AuthorAgeFilesLines
* glusterd: Fixed glusterd_brick_create_path algo.Krishnan Parthasarathi2012-05-191-16/+1
| | | | | | | | | | | | | | | | | | | | | | - check if any prefix of the brick path has "trusted.gfid" or "trusted.glusterfs.volume-id" set. - set trusted.glusterfs.volume-id on the bricks as soon as its induction into the volume is settled. Earlier, the setting of "volume-id" used to happen during the first run of the brick process, leaving of window for bricks part of one volume to be (ab)used by another volume inadvertently. - removed creation of brick directory (if missing), during start volume force. This is to avoid directory creation as part 'force'ful starting of volume and leave the responsibility with the user, who understands the 'availability' of the export directory (brick) better. Change-Id: I4237ec4ea7a4e38a7501027e7de7112edd67de8c BUG: 812214 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/3280 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/3313
* mgmt/glusterd: take the statedumps of running bricks if one of the bricks is ↵Raghavendra Bhat2012-05-011-1/+7
| | | | | | | | | | | | | | | | | | down Till now if one of the bricks of the volume is down, then statedump of that volume (bricks) did not take the statedumps of running bricks. This patch fixes that issue and cli command will take the statedumps of running brick processes. Change-Id: Id9b11905d3d759202e505c2ecfa6ccd5dce6a9ff BUG: 816884 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3237 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: Added volume-id to 'op' dictionaryKrishnan Parthasarathi2012-04-121-0/+24
| | | | | | | | | | | | | | | | | | | | Volume-id passed in op dictionary would help detect possible split brains among peers in a cluster. The idea is to check if the volume's id and the vol-id that was passed are equal. ie, same volume name, but different volume id indicate that glusterd 'metadata' of one of the participating peers is stale or there is a split brain. This is over and above the existing checksum based validation of peer supplied cluster 'metadata' (ie, volume info file). Change-Id: I1049ef249e417e540ccb4243e450f92fcd0f46f9 BUG: 797734 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/3083 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Fix compiler warnings and typos from Debian build.Jeff Darcy2012-04-101-1/+1
| | | | | | | | | | | | | Mostly to do with "-Werror=format-security" being buggy, but while we're here we might as well fix some typos and such. Credit goes to Patrick Matthäi <pmatthaei@debian.org> for pointing these out. Change-Id: Ia32d1111d7c10b1f213df85d86b17a1326248ffd BUG: 811387 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3117 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Improvements for volume heal CLI.Vijay Bellur2012-04-011-10/+25
| | | | | | | | | | | | | | 1) Brought in a CLI improvement for volume heal cmd when it fails before initiating a transaction. 2) Minor improvements in UI messages related to self-heal-daemon. Change-Id: I983c1e54b48f2efe8793fa5b00fa50df2067683b BUG: 807261 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/3057 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
* glusterd: bring back the 'non-synctask' behaviorAmar Tumballi2012-03-221-1/+1
| | | | | | | | | | | revert back to non synctask behavior Change-Id: Icfc9cbdeaf8dd6735df8366a6121c6598c56fade Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 805802 Reviewed-on: http://review.gluster.com/3002 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Add space for heal vol req log message.Rahul C S2012-03-211-1/+1
| | | | | | | | | | Change-Id: Iadf1d6304bcae8f666f2435ffa2d71c50dd1395a BUG: 764658 Signed-off-by: Rahul C S <rahulcs@redhat.com> Reviewed-on: http://review.gluster.com/2991 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
* glusterd: Disabled self-heal on clear-locks internal mountKrishnan Parthasarathi2012-03-211-0/+8
| | | | | | | | | | | | | | - Also, changed afr_get_xattr_clrlk_cbk to use dict_set_dynstr for clear-lock summary. Earlier, it was relying on 'str' passed from xlators below. Change-Id: I175f4542e6ef2c859c4811eecb9d8c5a7d25a283 BUG: 800779 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2992 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: bring in feature to use syncop for mgmt opsAmar Tumballi2012-03-211-5/+6
| | | | | | | | | | | | | | | | * new sycnop routines added to mgmt program * one should not use 'glusterd_op_begin()', instead can use the synctask framework, 'glusterd_op_begin_synctask()' * currently using for below operations: 'volume start', 'volume rebalance', 'volume quota', 'volume replace-brick' and 'volume add-brick' Change-Id: I0bee76d06790d5c5bb5db15d443b44af0e21f1c0 BUG: 762935 Signed-off-by: Amar Tumballi <amar@gluster.com> Reviewed-on: http://review.gluster.com/479 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: don't create the brick path in 'volume start'Amar Tumballi2012-03-181-1/+7
| | | | | | | | | | | | | create the missing brick directory only on a 'gluster volume start <VOLNAME> force' command Change-Id: Ica4fab9cefe953d73de9a30843d48f94e6ab735c Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 801610 Reviewed-on: http://review.gluster.com/2921 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Self-heald: Handle errors gracefully and show errors to usersPranith Kumar K2012-03-181-0/+10
| | | | | | | | | Change-Id: I5424ebfadb5b2773ee6f7370cc2867a555aa48dd BUG: 800352 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2962 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: bring a cmdline option to set memory-accountingAmar Tumballi2012-03-151-0/+2
| | | | | | | | | | | | | | | | | | currently this is implemented as a command line option, and not as an easier translator option. this is because as of now, before even the volume files are parsed, we would need memory accounting enabled. there is scope for improving this behavior, but for now, this approach solves the problem. Also, this feature's major consumers are the testers who are looking for leaks, hence option is hidden from usage output. Change-Id: I09a5b13743ae43ff42c251989f921319e94cabe3 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 799199 Reviewed-on: http://review.gluster.com/2856 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli, glusterd, nfs: "volume status|profile|top" for nfs serversKaushal M2012-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Enables usage of volume monitoring operations "volume status", "volume top" and "volume profile" for nfs servers. These operations can be performed on nfs-servers by passing "nfs" as an option in cli. The output is similar to the normal brick outputs for these commands. The new syntaxes for the changed commands are as below, #gluster volume profile <VOLNAME> {start|info|stop} [nfs] #gluster volume top <VOLNAME> {[open|read|write|opendir|readdir [nfs]] |[read-perf|write-perf [nfs|{bs <size> count <count>}]]} [brick <brick>] [list-cnt <count>] #gluster volume status [all | <VOLNAME> [nfs|<BRICK>]] [detail|clients|mem|inode|fd|callpool] Change-Id: Ia6eb50c60aecacf9b413d3ea993f4cdd90ec0e07 BUG: 795267 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2820 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* glusterd: Append internal mount logs of clear-locks command to a single fileKrishnan Parthasarathi2012-03-071-0/+3
| | | | | | | | | | | | | To ensure logs of all clear-locks commands executed from a 'peer' (glusterd) are in one place. Change-Id: I9f531a1e24d4502769740010da73b3d4adb5c5c9 BUG: 799267 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2861 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: Changed clear-locks cmd to use trusted-volfile for its internal mountKrishnan Parthasarathi2012-02-291-1/+1
| | | | | | | | | Change-Id: Iba8add1802832d4fa7082bc6a68eee966ddc508b BUG: 798127 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2846 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* locks/glusterd: Fixed clearing of posix locks from failing always.Krishnan Parthasarathi2012-02-271-1/+3
| | | | | | | | | Change-Id: Ieaf636c6f0d2aa1d001143a2d1433fce85dc8c7a BUG: 797042 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2812 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cluster/afr: Add commands to see self-heald opsPranith Kumar K2012-02-201-2/+12
| | | | | | | | | Change-Id: Id92d3276e65a6c0fe61ab328b58b3954ae116c74 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2775 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: auth allow enhancementsRajesh Amaravathi2012-02-201-13/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PROBLEM: When address-based authentication is enabled on a volume, the gNfs server, self-heal daemon (shd), and other operations such as quota, rebalance, replace-brick and geo-replication either stop working or the services are not started if all the peers' ipv{4,6} addresses or hostnames are not added in the "set auth.allow" operation, breaking the functionality of several operations. E.g: volume vol in a cluster of two peers: /mnt/brick1 in 192.168.1.4 /mnt/brick2 in 192.168.1.5 option auth.allow 192.168.1.6 (allow connection requests only from 192.168.1.6) This will disrupt the nfs servers on 192.168.1.{4,5}. brick server processes reject connection requests from both nfs servers (on 4,5), because the peer addresses are not in the auth.allow list. Same holds true for local mounts (on peer machines), self-heal daemon, and other operations which perform a glusterfs mount on one of the peers. * SOLUTION: Login-based authentication (username/password pairs, henceforth referred to as "keys") for gluster services and operations. These *per-volume* keys can be used to by-pass the addr-based authentication, provided none of the peers' addresses are put in the auth.reject list, to enable gluster services like gNfs, self-heal daemon and internal operations on volumes when auth.allow option is exercised. * IMPLEMENTATION: 1. Glusterd generates keys for each volume and stores it in memory as well as in respective volfiles. A new TRUSTED-FUSE volfile is generated which is fuse volfile + keys in protocol/client, and is named trusted-<volname>-fuse.vol. This is used by all local mounts. ANY local mount (on any peer) is granted the trusted-fuse volfile instead of fuse volfile via getspec. non-local mounts are NOT granted the trusted fuse volfile. 2. The keys generated for the volume is written to each server volfile telling servers to allow users with these keys. 3. NFS, self-heal daemon and replace-brick volfiles are updated with the volume's authentication keys. 4. The keys are NOT written to fuse volfiles for obvious reasons. 5. The ownership of volfiles and logfiles is restricted to root users. 6. Merging two identical definitions of peer_info_t in auth/addr and rpc-lib, throwing away the one in auth/addr. 7. Code cleanup in numerous places as appropriate. * IMPORTANT NOTES: 1. One SHOULD NOT put any of the peer addresses in the auth.reject list if one wants any of the glusterd services and features such as gNfs, self-heal, rebalance, geo-rep and quota. 2. If one wants to use username/password based authentication to volumes, one shall append to the server, nfs and shd volfiles, the keys one wants to use for authentication, *while_retaining those_generated_by_glusterd*. See doc/authentication.txt file for details. Change-Id: Ie0331d625ad000d63090e2d622fe1728fbfcc453 BUG: 789942 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2733 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli, glusterd : Added support for clear-locks command.Krishnan Parthasarathi2012-02-171-0/+393
| | | | | | | | | Change-Id: I8e7cd51d6e3dd968cced1ec4115b6811f2ab5c1b BUG: 789858 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2552 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: Fail volume 'modify' operations when rb is ongoingKrishnan Parthasarathi2012-02-141-0/+11
| | | | | | | | | | | | | | | * add-brick, stop-volume, remove-brick are the operations that are explicitly 'failed' when attempted while replace-brick is in progress. * we attach the volume-id to the dst_brick volfile ensuring that the replace-brick operation holds 'claim' on it. Change-Id: If60b2af566ca940b2add600b473c99730e06ab47 BUG: 765470 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2740 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: provide option to take statedump of the nfs serverRaghavendra Bhat2012-01-271-4/+12
| | | | | | | | | | | | | | | Currently the cli command for taking statedump is for glusterfs servers only. Statedump of nfs server cannot be taken. With this patch if one gives nfs as an option to the statedump command, then the nfs-server's statedump is taken. Change-Id: I4ef7a68e608da4aa2f17541d7b42cd78ce2624b6 BUG: 771587 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2579 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Improve cli output of gluster volume heal command.Rahul C S2011-12-221-32/+23
| | | | | | | | | | | | | | | Improving cli outputs according to the type of the volume, the "heal" action can be performed on the volume. Also checks if the volume is started & then if the "self-heal" daemon is not started, prints appropriate message. Change-Id: I25b0822e4d518c50e2f1173aa8c7c11ae6b76d3f BUG: 769774 Signed-off-by: Rahul C S <rahulcs@redhat.com> Reviewed-on: http://review.gluster.com/2496 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* mgmt/glusterd volume delete - Unref dict only in case of an errorshishir gowda2011-11-181-1/+1
| | | | | | | | Change-Id: I6edee785c69864bf42d869ed9cccb52cabc1523d BUG: 3817 Reviewed-on: http://review.gluster.com/736 Reviewed-by: Amar Tumballi <amar@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* mgmt/glusterd: delete volume to have dictionary as contextAmar Tumballi2011-11-161-17/+6
| | | | | | | | | | | earlier only DELETE_VOLUME was having volume name as context, where as all other OPs used to have dictionary Change-Id: I5bfcc458bff3295374eb4f0b0a31f6134745debd BUG: 3158 Reviewed-on: http://review.gluster.com/718 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* XDR: cli-glusterd xdr consolidationshishir gowda2011-11-161-106/+164
| | | | | | | | | | | | | | | | By using only 1 xdr struct for request and 1 xdr struct for response, we will be able scale better and also be able to parse the o/p better For request use- gf1_cli_req - contains dict For response use- gf1_cli_rsp - conains op_ret, op_errno, op_errstr, dict Change-Id: I94b034e1d8fa82dfd0cf96e7602d4039bc43fef3 BUG: 3720 Reviewed-on: http://review.gluster.com/662 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* mgmt/glusterd: skip shd graph generation for non-replicate volsPranith Kumar K2011-09-291-6/+1
| | | | | | | | Change-Id: I1bb83342bc0fa883ede527527ec8fd6ee470f781 BUG: 3666 Reviewed-on: http://review.gluster.com/535 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: allow non-related directories with same prefixRajesh Amaravathi2011-09-291-1/+1
| | | | | | | | | | | | | | Earlier, using two directories with names like /test and /test1 failed volume creation. This patch sees that the next character is checked to be '/' to conclude that they are recursive. Eg: /test and /test2 succeed, while /test and /test/alpha does not. Change-Id: Idee1e15b7e0a0d0965d1aea910b52f1da286d64b BUG: 3645 Reviewed-on: http://review.gluster.com/511 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* glusterd : 'volume stop' to check if other ops are in progressAmar Tumballi2011-09-281-29/+43
| | | | | | | | | | | | * handles the case of 'rebalance' in progress * inturn it will also handle the case of decommissioning in progress * also now checks if a replace-brick is in progress Change-Id: I0266483089515d16fe8167afe06a07696328a8e3 BUG: 3358 Reviewed-on: http://review.gluster.com/518 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* cli : new volume statedump commandKaushal M2011-09-271-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: 1. Add a new 'volume statedump' command, that performs statedumps of all the bricks in the volume and saves them in a specified location. 2. Add new server option 'server.statedump-path'. 3. Remove multiple function definitions in glusterd.h Statedump Information: The 'volume statedump' command performs statedumps on all the bricks in a given volume. The syntax of the command is, gluster volume statedump <VOLNAME> [type]...... Types include, * all * mem * iobuf * callpool * priv * fd * inode Defaults to 'all' when no type is specified. The statedump files are created by default in /tmp directory of the server on which the bricks are present. This path can be changed by setting the 'server.statedump-path' option. The statedump files will be named as, <brick-name>.<pid of brick process>.dump Change-Id: I01c0e1a8aad490da818e086d89f292bd2ed06fd4 BUG: 1964 Reviewed-on: http://review.gluster.com/321 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* glusterd: cleanup of volinfo '*_count' definitionsv3.3.0qa11Amar Tumballi2011-09-231-7/+17
| | | | | | | | | | | | | | | | | earlier, sub_count was having different meaning depending on the volume type. now, for replica and stripe count, one can directly access the 'replica_count' or 'stripe_count' to get the corresponding value from the volume info. 'sub_count' is preserved as is for backward compatibility. there is a new variable 'dist_leaf_count' to get info about how many bricks are present in one distribute sub volume. Change-Id: I5ea1c8f9ae08f584cca63b91ba69035c7e4350ca BUG: 3158 Reviewed-on: http://review.gluster.com/435 Reviewed-by: Krishnan Parthasarathi <kp@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Implemented cmd to trigger self-heal on a replicate volume.v3.3.0qa10Krishnan Parthasarathi2011-09-221-0/+160
| | | | | | | | | | | | | This cmd is used in the context of proactive self-heal for replicated volumes. User invokes the following cmd when (s)he suspects that self-heal needs to be done on a particular volume, gluster volume heal <VOLNAME>. Change-Id: I3954353b53488c28b70406e261808239b44997f3 BUG: 3602 Reviewed-on: http://review.gluster.com/454 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd/top: volume top succeeds on partial brickpathRajesh Amaravathi2011-09-191-1/+2
| | | | | | | | | | | | | | Rewrite of glusterd_volume_brickinfo_get in glusterd-utils.c An additional argument to glusterd_volume_brick_info_get_by_brick and glusterd_volume_brickinfo_get enables matching brick path in two ways: Complete or partial(ancestor and descendent paths matched). Change-Id: Ia87833a6f0c139599c3e40b59d60c64281b4084b BUG: 3271 Reviewed-on: http://review.gluster.com/162 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Proactive self heal process implementationPranith Kumar K2011-09-141-7/+3
| | | | | | | | Change-Id: I96db0d94566ceabf1649f890318363f738c06553 BUG: 2458 Reviewed-on: http://review.gluster.com/403 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Eliminate many "var set but not used" warnings with newer gcc.Jeff Darcy2011-09-071-3/+0
| | | | | | | | | | | | | | | | This fixes ~200 such warnings, but leaves three categories untouched. (1) Rpcgen code. (2) Macros which set variables in the outer (calling function) scope. (3) Variables which are set via function calls which may have side effects. Change-Id: I6554555f78ed26134251504b038da7e94adacbcd BUG: 2550 Reviewed-on: http://review.gluster.com/371 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* modify to the way we used XDR definitions files (.x files)Amar Tumballi2011-09-071-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | Earlier: step 1: copy the existing <xdr>.x files to /tmp step 2: generate '.[ch]' files using 'rpcgen <xdr>.x' step 3: check diff with the to the existing files, add only your part of changes back to the original file. (ignore other changes). step 4: there is another file to write wrapper functions to convert structures to/from XDR buffers, update it with your new structure. step 5: use these wrapper functions in the newly written procedures. step 6: commit :-| Now: step 1: update (mostly adding only) the <xdr>.x file step 2: run '<path-to-src>/extras/generate-xdr-files.sh <xdr>.x' command step 3: implement rpc procedure to handle the request/response. step 4: commit :-) Change-Id: I219f9159fc980438c86e847c6b030be96e595ea2 BUG: 3488 Reviewed-on: http://review.gluster.com/341 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* mgmt/glusterd: code re-structuringAmar Tumballi2011-09-051-0/+1038
created new files per operations, (or group of operations) Change-Id: Iccb2a6a0cd9661bf940118344b2f7f723e23ab8b BUG: 3158 Reviewed-on: http://review.gluster.com/281 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>