Our admin role is called "Admin" roles are case insensitive so this shouldn't matter?
I renamed it to admin to check and doesn't make a difference. (had to hack the DB in keystone)
When I debug this at the below line I always get an auth_project = <tenant id of the service tenant> (on_behalf_of is always None too)
auth_project = _get_auth_project(on_behalf_of)
I can't see the bit in the code where if the request has admin role it doesn't care what the project_id is and just returns all the alarms.
For instance if I do any other command as an ceilometer I don't get any results as the ceilometer user doesn't have any resources.
I also came across the following comment
# when an alarm is created by an admin on behalf of another tenant
# we must ensure for:
Does this mean the alarm is actually meant to be owned by service tenant and not the users tenant? Maybe the issue is that the alarms aren't being created correctly?
The alarm as stored in mongo is: (the project and user ID mentioned are my user ID)
Our admin role is called "Admin" roles are case insensitive so this shouldn't matter?
I renamed it to admin to check and doesn't make a difference. (had to hack the DB in keystone)
When I debug this at the below line I always get an auth_project = <tenant id of the service tenant> (on_behalf_of is always None too)
auth_project = _get_auth_ project( on_behalf_ of)
I can't see the bit in the code where if the request has admin role it doesn't care what the project_id is and just returns all the alarms.
For instance if I do any other command as an ceilometer I don't get any results as the ceilometer user doesn't have any resources.
I also came across the following comment
# when an alarm is created by an admin on behalf of another tenant
# we must ensure for:
Does this mean the alarm is actually meant to be owned by service tenant and not the users tenant? Maybe the issue is that the alarms aren't being created correctly?
The alarm as stored in mongo is: (the project and user ID mentioned are my user ID)
> db.alarm.findOne() "53c62215499af2 dbd3cf2b4d" ), 6817-422a- 80b8-d826fc53c0 f9", data_actions" : [ ], c4b74d9e69af9ed f08", periods" : 1, c4b74d9e69af9ed f08", operator" : "eq", outliers" : false "2014-07- 16T06:56: 21.332Z" ), "2014-07- 16T06:56: 21.332Z" ), aeb5fd94c702336 ca9"
{
"_id" : ObjectId(
"alarm_actions" : [ ],
"alarm_id" : "75a66cbe-
"description" : "Alarm when cpu_util is eq a avg of 60.0 over 60 seconds",
"enabled" : true,
"insufficient_
"name" : "test",
"ok_actions" : [ ],
"project_id" : "0bdf024c921848
"repeat_actions" : false,
"rule" : {
"meter_name" : "cpu_util",
"evaluation_
"period" : 60,
"statistic" : "avg",
"threshold" : 60,
"query" : [
{
"field" : "project_id",
"value" : "0bdf024c921848
"op" : "eq"
}
],
"comparison_
"exclude_
},
"state" : "insufficient data",
"state_timestamp" : ISODate(
"time_constraints" : [ ],
"timestamp" : ISODate(
"type" : "threshold",
"user_id" : "d9646718471b46
}