MB-5307 Check moxi_port for conflicts with dedicated_port.

Change-Id: I136eb9acb71e581f5422d206436b0318e233a0a6
Reviewed-on: http://review.couchbase.org/17236
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-5565 Check cpu_utilization_rate sanity correctly.

Change-Id: Idde0054fa82315793cb446a5f8b0747948bdfa1a
Reviewed-on: http://review.couchbase.org/17268
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-4703: Make cbbrowse_logs command work on Mac OS

Find path to Couchbase root relative to script,
then use that as the base for search paths.

Change-Id: Iecb59df358afa3ef0f81b37c9c2001a5a5a798d7
[alk@tut.by: rebased for 1.8.1]
[alk@tut.by: renamed to cbbrowse_logs and dont use sed anymore]
Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
Reviewed-on: http://review.couchbase.org/17327
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Jens Alfke <jens@couchbase.com>
Tested-by: Farshid Ghods <farshid@couchbase.com>
Reviewed-by: Farshid Ghods <farshid@couchbase.com>
MB-5579: made phone home send it's stuff via POST

JSONP cannot be used to deliver large amounts of stuff. Instead we're
POSTing stuff via hidden iframe's form submit, and we're getting
information about new versions by doing short JSONP GET.

Update notifications UI is also refactored a bit to do be more
cellfull. Particularly it now draws nice spinner when it's fetching
updates data.

As can be seen in fake-phone-home script. POSTed data is still json,
that's sent as "stats" field that's traditional form
url-encoding. That should be same as before, just uses POST instead of
GET.

It's possible to match POST & GET by looking at query string parameter
launchID that's unique identifier of phone home call. _Both_ GET &
POST will have this query string parameter and it will be
same. launchID as can be seen in code is built as concatenation of
cluster's uuid, current epoch milliseconds and random 16-bit value. So
not only it's unique, but even if we lost POST we can at least count
distinct clusters in the wild (who agreed to send phone home stats).

GET now only sends launchID as described above and version. I assume
that should be enough to send back something meaningful. In worst case
server-side implementation of GET can wait until POST is received and
extract any additional info it may need from there, then wake up GET
request and make it reply something.

Change-Id: I34de54a705dda3495fe64e8da86d12e2798392aa
Reviewed-on: http://review.couchbase.org/17338
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Dustin Sallings <dustin@spy.net>
MB-5308: don't set 'for' attr. of label for checkbox inside it

Apparently that's not working with Chrome 19. Removing "for" attribute
makes clicking on label work, i.e. it'll toggle checkbox as expected.

Change-Id: I676e69c150f9f1fe891fbf547702ea4b1395d302
Reviewed-on: http://review.couchbase.org/17339
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-5602: consider buckets' servers list when computing down nodes

Previous code assumed that all nodes need to have all buckets, but
that's not the case. Particularly, for partially rebalanced in or
partially rebalanced out nodes.

Fix is, naturally, to look exactly which buckets are expected to be up
and running on each node.

Change-Id: Iec3630a86fc92f213c32cf84f461388e4f5004f1
Reviewed-on: http://review.couchbase.org/17372
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
CBD-364: updated enterprise product registration

As requested by Dipti.

Change-Id: I708302d354169bed84d7e000b0c60988236627bf
Reviewed-on: http://review.couchbase.org/17374
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-5307: improved ns_config logging around clear call

Change-Id: I356ea4b55d1d56ccdfbdf399720a0aadd8b7d3d9
Reviewed-on: http://review.couchbase.org/17520
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Farshid Ghods <farshid@couchbase.com>
MB-5646: cbcollect_info fixes, including cbstats raw allocator

Besides adding 'cbstats raw allocator', cbstats might not also accept
'-a' flag anymore, so we call it twice, with and without, just in
case.

Additionally, fixed trying to get the dbdir on linux.

Change-Id: Icdf657425b82f2e78ee270c26c2f6689532f9002
Reviewed-on: http://review.couchbase.org/17523
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
MB-5645: cbbrowse_logs uses .., not double dirname

OSX needs absolute path, and its logs live in a different place.

Change-Id: I4c342cfefa98449237c4c2710f6f1ad306ae0a3d
Reviewed-on: http://review.couchbase.org/17527
Tested-by: Jens Alfke <jens@couchbase.com>
Reviewed-by: Jens Alfke <jens@couchbase.com>
MB-5650: try harder to find escript tool and config.dat

Try the usual places for linux, windows and OSX.

Windows is special because "escript" would be automatically
incorrectly executed as "escript.escript".

Change-Id: Ieaa019ea0aad1dd57e30eb78907207ab5dabd0ba
Reviewed-on: http://review.couchbase.org/17557
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>
MB-5657: create cbcollect_info tasks after main() has fixed PATH

Change-Id: I153f624e199b9197827c3e49b4eed9d9a82e82bf
Reviewed-on: http://review.couchbase.org/17562
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
Merge remote branch 'origin/branch-181' into branch-18

* origin/branch-181:
  MB-5657: create cbcollect_info tasks after main() has fixed PATH
  MB-5650: try harder to find escript tool and config.dat
  MB-5645: cbbrowse_logs uses .., not double dirname
  MB-5646: cbcollect_info fixes, including cbstats raw allocator
  MB-5307: improved ns_config logging around clear call
  CBD-364: updated enterprise product registration
  MB-5602: consider buckets' servers list when computing down nodes
  MB-5308: don't set 'for' attr. of label for checkbox inside it
  MB-5579: made phone home send it's stuff via POST
  MB-4703: Make cbbrowse_logs command work on Mac OS
  MB-5565 Check cpu_utilization_rate sanity correctly.
  MB-5307 Check moxi_port for conflicts with dedicated_port.

Change-Id: I51f3264e199b9197827c3e49b4eed9d9a82e82bf