MB-9883: allow asking for rc4-128 cipher

I.e. so that we can investigate that faster cipher influence of
overall cpu consumption.

Change-Id: I290e66ff17318f6d81aed1985493eeb32cc2b7ce
Reviewed-on: http://review.couchbase.org/32372
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
log unexpected remote_clusters_info errors

Change-Id: Ic89db558b853c2c69d5464245dfa65c9b953599b
Reviewed-on: http://review.couchbase.org/32373
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
log unexpected rest errors in menelaus_web_remote_clusters

Change-Id: I2e6ccb3ac7535f648f9cc2ca91836dc258927337
Reviewed-on: http://review.couchbase.org/32374
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
don't say we found multiple certificates when none was found

Change-Id: I74b3e5a297d3218fd78d23cf6ef7e2e418aac48c
Reviewed-on: http://review.couchbase.org/32375
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
make SSL UI look a bit more like email settings

Change-Id: I383e17e7d8707c516996df0f89201938b3f096c4
Reviewed-on: http://review.couchbase.org/32366
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9811: nicely format certificate mismatch errors

Change-Id: I0b0ee9fae586b916315ffe580d88d2c4cad6fc7d
Reviewed-on: http://review.couchbase.org/32376
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-9811: detect if remote cluster does not support xdcr-over-ssl

Change-Id: Id8cde8577280021d211ac1e54390b515834a6ec0
Reviewed-on: http://review.couchbase.org/32377
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
acc managment similar to other Save buttons in other tabs

Change-Id: I0f1b9d1485670b401efb7e56e9bf4bb6d5bb2155
Reviewed-on: http://review.couchbase.org/32368
Reviewed-by: Pavel Blagodov <stochmail@gmail.com>
Tested-by: Pavel Blagodov <stochmail@gmail.com>
cluster settings RAM Quota similar to what we have in wizard

Change-Id: Iaf53e0d56860729170eb683495e190b8023996fd
Reviewed-on: http://review.couchbase.org/32442
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9922: crash vbucket xmem replicator on xdcr certificate update

I.e. so that we're never replicating in plain when ssl is needed.

Change-Id: Id41c5fa10739b1e6af9f54103c04914cce29bcbf
Reviewed-on: http://review.couchbase.org/32498
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Include "netstat -s" output into cbcollect_info.

It's the same information that's provided in /proc/net/netstat but in
a human-readable form.

Change-Id: I08400afaa11e95b00fa42a6eee1fadef400f9f6e
Reviewed-on: http://review.couchbase.org/32564
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9926: correctly propagate errors from find_missing_revs

Previous code was incorrectly adding {error, idrev} pairs to list of
missing revs causing ids that caused get-meta errors to be not
included into list of actually replicated docs

Change-Id: I0c10ab82460d201c95fa65a48479665a5b980af1
Reviewed-on: http://review.couchbase.org/32603
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-9883: send memcached request batches with single calls

That should produce even better results than delay_send option.

Change-Id: Iba0891cf2d0fda96f77a733baffed99cab57f0a5
Reviewed-on: http://review.couchbase.org/32701
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9883: control batching of memcached replies in proxy

We now have slightly different proxy protocol that allows proxy on
remote node to be aware of memcached batches.

For that every batch now starts with 32-bit batch size in bytes
followed by 32-bit batch size in requests. Downstream proxy is using
that to accumulate proper count of replies before sending all of them
via single ssl:send call.

We have to break abstractions a bit to support that. Particularly
proxied_memcached_clients_pool has to be aware of batching.

Change-Id: I960d50b884ede1a96b142acc3be268224618ec60
Reviewed-on: http://review.couchbase.org/32704
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-9969: correctly compute nodes field of remote cluster

I.e. it looks like I've left some code that was accidently first
computing RemoteNodes and then matching it against different
computation of same value. When remote cluster is rebalanced it's
possible for this two computations to give different results causing
badmatch.

Change-Id: Ie4f337b72d5eb439c2576f84a6e6a3c192a72bfc
Reviewed-on: http://review.couchbase.org/32706
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9967 Don't crash when returning recovery task.

Change-Id: Iac67c83b224bba095b62b0bd9a01b754e04e0f2d
Reviewed-on: http://review.couchbase.org/32689
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9975: do not allow buckets to take ssl ports

Change-Id: Ib369e0c707174c742941f9c0202ddfe04e02bda3
Reviewed-on: http://review.couchbase.org/32709
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-9984 Fix recovery with star replication topology.

When starting recovery we create a special bucket config whose map
contains chains like [undefined, Node] when we want to create the
replica vbucket on Node. The problem was that
janitor_agent:apply_new_bucket_config_new_style_star used
ns_bucket:map_to_replicas_star to decide on which nodes replica
vbuckets have to be created. And the latter function explicitly
ignores replication pairs where either master or replica is undefined.

Change-Id: I558d63b3949a49edda8d2e8751c4f448fb203204
Reviewed-on: http://review.couchbase.org/32746
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9988: bump had_backfill timeout to infinity

We have a general policy of having infinite erlang timeouts for
everything related to rebalance. The logic is as soon as rebalance
stop works without relying on those timeouts, we're fine. And stop
doesn't rely on timeouts because those calls are wrapped with
spawn_and_wait which was built specifically to be able to abort
something when rebalance is stopped.

Change-Id: Ie49d24bb19b87669b971a94d2612b5941fec75ae
Reviewed-on: http://review.couchbase.org/32749
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge remote-tracking branch 'origin/for-rackaware'

* origin/for-rackaware:
  MB-9988: bump had_backfill timeout to infinity
  MB-9984 Fix recovery with star replication topology.
  MB-9975: do not allow buckets to take ssl ports
  MB-9967 Don't crash when returning recovery task.
  MB-9969: correctly compute nodes field of remote cluster
  MB-9883: control batching of memcached replies in proxy
  MB-9883: send memcached request batches with single calls
  MB-9926: correctly propagate errors from find_missing_revs
  Include "netstat -s" output into cbcollect_info.
  MB-9922: crash vbucket xmem replicator on xdcr certificate update
  cluster settings RAM Quota similar to what we have in wizard
  acc managment similar to other Save buttons in other tabs
  MB-9811: detect if remote cluster does not support xdcr-over-ssl
  MB-9811: nicely format certificate mismatch errors
  make SSL UI look a bit more like email settings
  don't say we found multiple certificates when none was found
  log unexpected rest errors in menelaus_web_remote_clusters
  log unexpected remote_clusters_info errors
  MB-9883: allow asking for rc4-128 cipher

Change-Id: I8e727520beb81f926f83e1828d92061bcb754f05