backported ./script/only-web.rb fixes from master

Change-Id: Ib7e4624c17638190108aa953e3aab5af373649e8
Reviewed-on: http://review.couchbase.org/15238
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
unbreak only-web.rb under modern sinatra gem

Found and reported by Sergey Avseyev

Change-Id: I20067b2c37d2b42b932d132879387ce989d41d42
Reviewed-on: http://review.couchbase.org/15239
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
[only-web.rb] allow custom rubies (e.g. via rvm)

Change-Id: I3ec814f3c030277110c8e3c7bc591e3c77285070
Reviewed-on: http://review.couchbase.org/15240
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
set keepalive on ebucketmigrator sockets. MB-5049

We've seen evidence of ebucketmigrator not being aware of other node
being completely down. This makes it fail quicker on kernel level.

Change-Id: I24fe1748279b83ea2923186ae4f47f7555d99db8
Reviewed-on: http://review.couchbase.org/15248
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
added logging to auto_failover_logic

Change-Id: I9f546cc8b9973be55344908406c0f858847334e8
Reviewed-on: http://review.couchbase.org/15241
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
added node's last hearbeat to auto failed over log message

Change-Id: I129c323b178427d5fa45ecd3a7f8312aa1d4ad3e
Reviewed-on: http://review.couchbase.org/15242
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
log slow ns_memcached:handle_info calls as well

Change-Id: Ifd886e391c56fda50f46fb5aa6669e4b70f7e87e
Reviewed-on: http://review.couchbase.org/15243
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
reduced ns_log dedup window to 15 seconds

We don't log to ns_log too often. But when we log it's often quite
important stuff.

We've seen in practice how dedup made things less visible. So let's
limit it.

Change-Id: I94298ee1a53aae6b0bb998ca921abb564a40420c
Reviewed-on: http://review.couchbase.org/15244
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
grab tap and checkpoint stats in diag. MB-4482

Change-Id: Ie384e45c388c8332b1a15a0e65d838c6c3ac83a9
Reviewed-on: http://review.couchbase.org/15245
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
log tap and checkpoint stats at end of rebalance

Change-Id: Ife0d7744fb19920f9068ae6ff45a90b83b118efb
Reviewed-on: http://review.couchbase.org/15246
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
log tap stats every 30 seconds during rebalance

Change-Id: I8657fe5c0822fcfca0ca74914ed941c99eb9ebaf
Reviewed-on: http://review.couchbase.org/15247
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge remote-tracking branch 'origin/branch-181' into branch-18

* origin/branch-181:
  log tap stats every 30 seconds during rebalance
  log tap and checkpoint stats at end of rebalance
  grab tap and checkpoint stats in diag. MB-4482
  reduced ns_log dedup window to 15 seconds
  log slow ns_memcached:handle_info calls as well
  added node's last hearbeat to auto failed over log message
  added logging to auto_failover_logic
  set keepalive on ebucketmigrator sockets. MB-5049
  [only-web.rb] allow custom rubies (e.g. via rvm)
  unbreak only-web.rb under modern sinatra gem
  backported ./script/only-web.rb fixes from master

Conflicts:
	src/ebucketmigrator_srv.erl

Change-Id: Iac51698d51cbd9a20dba5e4954217ae242d80f16