MB-100: mention that old stats are lost on upgrade from mnesia

Change-Id: Ib9f49244119f04b48ff0b90ea5aa88f01c506ba1
Reviewed-on: http://review.couchbase.org/25424
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7604:cbcollect_info: curl /diag passing credentials properly

I.e. by passing them as separate argument and avoiding shell argument
expansion altogether.

As part of doing it I've made sure Task supports list
commands. I.e. command lines with explicit arguments which doesn't
need any shell expansion.

Change-Id: Ibaf16430306a2c6c5c5dfb614ad95f7cdf944244
Reviewed-on: http://review.couchbase.org/25428
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-5307 Remove references to non-existent path-box class.

Change-Id: Ibc8cd3897ef960896b1dbe0abfa32db19f6a2a69
Reviewed-on: http://review.couchbase.org/25321
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-5307 Try to stop net_kernel on dist_manager start.

If, for instance, dist_manager crashed or was killed brutally then
net_kernel will be left started. This will cause dist_manager to crash
in attempt to bring it up.

Change-Id: I144a307fa68324abd7f5920a695a34e7dd1a6447
Reviewed-on: http://review.couchbase.org/25339
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7398 Move is_good_address to misc.

Change-Id: Ib88990babcc086eea626b8fd9190482e24aca78e
Reviewed-on: http://review.couchbase.org/25319
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7398 Handle ip_start file in dist_manager.

Change-Id: I4ed0a297102111c3bc88a0f74d56f054960b5268
Reviewed-on: http://review.couchbase.org/25340
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7398 REST call to rename a node.

Change-Id: I384a493806ccc87095e1609c2dc3e5fe1dc1a685
Reviewed-on: http://review.couchbase.org/25320
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7398 Ability to specify server hostname in wizard.

Change-Id: Idb39a8987c8ee9b8e414649f016367bd00ed6b57
Reviewed-on: http://review.couchbase.org/25322
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7398 Rename added node to what was specified as its address.

As part of information that is posted to engageCluster2 we provide a
requestedTargetNodeHostname field that indicates how the node was
referred in the cluster. So target node can rename itself to use this
hostname.

Change-Id: I72e6c06b5c61834abecdaaf52a820924f87018d5
Reviewed-on: http://review.couchbase.org/25341
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-5307 Handle failure to save address after rename.

We just ignored this before. But this can cause all sorts of badness
if the server gets restarted (it will start with wrong name basically).

Change-Id: Ife65bf88c6918253981dac2b445898afefc06f6a
Reviewed-on: http://review.couchbase.org/25342
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
CBD-220: switched ns_server_sup to supervisor2

So that we don't have to rely on supervisor_cushion for compaction
daemon.

Change-Id: I1199636cbf1142a4742423120b443ae7cec09de9
CBD-220: [ale] allow syncing all log messages to all sinks

So that we can exit without bothering to shutdown ale cleanly

Change-Id: I14829b98254fb567f0c6b3282c438d5a86a7d7eb
CBD-220: run memcached and ns_server from babysitting VM

I.e. so that:

a) windows nodes can finally rename themselves. Because ns_server is
run as ordinary erlang VM, not as direct erlsrv child

b) death of ns_server cannot bring down memcached

As part of this change we're changing a way cluster_run control
lifecycle of it's childs. I.e. instead of using posix but apprently
not OSX-compatible testament_child_death trick, we're now starting
babysitter in a same way ns_server or our usual port servers are
started. I.e. by having pipe into stdin and if that pipe is closed
(i.e. cluster_run dies) babysitter will just die asap (but shutting
down memcached and ns_server quickly before exiting).

initscript is started similarly as before, main difference being
startup of ns_babysitter_bootstrap rather than ns_bootstrap. And
shutdown is handled similarly, just via ns_babysitter_bootstrap. As
before, stop action spawns executioner erlang node that remotely asks
babysitter to shutdown gracefully. Stop action waits for shutdown of
all components just as before.

Babysitter VM is designed to be as minimal as possible. So it only
supervises ns_server's port server as well as dynamic set of child
port servers via ns_child_ports_sup. As part of ns_server startup
it'll contact it's own babysitter (via static 'babysitter_' + node()
name) and set it's ns_child_ports_sup dynamic childs. NOTE: there's a
tiny race there because we start ns_server first. But this is handled
by making ns_port_setup entry in supervisor be crash resistant (via
supervisor2 feature). Such behavior is made in order to have shutdown
start with memcached & moxi and stop ns_server last. That's good
w.r.t. having stats all the way until memcached shutdown. But it's
also required to have mccouch running so that ep-engine buckets can
continue persisting their stuff.

In addition to pure babysitting I also had to place some simple crash
logging facility into babysitter vm. I.e. so that memcached crashes
are visible in ns_log as before. This new facility preserves last 100
crashes which ns_server's component consumes and logs into ns_log.

Change-Id: Id4f1e6185726a2e9040b88400a99e38d44390bb0