summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | mgmt/glusterd: create the pid file for the brick process of the snap volumeRaghavendra Bhat2013-11-292-2/+36
|/ | | | | Change-Id: I8fafb19c2c13caac2a509c36f99d2dd782865b13 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* mgmt/glusterd: do not use the root of the snaped device as the brick pathRaghavendra Bhat2013-11-221-4/+24
| | | | | | | | | | | | | | | | | | Suppose a volume's brick has the path /export/brick/vol/dir and lvm of that brick is mounted at /export. Now snap of that brick is taken, and is mounted on a path (say /run/gluster/snaps/<snapname>) While creating the brick for the snap volume, /run/gluster/snaps/<snapname> (i.e the mount point of the snap lvm) should not be used as the export directory. The directory path remaining after the mount point of the original lvm should be appended to the snap lvm mounted path and should be used as the export directory (ex: /run/gluster/snaps/<snapname>/brick/vol/dir in this case). Its because the volume-id of the original volume and other extended attributes wont be set on the root. It will be in the same path as the original lvm. Change-Id: I832dac8478eba1a318bdbcdf6cd8bf55b2a3261d Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* Merge changes Icac9dce6,Ib225fbac into developmentShishir Gowda2013-11-217-30/+64
|\ | | | | | | | | | | * changes: glusterd/snapshot: Added trace statements and handled snapshot create commit failure. glusterd/mgmt: Adding synctasked flag to initiate multiple volume locks.
| * glusterd/snapshot: Added trace statements and handled snapshot create commit ↵Avra Sengupta2013-11-207-30/+56
| | | | | | | | | | | | | | | | | | | | | | failure. Also handles empty string(not NULL) in gd_syncop_mgmt_brick_op() and adds "Snapshot" in operation list used for printing op during logging. Change-Id: Icac9dce6bf1c087ab2aace9953e2af3a0fb81be6 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
| * glusterd/mgmt: Adding synctasked flag to initiate multiple volume locks.Avra Sengupta2013-11-201-0/+8
| | | | | | | | | | | | | | | | Setting 'is_synctasked' as gf_true for glusterd_mgmt_v3_initiate_snap_phases() to initiate multiple volume locks. Change-Id: Ib225fbac42b5e9cf9f3af0083d33ec49a1b87964 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
* | protocol/server: Unbarrier in a thread.shishir gowda2013-11-182-4/+12
|/ | | | | | | | Currently if the queue length is large, the response to glusterd will get blocked Change-Id: I713e8803a087b5131a35050ca027165562d7e1b7 Signed-off-by: shishir gowda <sgowda@redhat.com>
* Merge "storage/bd: check glusterd_is_valid_vg if HAVE_BD_XLATOR" into ↵shishir gowda2013-11-181-0/+3
|\ | | | | | | development
| * storage/bd: check glusterd_is_valid_vg if HAVE_BD_XLATORshishir gowda2013-11-151-0/+3
| | | | | | | | | | Change-Id: I97a417eeebc7ac6193c2de7ad59eb8f7f4f79fe6 Signed-off-by: shishir gowda <sgowda@redhat.com>
* | protocol/server: init the barrier queueshishir gowda2013-11-152-3/+7
|/ | | | | Change-Id: Ib39b244fd29d837a0640dba505eeff42e0a22f9a Signed-off-by: shishir gowda <sgowda@redhat.com>
* rfc.sh: Updated to reflect development branchshishir gowda2013-11-151-1/+1
| | | | Signed-off-by: shishir gowda <sgowda@redhat.com>
* snapshot: Merge conflict resolutionshishir gowda2013-11-156-19/+108
| | | | Signed-off-by: shishir gowda <sgowda@redhat.com>
* mgmt/glusterd : Change in the ordering of snapshot list output.Sachin Pandit2013-11-151-5/+2
| | | | | | | | snapshot taken first should be displayed first in the snapshot list output. Change-Id: Idd1b2374f842b3b70edfb3024094d4d81fbb1163 Signed-off-by: Sachin Pandit <spandit@redhat.com>
* mgmt/glusterd: store for snapshot descriptionshishir gowda2013-11-151-2/+35
| | | | | Change-Id: I0ba50ba2963edf8d890a2dc78d48d42db7f71ae2 Signed-off-by: shishir gowda <sgowda@redhat.com>
* cli/snapshot : Changed the type of few variables.Sachin Pandit2013-11-151-13/+17
| | | | | | | | | | | | | | Minor changes to the type of few varaibles was required as comparison between "unsigned int" and "int" in "snap create parse" was leading to incorrect result. The default snapshot name should be time stamp, instead of that "snapshot" was getting assigned as a snapshot name. This patch also fixes the default snapshot name problem. Change-Id: I5b48444059bc400717b35647edec08a444bcfc48 Signed-off-by: Sachin Pandit <spandit@redhat.com>
* cli/snapshot : Minox fix, string literal.Sachin Pandit2013-11-151-1/+1
| | | | | Change-Id: I2a0b7e244256f1df82beb3e4815d6cacfee50603 Signed-off-by: Sachin Pandit <spandit@redhat.com>
* mgmt/glusterd : Printing error message if volume does not exist.Sachin Pandit2013-11-152-3/+41
| | | | | | | | | If user tries to list the snap details of volumes which does not exist, then corresponding error message is displayed. Change-Id: I205738be3dc632ccb074b639a2088cdd44aa35a7 Signed-off-by: Sachin Pandit <spandit@redhat.com>
* cli/snapshot: Ask user to confirm change of snap max limitshishir gowda2013-11-153-5/+27
| | | | | Change-Id: I6fd89a98c4a111bb6cd3e4d3c2b3d6f783661c27 Signed-off-by: shishir gowda <sgowda@redhat.com>
* glusterd/Jarvis: Added aggr rsp dict in mgmt frameworkAvra Sengupta2013-11-157-12/+154
| | | | | | | Also fixes snapshot config output Change-Id: Ia50d94492009cf73dbb99ba20117b9fa4c41048a Signed-off-by: Avra Sengupta <asengupt@redhat.com>
* Snapshot: fix for snapshot create crashRajesh Joseph2013-11-151-2/+2
| | | | | | | | | GL-205: Gluster snapshot create crashing. runner-arg should have NULL as the last argument. Change-Id: I1bd0090160b53a04a8073c31d91fb77f96f625dc Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
* mgmt/glusterd: set the appropriate status of the snap after createRaghavendra Bhat2013-11-151-0/+3
| | | | | Change-Id: I58a743c92bbd021c3a42c5184ba8acf4db48878a Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* snapcount in volinfo was not getting updated. Fixed itSachin Pandit2013-11-151-1/+1
| | | | | Change-Id: Idafe3cdba149c2a66b89fb3fe0d4d3791d9d089c Signed-off-by: Sachin Pandit <spandit@redhat.com>
* mgmt/glusterd: do not assert if op_errstr is NULL in snapshot config opsRaghavendra Bhat2013-11-151-2/+0
| | | | | | | * op_errstr is allocated and set while returning if there is any error Change-Id: I6e0de80d611aeeee3d25e8c20ab49b8ef42b0bf5 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* mgmt/glusterd: get the xlator object before accessing itRaghavendra Bhat2013-11-151-0/+2
| | | | | Change-Id: I3404106a7e4fa7d32b1d5824e079040d2ed8d76b Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* snapshot: Snapshot restoreRajesh Joseph2013-11-159-55/+933
| | | | | | | | | | | | GL-31: Ability to restore snapshot Implemented snapshot restore for thin logical volume. As of now snapshot restore for CG is not tested. Testing for snapshot restore of a volume is done by changing the snapshot create process to create a thick snapshot. This is done because --merge option to restore thin volume is not working in the latest kernel. Change-Id: Ia3ded7e6c4da5957a74e269a25ba3200e6fb2d8b Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
* mgmt/glusterd: save snapshot config values in storeshishir gowda2013-11-151-1/+71
| | | | | Change-Id: Ia755e5c4af84827cc9b8876054cc48cfdc598876 Signed-off-by: shishir gowda <sgowda@redhat.com>
* mgmt/glusterd: changes to create consistency group out of volumesRaghavendra Bhat2013-11-151-0/+12
| | | | | | | | | * Also send the proper error back to cli incase of any failure * Before taking the snap check whether a snap with the requested name already exists. Change-Id: I0830b31b1f095dd1d3d968c4f8b3cf46dc32d259 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* mgmt/glusterd: store option to update only snap_list.infoshishir gowda2013-11-153-1/+53
| | | | | Change-Id: I16b17ca60b5f9b34b7d238d8a3424a3b7a1dc435 Signed-off-by: shishir gowda <sgowda@redhat.com>
* mgmt/glusterd: snapshot config changesshishir gowda2013-11-1511-169/+656
| | | | | | | | Also refactored code in glusterd for create command Additionally, removed brick-op func from mgmt_iniate_all_phases Change-Id: Iddcc332009c5716adee7f2b04c93b352fb983446 Signed-off-by: shishir gowda <sgowda@redhat.com>
* CLI : Snapshot List,Integration with glusterdSachin Pandit2013-11-153-57/+135
| | | | | | | | | | | | | | | | | | Change in Naming convention: "snap_details", "snap_count" and so on is replaced by "snap-details", "snap-count" so on. Total snapcount introduced. Separate check is made for repeated Volume Name Ex : "gluster snapshot list vol1 vol2 vol1 vol2" is considered as "gluster snapshot list vol1 vol2" *This is still a work in progress* *have to test CG list once CG Store is ready* Change-Id: I45e2904eb8bdbf78de8665f20ba9605c38320307 Signed-off-by: Sachin Pandit <spandit@redhat.com>
* mgmt/glusterd: Fix glusterd crash due to extra unrefshishir gowda2013-11-151-2/+4
| | | | | | Change-Id: I9d600b4d971b7fdcd54da50e4a069eab19648fa6 Original-author: Rajesh Joseph <rajeshatredhat@redhat.com> Signed-off-by: shishir gowda <sgowda@redhat.com>
* Snapshot: Added new XDR typesRajesh Joseph2013-11-153-15/+40
| | | | | | | Added new XDR types for all the snapshot command. Change-Id: I46c02ea8e9c81c7967a773386c4b77b5eb6d5075 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
* protocol/server: avoid rpc reply to the client only if the fop is barrieredRaghavendra Bhat2013-11-151-4/+7
| | | | | | | | * Now, reply submission to the client is avoided even if the fop is not barriered Change-Id: I9d503935c4d851f5dd0e8e4be0fea9c92e636ff3 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* mgmt/glusterd: handle snap volume store and actual volume store separatelyRaghavendra Bhat2013-11-154-21/+64
| | | | | Change-Id: I8b88fe94d0f9ee1089cafdda037abcf2f7a180ca Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* mgmt/glusterd: Snapstore fixes to make info file persistentshishir gowda2013-11-151-6/+11
| | | | | Change-Id: I30cbbeb135c2d0a780e9e414ac0a96739e25647b Signed-off-by: shishir gowda <sgowda@redhat.com>
* mgmt/snapshot: brick op for starting/stopping barriershishir gowda2013-11-156-7/+281
| | | | | Change-Id: Iafbd0ec95de0c41455fb79953fb4bb07721334a5 Signed-off-by: shishir gowda <sgowda@redhat.com>
* mgmt/glusterd: changes to start the brick process of the snap volumeRaghavendra Bhat2013-11-153-10/+54
| | | | | Change-Id: I54db2fa67ebb6b57629f9536c296fbae07a1d159 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* CLI : snapshot list cli interfaceSachin Pandit2013-11-153-54/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $gluster snapshot list *prints snaps of all volume* $gluster snapshot list -d *prints snaps of all volume with details* $gluster snapshot list vol1 *prints snaps of volume "vol1"* $gluster snapshot list vol1 -d *prints snaps of volume "vol1" with details* $gluster snapshot list vol1 vol2 *prints snaps of volume "vol1" & "vol2" $gluster snapshot list vol1 vol2 -d *prints snaps of volume "vol1" & "vol2" with details* $gluster snapshot list -c cgname *prints snaps of all volume present in the group "cgname"* $gluster snapshot list -c cgname -d *prints snaps of all volume present in the group "cgname" with details* ** As of now you wont be able to see any output as actual snap create is not integrated ** Change-Id: I60eeafc715a51f1c564a270bb4124368038012b1 Signed-off-by: Sachin Pandit <spandit@redhat.com>
* mgmt/glusterd:store for CGshishir gowda2013-11-154-110/+493
| | | | | Change-Id: I6ec888a5553ad29ded032c02c80dd940b2aae007 Signed-off-by: shishir gowda <sgowda@redhat.com>
* mgmt/glusterd: snapshot create commandRaghavendra Bhat2013-11-1512-98/+1513
| | | | | | | | | | | | | | | | | This is still a work in progress. As of now, these things are done: * Take the snapshot of the backend brick * Create the new volume for the snapshot * Create the brick and the client volfiles * Store the snapshot related info in /var/lib/glusterd * Create the snap object representing the snapshot TODO: Start the brick processes for the snapshot Change-Id: I26fbb0f8e5cf004d4c1dbca51819bab1cd1bac15 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* mgmt/glusterd: Snapshot list supportRajesh Joseph2013-11-155-19/+1032
| | | | | | | | Handles snapshot list command issued by cli. Details of all the snapshots will be sent back to the caller in required format. Change-Id: I01e512290548007c06e90b40a59cdde048fab954 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
* mgmt/glusterd: Store for snapshotshishir gowda2013-11-156-13/+644
| | | | | | | | | | | | | | | | | | | | Introduced a new store for storing snapshot list for a given volume. $GLUSTERD_INSTALL_PATH/vols/<volname>/snap_list.info $GLUSTERD_INSTALL_PATH/vols/<volname>/snaps/ $GLUSTERD_INSTALL_PATH/vols/<volname>/snaps/<snap-name>/info <-snapshot volume info $GLUSTERD_INSTALL_PATH/vols/<volname>/snaps/<snap-name>/bricks <-snapshot volume brick dir $GLUSTERD_INSTALL_PATH/vols/<volname>/snaps/<snap-name>/bricks/<infos> <-snapshot volume brick info files store delete options TODO - $GLUSTERD_INSTALL_PATH/CG/ <-place holder for all cg's .../CG/<cg-name>/info <- per cg information placeholder Change-Id: I1f9fd8ff7cc0682d05b33965736a43dca6adb3e9 Signed-off-by: shishir gowda <sgowda@redhat.com>
* glusterd/locks: Adding multiple volume locks supportsAvra Sengupta2013-11-157-129/+285
| | | | | | | Also linking snap create command to mgmt_v3 Change-Id: If2ed29be072e10d0b0bd271d53e48eeaa6501ed7 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
* glusterd: Defining interfaces to make use of mgmt_v3 rpcsAvra Sengupta2013-11-153-1/+1246
| | | | | | | | | Defining separate interfaces for every phase to make use of the rpcs and providing set of integrated interfaces for commands to consume Change-Id: I6d464326c5a8b5875a7c2539c9df072b23fe61a9 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
* glusterd/mgmt_v3: Initating complete synctask on glusterdAvra Sengupta2013-11-1512-218/+1734
| | | | | | | | | | | | glusterd mgmt_v3 is nothing but a complete synctask approach for glusterd to function. The commands making use of this won't be using the op-state machine to inject events and will be using the synctask framework to perform operations across all nodes in the cluster. This patch defines the program and the handlers used. Change-Id: Ibff2c62b0187c40cdea7254c85786297bba60372 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
* cli: snapshot create cli interface.Avra Sengupta2013-11-1511-1/+681
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ gluster snapshot help snapshot help - display help for snapshot commands snapshot create <volnames> [-n <snap-name/cg-name>] [-d <description>] - Snapshot Create. $ gluster snapshot create vol1 snapshot create: ???: snap created successfully $ gluster snapshot create vol1 vol2 snapshot create: ???: consistency group created successfully (The ??? will be replaced by the glusterd snap create command with the generated snap-name or cg-name) $ gluster snapshot create vol1 vol2 -n CG1 snapshot create: CG1: consistency group created successfully $ gluster snapshot create vol1 -n snap1 -d Description snapshot create: snap1: snap created successfully $ gluster snapshot create vol1 -n snap1 -d "Description can have -d within quotes" snapshot create: snap1: snap created successfully $ gluster snapshot create vol1 -n snap1 -d Description cant have -d without quotes snapshot create: failed: Options(-n/-d) are not valid descriptions Usage: snapshot create <volnames> [-n <snap-name/cg-name>] [-d <description>] $ gluster snapshot create vol1 -n "Multi word snap name" -d Description snapshot create: failed: Invalid snap name Usage: snapshot create <volnames> [-n <snap-name/cg-name>] [-d <description>] $ gluster snapshot create vol1 -d Description -n "-d" snapshot create: failed: Options(-n/-d) are not valid snap names Usage: snapshot create <volnames> [-n <snap-name/cg-name>] [-d <description>] $ gluster snapshot create vol1 -d -n snap1 snapshot create: failed: No description provided Usage: snapshot create <volnames> [-n <snap-name/cg-name>] [-d <description>] Change-Id: I74b5a8406d72282fbb7ba7d07e0c7fe395148d38 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
* protocol/server: Implement barriering mechanisms for fopsshishir gowda2013-11-154-5/+468
| | | | | | | | | | | | | Barriering allows cbk's responses to be held back until either a timeout or a un-barrier event is received. The event is triggered by a brick-op. barrier-timeout, barrier-queue-lenght, and barrier-fops are currently exposed as a xlator-options only Change-Id: Ifb62d5b2bd2fbb35aca3b537e534156c877ce3a6 Signed-off-by: shishir gowda <sgowda@redhat.com>
* glusterd/utils: Get brick mount's device nameshishir gowda2013-11-152-0/+47
| | | | | Change-Id: I03ff9e8094e7e36b28b521380949c7e9044c2e4e Signed-off-by: shishir gowda <sgowda@redhat.com>
* mgmt/glusterd: Introduce snapshot infrastructureshishir gowda2013-11-1518-190/+2329
| | | | | | | | API's for creating, adding, finding, removing snapshots and consistency groups are provided. Change-Id: Ic28da69a075b062aefdf14754c68259ca58bd427 Signed-off-by: shishir gowda <sgowda@redhat.com>
* glusterd: Volume locks and transaction specific opinfosAvra Sengupta2013-11-151-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | With this patch we are replacing the existing cluster-wide lock taken on glusterds across the cluster, with volume locks which are also taken on glusterds across the cluster, but are volume specific. So with the volume locks we are able to perform more than one gluster operation at the same time, as long as the operations are being performed on different volumes. We maintain a global list of volume-locks (using a dict for a list) where the key is the volume name, and which saves the uuid of the originator glusterd. These locks are held and released per volume transaction. In order to acheive multiple gluster operations occuring at the same time, we also separate opinfos in the op-state-machine, as a part of this patch. To do so, we generate a unique transaction-id (uuid) per gluster transaction. An opinfo is then associated with this transaction id, which is used throughout the transaction. We maintain a run-time global list(using a dict) of transaction-ids, and their respective opinfos to achieve this. Change-Id: Iaad505a854bac8de8f83beec0357eb6cde3f7ea8 BUG: 1011470 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
* fuse: Check the return status from state->resolve_nowupstreamVijaykumar M2013-11-142-7/+49
| | | | | | | | | Change-Id: I85fc6dd393449d365bb908b38c2827b58cb08171 BUG: 1030208 Signed-off-by: Vijaykumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/6262 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>