MB-8863: improved ROUser created message

Change-Id: Ibbbed603bf8ca1c4ae4e8f3ba6e5656923ad69d3
Reviewed-on: http://review.couchbase.org/30213
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9514: start stale histo epoch cleaner at right time

It's very clearly a bad idea to do it before ets table is created. And
fix is obvious.

Change-Id: I0d517c53e88a0d9de2081043e813d3e80cb61420
Reviewed-on: http://review.couchbase.org/30265
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-4643: maxlength attribute for login form fields

Change-Id: Ibd59a42281ca5686804ca99ee6ad93ac50c7251a
Reviewed-on: http://review.couchbase.org/30231
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
fixed error in the mockTheClock.js

Change-Id: I3b78fb708e97d3c27bd227af6b57be654bdbe83f
Reviewed-on: http://review.couchbase.org/30286
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
wrapped-date independence from underscore

Change-Id: I8262096b245fd6bce335f63404e3428b29854c7d
Reviewed-on: http://review.couchbase.org/30287
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100: removed manual ++ optimization

It turns out ++ BIF is doing it more or less in same way. I.e. see
erl_bif_lists.c:append_2. The only difference is that it validates
first argument for being list (and computes it's length) prior to
examining second arg emptyness. But because that's C code and because
we don't expect our lists to be huge, I believe leaving that
optimization to C is benefical. And simpler code is a win in itself.

Change-Id: If45b11978e778fd37247de9208789240419a3d96
Reviewed-on: http://review.couchbase.org/30217
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100: added run_queues to heartbeat stats

Change-Id: I924eea284439ee6d295f06c852f37c29205c3d1d
Reviewed-on: http://review.couchbase.org/30218
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100: log "took too long" memcached messages as debug

I.e. because it's still too common and is largely diagnostics for us
and not really error.

Change-Id: Iabb8b7bba960e3164ac8c49457d6b374c402ccaa
Reviewed-on: http://review.couchbase.org/30219
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100: corrected lsof usage

We found that greping lsof output is not always working because lsof
cuts full process name and particularly godu processes were filtered
out.

New code is doing pgrep to find all relevant processes.

I've also fixed misc issue with finding sigar port process.

Change-Id: Ide7d0f3f98b46ed76be2168093f13dd738f68489
Reviewed-on: http://review.couchbase.org/30220
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100: cb-collect redhat_transparent_hugepage-s data too

For whatever reason rhel6.2 (and presumably later) has different
directory with info about this feature. So we gather it too.

Change-Id: If4b6a3cf9ad8a12e599e2514f4a0619b80f8ebce
Reviewed-on: http://review.couchbase.org/30221
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9472:[couchbase-server] calm ls if erl_crash_dump.* is missing

Change-Id: I1e06ca5f814ca3476ed6b7789c544a99cb8422e0
Reviewed-on: http://review.couchbase.org/30222
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9472: adjusted ulimit warning text

To note that couchbase user is only for normal (root) installs.

Change-Id: I29d760872081b6824cb75fa93951840f876ee587
Reviewed-on: http://review.couchbase.org/30223
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-1143 Rack-aware vbucket map generation (replica count > 1).

Current limitations:

  - best effort is still not there
  - the process of generating matrix R from RI is still not rack
    aware; so for certain RIs even if fully rack aware R is feasible,
    the generated one might not be fully rack aware; and hence the
    induced vbucket map will have small number of vbuckets for which
    rack constraints are violated

Change-Id: Id17c5ab4bacb4e3dcb53e99250004bce41dd8413
Reviewed-on: http://review.couchbase.org/30276
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-1143: suggest rebalance if server groups have changed

This commit modifies ns_rebalancer:unbalanced logic to return true if
vbucket map options differ from last successful rebalance. And we now
store vbucket map options hash in order to detect that.

Change-Id: I479c038fffe116805e20b51e2af41ccdbbab30b2
Reviewed-on: http://review.couchbase.org/30224
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9480: Revert "MB-9457: pass swt low to child erlang"

This reverts commit 27f631902d17aec23a007826758bdf7722a7ed13.

It appears that +swt low triggers some erlang VM bug that caused nodes
to hang.

Change-Id: I8ccbbeff42e3adcc4e0943bc0c8bcb5c07c468bb
Reviewed-on: http://review.couchbase.org/30328
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
MB-100: gather /proc/sys/netstat too

I.e. for low level network statistics like tcp retransmits

Change-Id: Icf80fbac633601cd092b7f9e7447b3fa21a63163
Reviewed-on: http://review.couchbase.org/30329
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
Merge remote-tracking branch 'origin/for-rackaware'

* origin/for-rackaware:
  MB-100: gather /proc/sys/netstat too
  MB-9480: Revert "MB-9457: pass swt low to child erlang"
  MB-1143: suggest rebalance if server groups have changed
  MB-1143 Rack-aware vbucket map generation (replica count > 1).
  MB-9472: adjusted ulimit warning text
  MB-9472:[couchbase-server] calm ls if erl_crash_dump.* is missing
  MB-100: cb-collect redhat_transparent_hugepage-s data too
  MB-100: corrected lsof usage
  MB-100: log "took too long" memcached messages as debug
  MB-100: added run_queues to heartbeat stats
  MB-100: removed manual ++ optimization
  wrapped-date independence from underscore
  fixed error in the mockTheClock.js
  MB-4643: maxlength attribute for login form fields
  MB-9514: start stale histo epoch cleaner at right time
  MB-8863: improved ROUser created message

Conflicts:
	src/ns_online_config_upgrader.erl

Mostly trivial. With exception of minor conflict in amputated 1.8.x
config upgrade code.

Change-Id: I22c168b2ecad0e7e44179760c10377a6172109ce