)]}'
{"doc/source/devref/filter_scheduler.rst":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"0410482150f4499ef5f54185bf4d3630564f061a","unresolved":false,"context_lines":[{"line_number":89,"context_line":"  fall back to the global default ``ram_allocation_ratio``. If more than one value"},{"line_number":90,"context_line":"  is found for a host (meaning the host is in two differenet aggregate with"},{"line_number":91,"context_line":"  different ratio settings), the minimum value will be used."},{"line_number":92,"context_line":"* |DiskFilter| - filters hosts by their disk allocation. Only hosts with sufficient "},{"line_number":93,"context_line":"  disk space to host the instance are passed."},{"line_number":94,"context_line":"* |AggregateDiskFilter| - filters hosts by disk allocation with per-aggregate"},{"line_number":95,"context_line":"  ``disk_allocation_ratio`` setting. If no per-aggregate value is found, it will"}],"source_content_type":"text/x-rst","patch_set":8,"id":"AAAAUH%2F9oJw%3D","line":92,"updated":"2014-02-05 15:22:24.000000000","message":"It is better remove the blank space at the end","commit_id":"54aa60d4108587ef645b05c0c2320f070c599f47"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"014114b6ad5a49b4803bc88ac59cb2ed16e99f11","unresolved":false,"context_lines":[{"line_number":89,"context_line":"  fall back to the global default ``ram_allocation_ratio``. If more than one value"},{"line_number":90,"context_line":"  is found for a host (meaning the host is in two differenet aggregate with"},{"line_number":91,"context_line":"  different ratio settings), the minimum value will be used."},{"line_number":92,"context_line":"* |DiskFilter| - filters hosts by their disk allocation. Only hosts with sufficient "},{"line_number":93,"context_line":"  disk space to host the instance are passed."},{"line_number":94,"context_line":"* |AggregateDiskFilter| - filters hosts by disk allocation with per-aggregate"},{"line_number":95,"context_line":"  ``disk_allocation_ratio`` setting. If no per-aggregate value is found, it will"}],"source_content_type":"text/x-rst","patch_set":8,"id":"AAAAUH%2F9nOo%3D","line":92,"in_reply_to":"AAAAUH%2F9oJw%3D","updated":"2014-02-05 17:06:29.000000000","message":"Done","commit_id":"54aa60d4108587ef645b05c0c2320f070c599f47"}],"nova/scheduler/filters/disk_filter.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"b0fe9d74407c20b9da31871eee4272147895e828","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"class AggregateDiskFilter(BaseDiskFilter):"},{"line_number":75,"context_line":"    \"\"\"AggregateDiskFilter with per-aggregate ram subscription flag."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    Fall back to global disk_allocation_ratio if no per-aggregate setting"},{"line_number":78,"context_line":"    found."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2BptM%3D","line":75,"updated":"2014-01-23 14:51:44.000000000","message":"I guess it\u0027s not ram ,it\u0027s disk?","commit_id":"585690ed6f477e4ded02517a2a3b52230bd2e424"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"16039beaa6eeb788b86f8c284f86661acd83c991","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"class AggregateDiskFilter(BaseDiskFilter):"},{"line_number":75,"context_line":"    \"\"\"AggregateDiskFilter with per-aggregate ram subscription flag."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    Fall back to global disk_allocation_ratio if no per-aggregate setting"},{"line_number":78,"context_line":"    found."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bh0A%3D","line":75,"in_reply_to":"AAAAUH%2F%2BptM%3D","updated":"2014-01-24 18:03:11.000000000","message":"thanks good catch!","commit_id":"585690ed6f477e4ded02517a2a3b52230bd2e424"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"b0fe9d74407c20b9da31871eee4272147895e828","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        if num_values \u003e 1:"},{"line_number":95,"context_line":"            LOG.warning(_(\"%(num_values)d ratio values found, \""},{"line_number":96,"context_line":"                          \"of which the minimum value will be used.\"),"},{"line_number":97,"context_line":"                         {\u0027num_values\u0027: num_values})"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            ratio \u003d float(min(aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bpso%3D","line":97,"updated":"2014-01-23 14:51:44.000000000","message":"I think it\u0027s desired flow? use info might be better\nsince warning will lead to potential error, but it won\u0027t here","commit_id":"585690ed6f477e4ded02517a2a3b52230bd2e424"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"16039beaa6eeb788b86f8c284f86661acd83c991","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        if num_values \u003e 1:"},{"line_number":95,"context_line":"            LOG.warning(_(\"%(num_values)d ratio values found, \""},{"line_number":96,"context_line":"                          \"of which the minimum value will be used.\"),"},{"line_number":97,"context_line":"                         {\u0027num_values\u0027: num_values})"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            ratio \u003d float(min(aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bh0Q%3D","line":97,"in_reply_to":"AAAAUH%2F%2Bpso%3D","updated":"2014-01-24 18:03:11.000000000","message":"it\u0027s not the desired flow, it means the host is registered in several aggregates","commit_id":"585690ed6f477e4ded02517a2a3b52230bd2e424"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"b0fe9d74407c20b9da31871eee4272147895e828","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            ratio \u003d float(min(aggregate_vals))"},{"line_number":101,"context_line":"        except ValueError as e:"},{"line_number":102,"context_line":"            LOG.warning(_(\"Could not decode disk_allocation_ratio: \u0027%s\u0027\"), e)"},{"line_number":103,"context_line":"            ratio \u003d CONF.disk_allocation_ratio"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return ratio"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2BpsM%3D","line":102,"updated":"2014-01-23 14:51:44.000000000","message":"e.format_message() ?","commit_id":"585690ed6f477e4ded02517a2a3b52230bd2e424"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"16039beaa6eeb788b86f8c284f86661acd83c991","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            ratio \u003d float(min(aggregate_vals))"},{"line_number":101,"context_line":"        except ValueError as e:"},{"line_number":102,"context_line":"            LOG.warning(_(\"Could not decode disk_allocation_ratio: \u0027%s\u0027\"), e)"},{"line_number":103,"context_line":"            ratio \u003d CONF.disk_allocation_ratio"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return ratio"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bh0I%3D","line":102,"in_reply_to":"AAAAUH%2F%2BpsM%3D","updated":"2014-01-24 18:03:11.000000000","message":"ValueError does not have format_message","commit_id":"585690ed6f477e4ded02517a2a3b52230bd2e424"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"0410482150f4499ef5f54185bf4d3630564f061a","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _get_disk_allocation_ratio(self, host_state, filter_properties):"},{"line_number":82,"context_line":"        context \u003d filter_properties[\u0027context\u0027].elevated()"},{"line_number":83,"context_line":"        # TODO(uni): DB query in filter is a performance hit, especially for"},{"line_number":84,"context_line":"        # system with lots of hosts. Will need a general solution here to fix"},{"line_number":85,"context_line":"        # all filters with aggregate DB call things."},{"line_number":86,"context_line":"        metadata \u003d db.aggregate_metadata_get_by_host("}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9oIo%3D","line":83,"updated":"2014-02-05 15:22:24.000000000","message":"nit: TODO(your id)","commit_id":"54aa60d4108587ef645b05c0c2320f070c599f47"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"014114b6ad5a49b4803bc88ac59cb2ed16e99f11","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _get_disk_allocation_ratio(self, host_state, filter_properties):"},{"line_number":82,"context_line":"        context \u003d filter_properties[\u0027context\u0027].elevated()"},{"line_number":83,"context_line":"        # TODO(uni): DB query in filter is a performance hit, especially for"},{"line_number":84,"context_line":"        # system with lots of hosts. Will need a general solution here to fix"},{"line_number":85,"context_line":"        # all filters with aggregate DB call things."},{"line_number":86,"context_line":"        metadata \u003d db.aggregate_metadata_get_by_host("}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9nOE%3D","line":83,"in_reply_to":"AAAAUH%2F9oIo%3D","updated":"2014-02-05 17:06:29.000000000","message":"Done","commit_id":"54aa60d4108587ef645b05c0c2320f070c599f47"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"0410482150f4499ef5f54185bf4d3630564f061a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        if num_values \u003e 1:"},{"line_number":95,"context_line":"            LOG.warning(_(\"%(num_values)d ratio values found, \""},{"line_number":96,"context_line":"                          \"of which the minimum value will be used.\"),"},{"line_number":97,"context_line":"                         {\u0027num_values\u0027: num_values})"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            ratio \u003d float(min(aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9oB0%3D","line":97,"updated":"2014-02-05 15:22:24.000000000","message":"No need use keyword parameters if only one parameter.","commit_id":"54aa60d4108587ef645b05c0c2320f070c599f47"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"014114b6ad5a49b4803bc88ac59cb2ed16e99f11","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        if num_values \u003e 1:"},{"line_number":95,"context_line":"            LOG.warning(_(\"%(num_values)d ratio values found, \""},{"line_number":96,"context_line":"                          \"of which the minimum value will be used.\"),"},{"line_number":97,"context_line":"                         {\u0027num_values\u0027: num_values})"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            ratio \u003d float(min(aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9nNc%3D","line":97,"in_reply_to":"AAAAUH%2F9oB0%3D","updated":"2014-02-05 17:06:29.000000000","message":"Done","commit_id":"54aa60d4108587ef645b05c0c2320f070c599f47"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"664a628ebea2a72aa3657eb42ef636ff1f699195","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\"Disk Filter with over subscription flag.\"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _get_disk_allocation_ratio(self, host_state, filter_properties):"},{"line_number":71,"context_line":"        return CONF.disk_allocation_ratio"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"class AggregateDiskFilter(BaseDiskFilter):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVn%2F%2F5p0%3D","line":71,"updated":"2014-03-03 14:55:59.000000000","message":"Nit, I would collapse this into the above filter myself, but I guess that is a code style thing. This is OK too.","commit_id":"fb11b36eee06c2a8befb0048b83064b5f6dd2967"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"664a628ebea2a72aa3657eb42ef636ff1f699195","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        context \u003d filter_properties[\u0027context\u0027].elevated()"},{"line_number":83,"context_line":"        # TODO(sahid): DB query in filter is a performance hit, especially for"},{"line_number":84,"context_line":"        # system with lots of hosts. Will need a general solution here to fix"},{"line_number":85,"context_line":"        # all filters with aggregate DB call things."},{"line_number":86,"context_line":"        metadata \u003d db.aggregate_metadata_get_by_host("},{"line_number":87,"context_line":"                     context, host_state.host, key\u003d\u0027disk_allocation_ratio\u0027)"},{"line_number":88,"context_line":"        aggregate_vals \u003d metadata.get(\u0027disk_allocation_ratio\u0027, set())"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVn%2F%2F5pU%3D","line":85,"updated":"2014-03-03 14:55:59.000000000","message":"Agreed, this is bad, but we do need a general cache for all this aggregate stuff.","commit_id":"fb11b36eee06c2a8befb0048b83064b5f6dd2967"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c26220449bd214d7967181e10f875043ce47f5e6","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        # TODO(sahid): DB query in filter is a performance hit, especially for"},{"line_number":84,"context_line":"        # system with lots of hosts. Will need a general solution here to fix"},{"line_number":85,"context_line":"        # all filters with aggregate DB call things."},{"line_number":86,"context_line":"        metadata \u003d db.aggregate_metadata_get_by_host("},{"line_number":87,"context_line":"                     context, host_state.host, key\u003d\u0027disk_allocation_ratio\u0027)"},{"line_number":88,"context_line":"        aggregate_vals \u003d metadata.get(\u0027disk_allocation_ratio\u0027, set())"},{"line_number":89,"context_line":"        num_values \u003d len(aggregate_vals)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVn%2F%2F5lE%3D","line":86,"updated":"2014-03-03 15:00:03.000000000","message":"Hmm, I think this needs to use the new object call.\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/aggregate.py#L169\n\nAlso, can we have a helper method to save the cut and paste between all the filters that are very very similar! This is not very DRY.","commit_id":"fb11b36eee06c2a8befb0048b83064b5f6dd2967"}],"nova/tests/scheduler/test_host_filters.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a2e0021a8d8aa8aeb4793d9744122742d8cdc688","unresolved":false,"context_lines":[{"line_number":1921,"context_line":"            name\u003d\u0027fake_aggregate\u0027,"},{"line_number":1922,"context_line":"            hosts\u003d[\u0027host1\u0027],"},{"line_number":1923,"context_line":"            metadata\u003d{\u0027disk_allocation_ratio\u0027: \u00272\u0027})"},{"line_number":1924,"context_line":"        self.assertTrue(filt_cls.host_passes(host, filter_properties))"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_8f885172","line":1924,"updated":"2014-08-22 17:07:12.000000000","message":"I don\u0027t like the big cut and paste here.\n\nMore importantly, I think we need to test the filter actually rejects hosts.","commit_id":"037a1753c2532e5116650436711c9404774284aa"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ee46686c825fddf2a843927cfe188e50ed9f10df","unresolved":false,"context_lines":[{"line_number":1921,"context_line":"            name\u003d\u0027fake_aggregate\u0027,"},{"line_number":1922,"context_line":"            hosts\u003d[\u0027host1\u0027],"},{"line_number":1923,"context_line":"            metadata\u003d{\u0027disk_allocation_ratio\u0027: \u00272\u0027})"},{"line_number":1924,"context_line":"        self.assertTrue(filt_cls.host_passes(host, filter_properties))"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_d9c82159","line":1924,"in_reply_to":"1abeadc6_8f885172","updated":"2014-08-25 13:18:40.000000000","message":"1. I don\u0027t understand your point there is already a test for a host rejected. see: 1917\n\n2. about copy/paste as you can see it is almost input data passed to the test so it will probably make no difference.","commit_id":"037a1753c2532e5116650436711c9404774284aa"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fc78d91374d4aea295a1a23cf02294ac15363b5c","unresolved":false,"context_lines":[{"line_number":1921,"context_line":"            name\u003d\u0027fake_aggregate\u0027,"},{"line_number":1922,"context_line":"            hosts\u003d[\u0027host1\u0027],"},{"line_number":1923,"context_line":"            metadata\u003d{\u0027disk_allocation_ratio\u0027: \u00272\u0027})"},{"line_number":1924,"context_line":"        self.assertTrue(filt_cls.host_passes(host, filter_properties))"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_722463c6","line":1924,"in_reply_to":"1abeadc6_d9c82159","updated":"2014-08-26 08:44:50.000000000","message":"Sorry, I didn\u0027t see that properly.\n\nI guess the test should be split into the pass and fail as two separate test functions, for both of the above. But can be done in follow on patch.","commit_id":"037a1753c2532e5116650436711c9404774284aa"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a9651b74c1b083b1f72db3f7ff6066ef7cef1bdc","unresolved":false,"context_lines":[{"line_number":1925,"context_line":"            name\u003d\u0027fake_aggregate\u0027,"},{"line_number":1926,"context_line":"            hosts\u003d[\u0027host1\u0027],"},{"line_number":1927,"context_line":"            metadata\u003d{\u0027max_io_ops_per_host\u0027: \u0027XXX\u0027})"},{"line_number":1928,"context_line":"        filter_properties \u003d {\u0027context\u0027: self.context}"},{"line_number":1929,"context_line":""},{"line_number":1930,"context_line":"    def test_aggregate_disk_filter_value_error(self):"},{"line_number":1931,"context_line":"        self._stub_service_is_up(True)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1abeadc6_9a15849d","line":1928,"updated":"2014-08-26 15:50:48.000000000","message":"I think you managed to remove the assert from this test. Please add that back in.","commit_id":"bea13fc626044ed6ffe4a2bd0f70f2d91fd2450e"}]}
