start couchdb node directly without involving babysitter

...and wait for it to be fully loaded before starting ns_server_sup

this will ensure the proper loading order of processes, so the retrying
will not be needed in ns_couchdb_api

this also prevents couchdb node from being restarted when node name
changes

Change-Id: If145bbeb382b99310bcb856f0b661c143fae0b1a
Reviewed-on: http://review.couchbase.org/42582
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
start and supervise doc managers on ns_couchdb node remotely

... to enforce the proper loading and termination  order of the processes

Change-Id: I481570e964ba63eba461225521abf29099fda196
Reviewed-on: http://review.couchbase.org/42583
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
ns_couchdb_api will not retry in case of badrpc error

Change-Id: Ic7c52d49d5a1c04101654119f5f7d32abdb35748
Reviewed-on: http://review.couchbase.org/42817
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
properly restart ssl services on both nodes when needed

Change-Id: Ic56cca34a8cb3ead8a80b1b84f67d725b9e49064
Reviewed-on: http://review.couchbase.org/42818
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
properly restart ns_server_cluster_sup when setting data path

restarting the whole ns_couchdb node is too slow, so just restart
couch_app on it

Change-Id: I2366ffc5dad242b41c49d9933fbdb8c724271535
Reviewed-on: http://review.couchbase.org/42879
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
log bucket directory deletion failures in ns_server

Because ns_couchdb doesn't even have ns_log logger defined (for good
reasons).

Otherwise deleting memcached bucket crashes ns_memcached.

Change-Id: I9a1c3ea899c5bcb7253d2d4467ee95d4884ee08a
Reviewed-on: http://review.couchbase.org/43110
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
don't start doc_replicat{or,ion_srv} for memcached buckets

Because we don't start corresponding capi_replication_manager for
them, so they crash regularly.

Change-Id: I22659ee9e1aa4b8dcab97c6758bd9b5369fde10f
Reviewed-on: http://review.couchbase.org/43111
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
only wait for ns_couchdb once and link to it's main supervisor

We now wait for ns_couchdb readyness in separate erlang process and
only in single place in code. That simplifies our code.

Change-Id: I53aa16fc7022ae9f72704ea7014e9658e56cfe9b
Reviewed-on: http://review.couchbase.org/43112
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
wait for ns_couchdb shutdown much longer

Change-Id: I04343faff7528e73efb14c9988f24727acf7616a
Reviewed-on: http://review.couchbase.org/43113
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>