MB-100: mark expected failed cells test as expected failing

I.e. because I've just spent 10 minutes bisecting for this
failure. And predictably, ended up discovering that I've created this
failing unit test long time ago planning to fix cells to make it pass.

Given plans for cells, it'll clearly not going to be fixed. So we need
to either remove that test or just mark it as expect passing to
prevent folks from wasting time trying to fix it.

Change-Id: I14cfb5524d6b182f29f0396430322e36e81e60ab
Reviewed-on: http://review.couchbase.org/30299
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
MB-1143: don't attempt to use rackawareness API in mixed versions

When we're in mixed version cluster we don't have advertised server
groups urls. And we're detecting that as indication that rack awarness
ui features should not be used.

Change-Id: I4fb21114c672cbfe3d00bc904531edac1cd358e7
Reviewed-on: http://review.couchbase.org/30300
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
MB-100: introduced ns_bucket:get_bucket_with_vclock

Change-Id: Ia7ade2970c4661b56f2f084c014f3b8f7a10ff6c
Reviewed-on: http://review.couchbase.org/30322
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
MB-8726: send terse bucket info as streamingBucket output

Sergey asked me to add rev field to streamingBucket output. Because
libcouchbase is going to request streamingBucket anyways. Otherwise it
might be unable to get memcached host:port coodinates.

Given that I belive it's more worthwhile to simply send terse bucket
info. With notable exception of replacing $HOST marker as we're
currently doing on normal bucket detail results. This is done to
maintain backwards compatibility with older clients.

Change-Id: Ib062351a84ba395e39a8b71159c19a9ffc418692
Reviewed-on: http://review.couchbase.org/30323
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
mockTheClock for casperJs

Change-Id: I232117465153e4b19a8fe683387f653c52fdaa53
Reviewed-on: http://review.couchbase.org/30288
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
missed groups properties in hookjs

Change-Id: I518767d2eb64a5426b5637b4e4a263c254586b33
Reviewed-on: http://review.couchbase.org/30391
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
correctly output errors of remote_clusters_info POST

Otherwise we'll crash at json formatting

Change-Id: I7f949d224ac2692e35ebb34d9659128477a7271b
Reviewed-on: http://review.couchbase.org/30348
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
hibernate idle xmem processes

Change-Id: I07e4dbbc40cb38e3068566a13c470995d0798d15
Reviewed-on: http://review.couchbase.org/30359
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
MB-100: copy couch_api_wrap* to ns_server

Because we'll need to change it possibly heavily in order to support
xdcr-over-ssl. And it's not really used in couchdb.

I plan to remove and all it's unused users from couchdb in one of
subsequent commits

Change-Id: I46d487ed0b212d6534ebefa66a5b9b193eb18ee7
Reviewed-on: http://review.couchbase.org/30346
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
introduced xdc_lhttpc_pool for all our lhttpc connections

Previously every single instance of couch_api_wrap database we've used
was creating it's own separate http connections pool.

It can be easily seen how it causes tons of sockets in TIMED_WAIT
state. I.e. due to connections frequently opened/closed.

xdc_lhttpc_pool is a central pool of connections that solves
TIMED_WAIT problem. And moves us closer towards supporting
xdcr-over-ssl proxy.

Change-Id: If554588220cad208054ccd07341398428e12f017
Reviewed-on: http://review.couchbase.org/30347
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
use proc_lib to spawn slow_updater of ns_heart

I.e. so that if it dies we have some diagnostics

Change-Id: I73b721a2e1a561a4ee1e49a663540414a8cf5ac4
Reviewed-on: http://review.couchbase.org/30349
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
crash ns_heart if it's slow_updater child dies

Change-Id: I92c2740770f5b1f1ba76f14ec47a5ddd10fa8abf
Reviewed-on: http://review.couchbase.org/30350
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
Tested-by: Artem Stemkovski <artem@couchbase.com>
shutdown ns_heart slow_updater in terminate

I.e. so that if ns_heart crashes it's restarted instance will not have
problems spawning slow_updater child and registering it's name

Change-Id: I6feec959f4e8e521baad39da3ebc63059078fa8e
fixed ns_heart crash caused by wrong format string

Change-Id: I1769d7397dad7ce9f72f53f2a9dfb25a6df413e6
Reviewed-on: http://review.couchbase.org/30352
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
Tested-by: Artem Stemkovski <artem@couchbase.com>
Merge remote-tracking branch 'gerrit/for-rackaware' into merge_b

* gerrit/for-rackaware:
  fixed ns_heart crash caused by wrong format string
  shutdown ns_heart slow_updater in terminate
  crash ns_heart if it's slow_updater child dies
  use proc_lib to spawn slow_updater of ns_heart
  introduced xdc_lhttpc_pool for all our lhttpc connections
  MB-100: copy couch_api_wrap* to ns_server
  hibernate idle xmem processes
  correctly output errors of remote_clusters_info POST
  missed groups properties in hookjs
  mockTheClock for casperJs
  MB-8726: send terse bucket info as streamingBucket output
  MB-100: introduced ns_bucket:get_bucket_with_vclock
  MB-1143: don't attempt to use rackawareness API in mixed versions
  MB-100: mark expected failed cells test as expected failing

  Trivial merge

Change-Id: I9bbd0a92d0539e6f5b8ec7c52ee1e7e228697d19