No neutron project api calls in osprofiler trace
Hi
I am trying to run osprofiler for neutron project, but couldn't see neutron trace.
I followed these steps -
1) I have a devstack setup. Enabled osprofiler like expalined in this link
https:/
2) used this neutron cli patch https:/
3) executed neutron commands with --profile option, for example
neutron --profile SECRET_KEY port-create --name p8 99eefdc0-
4) osprofiler trace show --html 384caac9-
But that html file is not showing any neutron api. It is showing only keystone project api.
Did anyone tried neutron trace with osprofiler? Please help.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- osprofiler Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Dina Belova
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
content of trace html file
<!doctype html>
<html ng-app=
<head>
<script>
var OSProfilerData = {
"info": {
"started": 0,
"finished": 140,
"name": "total"
},
"stats": {
"wsgi": {
"count": 2,
"duration": 101
}
},
"children": [
{
"info": {
"name": "wsgi",
"service": "main",
"started": 0,
"info": {
"host": "vagrant",
},
"name": "wsgi-stop",
},
"finished": 7,
"project": "keystone",
"host": "vagrant",
"info": {
"host": "vagrant",
},
},
"name": "wsgi-start",
}
},
"parent_id": "384caac9-
"trace_id": "b6bdc0e8-
"children": []
},
{
"info": {
"name": "wsgi",
"service": "main",
"started": 46,
"info": {
"host": "vagrant",
},
"name": "wsgi-stop",
},
"finished": 140,
"project": "keystone",
"host": "vagrant",
"info": {
"host": "vagrant",
},
},
"name": "wsgi-start",
}
},
"parent_id": "384caac9-
"trace_id": "597f06da-
"children": []
}
]
}
</script>
<link rel="stylesheet" href="https:/
<link rel="stylesheet" href="https:/
<script src="https:/
<script src="https:/
<style>
.trace {
min-width: 900px;
width: 100%;
}
.trace tr:hover {
}
.trace tr td {
width: 14%;
padding: 2px;
}
.trace tr td.details {
width: 10%;
}
.
cursor: pointer;
}
.trace .level {
width: 10%;
}
.bold {
}
.duration {
width: 25px;
margin: 0px;
padding: 0px;
font-size: 10px;
}
.duration div{
text-align: center;
}
</style>
<script type="text/
<div ng-init=
<table class="trace cursor_
<tr>
<td class="level" style="
</td>
<td ng-click=
<div class="duration" style="width: {{get_width(
</td>
<td ng-click=
<td ng-click=
<td ng-click=
<td ng-click=
<td class="details">
<a href="#" ng-click=
</td>
</tr>
</table>
<div ng-hide=
<div ng-repeat="data in data.children" ng-include=
</div>
</div>
</script>
<script>
angular.
function ProfilerCtlr(
var convert_input = function(input, level){
level = (level) ? level : 0;
for (var i=0; i < input.children.
return input;
}
var full_duration = $scope.
var duration = (data.info.finished - data.info.started) * 100.0 / full_duration;
return (duration >= 0.5) ? duration : 0.5;
}
var full_duration = $scope.
return data.info.started * 100.0 / full_duration;
}
return ["total", "wsgi", "rpc"].
}
var info = angular.
var metadata = {};
var parts = key.split(".");
if (parts[0] == "meta"){
if (parts.length == 2){
}
else{
var group_name = parts[1];
if (!(group_name in this))
}
};
}, metadata);
var trace_data = "<div class='row'>"
columns = ["name", "project", "service", "host", "started",
for (var i = 0; i < columns.length; i++){
}
var output = (
'<div class="
'<div class="
'<div class="
);
var modal_instance = $modal.open({
"size": "lg"
});
}
$scope.tree = [convert_
}
</script>
</head>
<body>
<div ng-controller=
<table class="trace">
<tr class="bold text-left" style="
<td class="
<td class="
<td class="
</tr>
</table>
<div ng-repeat="data in tree" ng-include=
</div>
</body>
</html>
Revision history for this message
|
#2 |
OK, it looks like something wrong happened during neutron (or whatever) modifications. I've installed clear devstack and can confirm that neutron profiling does not work anymore (although it works for keystone in the same trace, for instance).
I took a look on what's passed to the osprofiler here https:/
Here is the pdb session:
(Pdb) cfg.CONF.
*** NoSuchOptError: no such option profiler in group [DEFAULT]
(Pdb) cfg.CONF
<oslo_config.
(Pdb) cfg.CONF.__dict__
{'_groups': {'oslo_
it looks like there was a bug introduced to the neutron code... Please file a bug and let's contact neutron developers.
Revision history for this message
|
#3 |
although here https:/
Revision history for this message
|
#4 |
Okay, so I found the issue :) Neutron change was continued and finished not by myself, but by Neutron team themselves. And two things happened in fact:
- they decided not to add osprofiler to the api-paste.ini pipelines by default. And none has fixed OSprofiler devstack to make it happen - and here is this discussion - https:/
- lately (when new initialization method was introduced to the neutron - https:/
Revision history for this message
|
#5 |
Thanks a lot Dina for the fixes and suggestions.
With these suggested changes, I could able to capture neutron trace. May be we need to document("how to enable Osprofiler trace for neutron" - in some document?
Revision history for this message
|
#6 |
Thanks Dina Belova, that solved my question.