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

Change-Id: I8d37f92f2d06cca9648f20b40eeae2642d0a91ac
Reviewed-on: http://review.couchbase.org/41332
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-12156 Don't trap exits while change disk paths.

It's not needed and prevents us from a situation where process gets
stuck and wakes up much later (potentially after node became part of a
cluster) and thus invalidates the check that node is not provisioned.

Change-Id: Ie0f9ced83150ddca71781704c05a350dd4b6a271
Reviewed-on: http://review.couchbase.org/41333
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-12167 Hide page fault graphs from UI.

Change-Id: I73e099eb4800427fd52d0227e260b81f4a57f0d6
Reviewed-on: http://review.couchbase.org/41378
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
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: I3f17971f2c532c31e63237eb2f5c6956df95e98d
Reviewed-on: http://review.couchbase.org/41379
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
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: I4ea2225ea78a5543053396574d33f8459d22c302
Reviewed-on: http://review.couchbase.org/41410
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-12164 Don't confirm removing of node that was just added.

Change-Id: I6dab4b65367b4167b4d7e44bb4fb678bb10ad9a2
Reviewed-on: http://review.couchbase.org/41428
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-12197: dump all backtraces on slow bucket shutdown

To diagnose the issue in MB.

Change-Id: I5d33cc815ceba43bf5ca898bbdaeca3fc2842f3a
Reviewed-on: http://review.couchbase.org/41463
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-12197: made terminate_and_wait work even for normal reason

When exit is send with reason normal, it gets ignored if child is not
trapping exits.

Recent change of dcp_replicator childs to not trap exits caused
condition where terminate with reason normal got stuck because of
normal exit being ignored.

This commit maps normal to shutdown and fixes MB.

Change-Id: I913814746f24446532fc0462b208f527993f9900
Reviewed-on: http://review.couchbase.org/41474
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
fix and use ns_config_replica:get_compressed

Change-Id: I7db8172e035ffb0ea873b76e74cad0f0fd470eba
allow to initialize config by pulling it from another node

we also need to create duplicate set of node related keys for the node
we are copying config to in order for calls like search_node to
work correctly
initial implementation of couchdb node with the copy of config

no config replication yet

Change-Id: I934f5cd8e601cf1a830af9a96b060777748f1762
config replication from ns_server node to couchdb node

Change-Id: Iae84c24bdb0cdecefaf0566b9c1459ae0b759109
make single_bucket_sup a parameter in ns_bucket_worker_sup

so the same supervisors can be reused for couchdb node

Change-Id: I8a753e5ec8cee5cfab6c581ba710e7d80d718b02
handle ns_server node rename on ns_couchdb node

Change-Id: I0212a061f9d4522a300c3cd7120679dbe0a9c14b
do not use couch_config from ns_config_default

since there will be no couch_config on ns_server node, use env variable
with default value instead

Change-Id: If4bc21d0f4bc2fef55be83e36aa7e70587a0cff8
make sure that modules for child nodes are loaded in the same order

... as for ns_server node

Change-Id: Iec5f19c11046506d18063932e8c312a40b17e675
use sockets from pool for all compaction related calls to memcached

to be able to run compaction daemon on a node without ns_memcached
server

Change-Id: I193fd60957eaa973860452436bc63e2202c4082b
use http to access couchdb on handling /couchBase urls

the existing hack with passing mochi request to the couchdb web
server won't work after couchdb will be moved to different node

Change-Id: If176e18f2e33777e4b4f9bda5601bb974be137a0
wip: runs on one node with one bucket without crashes

Change-Id: I12294c2d069dead2d18a5aac130ee65a876ca82f
wip: ddoc replication

Change-Id: Ied4b77e9fd3ed7f950fc686218ea754d39f0a8f9