CCBC-549: cbc: handle cbcrc options better

- Pass username to lcb
- If configuration file parsing fails, exit instead of warn

Change-Id: I4cf2ec4fb09fc24029ac2dbb729ce0f3c332d320
Reviewed-on: http://review.couchbase.org/43286
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
ctx/ioC: Close older socket when the previous connect fails

This is a bug which was left undiscovered because existing ioC
implementations would not allow a connect() to be re-invoked on a socket
which had initially failed, so the effect remained the same. However
this seems not to be the case for all implementations, and would result
in the C_conncb being re-called in an infinite loop, since the next-call
to connect() would be invoked on the existing socket (which actually
does fail).

Change-Id: Ibed955ffcde6d7b55d9da181607761cb12935aa3
Reviewed-on: http://review.couchbase.org/43287
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
Make all built-in plugins use the 'v2' field internally

This was causing some serious issues with the select plugin as it would
refer to the internal '.v0' field for various function calls which just
did not exist.

A future commit will explicitly deprecate these API calls, but I'm
trying to keep this particular commit small for now.

Change-Id: I04486be70aa6b27ab62f6ce7c80799f5021957f6
Reviewed-on: http://review.couchbase.org/43269
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
HTTP: Handle cancellation within callback

If a request was cancelled from within the callback, it would result in
calling lcb_http_request_finish() twice which would result in the
library accessing freed memory.

This commit adds a sentinel so that finish is only called once.
Additionally, more tests have been added to test the various aspects of
the HTTP API.

Change-Id: Ibba86586c360e3d929b0ba998282725e5f9704c5
Reviewed-on: http://review.couchbase.org/43251
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Fix version generation

This adds version generation in a more portable manner, requiring only
Git for the most basic meta-data. This allows us to generate versions
properly on Windows without requiring a full GNU coreutils installation

Change-Id: Ic10b9a4a76071c8b3cbeb4a8032ecb6ca5a61c31
Reviewed-on: http://review.couchbase.org/43420
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
Update release metadata for version 2.4.4

Change-Id: Ie1eab9abfaed746cee9b87df6e41dd1c4197a7b9
Reviewed-on: http://review.couchbase.org/43417
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Fix debian package generation

Change-Id: Ia640c76faac484be8726031550bbb5e80a4db432
Reviewed-on: http://review.couchbase.org/43445
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Add SSL Unit Tests

This adds a test for very basic SSL functionality; just to ensure we're
not DOA for each change we do.

Like the other core socket tests, this test actually constructs an
isolated server using OpenSSL's BSDeque I/O methods.

Change-Id: I1e7ad8bcffd59ef8479716188fb3a987aadc383e
ssl_c: Plug ownership/callback leaks

See inline comments and modifications for the painful details. In short:

- Always ensure pending write buffers are explicitly freed (i.e.
  returned to the lcbio_CTX/lcbio_SOCKET level) when the CSSL object is
  closed.
- Always trigger the user callback if a user-request is effective for a
  read and we have an error.

Change-Id: Id9ffd96d66505b3ec6f9d6ec479fe504432caa52
Deprecate v1/v2 IOPS access internally

We just patched up a bug from older code which was using the 'v0'
fields. Let's avoid this in the future by disabling access to all the
'v1' and 'v2' specific plugins.

Note, non-internal code (i.e. LIBCOUCHBASE_INTERNAL is not defined) will
still work (and not get warnings), and the ABI structure will also
remain the same.

Change-Id: I42affa93f40f5db182bb8ebffc46f2758ad386e7
Fix test behavior on real clusters

Change-Id: I2b09f1b3463f3e719e48eac786d300bb97f35430
Change help text of LCB_INVALID_USERNAME to be more accurate

This would otherwise confuse users who are using a usename other than
'Adminsitrator'

Change-Id: I2129cf20eee15a789155035c4277ab3ec4ef8f7e
add htparse keepalive tests

Change-Id: I0d04ca77f05678fa5f7e04a7b1089a695bf4dfda
Don't add lcbht.t to htparse test executable

This file is already included via linking couchbaseS. Without this, our
coverage reports are missing lcbht.c since we're not testing the
instrumented object (but rather the one built into the test exe)

Change-Id: I8fa95c04a22e932d49d7f7422012322e12d5e933
check-all: add estimated linker path if not passed

Change-Id: I0b0c3a574abbc79648ab8926ffe8d82c117431d6
CCBC-550: Fix pillowfight --set-ratio with values higher than 50

Change-Id: I91504ebd8d81a57d845b40a9375bb94a7e45b7d2
Improve cbcrc/cbc-pillowfight manpages

This adds some more usage examples.

Change-Id: Ib4cc40bfdb9e693a00eb635e9de35d18d7479fe8
README: simplify build process

Change-Id: I512bc911e245963f38346de4dad1ecadf4a76378
Fix some conditional logic in retrychck

We should check specific error codes first, and then go to generalized
error categories. NOT_MY_VBUCKET, for example, is EIFNET, but is handled
differently in this case.

Change-Id: I593fd07c24e9394e6c2dc2f349203e4b73648397
Don't derive REVDESCRIBE from VERSION_INFO

deb/rpm make dist-{deb,rpm} was broken when the tag was a bare version
(i.e 2.4.4) rather than a subsequent command (2.4.3-4-gdeadbeef).

Change-Id: I0b057631ec6f1e96c859c3f796e083642804c9be