Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MB-100:Merge branch 'branch-181' into branch-18

* branch-181:
  MB-5895: consider upgrading vb map history at rebalance start
  MB-5678: cbcollect_info invokes cbstats with its changed params

Change-Id: I292cedb61a9bf00676b73ab864c6e6c29647ff41
  • Loading branch information...
commit 0ffcbabc02a83fe1906ebc0e5adbab571fa35305 2 parents ff1356e + 8faeffa
@bcui6611 bcui6611 authored
View
62 cbcollect_info
@@ -227,7 +227,7 @@ def get_dbdir():
def get_credential():
ret = retrieve_config_value('\s*{creds,\[\{"(.+)",\s*\[\{password,\s*"(.*)"\}')
if ret:
- return "{0}:{1}".format(ret[0], ret[1])
+ return "%s:%s" % (ret[0], ret[1])
else:
return ""
@@ -324,7 +324,34 @@ def make_tasks():
os.path.dirname(sys.argv[0]) + "/cbdumpconfig.escript /opt/couchbase/var/lib/couchbase/config/config.dat"),
AllOsTask("couchbase logs", "cbbrowse_logs", log_file="ns_server.debug.log"),
AllOsTask("couchbase logs", "cbbrowse_logs info", log_file="ns_server.info.log"),
- AllOsTask("couchbase logs", "cbbrowse_logs error", log_file="ns_server.error.log")
+ AllOsTask("couchbase logs", "cbbrowse_logs error", log_file="ns_server.error.log"),
+ AllOsTask("memcached stats all",
+ "cbstats -a 127.0.0.1:11210 all -b _admin -p _admin",
+ log_file="stats.log"),
+ AllOsTask("memcached stats checkpoint",
+ "cbstats -a 127.0.0.1:11210 checkpoint -b _admin -p _admin",
+ log_file="stats.log"),
+ AllOsTask("memcached stats dispatcher",
+ "cbstats -a 127.0.0.1:11210 dispatcher logs -b _admin -p _admin",
+ log_file="stats.log"),
+ AllOsTask("memcached stats hash",
+ "cbstats -a 127.0.0.1:11210 hash detail -b _admin -p _admin",
+ log_file="stats.log"),
+ AllOsTask("memcached stats tap",
+ "cbstats -a 127.0.0.1:11210 tap -b _admin -p _admin",
+ log_file="stats.log"),
+ AllOsTask("memcached stats tapagg",
+ "cbstats -a 127.0.0.1:11210 tapagg -b _admin -p _admin",
+ log_file="stats.log"),
+ AllOsTask("memcached stats timings",
+ "cbstats -a 127.0.0.1:11210 timings -b _admin -p _admin",
+ log_file="stats.log"),
+ AllOsTask("memcached memory stats",
+ "cbstats -a 127.0.0.1:11210 raw memory -b _admin -p _admin",
+ log_file="stats.log"),
+ AllOsTask("memcached allocator stats",
+ "cbstats -a 127.0.0.1:11210 raw allocator -b _admin -p _admin",
+ log_file="stats.log")
]
c = get_credential()
@@ -334,37 +361,6 @@ def make_tasks():
"curl \"http://%s@127.0.0.1:8091/diag?noLogs=1\"" % (c),
log_file="diag.log"))
- for flg in ['', '-a']:
- _tasks = _tasks + [
- AllOsTask("memcached stats all",
- "cbstats %s 127.0.0.1:11210 all _admin _admin" % (flg),
- log_file="stats.log"),
- AllOsTask("memcached stats checkpoint",
- "cbstats %s 127.0.0.1:11210 checkpoint _admin _admin" % (flg),
- log_file="stats.log"),
- AllOsTask("memcached stats dispatcher",
- "cbstats %s 127.0.0.1:11210 dispatcher logs _admin _admin" % (flg),
- log_file="stats.log"),
- AllOsTask("memcached stats hash",
- "cbstats %s 127.0.0.1:11210 hash detail _admin _admin" % (flg),
- log_file="stats.log"),
- AllOsTask("memcached stats tap",
- "cbstats %s 127.0.0.1:11210 tap _admin _admin" % (flg),
- log_file="stats.log"),
- AllOsTask("memcached stats tapagg",
- "cbstats %s 127.0.0.1:11210 tapagg _admin _admin" % (flg),
- log_file="stats.log"),
- AllOsTask("memcached stats timings",
- "cbstats %s 127.0.0.1:11210 timings _admin _admin" % (flg),
- log_file="stats.log"),
- AllOsTask("memcached memory stats",
- "cbstats %s 127.0.0.1:11210 raw memory _admin _admin" % (flg),
- log_file="stats.log"),
- AllOsTask("memcached allocator stats",
- "cbstats %s 127.0.0.1:11210 raw allocator _admin _admin" % (flg),
- log_file="stats.log")
- ]
-
return _tasks
def main():
View
4 src/ns_config_default.erl
@@ -225,8 +225,8 @@ maybe_add_vbucket_map_history(Config) ->
maybe_add_vbucket_map_history(Config, HistorySize) ->
case ns_config:search(Config, vbucket_map_history) of
- {value, _} -> [];
- false ->
+ {value, [_|_]} -> [];
+ _ -> %% no history or empty history
Buckets = ns_bucket:get_buckets(Config),
History = lists:flatmap(
fun ({_Bucket, BucketConfig}) ->
View
6 src/ns_orchestrator.erl
@@ -399,6 +399,12 @@ idle({start_rebalance, KeepNodes, EjectNodes, FailedNodes}, _From,
"Starting rebalance, KeepNodes = ~p, EjectNodes = ~p~n",
[KeepNodes, EjectNodes]),
ns_cluster:counter_inc(rebalance_start),
+ case ns_config_default:maybe_add_vbucket_map_history(ns_config:get()) of
+ [{set, vbucket_map_history, History}] ->
+ ns_config:set(vbucket_map_history, History);
+ [] ->
+ ok
+ end,
Pid = spawn_link(
fun () ->
master_activity_events:note_rebalance_start(self(), KeepNodes, EjectNodes, FailedNodes),
Please sign in to comment.
Something went wrong with that request. Please try again.