summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangxiyuan <wangxiyuan@huawei.com>2016-04-01 11:45:27 +0800
committerwangxiyuan <wangxiyuan@huawei.com>2016-04-01 11:45:43 +0800
commit8be653361f4b2dba67e96698930b6f1e8b7a5b93 (patch)
tree2c17989c5affc083a08b12a0aeb51814540566a1
parentba7c40a72823918a49634ec65ba69ecd6c9cf1e0 (diff)
downloadosprofiler-8be653361f4b2dba67e96698930b6f1e8b7a5b93.tar.gz
Add an error tip when trace_id is not found
If ceilometer doesn't enable profiler notification topic, the trace_id would not be found as well. Change-Id: I54a976498ae77380ecdce1b449ba70a9522ce692
-rw-r--r--osprofiler/cmd/commands.py3
-rw-r--r--osprofiler/tests/cmd/test_shell.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/osprofiler/cmd/commands.py b/osprofiler/cmd/commands.py
index b2700b6..a101fe0 100644
--- a/osprofiler/cmd/commands.py
+++ b/osprofiler/cmd/commands.py
@@ -71,7 +71,8 @@ class TraceCommands(BaseCommand):
"There are 3 possible reasons: \n"
" 1) You are using not admin credentials\n"
" 2) You specified wrong trace id\n"
- " 3) You specified wrong HMAC Key in original calling"
+ " 3) You specified wrong HMAC Key in original calling\n"
+ " 4) Ceilometer didn't enable profiler notification topic"
% args.trace)
raise exc.CommandError(msg)
diff --git a/osprofiler/tests/cmd/test_shell.py b/osprofiler/tests/cmd/test_shell.py
index a146189..b11bc3e 100644
--- a/osprofiler/tests/cmd/test_shell.py
+++ b/osprofiler/tests/cmd/test_shell.py
@@ -158,7 +158,8 @@ class ShellTestCase(test.TestCase):
msg = ("Trace with UUID %s not found. There are 3 possible reasons: \n"
" 1) You are using not admin credentials\n"
" 2) You specified wrong trace id\n"
- " 3) You specified wrong HMAC Key in original calling"
+ " 3) You specified wrong HMAC Key in original calling\n"
+ " 4) Ceilometer didn't enable profiler notification topic"
% fake_trace_id)
self._test_with_command_error("trace show %s" % fake_trace_id, msg)