)]}'
{"ceilometer/compute/instance.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"7cab3610c667f504e7e37b4040dd890404105651","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \u0027name\u0027: getattr(instance, \u0027OS-EXT-SRV-ATTR:instance_name\u0027, u\u0027\u0027),"},{"line_number":49,"context_line":"        \u0027instance_type\u0027: (instance.flavor[\u0027id\u0027] if instance.flavor else None),"},{"line_number":50,"context_line":"        \u0027host\u0027: instance.hostId,"},{"line_number":51,"context_line":"        \u0027instance_id\u0027: instance.id,"},{"line_number":52,"context_line":"        }"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    for name in INSTANCE_PROPERTIES:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1aM%3D","line":51,"updated":"2012-12-13 12:52:31.000000000","message":"The instance ID is already provided via the counter resource ID for all compute pollsters except the NetPollster IIRC.\n\nDoes it make sense to repeat this UUID for all those counters?\n\nFor the NetPollster, I don\u0027t understand why the existing setting here isn\u0027t sufficient:\n\nhttps://github.com/openstack/ceilometer/blob/master/ceilometer/compute/pollsters.py#L222","commit_id":"a230e5ad72fbc8f08a0ed81deb47c0ddb7966ece"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"7695a9642ce859a2db9e333860c8531b6b4ba76c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \u0027name\u0027: getattr(instance, \u0027OS-EXT-SRV-ATTR:instance_name\u0027, u\u0027\u0027),"},{"line_number":49,"context_line":"        \u0027instance_type\u0027: (instance.flavor[\u0027id\u0027] if instance.flavor else None),"},{"line_number":50,"context_line":"        \u0027host\u0027: instance.hostId,"},{"line_number":51,"context_line":"        \u0027instance_id\u0027: instance.id,"},{"line_number":52,"context_line":"        }"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    for name in INSTANCE_PROPERTIES:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0Mg%3D","line":51,"in_reply_to":"AAAAMX%2F%2F1aM%3D","updated":"2012-12-14 09:21:17.000000000","message":"Hmm, originally I simply want to put instance_id into all nova sample, so that the dimension to fetch the instance_id is easier. But agree that it\u0027s really not good to add one field for all samples, which will cost a lot of storage in the long run.\n\nI will remove this in my next submission.","commit_id":"a230e5ad72fbc8f08a0ed81deb47c0ddb7966ece"}],"ceilometer/compute/pollsters.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"7cab3610c667f504e7e37b4040dd890404105651","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        metadata \u003d copy.copy(vnic_data)"},{"line_number":221,"context_line":"        resource_metadata \u003d dict(zip(metadata._fields, metadata))"},{"line_number":222,"context_line":"        resource_metadata[\u0027instance_id\u0027] \u003d instance.id"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        return counter.Counter("},{"line_number":225,"context_line":"            name\u003dname,"},{"line_number":226,"context_line":"            type\u003dtype,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F1Z4%3D","side":"PARENT","line":223,"updated":"2012-12-13 12:52:31.000000000","message":"Would it be better for the NetPollster to reuse make_counter_from_instance like the other compute pollsters, instead of repeating the code to extract the flavor?","commit_id":"16b26f835ac4c87482a49da0ccb13f12231f1b41"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"08ce3c0acde636547c3ec080199aa0923dcf8f58","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        metadata \u003d copy.copy(vnic_data)"},{"line_number":221,"context_line":"        resource_metadata \u003d dict(zip(metadata._fields, metadata))"},{"line_number":222,"context_line":"        resource_metadata[\u0027instance_id\u0027] \u003d instance.id"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        return counter.Counter("},{"line_number":225,"context_line":"            name\u003dname,"},{"line_number":226,"context_line":"            type\u003dtype,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0LY%3D","side":"PARENT","line":223,"in_reply_to":"AAAAMX%2F%2F0MM%3D","updated":"2012-12-14 10:08:49.000000000","message":"Excellent point on the repetition of resource metadata.\n\nJust to sum up the related discussion on IRC ...\n\nI agree, it doesn\u0027t seem to make sense to store anything that\u0027s *immutable* many, many times. However we do seem to have an implicit design goal tha that each piece of metering data must be standalone (i.e. contain all th einformation needs to consider it independent of other metering data). Also we need to ensure that the metadata captures the state of the resource *as was* at the time the counter was collected.\n\n(Say for for example the flavor changed for a resized instance, we would want the metering data from the past to still reflect the old flavour, while the metering data into the future to carry the new flavor).\n\nSo I think we need to distinguish between mutable and immutable metadata - the former only needs to be stored once, whereas the latter could be repeated for each counter just for simplicity. Turns out the vast majority of these metadata are immutable so the repetition would be relatively small (at least for instances anyway, maybe not so much for image metadata).\n\nI\u0027d imagine the original motivation in repeat all resource metadata was just to KISS, avoid premature optimization etc. But going forward, we could consider separating out mutable and immutable metadata, effectively de-duping the latter.","commit_id":"16b26f835ac4c87482a49da0ccb13f12231f1b41"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"7695a9642ce859a2db9e333860c8531b6b4ba76c","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        metadata \u003d copy.copy(vnic_data)"},{"line_number":221,"context_line":"        resource_metadata \u003d dict(zip(metadata._fields, metadata))"},{"line_number":222,"context_line":"        resource_metadata[\u0027instance_id\u0027] \u003d instance.id"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        return counter.Counter("},{"line_number":225,"context_line":"            name\u003dname,"},{"line_number":226,"context_line":"            type\u003dtype,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F0MM%3D","side":"PARENT","line":223,"in_reply_to":"AAAAMX%2F%2F1Z4%3D","updated":"2012-12-14 09:21:17.000000000","message":"I don\u0027t think so.\n\nBasically the resource_metadata should contain information about the resource the sample is based on. For NetPollster data, it\u0027s about the the vnic, which is a resource itself, while the instance resource is in fact the parent resource, if we think resource as a tree.\n\nIn fact, I\u0027m not sure why the resource management takes current method , i.e. all resource metadata is sent together with meter to data storage, and the data storage will update the internal storage if received different resource metadata for same resource. \nIMHO, the resource should be maintained  with special resource management code and the sample need only include resource id. If we want to keep the resource status when the sample collected, timestamp should be used to track this. Of course, there will potentially be small race condition windows, but that exists anyway, even in current implementation.","commit_id":"16b26f835ac4c87482a49da0ccb13f12231f1b41"}],"tests/compute/test_instance.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"25af6114dbeb08942cf47252ce557e65aa2a9354","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                           \u0027root_gb\u0027: 3,"},{"line_number":62,"context_line":"                           \u0027vcpus\u0027: 1,"},{"line_number":63,"context_line":"                           \u0027flavor\u0027: {\u0027id\u0027: 1},"},{"line_number":64,"context_line":"                           \u0027hostId\u0027: \u00271234-5678\u0027,"},{"line_number":65,"context_line":"                           }"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2F%2FoU%3D","line":64,"updated":"2012-12-17 10:51:24.000000000","message":"Useless change in this patch I guess, I\u0027d be happy without that :)","commit_id":"eb6656584470e7fa12e7285a1fdeb3b827c3f577"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"af26ef135b009b38ed2e8075c9029175f601b79c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                           \u0027root_gb\u0027: 3,"},{"line_number":62,"context_line":"                           \u0027vcpus\u0027: 1,"},{"line_number":63,"context_line":"                           \u0027flavor\u0027: {\u0027id\u0027: 1},"},{"line_number":64,"context_line":"                           \u0027hostId\u0027: \u00271234-5678\u0027,"},{"line_number":65,"context_line":"                           }"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2F%2BrM%3D","line":64,"in_reply_to":"AAAAM3%2F%2F%2FoU%3D","updated":"2012-12-18 00:42:20.000000000","message":"sure, I will update a new one without this changes.","commit_id":"eb6656584470e7fa12e7285a1fdeb3b827c3f577"}]}
