)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"3b59b3c01dcf8f7855f6b780482777ad2fe2074b","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This is part of the blueprint utilization-aware-scheduling and the"},{"line_number":19,"context_line":"blueprint generic-host-state-for-scheduler."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Ib3e68505e6d4d8f6d67b54c5f00de3e1c172738c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"AAAATn%2F%2F2ik%3D","line":20,"updated":"2013-10-27 10:28:10.000000000","message":"Should add \"DocImpact\"","commit_id":"f955d82510aea176b01301c035db4cc608c766be"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"e2a58660ba4418acfa7954ab980bd76721afe099","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This is part of the blueprint utilization-aware-scheduling and the"},{"line_number":19,"context_line":"blueprint generic-host-state-for-scheduler."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Ib3e68505e6d4d8f6d67b54c5f00de3e1c172738c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"AAAATn%2F%2F1%2FQ%3D","line":20,"in_reply_to":"AAAATn%2F%2F2ik%3D","updated":"2013-10-28 01:40:27.000000000","message":"Done","commit_id":"f955d82510aea176b01301c035db4cc608c766be"}],"etc/nova/nova.conf.sample":[{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"26225bbab4ffe380872c64c1594d6063402a888b","unresolved":false,"context_lines":[{"line_number":2156,"context_line":"#cinder_cross_az_attach\u003dtrue"},{"line_number":2157,"context_line":""},{"line_number":2158,"context_line":""},{"line_number":2159,"context_line":"[keymgr]"},{"line_number":2160,"context_line":""},{"line_number":2161,"context_line":"#"},{"line_number":2162,"context_line":"# Options defined in nova.keymgr"}],"source_content_type":"application/octet-stream","patch_set":37,"id":"AAAATn%2F%2BRjU%3D","line":2159,"updated":"2013-11-28 02:07:26.000000000","message":"nova.conf.sample seems to be mixed up with so many unrelated changes since patchset 36. Guess you need a clean rebase.","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"1c3657ccfca4ce6cc5fbc60d30bff1f937472cbd","unresolved":false,"context_lines":[{"line_number":2156,"context_line":"#cinder_cross_az_attach\u003dtrue"},{"line_number":2157,"context_line":""},{"line_number":2158,"context_line":""},{"line_number":2159,"context_line":"[keymgr]"},{"line_number":2160,"context_line":""},{"line_number":2161,"context_line":"#"},{"line_number":2162,"context_line":"# Options defined in nova.keymgr"}],"source_content_type":"application/octet-stream","patch_set":37,"id":"AAAATn%2F%2BQ3Y%3D","line":2159,"in_reply_to":"AAAATn%2F%2BRCc%3D","updated":"2013-11-28 07:38:47.000000000","message":"Yes, I double checked. I don\u0027t think it\u0027s a git commit issue. This file is generated by tools/config/generate_sample.sh.","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"601d91d6ce90fd5aaffda5199bfff591509fd975","unresolved":false,"context_lines":[{"line_number":2156,"context_line":"#cinder_cross_az_attach\u003dtrue"},{"line_number":2157,"context_line":""},{"line_number":2158,"context_line":""},{"line_number":2159,"context_line":"[keymgr]"},{"line_number":2160,"context_line":""},{"line_number":2161,"context_line":"#"},{"line_number":2162,"context_line":"# Options defined in nova.keymgr"}],"source_content_type":"application/octet-stream","patch_set":37,"id":"AAAATn%2F%2BRCc%3D","line":2159,"in_reply_to":"AAAATn%2F%2BRbs%3D","updated":"2013-11-28 07:18:43.000000000","message":"Haven\u0027t seen this before, but... could you please double check if the commit at your local side the same as what we see here?\n\nIf that is, then it is not a gerrit issue, but definitely a git commit issue to fix.","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"a7e16231706871a688701c12165dcca978e3b178","unresolved":false,"context_lines":[{"line_number":2156,"context_line":"#cinder_cross_az_attach\u003dtrue"},{"line_number":2157,"context_line":""},{"line_number":2158,"context_line":""},{"line_number":2159,"context_line":"[keymgr]"},{"line_number":2160,"context_line":""},{"line_number":2161,"context_line":"#"},{"line_number":2162,"context_line":"# Options defined in nova.keymgr"}],"source_content_type":"application/octet-stream","patch_set":37,"id":"AAAATn%2F%2BRbs%3D","line":2159,"in_reply_to":"AAAATn%2F%2BRjU%3D","updated":"2013-11-28 03:27:31.000000000","message":"I\u0027ve rebased to the latest master and still see this quite a lot of change. I believed this is caused by the putting of options into a new group.","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0aee95ecc4e76b86cb902e97f4a4b4d1b097e1eb","unresolved":false,"context_lines":[{"line_number":2074,"context_line":"#cinder_cross_az_attach\u003dtrue"},{"line_number":2075,"context_line":""},{"line_number":2076,"context_line":""},{"line_number":2077,"context_line":"[keymgr]"},{"line_number":2078,"context_line":""},{"line_number":2079,"context_line":"#"},{"line_number":2080,"context_line":"# Options defined in nova.keymgr"}],"source_content_type":"application/octet-stream","patch_set":38,"id":"AAAATn%2F95xs%3D","line":2077,"updated":"2013-12-04 17:36:38.000000000","message":"The huge change in the sample .conf makes me wonder if there was a problem either with your regeneration of it, or with a subsequent rebase.  I\u0027d recommend a fresh rebase and clean regeneration of nova.conf.sample.","commit_id":"d8aa3d1245b435e9ca747f291774b4ba7197738a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"0aabd8847f0e96002b84ef74c23786459199fad4","unresolved":false,"context_lines":[{"line_number":2074,"context_line":"#cinder_cross_az_attach\u003dtrue"},{"line_number":2075,"context_line":""},{"line_number":2076,"context_line":""},{"line_number":2077,"context_line":"[keymgr]"},{"line_number":2078,"context_line":""},{"line_number":2079,"context_line":"#"},{"line_number":2080,"context_line":"# Options defined in nova.keymgr"}],"source_content_type":"application/octet-stream","patch_set":38,"id":"AAAATn%2F93jc%3D","line":2077,"in_reply_to":"AAAATn%2F95xs%3D","updated":"2013-12-05 03:38:52.000000000","message":"Did a fresh rebase and clean regeneration, but still got such a huge change.","commit_id":"d8aa3d1245b435e9ca747f291774b4ba7197738a"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"1a5c96e0703d487603016a9e1d20439a79f370d4","unresolved":false,"context_lines":[{"line_number":2022,"context_line":"#cinder_cross_az_attach\u003dtrue"},{"line_number":2023,"context_line":""},{"line_number":2024,"context_line":""},{"line_number":2025,"context_line":"[keymgr]"},{"line_number":2026,"context_line":""},{"line_number":2027,"context_line":"#"},{"line_number":2028,"context_line":"# Options defined in nova.keymgr"}],"source_content_type":"application/octet-stream","patch_set":39,"id":"AAAATn%2F90Cc%3D","line":2025,"updated":"2013-12-05 17:24:48.000000000","message":"Note for other reviewers:\n\nI have done a careful analysis, and confirmed that the only section added is the \u0027metrics\u0027 section, and that all options in the other sections are preserved.  I believe the huge diff is due to dictionary ordering instability.  It may be worthwhile to open a bug on the config generator (oslo.config), suggesting that the sections be emitted in alphabetical order.\n\nFor this patch, I believe that this huge change is acceptable.","commit_id":"bc32777e73904506d5900487fe98944a26ee5b23"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"30496087b0f4d5f13972f667141e571825b79f8c","unresolved":false,"context_lines":[{"line_number":2022,"context_line":"#cinder_cross_az_attach\u003dtrue"},{"line_number":2023,"context_line":""},{"line_number":2024,"context_line":""},{"line_number":2025,"context_line":"[keymgr]"},{"line_number":2026,"context_line":""},{"line_number":2027,"context_line":"#"},{"line_number":2028,"context_line":"# Options defined in nova.keymgr"}],"source_content_type":"application/octet-stream","patch_set":39,"id":"AAAATn%2F9xtk%3D","line":2025,"in_reply_to":"AAAATn%2F90Cc%3D","updated":"2013-12-06 02:04:47.000000000","message":"I\u0027ve opened the bug https://bugs.launchpad.net/oslo/+bug/1258363","commit_id":"bc32777e73904506d5900487fe98944a26ee5b23"}],"nova/scheduler/weights/metrics.py":[{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"f105119d6ae42e10939794c66443e59b086523e8","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from nova.scheduler import weights"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"metrics_weight_opts \u003d ["},{"line_number":34,"context_line":"        cfg.FloatOpt(\u0027metrics_weight_multiplier\u0027,"},{"line_number":35,"context_line":"                     default\u003d1.0,"},{"line_number":36,"context_line":"                     help\u003d\u0027Multiplier used for weighing metrics. Negative \u0027"},{"line_number":37,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQn%2F%2FcCo%3D","line":34,"updated":"2013-07-31 07:49:20.000000000","message":"I\u0027ve changed my mind on this. Using a negative multiplier for this purpose is counter-intuitive. A multiplier should be used to specify the importance of a weigher against the rest of them, nor for this.\n\nCould you please add a \"stacking\" flag?","commit_id":"2e6b52ad95240110dd5a7f8dd8ee1e48508f9869"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"3e9b78064f89864db961c47abce0cffe635fb8df","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from nova.scheduler import weights"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"metrics_weight_opts \u003d ["},{"line_number":34,"context_line":"        cfg.FloatOpt(\u0027metrics_weight_multiplier\u0027,"},{"line_number":35,"context_line":"                     default\u003d1.0,"},{"line_number":36,"context_line":"                     help\u003d\u0027Multiplier used for weighing metrics. Negative \u0027"},{"line_number":37,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQn%2F%2FbZI%3D","line":34,"in_reply_to":"AAAAQn%2F%2FcCo%3D","updated":"2013-07-31 11:07:29.000000000","message":"I use multiplier here exactly to specify the importance of a weigher against the rest of them. \n\nI copied the help string from ram weigher, so it might be misleading. \n\nAny comment @Alvaro?","commit_id":"2e6b52ad95240110dd5a7f8dd8ee1e48508f9869"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"ce47d2be2a03f954456933fae4770cf514a7cf07","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        cfg.FloatOpt(\u0027metrics_weight_multiplier\u0027,"},{"line_number":35,"context_line":"                     default\u003d1.0,"},{"line_number":36,"context_line":"                     help\u003d\u0027Multiplier used for weighing metrics. Negative \u0027"},{"line_number":37,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"},{"line_number":38,"context_line":"        cfg.ListOpt(\u0027metrics_weight_setting\u0027,"},{"line_number":39,"context_line":"                    default\u003d[],"},{"line_number":40,"context_line":"                    help\u003d\u0027How the metrics are going to be weighed. This \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQn%2F%2FbEo%3D","line":37,"updated":"2013-07-31 12:36:49.000000000","message":"According to your comment above, then remove the \"Negative numbers mean to stack vs spread.\" part","commit_id":"2e6b52ad95240110dd5a7f8dd8ee1e48508f9869"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"3f3c72c10e3aac47a90dc3eb2edbaa267047e9cc","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        cfg.FloatOpt(\u0027metrics_weight_multiplier\u0027,"},{"line_number":35,"context_line":"                     default\u003d1.0,"},{"line_number":36,"context_line":"                     help\u003d\u0027Multiplier used for weighing metrics. Negative \u0027"},{"line_number":37,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"},{"line_number":38,"context_line":"        cfg.ListOpt(\u0027metrics_weight_setting\u0027,"},{"line_number":39,"context_line":"                    default\u003d[],"},{"line_number":40,"context_line":"                    help\u003d\u0027How the metrics are going to be weighed. This \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQn%2F%2FYes%3D","line":37,"in_reply_to":"AAAAQn%2F%2FbEo%3D","updated":"2013-08-01 02:14:28.000000000","message":"Done","commit_id":"2e6b52ad95240110dd5a7f8dd8ee1e48508f9869"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5c7e057966c10fb6ef74261700a6ca8c08bc0a6e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    def __init__(self):"},{"line_number":56,"context_line":"        self._parse_setting()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def _parse_setting(self):"},{"line_number":59,"context_line":"        self.setting \u003d []"},{"line_number":60,"context_line":"        bad \u003d []"},{"line_number":61,"context_line":"        for item in CONF.metrics_weight_setting:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAQn%2F%2FGaw%3D","line":58,"updated":"2013-08-07 07:33:23.000000000","message":"it would be nice if there were tests cases for this code.","commit_id":"d9cac2c02c12dd9e8d068ff2ac7cdb3c8d7f14c3"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"34565bb6f524f4232ca8a0d50cf9319f26f7ca5d","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    def __init__(self):"},{"line_number":56,"context_line":"        self._parse_setting()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def _parse_setting(self):"},{"line_number":59,"context_line":"        self.setting \u003d []"},{"line_number":60,"context_line":"        bad \u003d []"},{"line_number":61,"context_line":"        for item in CONF.metrics_weight_setting:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAQn%2F%2FB%2Bc%3D","line":58,"in_reply_to":"AAAAQn%2F%2FGaw%3D","updated":"2013-08-08 06:06:00.000000000","message":"Done","commit_id":"d9cac2c02c12dd9e8d068ff2ac7cdb3c8d7f14c3"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"0eea722b3d2dbf124b7ec5d64142e8c70c10e022","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        cfg.FloatOpt(\u0027metrics_weight_multiplier\u0027,"},{"line_number":35,"context_line":"                     default\u003d1.0,"},{"line_number":36,"context_line":"                     help\u003d\u0027Multiplier used for weighing metrics.\u0027),"},{"line_number":37,"context_line":"        cfg.ListOpt(\u0027metrics_weight_setting\u0027,"},{"line_number":38,"context_line":"                    default\u003d[],"},{"line_number":39,"context_line":"                    help\u003d\u0027How the metrics are going to be weighed. This \u0027"},{"line_number":40,"context_line":"                         \u0027should be in the form of \"\u003cname1\u003e\u003d\u003cratio1\u003e, \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2F30A%3D","line":37,"updated":"2013-08-28 15:50:31.000000000","message":"Consider using the term \u0027multiplier\u0027 instead of \u0027ratio\u0027 to be more consistent with other weights code.\n\n(see weights/ram.py)","commit_id":"e52a5f0a5f70cd06f6401ee1a751ec3f80221b41"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"12f17e57f057084d860073999b9eaacbb40efdaa","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        cfg.FloatOpt(\u0027metrics_weight_multiplier\u0027,"},{"line_number":35,"context_line":"                     default\u003d1.0,"},{"line_number":36,"context_line":"                     help\u003d\u0027Multiplier used for weighing metrics.\u0027),"},{"line_number":37,"context_line":"        cfg.ListOpt(\u0027metrics_weight_setting\u0027,"},{"line_number":38,"context_line":"                    default\u003d[],"},{"line_number":39,"context_line":"                    help\u003d\u0027How the metrics are going to be weighed. This \u0027"},{"line_number":40,"context_line":"                         \u0027should be in the form of \"\u003cname1\u003e\u003d\u003cratio1\u003e, \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2FiMQ%3D","line":37,"in_reply_to":"AAAASn%2F%2F1P0%3D","updated":"2013-09-03 18:43:08.000000000","message":"Gotcha.  I don\u0027t know that it\u0027d be more confusing to re-use multiplier, but this should be fine.","commit_id":"e52a5f0a5f70cd06f6401ee1a751ec3f80221b41"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"999d0a8b48ae8c8b87f732ee08e9767d2241706f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        cfg.FloatOpt(\u0027metrics_weight_multiplier\u0027,"},{"line_number":35,"context_line":"                     default\u003d1.0,"},{"line_number":36,"context_line":"                     help\u003d\u0027Multiplier used for weighing metrics.\u0027),"},{"line_number":37,"context_line":"        cfg.ListOpt(\u0027metrics_weight_setting\u0027,"},{"line_number":38,"context_line":"                    default\u003d[],"},{"line_number":39,"context_line":"                    help\u003d\u0027How the metrics are going to be weighed. This \u0027"},{"line_number":40,"context_line":"                         \u0027should be in the form of \"\u003cname1\u003e\u003d\u003cratio1\u003e, \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2F1P0%3D","line":37,"in_reply_to":"AAAASn%2F%2F30A%3D","updated":"2013-08-29 01:59:05.000000000","message":"@Brian,\n\nThe ratio here is meant to be used within the this metrics weigher only, because this generic metrics weigher can weighing multiple metrics at the same time. The multiplier is used between multiple weighers. e.g. If the admin enables both ram weigher and metrics weigher at the same time, then\n\ntotal_weight \u003d ram_weight_multiplier * ram_weight + metrics_weight_multiplier * metrics_weight\n\nmetrics_weight \u003d metrics[name1].value * ratio1 + metrics[name2].value * ratio2\n\nI use the term \u0027ratio\u0027 here to not confuse with multiplier. I don\u0027t know how to use only 1 multiplier to enable weighing multiple metrics within this weigher. Any suggestions?","commit_id":"e52a5f0a5f70cd06f6401ee1a751ec3f80221b41"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"0eea722b3d2dbf124b7ec5d64142e8c70c10e022","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            try:"},{"line_number":85,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":86,"context_line":"            except KeyError:"},{"line_number":87,"context_line":"                pass"},{"line_number":88,"context_line":"        return value"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2F31M%3D","line":87,"updated":"2013-08-28 15:50:31.000000000","message":"Possibly worth a debug message?  Might indicate misconfiguration since the computes aren\u0027t generating the metric you have configured the scheduler to consume.","commit_id":"e52a5f0a5f70cd06f6401ee1a751ec3f80221b41"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"999d0a8b48ae8c8b87f732ee08e9767d2241706f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            try:"},{"line_number":85,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":86,"context_line":"            except KeyError:"},{"line_number":87,"context_line":"                pass"},{"line_number":88,"context_line":"        return value"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2F1O4%3D","line":87,"in_reply_to":"AAAASn%2F%2F31M%3D","updated":"2013-08-29 01:59:05.000000000","message":"Done","commit_id":"e52a5f0a5f70cd06f6401ee1a751ec3f80221b41"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5c06df7a53ca457ea12bc6a3ed1820f7d2f54850","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        for (name, ratio) in self.setting:"},{"line_number":84,"context_line":"            try:"},{"line_number":85,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":86,"context_line":"            except KeyError:"},{"line_number":87,"context_line":"                LOG.debug(_(\"host node %(host)s.%(node)s doesn\u0027t have the \""},{"line_number":88,"context_line":"                            \"metric %(name)s\"),"},{"line_number":89,"context_line":"                          {\u0027host\u0027: host_state.host,"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAASn%2F%2FiLQ%3D","line":86,"updated":"2013-09-03 18:39:39.000000000","message":"Question...Is the weight value still useful if one or more metrics is missing?  The operator configures the individual \"ratios\" in the metric_weight_setting may not get weights that make sense if they are missing.  I wonder now if this should simply raise an exception.","commit_id":"8d4c22f63a3bc370a7934828b92583e11ffdf01b"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"bc0abca4ebe47a5d8430a36903ec7b3e5d65fdde","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        for (name, ratio) in self.setting:"},{"line_number":84,"context_line":"            try:"},{"line_number":85,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":86,"context_line":"            except KeyError:"},{"line_number":87,"context_line":"                LOG.debug(_(\"host node %(host)s.%(node)s doesn\u0027t have the \""},{"line_number":88,"context_line":"                            \"metric %(name)s\"),"},{"line_number":89,"context_line":"                          {\u0027host\u0027: host_state.host,"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAASn%2F%2Ff8E%3D","line":86,"in_reply_to":"AAAASn%2F%2FiLQ%3D","updated":"2013-09-04 02:50:31.000000000","message":"ok, I\u0027ll raise a new exception MetricNotAvailable","commit_id":"8d4c22f63a3bc370a7934828b92583e11ffdf01b"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"2f2b461519d315896d3f46ab60c088ebc5110435","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"\"\"\""},{"line_number":16,"context_line":"Metrics Weigher.  Weigh hosts by their metrics."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATX%2F%2F%2F7M%3D","line":14,"updated":"2013-10-23 04:28:41.000000000","message":"There should be a blank line here.","commit_id":"c1ad11ea7475f17b2d67057036172a2ee6b24948"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"eb3407449d83a2f3485633ed989876ebc9a142e5","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"\"\"\""},{"line_number":16,"context_line":"Metrics Weigher.  Weigh hosts by their metrics."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2F%2F38%3D","line":14,"in_reply_to":"AAAATX%2F%2F%2F7M%3D","updated":"2013-10-24 05:53:23.000000000","message":"Done","commit_id":"c1ad11ea7475f17b2d67057036172a2ee6b24948"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"99ec224b3b7daaa0b2a0d86e3e0e92482d819f78","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            else:"},{"line_number":72,"context_line":"                bad.append(item)"},{"line_number":73,"context_line":"        if bad:"},{"line_number":74,"context_line":"            LOG.warn(_(\"Ignore the incorrect settings of\""},{"line_number":75,"context_line":"                       \" metrics_weight_setting: %s\"),"},{"line_number":76,"context_line":"                     str(bad))"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATX%2F%2F%2BjI%3D","line":74,"updated":"2013-10-23 12:22:01.000000000","message":"I\u0027m not sure I like the inconsistent behavior here - if the value part of the configuration setting is wrong / mistyped then you just log an error, but if the metric name is wrong/mistyped then (below) you trap and raise the key error which will make the scheduler fail.\n\nIt feels to me like this is should fail the scheduler in both cases - running with a mis-configured scheduler is a pretty bad state to be in","commit_id":"c1ad11ea7475f17b2d67057036172a2ee6b24948"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"eb3407449d83a2f3485633ed989876ebc9a142e5","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            else:"},{"line_number":72,"context_line":"                bad.append(item)"},{"line_number":73,"context_line":"        if bad:"},{"line_number":74,"context_line":"            LOG.warn(_(\"Ignore the incorrect settings of\""},{"line_number":75,"context_line":"                       \" metrics_weight_setting: %s\"),"},{"line_number":76,"context_line":"                     str(bad))"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2F%2F1A%3D","line":74,"in_reply_to":"AAAATX%2F%2F%2BjI%3D","updated":"2013-10-24 05:53:23.000000000","message":"I\u0027ll change it to LOG.exception","commit_id":"c1ad11ea7475f17b2d67057036172a2ee6b24948"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"99ec224b3b7daaa0b2a0d86e3e0e92482d819f78","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            try:"},{"line_number":87,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":88,"context_line":"            except KeyError:"},{"line_number":89,"context_line":"                exp \u003d exception.ComputeHostMetricNotFound"},{"line_number":90,"context_line":"                raise exp(host\u003dhost_state.host,"},{"line_number":91,"context_line":"                          node\u003dhost_state.nodename,"},{"line_number":92,"context_line":"                          name\u003dname)"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATX%2F%2F%2Bh4%3D","line":89,"updated":"2013-10-23 12:22:01.000000000","message":"This seems to imply that all hosts will always collect all metrics - is that always true  - it seems like a bit of a heavy limitation.\n\nNot sure it can be easily fixed in here, but something that made sure that at least one host was reporting the expected metric would be a very useful check","commit_id":"c1ad11ea7475f17b2d67057036172a2ee6b24948"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"eb3407449d83a2f3485633ed989876ebc9a142e5","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            try:"},{"line_number":87,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":88,"context_line":"            except KeyError:"},{"line_number":89,"context_line":"                exp \u003d exception.ComputeHostMetricNotFound"},{"line_number":90,"context_line":"                raise exp(host\u003dhost_state.host,"},{"line_number":91,"context_line":"                          node\u003dhost_state.nodename,"},{"line_number":92,"context_line":"                          name\u003dname)"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2F%2Fxk%3D","line":89,"in_reply_to":"AAAATX%2F%2F%2Bh4%3D","updated":"2013-10-24 05:53:23.000000000","message":"How about adding another scheduler filter to filter out those hosts who do not have the metrics? \n\nIf it\u0027s ok, I\u0027ll do it in a separate patch.","commit_id":"c1ad11ea7475f17b2d67057036172a2ee6b24948"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"dad128cb69ea1dd798210809646d7bd2920abdc5","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                (name, ratio) \u003d item.split(\u0027\u003d\u0027)"},{"line_number":66,"context_line":"                ratio \u003d float(ratio)"},{"line_number":67,"context_line":"            except ValueError:"},{"line_number":68,"context_line":"                name \u003d None"},{"line_number":69,"context_line":"                ratio \u003d None"},{"line_number":70,"context_line":"            if name and ratio is not None:"},{"line_number":71,"context_line":"                self.setting.append((name, ratio))"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F%2F7I4%3D","line":68,"updated":"2013-10-25 06:26:03.000000000","message":"nit, could simpily to 68-73: \n\n    bad.append(item)\nelse:\n    self.setting.append((name, ration))","commit_id":"f955d82510aea176b01301c035db4cc608c766be"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"01fb613931c43d2faebaf26da8a463521f1c2404","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                (name, ratio) \u003d item.split(\u0027\u003d\u0027)"},{"line_number":66,"context_line":"                ratio \u003d float(ratio)"},{"line_number":67,"context_line":"            except ValueError:"},{"line_number":68,"context_line":"                name \u003d None"},{"line_number":69,"context_line":"                ratio \u003d None"},{"line_number":70,"context_line":"            if name and ratio is not None:"},{"line_number":71,"context_line":"                self.setting.append((name, ratio))"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F%2F7IY%3D","line":68,"in_reply_to":"AAAATn%2F%2F7I4%3D","updated":"2013-10-25 06:32:07.000000000","message":"We also need to deal with error configuration like \"\u003d2.0\", which could not be caught by this except branch.","commit_id":"f955d82510aea176b01301c035db4cc608c766be"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"5632c3f9ba9d06c4a84fdc763828c072edec86a5","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                (name, ratio) \u003d item.split(\u0027\u003d\u0027)"},{"line_number":66,"context_line":"                ratio \u003d float(ratio)"},{"line_number":67,"context_line":"            except ValueError:"},{"line_number":68,"context_line":"                name \u003d None"},{"line_number":69,"context_line":"                ratio \u003d None"},{"line_number":70,"context_line":"            if name and ratio is not None:"},{"line_number":71,"context_line":"                self.setting.append((name, ratio))"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAATn%2F%2F6%2BI%3D","line":68,"in_reply_to":"AAAATn%2F%2F7IY%3D","updated":"2013-10-25 07:19:47.000000000","message":"sorry right.","commit_id":"f955d82510aea176b01301c035db4cc608c766be"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"345e81a287a70da5e5edabbf4c324ff8442d0683","unresolved":false,"context_lines":[{"line_number":48,"context_line":"]"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"CONF \u003d cfg.CONF"},{"line_number":51,"context_line":"CONF.register_opts(metrics_weight_opts)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAATn%2F%2BeQ8%3D","line":51,"updated":"2013-11-25 17:51:03.000000000","message":"How about registering these options with:\n\ngroup\u003d\u0027metrics\u0027\n\nThen you could remove the \u0027metrics_\u0027 prefix from each option like so:\n\nCONF.metrics.weight_multiplier","commit_id":"022e332ceefbb6cd0844a499c5750f0d525c5333"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"f9672dad820802dd605e6201f3f8dfe43332c8b0","unresolved":false,"context_lines":[{"line_number":48,"context_line":"]"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"CONF \u003d cfg.CONF"},{"line_number":51,"context_line":"CONF.register_opts(metrics_weight_opts)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAATn%2F%2BcBA%3D","line":51,"in_reply_to":"AAAATn%2F%2BeQ8%3D","updated":"2013-11-26 03:15:23.000000000","message":"@Brian,\n\nmetrics_weight_multiplier is used to set the weight between this weigher and other weighers, just like the ram_weight_multiplier option in scheduler/weights/ram.py. So I think this one might  not fit in the \u0027metrics\u0027 group. However the metrics_weight_setting option is internal to this weigher.  \n\nSo how about I only put metrics_weight_setting into the \u0027metrics\u0027 group and leave the metrics_weight_multiplier in the default group, just like the ram weigher does?","commit_id":"022e332ceefbb6cd0844a499c5750f0d525c5333"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"ec2ed167bb0e6a82b617a261350f699f7d8ae6bd","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                     help\u003d\u0027Multiplier used for weighing metrics.\u0027),"},{"line_number":39,"context_line":"]"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"metrics_weight_internal_opts \u003d ["},{"line_number":42,"context_line":"        cfg.ListOpt(\u0027weight_setting\u0027,"},{"line_number":43,"context_line":"                    default\u003d[],"},{"line_number":44,"context_line":"                    help\u003d\u0027How the metrics are going to be weighed. This \u0027"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAATn%2F%2BTdM%3D","line":41,"updated":"2013-11-27 16:23:22.000000000","message":"Personally I don\u0027t think the distinction here of an internal option is particularly valuable.  \n\nI think you should either put them both in the group so they can be specified together in nova.conf or don\u0027t put them in a group at all.\n\nFWIW, the general, the trend is to use the groups more to organize options.","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"a7e16231706871a688701c12165dcca978e3b178","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                     help\u003d\u0027Multiplier used for weighing metrics.\u0027),"},{"line_number":39,"context_line":"]"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"metrics_weight_internal_opts \u003d ["},{"line_number":42,"context_line":"        cfg.ListOpt(\u0027weight_setting\u0027,"},{"line_number":43,"context_line":"                    default\u003d[],"},{"line_number":44,"context_line":"                    help\u003d\u0027How the metrics are going to be weighed. This \u0027"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAATn%2F%2BRbk%3D","line":41,"in_reply_to":"AAAATn%2F%2BTdM%3D","updated":"2013-11-28 03:27:31.000000000","message":"Ok, i\u0027ll put these 2 options into the metrics group.","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"26225bbab4ffe380872c64c1594d6063402a888b","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":93,"context_line":"            except KeyError:"},{"line_number":94,"context_line":"                exp \u003d exception.ComputeHostMetricNotFound"},{"line_number":95,"context_line":"                raise exp(host\u003dhost_state.host,"},{"line_number":96,"context_line":"                          node\u003dhost_state.nodename,"},{"line_number":97,"context_line":"                          name\u003dname)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAATn%2F%2BRfY%3D","line":94,"updated":"2013-11-28 02:07:26.000000000","message":"Then who will handle this ComputeHostMetricNotFound exception?\n\nGuess the safe approach here is to ignore this metric item for this host, or use default value for calculate. Because it is perfectly normal, on a upgrade path or incorrect version, some compute node simply don\u0027t have the metric data stored in db.\n\nBesides, it also worth another unittest to cover this case.","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"1c3657ccfca4ce6cc5fbc60d30bff1f937472cbd","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":93,"context_line":"            except KeyError:"},{"line_number":94,"context_line":"                exp \u003d exception.ComputeHostMetricNotFound"},{"line_number":95,"context_line":"                raise exp(host\u003dhost_state.host,"},{"line_number":96,"context_line":"                          node\u003dhost_state.nodename,"},{"line_number":97,"context_line":"                          name\u003dname)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAATn%2F%2BQ18%3D","line":94,"in_reply_to":"AAAATn%2F%2BQ%2FI%3D","updated":"2013-11-28 07:38:47.000000000","message":"I used to ignore the non-existing metrics, but some cores seems to think it needs a exception here. I think this is a decision depending on whether we should NOT mislead the admin about what he/she sets in weight_setting.\n\nI\u0027ll add the document of the dependency of filter in the new filter patch.","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"601d91d6ce90fd5aaffda5199bfff591509fd975","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":93,"context_line":"            except KeyError:"},{"line_number":94,"context_line":"                exp \u003d exception.ComputeHostMetricNotFound"},{"line_number":95,"context_line":"                raise exp(host\u003dhost_state.host,"},{"line_number":96,"context_line":"                          node\u003dhost_state.nodename,"},{"line_number":97,"context_line":"                          name\u003dname)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAATn%2F%2BQ%2FI%3D","line":94,"in_reply_to":"AAAATn%2F%2BRbM%3D","updated":"2013-11-28 07:18:43.000000000","message":"Sorry I didn\u0027t notice the comment on the earlier patch set. \n\nMaybe you should set weight to None for host w/o metric value, so that it become the least favourable host after sorting.\n\nThe point here is weigher itself, should gracefully handle the situation without breaking the whole scheduling action. If there\u0027s any extra dependency on filters, it should be mentioned in document, I guess. :)","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"a7e16231706871a688701c12165dcca978e3b178","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                value +\u003d host_state.metrics[name].value * ratio"},{"line_number":93,"context_line":"            except KeyError:"},{"line_number":94,"context_line":"                exp \u003d exception.ComputeHostMetricNotFound"},{"line_number":95,"context_line":"                raise exp(host\u003dhost_state.host,"},{"line_number":96,"context_line":"                          node\u003dhost_state.nodename,"},{"line_number":97,"context_line":"                          name\u003dname)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAATn%2F%2BRbM%3D","line":94,"in_reply_to":"AAAATn%2F%2BRfY%3D","updated":"2013-11-28 03:27:31.000000000","message":"@Qiu Yu,\nWe\u0027ve discussed this in the previous patches\u0027 comment. It seems that if the metrics is not found, it\u0027s useless to be set in the weight_setting to do the calculation. Using the default value might results a misleading result that the user doesn\u0027t expect to see. \n\nTo avoid see this kind of exception, maybe we could add a scheduler filter to filter out those compute node who doesn\u0027t have the value? Is it ok with you? How about implementing the filter in another patch?\n\nThe unittest is already there, See nova.tests.scheduler.test_weights.MetricsWeigherTestCase.test_metric_not_found","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0aee95ecc4e76b86cb902e97f4a4b4d1b097e1eb","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                bad.append(item)"},{"line_number":74,"context_line":"        if bad:"},{"line_number":75,"context_line":"            LOG.exception(_(\"Ignore the incorrect settings of\""},{"line_number":76,"context_line":"                            \" metrics_weight_setting: %s\"),"},{"line_number":77,"context_line":"                          str(bad))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _weight_multiplier(self):"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAATn%2F95wQ%3D","line":76,"updated":"2013-12-04 17:36:38.000000000","message":"I\u0027d phrase this as \"Ignoring the invalid elements of metrics_weight_setting: %s\"; also, I would use \", \".join(bad) as opposed to str(bad).  At a minimum, I\u0027d like to see you s/Ignore/Ignoring/.  (English nit)","commit_id":"d8aa3d1245b435e9ca747f291774b4ba7197738a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"0aabd8847f0e96002b84ef74c23786459199fad4","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                bad.append(item)"},{"line_number":74,"context_line":"        if bad:"},{"line_number":75,"context_line":"            LOG.exception(_(\"Ignore the incorrect settings of\""},{"line_number":76,"context_line":"                            \" metrics_weight_setting: %s\"),"},{"line_number":77,"context_line":"                          str(bad))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _weight_multiplier(self):"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAATn%2F93ks%3D","line":76,"in_reply_to":"AAAATn%2F95wQ%3D","updated":"2013-12-05 03:38:52.000000000","message":"Done.\nAlso I noticed log.exception should only be used in try...except... clause, so I\u0027ll change it to log.error.","commit_id":"d8aa3d1245b435e9ca747f291774b4ba7197738a"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0aee95ecc4e76b86cb902e97f4a4b4d1b097e1eb","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                exp \u003d exception.ComputeHostMetricNotFound"},{"line_number":91,"context_line":"                raise exp(host\u003dhost_state.host,"},{"line_number":92,"context_line":"                          node\u003dhost_state.nodename,"},{"line_number":93,"context_line":"                          name\u003dname)"},{"line_number":94,"context_line":"        return value"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAATn%2F95vk%3D","line":93,"updated":"2013-12-04 17:36:38.000000000","message":"I would tend to phrase this as:\n\n    raise exception.ComputeHostMetricNotFound(\n        host\u003dhost_state.host, node\u003dhost_state.nodename, name\u003dname)\n\n(femtonit)","commit_id":"d8aa3d1245b435e9ca747f291774b4ba7197738a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"0aabd8847f0e96002b84ef74c23786459199fad4","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                exp \u003d exception.ComputeHostMetricNotFound"},{"line_number":91,"context_line":"                raise exp(host\u003dhost_state.host,"},{"line_number":92,"context_line":"                          node\u003dhost_state.nodename,"},{"line_number":93,"context_line":"                          name\u003dname)"},{"line_number":94,"context_line":"        return value"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAATn%2F93kU%3D","line":93,"in_reply_to":"AAAATn%2F95vk%3D","updated":"2013-12-05 03:38:52.000000000","message":"Done","commit_id":"d8aa3d1245b435e9ca747f291774b4ba7197738a"}],"nova/scheduler/weights/resources.py":[{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"708e06ac14ab3411945b30dc2dc83d028f9cb283","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        cfg.FloatOpt(\u0027resources_weight_multiplier\u0027,"},{"line_number":38,"context_line":"                     default\u003d1.0,"},{"line_number":39,"context_line":"                     help\u003d\u0027Multiplier used for weighing resources.  Negative \u0027"},{"line_number":40,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F23c%3D","line":40,"updated":"2013-07-10 10:13:26.000000000","message":"This is not really true when using more than one weigher. I\u0027d better add another flag resources_weight_inverse\u0027  to reverse the behavior of the weigher (i.e. stack).","commit_id":"3f7496c6577e01a61d3fb8c4be8c08dfc903a791"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"3a2b981228153c9d5f7e43cdcd5715aac5f084e3","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        cfg.FloatOpt(\u0027resources_weight_multiplier\u0027,"},{"line_number":38,"context_line":"                     default\u003d1.0,"},{"line_number":39,"context_line":"                     help\u003d\u0027Multiplier used for weighing resources.  Negative \u0027"},{"line_number":40,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F2x8%3D","line":40,"in_reply_to":"AAAAP3%2F%2F23c%3D","updated":"2013-07-10 10:52:40.000000000","message":"Sorry, Alvaro, I don\u0027t catch what you mean here. What\u0027s wrong with this when using more than one weigher?","commit_id":"3f7496c6577e01a61d3fb8c4be8c08dfc903a791"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"9734580ae519b0a90aa3aff25eefbeddee768394","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        cfg.FloatOpt(\u0027resources_weight_multiplier\u0027,"},{"line_number":38,"context_line":"                     default\u003d1.0,"},{"line_number":39,"context_line":"                     help\u003d\u0027Multiplier used for weighing resources.  Negative \u0027"},{"line_number":40,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2FzR4%3D","line":40,"in_reply_to":"AAAAP3%2F%2F2ss%3D","updated":"2013-07-11 07:38:31.000000000","message":"Do you have any links to the email discussion or design spec about the future weigh normalization? Here I just followed the existing ram weigher. Could it be possible to leave that in future patches which changes both ram weigher and this weigher?","commit_id":"3f7496c6577e01a61d3fb8c4be8c08dfc903a791"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"3ab0468b409f4f1b637959a67f2ecc4a8804230a","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        cfg.FloatOpt(\u0027resources_weight_multiplier\u0027,"},{"line_number":38,"context_line":"                     default\u003d1.0,"},{"line_number":39,"context_line":"                     help\u003d\u0027Multiplier used for weighing resources.  Negative \u0027"},{"line_number":40,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F2ss%3D","line":40,"in_reply_to":"AAAAP3%2F%2F2x8%3D","updated":"2013-07-10 11:14:55.000000000","message":"Sorry, I was thinking about the future weigth normalization. Anyway I think that the usage of an inverse flag is more appropriate (for example if normalizing weights the negative multiplier won\u0027t behave as expected and all the weighers should be readapted).","commit_id":"3f7496c6577e01a61d3fb8c4be8c08dfc903a791"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c43e44c149765303ff1f1e7bcb5998cb519199e1","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def weigh_objects(self, weighed_obj_list, weight_properties):"},{"line_number":70,"context_line":"        # get resoruces and ratios"},{"line_number":71,"context_line":"        scheduler_hints \u003d weight_properties.get(\u0027scheduler_hints\u0027) or {}"},{"line_number":72,"context_line":"        resources \u003d scheduler_hints.get(\u0027weighed_resources\u0027, [])"},{"line_number":73,"context_line":"        ratios \u003d scheduler_hints.get(\u0027weighed_ratios\u0027, [])"},{"line_number":74,"context_line":"        if isinstance(resources, basestring):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F2Bc%3D","line":71,"updated":"2013-07-10 14:47:45.000000000","message":"Why not weight_properties.get(\u0027scheduler_hints\u0027, {})?\n\nIf this return {} is there any reason to continue with the method?","commit_id":"3f7496c6577e01a61d3fb8c4be8c08dfc903a791"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"9734580ae519b0a90aa3aff25eefbeddee768394","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def weigh_objects(self, weighed_obj_list, weight_properties):"},{"line_number":70,"context_line":"        # get resoruces and ratios"},{"line_number":71,"context_line":"        scheduler_hints \u003d weight_properties.get(\u0027scheduler_hints\u0027) or {}"},{"line_number":72,"context_line":"        resources \u003d scheduler_hints.get(\u0027weighed_resources\u0027, [])"},{"line_number":73,"context_line":"        ratios \u003d scheduler_hints.get(\u0027weighed_ratios\u0027, [])"},{"line_number":74,"context_line":"        if isinstance(resources, basestring):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2FzT4%3D","line":71,"in_reply_to":"AAAAP3%2F%2F2Bc%3D","updated":"2013-07-11 07:38:31.000000000","message":"Done","commit_id":"3f7496c6577e01a61d3fb8c4be8c08dfc903a791"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c355c10daf5abe8960123c39f67bb48eac7104b2","unresolved":false,"context_lines":[{"line_number":36,"context_line":"resources_weight_opts \u003d ["},{"line_number":37,"context_line":"        cfg.FloatOpt(\u0027resources_weight_multiplier\u0027,"},{"line_number":38,"context_line":"                     default\u003d1.0,"},{"line_number":39,"context_line":"                     help\u003d\u0027Multiplier used for weighing resources.  Negative \u0027"},{"line_number":40,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FuME%3D","line":39,"updated":"2013-07-12 13:15:01.000000000","message":"minor nit - double space","commit_id":"afc46ad7c39ad42e9f45f33185feec39727f71f2"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"b16ecb895e381c592c36495c85a362ac55e48460","unresolved":false,"context_lines":[{"line_number":36,"context_line":"resources_weight_opts \u003d ["},{"line_number":37,"context_line":"        cfg.FloatOpt(\u0027resources_weight_multiplier\u0027,"},{"line_number":38,"context_line":"                     default\u003d1.0,"},{"line_number":39,"context_line":"                     help\u003d\u0027Multiplier used for weighing resources.  Negative \u0027"},{"line_number":40,"context_line":"                          \u0027numbers mean to stack vs spread.\u0027),"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2F%2Bg0%3D","line":39,"in_reply_to":"AAAAP3%2F%2FuME%3D","updated":"2013-07-18 05:35:22.000000000","message":"thanks for catching this.","commit_id":"afc46ad7c39ad42e9f45f33185feec39727f71f2"},{"author":{"_account_id":7073,"name":"mouad benchchaoui","email":"m.benchchaoui@x-ion.de","username":"mouad"},"change_message_id":"33c82618c6d17b6f559bfd1911553a53661fde59","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def _weigh_object(self, host_state, resources, ratios):"},{"line_number":55,"context_line":"        value \u003d 0"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        for (resource, ratio) in map(lambda x, y: (x, y), resources, ratios):"},{"line_number":58,"context_line":"            if not resource or ratio is None:"},{"line_number":59,"context_line":"                break"},{"line_number":60,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FueM%3D","line":57,"updated":"2013-07-12 11:00:32.000000000","message":"Better to use zip :  http://docs.python.org/2/library/functions.html#zip\n\nmap(lambda x, y: (x, y), resources, ratios) \u003d\u003e zip(resources, ratios)","commit_id":"afc46ad7c39ad42e9f45f33185feec39727f71f2"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"b16ecb895e381c592c36495c85a362ac55e48460","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def _weigh_object(self, host_state, resources, ratios):"},{"line_number":55,"context_line":"        value \u003d 0"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        for (resource, ratio) in map(lambda x, y: (x, y), resources, ratios):"},{"line_number":58,"context_line":"            if not resource or ratio is None:"},{"line_number":59,"context_line":"                break"},{"line_number":60,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2F%2Bgw%3D","line":57,"in_reply_to":"AAAAP3%2F%2FueM%3D","updated":"2013-07-18 05:35:22.000000000","message":"yeah, zip would be a better choice.","commit_id":"afc46ad7c39ad42e9f45f33185feec39727f71f2"}],"nova/tests/scheduler/fakes.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5c7e057966c10fb6ef74261700a6ca8c08bc0a6e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"             free_disk_mb\u003d8192, local_gb_used\u003d0, updated_at\u003dNone,"},{"line_number":47,"context_line":"             service\u003ddict(host\u003d\u0027host4\u0027, disabled\u003dFalse),"},{"line_number":48,"context_line":"             hypervisor_hostname\u003d\u0027node4\u0027),"},{"line_number":49,"context_line":"        # Broken entry"},{"line_number":50,"context_line":"        dict(id\u003d5, local_gb\u003d1024, memory_mb\u003d1024, vcpus\u003d1, service\u003dNone),"},{"line_number":51,"context_line":"]"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAQn%2F%2FGa8%3D","line":49,"updated":"2013-08-07 07:33:23.000000000","message":"The comment was/is a bit confusig. Can you maybe consider writing \"Partial entry\" and explaining what it will be used for.","commit_id":"d9cac2c02c12dd9e8d068ff2ac7cdb3c8d7f14c3"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"34565bb6f524f4232ca8a0d50cf9319f26f7ca5d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"             free_disk_mb\u003d8192, local_gb_used\u003d0, updated_at\u003dNone,"},{"line_number":47,"context_line":"             service\u003ddict(host\u003d\u0027host4\u0027, disabled\u003dFalse),"},{"line_number":48,"context_line":"             hypervisor_hostname\u003d\u0027node4\u0027),"},{"line_number":49,"context_line":"        # Broken entry"},{"line_number":50,"context_line":"        dict(id\u003d5, local_gb\u003d1024, memory_mb\u003d1024, vcpus\u003d1, service\u003dNone),"},{"line_number":51,"context_line":"]"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAQn%2F%2FB%2BY%3D","line":49,"in_reply_to":"AAAAQn%2F%2FGa8%3D","updated":"2013-08-08 06:06:00.000000000","message":"Done","commit_id":"d9cac2c02c12dd9e8d068ff2ac7cdb3c8d7f14c3"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"26225bbab4ffe380872c64c1594d6063402a888b","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                                       \u0027timestamp\u0027: None,"},{"line_number":123,"context_line":"                                       \u0027source\u0027: \u0027host4\u0027"},{"line_number":124,"context_line":"                                      },"},{"line_number":125,"context_line":"                                     ])),"},{"line_number":126,"context_line":"]"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"INSTANCES \u003d ["}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAATn%2F%2BRfM%3D","line":125,"updated":"2013-11-28 02:07:26.000000000","message":"Also need a another fake node with some metric value missing for completeness.","commit_id":"5fcc36e0dc88b1768f90a075a4da320df033f0e7"}],"nova/tests/scheduler/test_weights.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0aee95ecc4e76b86cb902e97f4a4b4d1b097e1eb","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.mox.ReplayAll()"},{"line_number":127,"context_line":"        host_states \u003d self.host_manager.get_all_host_states(ctxt)"},{"line_number":128,"context_line":"        self.mox.VerifyAll()"},{"line_number":129,"context_line":"        self.mox.ResetAll()"},{"line_number":130,"context_line":"        return host_states"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _do_test(self, settings, expected_weight, expected_host):"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAATn%2F95vY%3D","line":129,"updated":"2013-12-04 17:36:38.000000000","message":"For new tests, we\u0027re encouraging the use of mock over mox.  (femtonit)","commit_id":"d8aa3d1245b435e9ca747f291774b4ba7197738a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"0aabd8847f0e96002b84ef74c23786459199fad4","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.mox.ReplayAll()"},{"line_number":127,"context_line":"        host_states \u003d self.host_manager.get_all_host_states(ctxt)"},{"line_number":128,"context_line":"        self.mox.VerifyAll()"},{"line_number":129,"context_line":"        self.mox.ResetAll()"},{"line_number":130,"context_line":"        return host_states"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _do_test(self, settings, expected_weight, expected_host):"}],"source_content_type":"text/x-python","patch_set":38,"id":"AAAATn%2F93c8%3D","line":129,"in_reply_to":"AAAATn%2F95vY%3D","updated":"2013-12-05 03:38:52.000000000","message":"Done","commit_id":"d8aa3d1245b435e9ca747f291774b4ba7197738a"}]}
