summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/nsr-server/src
Commit message (Collapse)AuthorAgeFilesLines
* build: fix "unpackaged but installed" warningsJeff Darcy2014-04-231-1/+1
| | | | | Change-Id: Ic765ede72eacd03501549e71247265aa86983d86 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* nsr: add quorum enforcementJeff Darcy2014-04-224-2/+42
| | | | | Change-Id: I0241f8c1ac97c80ae438e3d9f1ac492d63da9347 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* Merge "nsr: use different etcd keys for each NSR subvolume"Jeff Darcy2014-04-224-18/+52
|\
| * nsr: use different etcd keys for each NSR subvolumeJeff Darcy2014-03-254-18/+52
| | | | | | | | | | | | | | | | 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>
* Fix test failures in leader election.Jeff Darcy2014-03-111-4/+8
| | | | | Change-Id: Ib5aa97dd31872f67727f3726fa96d4a663b9f6d3 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* nsr: change leader-election code to use new etcd_lockJeff Darcy2014-03-052-182/+69
| | | | | | | | | This is certainy much simpler (therefore easier to maintain) and should be more robust as well. Tested with both real and simulated versions of the etcd API. Change-Id: Ic67de7f87455fcd9aeb1354714698f9562b7e4a7 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* nsr: update to latest versions of etcd and etcd-apiJeff Darcy2014-03-053-58/+282
| | | | | | | | Also fixed some general bit-rot around how daemons are started when using real etcd. Change-Id: Ib5d9c8d49982c4562b6a28b7a7c1dd1e5d9d3077 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* nsr: add mem_acct_init functionsJeff Darcy2014-03-041-0/+19
| | | | | | | | | | | | 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-031-3/+40
| | | | | | | | | | 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 : Changes made in nsr logging functionsAnuradha2014-02-171-3/+3
| | | | | | | | | | | | | 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>
* Merge "nsr-server: update etcd-api to match upstream"Jeff Darcy2014-02-112-39/+39
|\
| * nsr-server: update etcd-api to match upstreamJeff Darcy2014-02-032-39/+39
| | | | | | | | | | Change-Id: I91e2d61ecc924346d1c3c85eaef1193fddb52ecd Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* | nsr: add first reconciliation testJeff Darcy2014-02-113-3/+3
|/ | | | | | | | | | | | | | | The test itself fails, because reconciliation never actually seems to complete. Instead, it fills up several log files with 16M lines worth of junk, even though we only did ~200 writes. Fencing is also disabled so we can make progress despite this. Still, this test should provide a basic framework for testing reconciliation once it's fixed. This patch also fixes the hard-coded executable path used to start the recon daemon. Without this, starting the brick fails on a standard install (because the hard-coded path was to a non-standard location). Change-Id: I982967d796c3fb5713c5062912be2d804dcc0149 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* Merge "nsr-server: add periodic fsync (as syncop)"Jeff Darcy2014-02-031-1/+9
|\
| * nsr-server: add periodic fsync (as syncop)Jeff Darcy2014-01-291-1/+9
| | | | | | | | | | Change-Id: I2fabe572ce0431f92fc361b338e262f1ecf5df66 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* | etcd-sim: fix stdio-buffering problemJeff Darcy2014-01-291-38/+68
|/ | | | | | | | | | | | | | Leader election was not working because processes were continuing to read their own cached copies of the data file contents, not seeing each others' changes. Fflush is not sufficient to ensure that data propagates from one process to another. Even ensuring that it gets to disk requires an fsync as well (which we weren't doing). The only viable solution is to *reopen* the data file with an empty buffer. This also makes it easier to ensure correct locking across the whole file, instead of just from the previous seek position to EOF. Change-Id: I165d55afd5804dc3f579ea7e55c56da5066ae6c1 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* NSR reconciliation: Adding index for each opRaghavan P2014-01-235-2/+17
| | | | | | | We need to have the leader generate an index number for each changelog entry. Change-Id: If451dc00a21dbc481771b713ac75fd0af6887014 Signed-off-by: Raghavan P <rpichai@redhat.com>
* Fix write-queuing logic.Jeff Darcy2014-01-221-5/+8
| | | | | | | | | | The write path for followers would call STACK_WIND without incrementing ictx->active first. Therefore, when we got to nsr_writev_complete, we'd decrement from zero (overflow). That write would succeed, but then the next would see ictx->active was set and queue instead of executing. Change-Id: I05714165d68b91abfc7f274ef9f011204dbe496f Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* cluster/nsr-server: fix etcd-sim date handlingJeff Darcy2014-01-221-66/+59
| | | | | | | | | | | There was just no particularly good reason to be doing all of those conversions for comparison on the same machine, and it was actually causing failures on a test machine where strptime was sporadically creating a structure where the "hours" field was off by one. Also added missing functions to allow unit testing, fixed some headers and indentation, etc. Change-Id: I3b1a80365d72bdb5afb0119a8e6505e2bc47a94f Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* nsr : Fix "special" recon logging functions.Anuradha2014-01-212-2/+43
| | | | | | | | | | | | | | | | | | | | | 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>
* Merge "Update to etcd API v2."Jeff Darcy2014-01-161-15/+76
|\
| * Update to etcd API v2.Jeff Darcy2014-01-081-15/+76
| | | | | | | | | | Change-Id: I6609b39276674aa6d94113ba270c2bc67f2be1e8 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* | Fix precondition handling.Jeff Darcy2014-01-141-5/+6
|/ | | | | | | Without this, nsr.t was hanging because of stalled leader election. Change-Id: Ia87f582956e0a61f1d2e1fe792aca1d885f20af3 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* Changes to NSR reconciliation code.Raghavan P2014-01-087-173/+648
| | | | | | | | | | | | 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>
* Update comment to reflect new code-generation technique.Jeff Darcy2013-12-111-8/+5
| | | | | | | Also, test rfc.sh on the new project. Change-Id: I3b639dabd0717082b872581b40a3abfa5b049bbc Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* Permission changes.Jeff Darcy2013-12-112-0/+0
| | | | | Change-Id: I6c365ddedc3e96a67127cf012819e9a0138395f4 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* More leftovers from the move.Jeff Darcy2013-12-112-129/+0
| | | | | Change-Id: I846a6c4145e5f8c5dd446b919dcf12eb7d8fbacb Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* Remove generated file (again).Jeff Darcy2013-12-111-4444/+0
| | | | | Change-Id: I86204fb763972462c217369e613951c64879af83 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
* Roll-up patch for NSR so far.Jeff Darcy2013-12-1132-0/+10857
Previous history: https://forge.gluster.org/~jdarcy/glusterfs-core/glusterfs-nsr Change-Id: I2b56328788753c6a74d9589815f2dd705ac9ce6a Signed-off-by: Jeff Darcy <jdarcy@redhat.com>