summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/nsr-server
Commit message (Collapse)AuthorAgeFilesLines
* 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-1133-0/+10860
Previous history: https://forge.gluster.org/~jdarcy/glusterfs-core/glusterfs-nsr Change-Id: I2b56328788753c6a74d9589815f2dd705ac9ce6a Signed-off-by: Jeff Darcy <jdarcy@redhat.com>