)]}'
{"etc/ceilometer/event_definitions.yaml":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"7ce6c03a596487ebaacf718fc08b148c3b432f14","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    created_at:"},{"line_number":110,"context_line":"      fields: payload.created_at"},{"line_number":111,"context_line":"    user_id:"},{"line_number":112,"context_line":"      fields: payload.owner"},{"line_number":113,"context_line":"    deleted_at:"},{"line_number":114,"context_line":"      fields: payload.deleted_at"},{"line_number":115,"context_line":"    size:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a961159_a718e6d3","line":112,"updated":"2014-12-22 07:21:22.000000000","message":"I don\u0027t know why Glance allow an attribute to have two meanings which is controlled by an user option (DEFAULT.owner_is_tenant). The amazing image.owner cannot explain itself, which definitely will cause problem when user uses Ceilometer API and finds two different fields have same value.","commit_id":"6568e531d2dc2b50fdf986db4cba4ea1cf36fb2b"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"393ba0148538ab8f269ec6c262799e1e227a159b","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    created_at:"},{"line_number":110,"context_line":"      fields: payload.created_at"},{"line_number":111,"context_line":"    user_id:"},{"line_number":112,"context_line":"      fields: payload.owner"},{"line_number":113,"context_line":"    deleted_at:"},{"line_number":114,"context_line":"      fields: payload.deleted_at"},{"line_number":115,"context_line":"    size:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a961159_60b24fe6","line":112,"in_reply_to":"3a961159_17fd5e6e","updated":"2014-12-23 02:30:25.000000000","message":"Sorry, seems I forgot to paste some links.\n\nField image.owner exists, but has two different means: user_id or project_id. It is controlled by Glance configuration option: [DEFAULT].owner_is_tenant \u003d {true,false}, which is not good FMPOV. (The worst case is owner can be anything if user is admin and set that field explicitly, but this seems common issue in whole OpenStack, so let\u0027s ignore this case.)\n\nCeilometer can do nothing but just as what you\u0027ve done here: both fields record one value. The fix should be in Glance side rather than Ceilometer side, since we have no way to get that option\u0027s value IIUC.\n\ndetails::\n\n1. when create or update image, Glance stores request.context.owner to owner filed. see\n\n    https://github.com/openstack/glance/blob/master/glance/registry/api/v1/images.py#L410\n    https://github.com/openstack/glance/blob/master/glance/registry/api/v1/images.py#L459\n\n2. context.owner will be one of two values, see\n\n    https://github.com/openstack/glance/blob/master/glance/context.py#L96","commit_id":"6568e531d2dc2b50fdf986db4cba4ea1cf36fb2b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"f265bf751bb3005d16ef3540154232e012fbff66","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    created_at:"},{"line_number":110,"context_line":"      fields: payload.created_at"},{"line_number":111,"context_line":"    user_id:"},{"line_number":112,"context_line":"      fields: payload.owner"},{"line_number":113,"context_line":"    deleted_at:"},{"line_number":114,"context_line":"      fields: payload.deleted_at"},{"line_number":115,"context_line":"    size:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a961159_17fd5e6e","line":112,"in_reply_to":"3a961159_a718e6d3","updated":"2014-12-22 15:00:11.000000000","message":"hi ZhiQiang, i\u0027d be happy to fix this but i don\u0027t quite understand what you wrote. does payload.owner not exists? the reason remapped it to user_id is typically that\u0027s how we represent ownership in ceilometer and it gives us a common trait for users to query across\n\nor are you trying to say payload.owner, is not actually a meaningful value (it\u0027s not a user_id)","commit_id":"6568e531d2dc2b50fdf986db4cba4ea1cf36fb2b"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"7ce6c03a596487ebaacf718fc08b148c3b432f14","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    receiver_user:"},{"line_number":122,"context_line":"      fields: payload.receiver_user_id"},{"line_number":123,"context_line":"    user_id:"},{"line_number":124,"context_line":"      fields: payload.owner_id"},{"line_number":125,"context_line":"    image_id:"},{"line_number":126,"context_line":"      fields: payload.image_id"},{"line_number":127,"context_line":"    destination_ip:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a961159_877a0aef","line":124,"updated":"2014-12-22 07:21:22.000000000","message":"The payload.owner_id is image.owner, which cannot make sure is user_id....","commit_id":"6568e531d2dc2b50fdf986db4cba4ea1cf36fb2b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"f265bf751bb3005d16ef3540154232e012fbff66","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    receiver_user:"},{"line_number":122,"context_line":"      fields: payload.receiver_user_id"},{"line_number":123,"context_line":"    user_id:"},{"line_number":124,"context_line":"      fields: payload.owner_id"},{"line_number":125,"context_line":"    image_id:"},{"line_number":126,"context_line":"      fields: payload.image_id"},{"line_number":127,"context_line":"    destination_ip:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a961159_97d94e24","line":124,"in_reply_to":"3a961159_877a0aef","updated":"2014-12-22 15:00:11.000000000","message":"https://github.com/openstack/ceilometer/blob/master/ceilometer/image/notifications.py#L115-L128 is this not right?","commit_id":"6568e531d2dc2b50fdf986db4cba4ea1cf36fb2b"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"393ba0148538ab8f269ec6c262799e1e227a159b","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    receiver_user:"},{"line_number":122,"context_line":"      fields: payload.receiver_user_id"},{"line_number":123,"context_line":"    user_id:"},{"line_number":124,"context_line":"      fields: payload.owner_id"},{"line_number":125,"context_line":"    image_id:"},{"line_number":126,"context_line":"      fields: payload.image_id"},{"line_number":127,"context_line":"    destination_ip:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3a961159_a0c7d743","line":124,"in_reply_to":"3a961159_97d94e24","updated":"2014-12-23 02:30:25.000000000","message":"Yes, it could be wrong. The owner_id could be project_id if Glance option owner_is_tenant is set to True (or by default).\n\nI don\u0027t know what is the right thing to do. Since default value is owner_is_tenant\u003dTrue, maybe use this filed as project id? which seems not so good too.\n\n**I\u0027m not preventing this patch to be merged, just alert there is something weird should be noticed.**\n\ndetail, image.send notification uses image.owner as payload.owner_id\n\n    1. https://github.com/openstack/glance/blob/master/glance/api/common.py#L78\n    2. https://github.com/openstack/glance/blob/master/glance/notifier.py#L166","commit_id":"6568e531d2dc2b50fdf986db4cba4ea1cf36fb2b"}]}
