summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/nsr-recon
Commit message (Collapse)AuthorAgeFilesLines
* nsr: expand coverage of reconciliation testJeff Darcy2014-04-221-10/+10
| | | | | | | | | | | | | | This version tests eight kinds of modifying operations instead of just two, and tests those two a bit better than before. Symlink had to be fixed because there was a mismatch between the actual changelog format and the nsr-recon parsing code. Setxattr and removexattr are still hopelessly broken, but that code needs to be replaced anyway when we start putting the xattr names into the changelog so it's not worth fixing them right now. When that's done we'll be up to ten kinds of operations, missing only rename. Change-Id: I3d805cf8fd324221be03edc3e5fc26d7656e4af9 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* nsr: fix more reconciliation resource leaksJeff Darcy2014-04-223-181/+237
| | | | | | | | | | | Also fixed GF_CALLOC calls to use proper memory types instead of always gf_mt_recon_private_t, so we that we can use state dumps to see what's leaking. This in turn required solving some very "interesting" problems to do with xlator/GFAPI mixing and THIS (which is used within GF_CALLOC). Change-Id: I3f928c9ac89600649bb3934664a3c4f6c43937e5 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* Merge "nsr: use different etcd keys for each NSR subvolume"Jeff Darcy2014-04-221-0/+1
|\
| * nsr: use different etcd keys for each NSR subvolumeJeff Darcy2014-03-251-0/+1
| | | | | | | | | | | | | | | | This is necessary both for separate volumes using NSR and for DHT volumes composed of multiple NSR subvolumes. Change-Id: Ia269d70b535cc26900f8b6e7f22706087746fbe7 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* | build: NSR requirement on curlLuis Pabon2014-03-281-2/+3
|/ | | | | | | | | | | * Added a libcurl requirement to the configure script * Fixed the Makefile to use the built libgfapi version, not an installed one. * Tested recon.t and it worked. Change-Id: Ie2fc07da33e4bdb8a8aa911ac8225b82025775a7 Signed-off-by: Luis Pabon <lpabon@redhat.com>
* features/changelog: NSR Journal changesVenky Shankar2014-03-121-9/+31
| | | | | | | | | | | | | * Sequential updates to journal * Journal update in the FOP path * NSR specific format changes TBD --- * POST-OP record Change-Id: I5b21b7624ccb095295a0c69abf00866e0d6cd818 Signed-off-by: Venky Shankar <vshankar@redhat.com>
* Fix leaks introduced by error-checking patch.Jeff Darcy2014-03-052-875/+967
| | | | | | | | | | | Specifically, I050003a819d2314c8fdfd111df465041c30ee6e3 As usual, the best way to make sure resources get reclaimed is to make sure all return paths go through common cleanup code. This meant a lot of refactoring. Besides general readability benefits, this also got rid of the setjmp/longjmp nonsense flagged in a previous review. Change-Id: Ic232cf342a5168bfc33f6e0a0c8f0530d88f7c5e Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* nsr: add mem_acct_init functionsJeff Darcy2014-03-043-39/+25
| | | | | | | | | | | | It's not clear why this started failing after the last merge, since the mem_acct code hasn't changed for a while, but it did and having those functions is good form anyway. Also removed a bunch of GF_ASSERT(0) calls that made (and will continue to make) debugging unnecessarily painful. Change-Id: Icd89f2e23f1eaafc79cb9af06c3c9c8d2fdeec14 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* changes to NSR reconciliation code to add error handling.Raghavan P2014-03-034-255/+428
| | | | | | | | | | Description of chnages added: 1) In recon driver, check for all glfs calls return values. 2) make the driver send back error values to other drivers or to main translator. 3) let the leader retry on errors Change-Id: I050003a819d2314c8fdfd111df465041c30ee6e3 Signed-off-by: Raghavan P <rpichai@redhat.com>
* nsr-recon: use O_SYNC on logging filesJeff Darcy2014-02-261-3/+20
| | | | | | | | This is slightly simpler, and possibly more efficient, than doing fsync after every log write. Change-Id: Ib14323198236d755caad2acfed0a8ddb5e36a3f4 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* nsr : Changes made in nsr logging functionsAnuradha2014-02-174-21/+62
| | | | | | | | | | | | | 1) File pointers for worker and driver logs are now in their respective ctx, instead of static file pointer in nsr logging functions. 2) File pointer for recon-main-log now in nsr_recon_private_t, instead of a static file pointer in nsr recon logging function. 3) Changed a few fprintf to gflog. Change-Id: Iab92e20d1691104bad19b7fe044a1d3ce2792ab3 Signed-off-by: Anuradha <atalur@redhat.com>
* Example of how to add extra info to changelog records.Jeff Darcy2014-02-113-1/+36
| | | | | | | | This is a bit hacky so far, but this is the direction we need to go for all fops that take extra data like modes, uids, times, or keys. Change-Id: I02968611bc46beda108b4caf65cd6a8928679e16 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* Merge "nsr-recon: bring data_worker_fun in line with coding standard"Jeff Darcy2014-02-111-228/+245
|\
| * nsr-recon: bring data_worker_fun in line with coding standardJeff Darcy2014-02-041-228/+245
| | | | | | | | | | | | | | | | | | | | ...or any reasonable one. OK, not in line, but closer. This introduces only minor functional change, in the form of new error messages for cases that haven't been implemented yet. Mostly it's just a matter of making the code readable and reviewable. Change-Id: Ide76f8b9ca1fb79f8f2772bc70a6f39656f49816 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* | nsr-recon: fix entry-count error when logs are preallocatedJeff Darcy2014-02-111-12/+65
|/ | | | | Change-Id: I48dc83f5ea5a47ec8ef7eaadf8ecbc5f2a725fd3 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* nsr : Fix "special" recon logging functions.Anuradha2014-01-214-106/+208
| | | | | | | | | | | | | | | | | | | | | Combining two patches together. http://review.gluster.org/#/c/6538/4, author : Jeff Darcy and http://review.gluster.org/#/c/6748/2, author : Anuradha Talur. (1) Put logs into /var/log instead of /tmp. (2) Added debug-level check. (3) Added function/line information. (4) Fixed many instances of missing symbol GF_LOG_ERR. Removing spurious newlines will have to wait until a subsequent patch. Keeping this one up to date is tedious enough. Changed the logging directory of reconciliation logs to /var/log/nsr-logs. Change-Id: I8ffd901537d77329eddbd17b380c1611607927d6 Credits: Jeff Darcy <jdarcy@redhat.com> Signed-off-by: Anuradha <atalur@redhat.com>
* Fixeda bug where a NULL pointer exception happens on resolution partRaghavan P2014-01-161-4/+4
| | | | | | Signed-off-by: Raghavan P <rpichai@redhat.com> Change-Id: I71ea6c14007ac49ec2859261dd39317e4c0367d4
* Changes to NSR reconciliation code.Raghavan P2014-01-084-66/+181
| | | | | | | | | | | | Following is list of changes: 1) Simulation of etcd using a file as a registry protected using locks. 2) Implement notifications for child up and child down. 3) Join a new brick into quorum. 4) add support for proper fencing and draining of IO required for reconciliaiton 5) misc changes and addressed review comments. Change-Id: Iddd1137ad6205252ed03301888bb1e83fa2221e0 Signed-off-by: Raghavan P <rpichai@redhat.com>
* Roll-up patch for NSR so far.Jeff Darcy2013-12-116-0/+3872
Previous history: https://forge.gluster.org/~jdarcy/glusterfs-core/glusterfs-nsr Change-Id: I2b56328788753c6a74d9589815f2dd705ac9ce6a Signed-off-by: Jeff Darcy <jdarcy@redhat.com>