bp: MB-12156 Don't delete buckets when changing datapath.

Change-Id: Ie738291e367e3e136c771086a7c1deb6d45c7dc1
Orig-Reviewed-on: http://review.couchbase.org/41332
Reviewed-on: http://review.couchbase.org/42987
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp: MB-12147 Check all required stats for disk/data usage.

We have couch_disk_data_size (as well as some other stats that don't
make sense) even if there're only memmcached buckets. That's because in
certain places we don't make clear separation between memcached and
membase buckets in stats_collector code. I decided that it's easier to
just check all the required stats and fix the referred bug in this way.

Change-Id: Ia1620031aa87245178e205a30f7e97ded2ac7451
Orig-Reviewed-on: http://review.couchbase.org/41379
Reviewed-on: http://review.couchbase.org/42988
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp: MB-12158: don't trap exits in dcp_proxy processes

Because we don't really need to.

And most importantly because erlang has a bug where send might get
stuck forever if socket is closed on other end.

So if we just die when dcp_replicator dies we'll avoid this
problem. Or at very least we'll close both sockets without any delays.

Change-Id: Id6143b6157aad641e28cdc783b74a0843d55b118
Orig-Reviewed-on: http://review.couchbase.org/41410
Reviewed-on: http://review.couchbase.org/42989
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp: MB-12288:only allow xdcr-over-ssl proxying to memcached data port

Change-Id: Iec6869a2762366283ebabc508879ad2f3ef39763
Orig-Reviewed-on: http://review.couchbase.org/41804
Reviewed-on: http://review.couchbase.org/42990
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp:MB-12358: disable ssl v3 for management and capi endpoints

Change-Id: I4cf9ccac9e487e417f0f3c74ea295bbf1421be40
Orig-Reviewed-on: http://review.couchbase.org/42188
Reviewed-on: http://review.couchbase.org/42991
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp: MB-12358: disable ssl v3 for xdcr ssl proxy

Change-Id: Ic4cd9ac5dd7a8bd4351af7154a84e82fc17f1cb7
Orig-Reviewed-on: http://review.couchbase.org/42209
Reviewed-on: http://review.couchbase.org/42992
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp:MB-12104 restart terse_bucket_info_uploader after ns_memcached is restarted

to make sure that terse bucket info gets reuploaded to memcached

Change-Id: Ic0e6303102dbcd301b042301b34026b4d4b6709c
Orig-Reviewed-on: http://review.couchbase.org/42394
Reviewed-on: http://review.couchbase.org/42993
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp: harmless typo

Change-Id: I3bd2dbd8f8abea0ad480abb6c12898cadeb16dbd
Orig-Reviewed-on: http://review.couchbase.org/42397
Reviewed-on: http://review.couchbase.org/42994
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp: don't insist on unique name for ns_memcached_sup instances

Which breaks multiple buckets because every bucket creates its own
instance of ns_memcached_sup which all try to register under same name
and fail.

Change-Id: I4cff4d6db4706ae4b529b832916dc7cff5d3918d
Orig-Reviewed-on: http://review.couchbase.org/42433
Reviewed-on: http://review.couchbase.org/42995
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp: MB-9890: cleanup keys/bodies from xdcr_vbucket_rep crash reports

I.e. so that we cannot leak customer data there

Change-Id: I23647d34f8bb8b44fc51bedbd9cae4e9aa41e04c
Orig-Reviewed-on: http://review.couchbase.org/42490
Reviewed-on: http://review.couchbase.org/42996
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp: remove unnecessary opening/closing of master db from xdc_vbucket_rep

Change-Id: Ia350ba648740b4aacca52dabf2235d202ecf96a1
Orig-Reviewed-on: http://review.couchbase.org/41934
Reviewed-on: http://review.couchbase.org/42997
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp: MB-9890: avoid logging states of xdc_vbucket_rep childs

When xdc_vbucket_rep process exits it triggers proc_lib code that
dumps exit reason and other convenience diagnostic. Part of that
diagnostics is dump of neighbor process states that don't trap
exits. And worker sub-processes of xdc_vbucket_rep are such processes
that don't trap exits.

So in order to prevent proc_lib from exposing internals of those
workers, we create them via intermediate processes that do trap exits.

Change-Id: I68e13786568a5fba336b59500b2189807f047ce0
Orig-Reviewed-on: http://review.couchbase.org/42491
Reviewed-on: http://review.couchbase.org/42998
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>