)]}'
{"requirements.txt":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"666326d8f23665c8fdba2ea69a3c78d983f282b1","unresolved":false,"context_lines":[{"line_number":6,"context_line":"jsonpatch\u003e\u003d1.1 # BSD"},{"line_number":7,"context_line":"keystoneauth1\u003e\u003d2.1.0 # Apache-2.0"},{"line_number":8,"context_line":"keystonemiddleware!\u003d4.1.0,\u003e\u003d4.0.0 # Apache-2.0"},{"line_number":9,"context_line":"oslo.cache\u003e\u003d1.5.0 # Apache-2.0"},{"line_number":10,"context_line":"oslo.config\u003e\u003d3.9.0 # Apache-2.0"},{"line_number":11,"context_line":"oslo.context\u003e\u003d2.2.0 # Apache-2.0"},{"line_number":12,"context_line":"oslo.db\u003e\u003d4.1.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":10,"id":"1a122d0e_e80a1278","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":18},"updated":"2016-04-28 13:04:15.000000000","message":"why did you change the requirements version? They are automatically updated via an OpenStack Bot.","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"58ea7f1f07488e1a2139da6776b1093fd5441e6c","unresolved":false,"context_lines":[{"line_number":6,"context_line":"jsonpatch\u003e\u003d1.1 # BSD"},{"line_number":7,"context_line":"keystoneauth1\u003e\u003d2.1.0 # Apache-2.0"},{"line_number":8,"context_line":"keystonemiddleware!\u003d4.1.0,\u003e\u003d4.0.0 # Apache-2.0"},{"line_number":9,"context_line":"oslo.cache\u003e\u003d1.5.0 # Apache-2.0"},{"line_number":10,"context_line":"oslo.config\u003e\u003d3.9.0 # Apache-2.0"},{"line_number":11,"context_line":"oslo.context\u003e\u003d2.2.0 # Apache-2.0"},{"line_number":12,"context_line":"oslo.db\u003e\u003d4.1.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":10,"id":"1a122d0e_c4160848","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":18},"in_reply_to":"1a122d0e_e80a1278","updated":"2016-04-29 08:23:06.000000000","message":"Done","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"12df9fe26d1036e651678eb37ccc98b711998b7f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"keystoneauth1\u003e\u003d2.1.0 # Apache-2.0"},{"line_number":8,"context_line":"keystonemiddleware!\u003d4.1.0,\u003e\u003d4.0.0 # Apache-2.0"},{"line_number":9,"context_line":"oslo.concurrency\u003e\u003d3.5.0 # Apache-2.0"},{"line_number":10,"context_line":"oslo.cache\u003e\u003d1.5.0 # Apache-2.0"},{"line_number":11,"context_line":"oslo.context\u003e\u003d2.2.0 # Apache-2.0"},{"line_number":12,"context_line":"oslo.db\u003e\u003d4.1.0 # Apache-2.0"},{"line_number":13,"context_line":"oslo.i18n\u003e\u003d2.1.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":14,"id":"dab17558_8484fd0a","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":17},"updated":"2016-05-11 14:26:44.000000000","message":"why are you replacing oslo.config here? We should have them both.","commit_id":"f02b933fd414f4af1047ecb3eef4ab11076db1ec"}],"setup.cfg":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    dummy \u003d watcher.decision_engine.strategy.strategies.dummy_strategy:DummyStrategy"},{"line_number":50,"context_line":"    basic \u003d watcher.decision_engine.strategy.strategies.basic_consolidation:BasicConsolidation"},{"line_number":51,"context_line":"    outlet_temp_control \u003d watcher.decision_engine.strategy.strategies.outlet_temp_control:OutletTempControl"},{"line_number":52,"context_line":"    workload_stabilization \u003d watcher.decision_engine.strategy.strategies.sd:StandardDeviation"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"watcher_actions \u003d"},{"line_number":55,"context_line":"    migrate \u003d watcher.applier.actions.migration:Migrate"}],"source_content_type":"text/x-ttcn-cfg","patch_set":3,"id":"da0c15f0_97099b34","line":52,"range":{"start_line":52,"start_character":76,"end_line":52,"end_character":93},"updated":"2016-03-25 14:52:44.000000000","message":"Why not naming the class WorkloadStabilization as well?","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"666326d8f23665c8fdba2ea69a3c78d983f282b1","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    dummy \u003d watcher.decision_engine.strategy.strategies.dummy_strategy:DummyStrategy"},{"line_number":50,"context_line":"    basic \u003d watcher.decision_engine.strategy.strategies.basic_consolidation:BasicConsolidation"},{"line_number":51,"context_line":"    outlet_temp_control \u003d watcher.decision_engine.strategy.strategies.outlet_temp_control:OutletTempControl"},{"line_number":52,"context_line":"    vm_workload_consolidation \u003d watcher.decision_engine.strategy.strategies.vm_workload_consolidation:VMWorkloadConsolidation"},{"line_number":53,"context_line":"    workload_stabilization \u003d watcher.decision_engine.strategy.strategies.workload_stabilization:WorkloadStabilization"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"watcher_actions \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":10,"id":"1a122d0e_28708a0a","line":52,"range":{"start_line":52,"start_character":4,"end_line":52,"end_character":125},"updated":"2016-04-28 13:04:15.000000000","message":"I don\u0027t see where you implemented this strategy.","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"58ea7f1f07488e1a2139da6776b1093fd5441e6c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    dummy \u003d watcher.decision_engine.strategy.strategies.dummy_strategy:DummyStrategy"},{"line_number":50,"context_line":"    basic \u003d watcher.decision_engine.strategy.strategies.basic_consolidation:BasicConsolidation"},{"line_number":51,"context_line":"    outlet_temp_control \u003d watcher.decision_engine.strategy.strategies.outlet_temp_control:OutletTempControl"},{"line_number":52,"context_line":"    vm_workload_consolidation \u003d watcher.decision_engine.strategy.strategies.vm_workload_consolidation:VMWorkloadConsolidation"},{"line_number":53,"context_line":"    workload_stabilization \u003d watcher.decision_engine.strategy.strategies.workload_stabilization:WorkloadStabilization"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"watcher_actions \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":10,"id":"1a122d0e_8909c933","line":52,"range":{"start_line":52,"start_character":4,"end_line":52,"end_character":125},"in_reply_to":"1a122d0e_28708a0a","updated":"2016-04-29 08:23:06.000000000","message":"vm_workload_consolidation isn\u0027t my strategy.","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"}],"watcher/decision_engine/strategy/strategies/base.py":[{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"3706f8d4a2fde0e9b98742d59cdb018b98a85af9","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    @classmethod"},{"line_number":231,"context_line":"    def get_goal_name(cls):"},{"line_number":232,"context_line":"        return \"WORKLOAD_STABILIZATION\""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    @classmethod"},{"line_number":235,"context_line":"    def get_goal_display_name(cls):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_ce5d56ee","line":232,"updated":"2016-05-27 10:12:17.000000000","message":"I would prefer \u0027WORKLOAD_BALANCING\u0027 for the goal.","commit_id":"9f7a9818738bf695e0c5a69bc96767101fce5573"}],"watcher/decision_engine/strategy/strategies/sd.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import math"},{"line_number":21,"context_line":"import oslo_cache"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from copy import deepcopy"},{"line_number":25,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_d213215b","line":22,"updated":"2016-03-25 14:52:44.000000000","message":"nit: extra blank line here","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import math"},{"line_number":21,"context_line":"import oslo_cache"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from copy import deepcopy"},{"line_number":25,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_60dde80d","line":22,"in_reply_to":"da0c15f0_d213215b","updated":"2016-03-30 14:41:04.000000000","message":"Done","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"# limitations under the License."},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import math"},{"line_number":21,"context_line":"import oslo_cache"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from copy import deepcopy"},{"line_number":25,"context_line":"from oslo_config import cfg"},{"line_number":26,"context_line":"from oslo_log import log"},{"line_number":27,"context_line":"from watcher._i18n import _LE, _"},{"line_number":28,"context_line":"from watcher.common import exception"},{"line_number":29,"context_line":"from watcher.decision_engine.model.vm_state import VMState"},{"line_number":30,"context_line":"from watcher.decision_engine.strategy.strategies.base import BaseStrategy"},{"line_number":31,"context_line":"from watcher.metrics_engine.cluster_history.ceilometer import \\"},{"line_number":32,"context_line":"    CeilometerClusterHistory"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_12bab923","line":32,"range":{"start_line":20,"start_character":0,"end_line":32,"end_character":28},"updated":"2016-03-25 14:52:44.000000000","message":"OpenStack imposes set of rules regarding imports. See http://docs.openstack.org/developer/hacking/#imports.\n\nNote: You should import the module and not the class","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"# limitations under the License."},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import math"},{"line_number":21,"context_line":"import oslo_cache"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from copy import deepcopy"},{"line_number":25,"context_line":"from oslo_config import cfg"},{"line_number":26,"context_line":"from oslo_log import log"},{"line_number":27,"context_line":"from watcher._i18n import _LE, _"},{"line_number":28,"context_line":"from watcher.common import exception"},{"line_number":29,"context_line":"from watcher.decision_engine.model.vm_state import VMState"},{"line_number":30,"context_line":"from watcher.decision_engine.strategy.strategies.base import BaseStrategy"},{"line_number":31,"context_line":"from watcher.metrics_engine.cluster_history.ceilometer import \\"},{"line_number":32,"context_line":"    CeilometerClusterHistory"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_a005407b","line":32,"range":{"start_line":20,"start_character":0,"end_line":32,"end_character":28},"in_reply_to":"da0c15f0_12bab923","updated":"2016-03-30 14:41:04.000000000","message":"Done","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class StandardDeviation(BaseStrategy):"},{"line_number":70,"context_line":"    MIGRATION \u003d \"migrate\""},{"line_number":71,"context_line":"    DEFAULT_NAME \u003d \"sd\""},{"line_number":72,"context_line":"    DEFAULT_DESCRIPTION \u003d \"Standard Deviation Algorithm\""},{"line_number":73,"context_line":"    MEMOIZE \u003d _set_memoize(CONF)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_520551c0","line":70,"updated":"2016-03-25 14:52:44.000000000","message":"Can you add some detailed description of your strategy in a docstring here please? Can you do so using the same template as the other strategies (see https://github.com/openstack/watcher/blob/master/watcher/decision_engine/strategy/strategies/outlet_temp_control.py#L45-L72)?\nFYI, this docstring is automatically pulled to generate the HTML doc.","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        :param vm_uuid: vm for which statistic is gathered."},{"line_number":118,"context_line":"        :return: dict"},{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":"        LOG.warning(\u0027get_vm_load started\u0027)"},{"line_number":121,"context_line":"        flavor_id \u003d self.nova.servers.get(vm_uuid).flavor[\u0027id\u0027]"},{"line_number":122,"context_line":"        vm_vcpus \u003d self.nova.flavors.get(flavor_id).vcpus"},{"line_number":123,"context_line":"        vm_load \u003d {\u0027uuid\u0027: vm_uuid, \u0027vcpus\u0027: vm_vcpus}"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_ed4644be","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":42},"updated":"2016-03-25 14:52:44.000000000","message":"Shouldn\u0027t this be a LOG.info() or even a LOG.debug() instead?\n\nBy the way, any log message apart from LOG.debug() should be localized (see http://docs.openstack.org/developer/oslo.i18n/guidelines.html)","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        :param vm_uuid: vm for which statistic is gathered."},{"line_number":118,"context_line":"        :return: dict"},{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":"        LOG.warning(\u0027get_vm_load started\u0027)"},{"line_number":121,"context_line":"        flavor_id \u003d self.nova.servers.get(vm_uuid).flavor[\u0027id\u0027]"},{"line_number":122,"context_line":"        vm_vcpus \u003d self.nova.flavors.get(flavor_id).vcpus"},{"line_number":123,"context_line":"        vm_load \u003d {\u0027uuid\u0027: vm_uuid, \u0027vcpus\u0027: vm_vcpus}"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_20b13048","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":42},"in_reply_to":"da0c15f0_ed4644be","updated":"2016-03-30 14:41:04.000000000","message":"Done","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                    resource_id\u003dvm_uuid,"},{"line_number":136,"context_line":"                    metric_name\u003davg_meter,"},{"line_number":137,"context_line":"                )"},{"line_number":138,"context_line":"            vm_load[meter] \u003d avg_meter if avg_meter else 0"},{"line_number":139,"context_line":"        return vm_load"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def normalize_hosts_load(self, hosts):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_b2794d32","line":138,"range":{"start_line":138,"start_character":29,"end_line":138,"end_character":58},"updated":"2016-03-25 14:52:44.000000000","message":"avg_meter or 0","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                    resource_id\u003dvm_uuid,"},{"line_number":136,"context_line":"                    metric_name\u003davg_meter,"},{"line_number":137,"context_line":"                )"},{"line_number":138,"context_line":"            vm_load[meter] \u003d avg_meter if avg_meter else 0"},{"line_number":139,"context_line":"        return vm_load"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def normalize_hosts_load(self, hosts):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_e0a6180f","line":138,"range":{"start_line":138,"start_character":29,"end_line":138,"end_character":58},"in_reply_to":"da0c15f0_b2794d32","updated":"2016-03-30 14:41:04.000000000","message":"Done","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            for metric in self.metrics:"},{"line_number":163,"context_line":"                hosts_load[hypervisor_id][metric] \u003d 0"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"            vms_id \u003d current_model.get_mapping(). \\"},{"line_number":166,"context_line":"                get_node_vms_from_id(hypervisor_id)"},{"line_number":167,"context_line":"            for vm_id in vms_id:"},{"line_number":168,"context_line":"                vm \u003d current_model.get_vm_from_id(vm_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_b2f5cd84","line":165,"range":{"start_line":165,"start_character":12,"end_line":165,"end_character":18},"updated":"2016-03-25 14:52:44.000000000","message":"nit: s/vms_id/vm_ids","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            for metric in self.metrics:"},{"line_number":163,"context_line":"                hosts_load[hypervisor_id][metric] \u003d 0"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"            vms_id \u003d current_model.get_mapping(). \\"},{"line_number":166,"context_line":"                get_node_vms_from_id(hypervisor_id)"},{"line_number":167,"context_line":"            for vm_id in vms_id:"},{"line_number":168,"context_line":"                vm \u003d current_model.get_vm_from_id(vm_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_809f5cb3","line":165,"range":{"start_line":165,"start_character":12,"end_line":165,"end_character":18},"in_reply_to":"da0c15f0_b2f5cd84","updated":"2016-03-30 14:41:04.000000000","message":"Done","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                raise exception.WatcherException("},{"line_number":203,"context_line":"                    _(\"Incorrect mapping: could not find \""},{"line_number":204,"context_line":"                      \"associated \u0027%(metric)s_weight\u0027 for\""},{"line_number":205,"context_line":"                      \" \u0027%(metric)s\u0027 in weight dict.\") % {\u0027metric\u0027: metric}"},{"line_number":206,"context_line":"                )"},{"line_number":207,"context_line":"        return weighted_sd"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_ed7484fe","line":205,"range":{"start_line":205,"start_character":55,"end_line":205,"end_character":56},"updated":"2016-03-25 14:52:44.000000000","message":"Commas are preferred over \u0027%\u0027 sign for string formatting within logging functions (see http://docs.openstack.org/developer/oslo.i18n/guidelines.html)","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                raise exception.WatcherException("},{"line_number":203,"context_line":"                    _(\"Incorrect mapping: could not find \""},{"line_number":204,"context_line":"                      \"associated \u0027%(metric)s_weight\u0027 for\""},{"line_number":205,"context_line":"                      \" \u0027%(metric)s\u0027 in weight dict.\") % {\u0027metric\u0027: metric}"},{"line_number":206,"context_line":"                )"},{"line_number":207,"context_line":"        return weighted_sd"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_20e930e7","line":205,"range":{"start_line":205,"start_character":55,"end_line":205,"end_character":56},"in_reply_to":"da0c15f0_ed7484fe","updated":"2016-03-30 14:41:04.000000000","message":"Done","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        vm_load \u003d self.get_vm_load(vm_id)"},{"line_number":213,"context_line":"        d_host_vcpus \u003d new_hosts[dst_hp_id][\u0027vcpus\u0027]"},{"line_number":214,"context_line":"        s_host_vcpus \u003d new_hosts[src_hp_id][\u0027vcpus\u0027]"},{"line_number":215,"context_line":"        transform_method \u003d self.transform_vm_cpu_to_host_cpu"},{"line_number":216,"context_line":"        for metric in self.metrics:"},{"line_number":217,"context_line":"            if metric is \u0027cpu_util\u0027:"},{"line_number":218,"context_line":"                new_hosts[src_hp_id][metric] -\u003d transform_method(vm_load,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_f24bc5ae","line":215,"range":{"start_line":215,"start_character":8,"end_line":215,"end_character":60},"updated":"2016-03-25 14:52:44.000000000","message":"Why do you need to do this?","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        vm_load \u003d self.get_vm_load(vm_id)"},{"line_number":213,"context_line":"        d_host_vcpus \u003d new_hosts[dst_hp_id][\u0027vcpus\u0027]"},{"line_number":214,"context_line":"        s_host_vcpus \u003d new_hosts[src_hp_id][\u0027vcpus\u0027]"},{"line_number":215,"context_line":"        transform_method \u003d self.transform_vm_cpu_to_host_cpu"},{"line_number":216,"context_line":"        for metric in self.metrics:"},{"line_number":217,"context_line":"            if metric is \u0027cpu_util\u0027:"},{"line_number":218,"context_line":"                new_hosts[src_hp_id][metric] -\u003d transform_method(vm_load,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_a02c2003","line":215,"range":{"start_line":215,"start_character":8,"end_line":215,"end_character":60},"in_reply_to":"da0c15f0_f24bc5ae","updated":"2016-03-30 14:41:04.000000000","message":"It\u0027s been removed after refactoring.","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            else:"},{"line_number":223,"context_line":"                new_hosts[src_hp_id][metric] -\u003d vm_load[metric]"},{"line_number":224,"context_line":"                new_hosts[dst_hp_id][metric] +\u003d vm_load[metric]"},{"line_number":225,"context_line":"        LOG.warning(new_hosts)"},{"line_number":226,"context_line":"        normalized_hosts \u003d self.normalize_hosts_load(new_hosts)"},{"line_number":227,"context_line":"        for metric in self.metrics:"},{"line_number":228,"context_line":"            migration_case.append(self.get_sd(normalized_hosts, metric))"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_529551e2","line":225,"range":{"start_line":225,"start_character":12,"end_line":225,"end_character":19},"updated":"2016-03-25 14:52:44.000000000","message":"Why is this a warning? Can you put some legible message alongside the data please?","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            else:"},{"line_number":223,"context_line":"                new_hosts[src_hp_id][metric] -\u003d vm_load[metric]"},{"line_number":224,"context_line":"                new_hosts[dst_hp_id][metric] +\u003d vm_load[metric]"},{"line_number":225,"context_line":"        LOG.warning(new_hosts)"},{"line_number":226,"context_line":"        normalized_hosts \u003d self.normalize_hosts_load(new_hosts)"},{"line_number":227,"context_line":"        for metric in self.metrics:"},{"line_number":228,"context_line":"            migration_case.append(self.get_sd(normalized_hosts, metric))"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_405f040e","line":225,"range":{"start_line":225,"start_character":12,"end_line":225,"end_character":19},"in_reply_to":"da0c15f0_529551e2","updated":"2016-03-30 14:41:04.000000000","message":"I used it during the development. It no longer needed.","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                    if weighted_sd \u003c min_sd_case[\u0027value\u0027]:"},{"line_number":253,"context_line":"                        min_sd_case \u003d {\u0027host\u0027: dst_hp_id, \u0027value\u0027: weighted_sd,"},{"line_number":254,"context_line":"                                       \u0027s_host\u0027: source_hp_id, \u0027vm\u0027: vm_id}"},{"line_number":255,"context_line":"                    LOG.warning(\u0027Weighted SD: {0}\u0027.format(weighted_sd))"},{"line_number":256,"context_line":"                    LOG.warning(min_sd_case)"},{"line_number":257,"context_line":"                vm_host_map.append(min_sd_case)"},{"line_number":258,"context_line":"        return sorted(vm_host_map, key\u003dlambda x: x[\u0027value\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_ede4843c","line":255,"range":{"start_line":255,"start_character":20,"end_line":255,"end_character":31},"updated":"2016-03-25 14:52:44.000000000","message":"Again, shouldn\u0027t this be a LOG.info() instead?\n\nBy the way, any log message apart from LOG.debug should be localized (see http://docs.openstack.org/developer/oslo.i18n/guidelines.html)","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                    if weighted_sd \u003c min_sd_case[\u0027value\u0027]:"},{"line_number":253,"context_line":"                        min_sd_case \u003d {\u0027host\u0027: dst_hp_id, \u0027value\u0027: weighted_sd,"},{"line_number":254,"context_line":"                                       \u0027s_host\u0027: source_hp_id, \u0027vm\u0027: vm_id}"},{"line_number":255,"context_line":"                    LOG.warning(\u0027Weighted SD: {0}\u0027.format(weighted_sd))"},{"line_number":256,"context_line":"                    LOG.warning(min_sd_case)"},{"line_number":257,"context_line":"                vm_host_map.append(min_sd_case)"},{"line_number":258,"context_line":"        return sorted(vm_host_map, key\u003dlambda x: x[\u0027value\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_e010d803","line":255,"range":{"start_line":255,"start_character":20,"end_line":255,"end_character":31},"in_reply_to":"da0c15f0_ede4843c","updated":"2016-03-30 14:41:04.000000000","message":"Done","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                        min_sd_case \u003d {\u0027host\u0027: dst_hp_id, \u0027value\u0027: weighted_sd,"},{"line_number":254,"context_line":"                                       \u0027s_host\u0027: source_hp_id, \u0027vm\u0027: vm_id}"},{"line_number":255,"context_line":"                    LOG.warning(\u0027Weighted SD: {0}\u0027.format(weighted_sd))"},{"line_number":256,"context_line":"                    LOG.warning(min_sd_case)"},{"line_number":257,"context_line":"                vm_host_map.append(min_sd_case)"},{"line_number":258,"context_line":"        return sorted(vm_host_map, key\u003dlambda x: x[\u0027value\u0027])"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_6d5d14e9","line":256,"range":{"start_line":256,"start_character":20,"end_line":256,"end_character":31},"updated":"2016-03-25 14:52:44.000000000","message":"Ditto\nCan you put a label just like above so people can actually know what this piece of data is about whenever reading the logs.","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                        min_sd_case \u003d {\u0027host\u0027: dst_hp_id, \u0027value\u0027: weighted_sd,"},{"line_number":254,"context_line":"                                       \u0027s_host\u0027: source_hp_id, \u0027vm\u0027: vm_id}"},{"line_number":255,"context_line":"                    LOG.warning(\u0027Weighted SD: {0}\u0027.format(weighted_sd))"},{"line_number":256,"context_line":"                    LOG.warning(min_sd_case)"},{"line_number":257,"context_line":"                vm_host_map.append(min_sd_case)"},{"line_number":258,"context_line":"        return sorted(vm_host_map, key\u003dlambda x: x[\u0027value\u0027])"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_a0838055","line":256,"range":{"start_line":256,"start_character":20,"end_line":256,"end_character":31},"in_reply_to":"da0c15f0_6d5d14e9","updated":"2016-03-30 14:41:04.000000000","message":"I used it during the development. It no longer needed.","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c3ea48323de7b69e58d39b3f8802bf6219309cf4","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        normalized_load \u003d self.normalize_hosts_load(hosts_load)"},{"line_number":263,"context_line":"        for metric in self.metrics:"},{"line_number":264,"context_line":"            metric_sd \u003d self.get_sd(normalized_load, metric)"},{"line_number":265,"context_line":"            LOG.warning(\u0027Standard Deviation of {0}: {1}\u0027.format(metric,"},{"line_number":266,"context_line":"                                                                metric_sd))"},{"line_number":267,"context_line":"            if metric_sd \u003e float(self.thresholds[metric]):"},{"line_number":268,"context_line":"                return self.simulate_migrations(current_model, hosts_load)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_edc12430","line":265,"range":{"start_line":265,"start_character":12,"end_line":265,"end_character":23},"updated":"2016-03-25 14:52:44.000000000","message":"ditto","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"cb364a34173e756017e52cf660682f5eb632e63a","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        normalized_load \u003d self.normalize_hosts_load(hosts_load)"},{"line_number":263,"context_line":"        for metric in self.metrics:"},{"line_number":264,"context_line":"            metric_sd \u003d self.get_sd(normalized_load, metric)"},{"line_number":265,"context_line":"            LOG.warning(\u0027Standard Deviation of {0}: {1}\u0027.format(metric,"},{"line_number":266,"context_line":"                                                                metric_sd))"},{"line_number":267,"context_line":"            if metric_sd \u003e float(self.thresholds[metric]):"},{"line_number":268,"context_line":"                return self.simulate_migrations(current_model, hosts_load)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da0c15f0_80091ce0","line":265,"range":{"start_line":265,"start_character":12,"end_line":265,"end_character":23},"in_reply_to":"da0c15f0_edc12430","updated":"2016-03-30 14:41:04.000000000","message":"Done","commit_id":"7b6fe74583e646e9080eae4726d2387b448b0bda"}],"watcher/decision_engine/strategy/strategies/workload_stabilization.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"666326d8f23665c8fdba2ea69a3c78d983f282b1","unresolved":false,"context_lines":[{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import math"},{"line_number":21,"context_line":"import oslo_cache"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from copy import deepcopy"},{"line_number":24,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_e8fcd273","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":17},"updated":"2016-04-28 13:04:15.000000000","message":"nit: this is not a std library import so you should move it down next to the other oslo imports.","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"58ea7f1f07488e1a2139da6776b1093fd5441e6c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import math"},{"line_number":21,"context_line":"import oslo_cache"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from copy import deepcopy"},{"line_number":24,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_e91b1d71","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":17},"in_reply_to":"1a122d0e_e8fcd273","updated":"2016-04-29 08:23:06.000000000","message":"Done","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"666326d8f23665c8fdba2ea69a3c78d983f282b1","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import math"},{"line_number":21,"context_line":"import oslo_cache"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from copy import deepcopy"},{"line_number":24,"context_line":"from oslo_config import cfg"},{"line_number":25,"context_line":"from oslo_log import log"},{"line_number":26,"context_line":"from watcher._i18n import _LE, _LI, _"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_48d506e3","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":25},"updated":"2016-04-28 13:04:15.000000000","message":"this is from standar library so you should move it up with \"math\"","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"58ea7f1f07488e1a2139da6776b1093fd5441e6c","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import math"},{"line_number":21,"context_line":"import oslo_cache"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from copy import deepcopy"},{"line_number":24,"context_line":"from oslo_config import cfg"},{"line_number":25,"context_line":"from oslo_log import log"},{"line_number":26,"context_line":"from watcher._i18n import _LE, _LI, _"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_8910a94f","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":25},"in_reply_to":"1a122d0e_48d506e3","updated":"2016-04-29 08:23:06.000000000","message":"Done","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"666326d8f23665c8fdba2ea69a3c78d983f282b1","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from copy import deepcopy"},{"line_number":24,"context_line":"from oslo_config import cfg"},{"line_number":25,"context_line":"from oslo_log import log"},{"line_number":26,"context_line":"from watcher._i18n import _LE, _LI, _"},{"line_number":27,"context_line":"from watcher.common import exception"},{"line_number":28,"context_line":"from watcher.decision_engine.model import vm_state"},{"line_number":29,"context_line":"from watcher.decision_engine.strategy.strategies import base"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_68f1e294","line":26,"updated":"2016-04-28 13:04:15.000000000","message":"nit: missing blank line before watcher imports","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"58ea7f1f07488e1a2139da6776b1093fd5441e6c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from copy import deepcopy"},{"line_number":24,"context_line":"from oslo_config import cfg"},{"line_number":25,"context_line":"from oslo_log import log"},{"line_number":26,"context_line":"from watcher._i18n import _LE, _LI, _"},{"line_number":27,"context_line":"from watcher.common import exception"},{"line_number":28,"context_line":"from watcher.decision_engine.model import vm_state"},{"line_number":29,"context_line":"from watcher.decision_engine.strategy.strategies import base"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_a915a540","line":26,"in_reply_to":"1a122d0e_68f1e294","updated":"2016-04-29 08:23:06.000000000","message":"Done","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"666326d8f23665c8fdba2ea69a3c78d983f282b1","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"CONF \u003d cfg.CONF"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"CONF.register_opts(ws_opts, \u0027watcher_workload_stabilization\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def _set_memoize(conf):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_0852ee66","line":56,"range":{"start_line":56,"start_character":29,"end_line":56,"end_character":59},"updated":"2016-04-28 13:04:15.000000000","message":"Strategies will soon have parameters. I believe that their config section will be prefixed by their namespace. So IMHO, I would rename it [watcher_strategies.watcher_workload_stabilization]","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"58ea7f1f07488e1a2139da6776b1093fd5441e6c","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"CONF \u003d cfg.CONF"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"CONF.register_opts(ws_opts, \u0027watcher_workload_stabilization\u0027)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def _set_memoize(conf):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_c9510132","line":56,"range":{"start_line":56,"start_character":29,"end_line":56,"end_character":59},"in_reply_to":"1a122d0e_0852ee66","updated":"2016-04-29 08:23:06.000000000","message":"Done","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"666326d8f23665c8fdba2ea69a3c78d983f282b1","unresolved":false,"context_lines":[{"line_number":360,"context_line":"                        balanced \u003d True"},{"line_number":361,"context_line":"                        break"},{"line_number":362,"context_line":"                if balanced:"},{"line_number":363,"context_line":"                    return self.fill_solution(current_model)"},{"line_number":364,"context_line":"        return self.fill_solution(current_model)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_e8e692ae","line":363,"range":{"start_line":363,"start_character":20,"end_line":363,"end_character":60},"updated":"2016-04-28 13:04:15.000000000","message":"why not \u0027break\u0027 here ? The return is the same as below so IMHO that would be nicer.","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"58ea7f1f07488e1a2139da6776b1093fd5441e6c","unresolved":false,"context_lines":[{"line_number":360,"context_line":"                        balanced \u003d True"},{"line_number":361,"context_line":"                        break"},{"line_number":362,"context_line":"                if balanced:"},{"line_number":363,"context_line":"                    return self.fill_solution(current_model)"},{"line_number":364,"context_line":"        return self.fill_solution(current_model)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a122d0e_092bf982","line":363,"range":{"start_line":363,"start_character":20,"end_line":363,"end_character":60},"in_reply_to":"1a122d0e_e8e692ae","updated":"2016-04-29 08:23:06.000000000","message":"Done","commit_id":"91f388c7f5f3c866a363cf05be8e59960175d61e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    *Limitations*"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    - It assume that live migrations are possible"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    *Spec URL*"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_ff09d6de","line":87,"updated":"2016-05-18 13:16:54.000000000","message":"You can also say that the strategy assume that the\nload on the system is sufficiently stable.\n\nOtherwise, we would need some other means for predicting future load in order to determine a viable reconfiguration.\nWe will able to do that through the watcher scoring engine.\nhttps://review.openstack.org/#/c/289880/","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    *Limitations*"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    - It assume that live migrations are possible"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    *Spec URL*"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_d060ff37","line":87,"in_reply_to":"bab6814e_ff09d6de","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        \"\"\""},{"line_number":157,"context_line":"        LOG.info(_LI(\u0027get_vm_load started\u0027))"},{"line_number":158,"context_line":"        flavor_id \u003d self.nova.servers.get(vm_uuid).flavor[\u0027id\u0027]"},{"line_number":159,"context_line":"        vm_vcpus \u003d self.nova.flavors.get(flavor_id).vcpus"},{"line_number":160,"context_line":"        vm_load \u003d {\u0027uuid\u0027: vm_uuid, \u0027vcpus\u0027: vm_vcpus}"},{"line_number":161,"context_line":"        for meter in self.metrics:"},{"line_number":162,"context_line":"            avg_meter \u003d self.ceilometer.statistic_aggregation("}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_3a3edeb8","line":159,"updated":"2016-05-18 13:16:54.000000000","message":"You should use the pre-loaded model which contains the flavors for the VMs.\n\ne.g:\nmodel.get_resource_from_id(\n            resource.ResourceType.cpu_cores).get_capacity(\n                model.get_vm_from_id(vm_uuid))\n\nWe are working on a new version which will dramatically  improve the performances.\nhttps://review.openstack.org/#/c/287019/","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        \"\"\""},{"line_number":157,"context_line":"        LOG.info(_LI(\u0027get_vm_load started\u0027))"},{"line_number":158,"context_line":"        flavor_id \u003d self.nova.servers.get(vm_uuid).flavor[\u0027id\u0027]"},{"line_number":159,"context_line":"        vm_vcpus \u003d self.nova.flavors.get(flavor_id).vcpus"},{"line_number":160,"context_line":"        vm_load \u003d {\u0027uuid\u0027: vm_uuid, \u0027vcpus\u0027: vm_vcpus}"},{"line_number":161,"context_line":"        for meter in self.metrics:"},{"line_number":162,"context_line":"            avg_meter \u003d self.ceilometer.statistic_aggregation("}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_c9e067fd","line":159,"in_reply_to":"bab6814e_3a3edeb8","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                resource_id\u003dvm_uuid,"},{"line_number":164,"context_line":"                meter_name\u003dmeter,"},{"line_number":165,"context_line":"                period\u003d\"120\","},{"line_number":166,"context_line":"                aggregate\u003d\u0027avg\u0027"},{"line_number":167,"context_line":"            )"},{"line_number":168,"context_line":"            if avg_meter is None:"},{"line_number":169,"context_line":"                LOG.error("}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_2587da10","line":166,"updated":"2016-05-18 13:16:54.000000000","message":"The usage of average can potentially cause issues in case for example of a peak.\nThe workload of the VM can go above the threshold for a brief moment and might the algorithm to trigger migrations and your system will oscillate.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                resource_id\u003dvm_uuid,"},{"line_number":164,"context_line":"                meter_name\u003dmeter,"},{"line_number":165,"context_line":"                period\u003d\"120\","},{"line_number":166,"context_line":"                aggregate\u003d\u0027avg\u0027"},{"line_number":167,"context_line":"            )"},{"line_number":168,"context_line":"            if avg_meter is None:"},{"line_number":169,"context_line":"                LOG.error("}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_2b9f6051","line":166,"in_reply_to":"bab6814e_2587da10","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                    resource_id\u003dvm_uuid,"},{"line_number":173,"context_line":"                    metric_name\u003davg_meter,"},{"line_number":174,"context_line":"                )"},{"line_number":175,"context_line":"            vm_load[meter] \u003d avg_meter or 0"},{"line_number":176,"context_line":"        return vm_load"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def normalize_hosts_load(self, hosts):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_5789fbc9","line":175,"updated":"2016-05-18 13:16:54.000000000","message":"If we don\u0027t have metric it is possible that the avg_meter is 100. I tend to prefer the worst-case or to cancel the optimization.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                    resource_id\u003dvm_uuid,"},{"line_number":173,"context_line":"                    metric_name\u003davg_meter,"},{"line_number":174,"context_line":"                )"},{"line_number":175,"context_line":"            vm_load[meter] \u003d avg_meter or 0"},{"line_number":176,"context_line":"        return vm_load"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def normalize_hosts_load(self, hosts):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_abd6b024","line":175,"in_reply_to":"bab6814e_5789fbc9","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            if \u0027cpu_util\u0027 in normalized_hosts[host]:"},{"line_number":182,"context_line":"                normalized_hosts[host][\u0027cpu_util\u0027] /\u003d float(100)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"            if \u0027memory.resident\u0027 in normalized_hosts[host]:"},{"line_number":185,"context_line":"                h_id \u003d self.nova.hypervisors.search(host)[0].id"},{"line_number":186,"context_line":"                h_memory \u003d self.nova.hypervisors.get(h_id).memory_mb"},{"line_number":187,"context_line":"                normalized_hosts[host][\u0027memory.resident\u0027] /\u003d float(h_memory)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_f7710fe2","line":184,"updated":"2016-05-18 13:16:54.000000000","message":"The strategy allow to add new metrics but don\u0027t let you specify how to normalized them.\ne.g: I would to add \u0027compute.node.cpu.percent\u0027","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            if \u0027cpu_util\u0027 in normalized_hosts[host]:"},{"line_number":182,"context_line":"                normalized_hosts[host][\u0027cpu_util\u0027] /\u003d float(100)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"            if \u0027memory.resident\u0027 in normalized_hosts[host]:"},{"line_number":185,"context_line":"                h_id \u003d self.nova.hypervisors.search(host)[0].id"},{"line_number":186,"context_line":"                h_memory \u003d self.nova.hypervisors.get(h_id).memory_mb"},{"line_number":187,"context_line":"                normalized_hosts[host][\u0027memory.resident\u0027] /\u003d float(h_memory)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_c96fc7fa","line":184,"in_reply_to":"bab6814e_8e914549","updated":"2016-05-25 08:25:27.000000000","message":"I\u0027ll investigate monasca and ceilometer to see if we can provide a common way to normalize metrics. Thank you.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"845aa5e9cd4793b1735f85f0c2b1cf56306a2a06","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            if \u0027cpu_util\u0027 in normalized_hosts[host]:"},{"line_number":182,"context_line":"                normalized_hosts[host][\u0027cpu_util\u0027] /\u003d float(100)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"            if \u0027memory.resident\u0027 in normalized_hosts[host]:"},{"line_number":185,"context_line":"                h_id \u003d self.nova.hypervisors.search(host)[0].id"},{"line_number":186,"context_line":"                h_memory \u003d self.nova.hypervisors.get(h_id).memory_mb"},{"line_number":187,"context_line":"                normalized_hosts[host][\u0027memory.resident\u0027] /\u003d float(h_memory)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_8e914549","line":184,"in_reply_to":"bab6814e_f7710fe2","updated":"2016-05-25 07:34:47.000000000","message":"+1","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            if \u0027cpu_util\u0027 in normalized_hosts[host]:"},{"line_number":182,"context_line":"                normalized_hosts[host][\u0027cpu_util\u0027] /\u003d float(100)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"            if \u0027memory.resident\u0027 in normalized_hosts[host]:"},{"line_number":185,"context_line":"                h_id \u003d self.nova.hypervisors.search(host)[0].id"},{"line_number":186,"context_line":"                h_memory \u003d self.nova.hypervisors.get(h_id).memory_mb"},{"line_number":187,"context_line":"                normalized_hosts[host][\u0027memory.resident\u0027] /\u003d float(h_memory)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_ff29d68a","line":184,"in_reply_to":"bab6814e_f7710fe2","updated":"2016-05-25 08:25:27.000000000","message":"I\u0027ll investigate monasca and ceilometer to see if we can provide a common way to normalize metrics","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        for hypervisor_id in current_model.get_all_hypervisors():"},{"line_number":195,"context_line":"            hosts_load[hypervisor_id] \u003d {}"},{"line_number":196,"context_line":"            h_id \u003d self.nova.hypervisors.search(hypervisor_id)[0].id"},{"line_number":197,"context_line":"            host_vcpus \u003d self.nova.hypervisors.get(h_id).vcpus"},{"line_number":198,"context_line":"            hosts_load[hypervisor_id][\u0027vcpus\u0027] \u003d host_vcpus"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            for metric in self.metrics:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_da9a32c5","line":197,"updated":"2016-05-18 13:16:54.000000000","message":"ditto: You should use the pre-loaded model which contains the flavors for the hosts.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        for hypervisor_id in current_model.get_all_hypervisors():"},{"line_number":195,"context_line":"            hosts_load[hypervisor_id] \u003d {}"},{"line_number":196,"context_line":"            h_id \u003d self.nova.hypervisors.search(hypervisor_id)[0].id"},{"line_number":197,"context_line":"            host_vcpus \u003d self.nova.hypervisors.get(h_id).vcpus"},{"line_number":198,"context_line":"            hosts_load[hypervisor_id][\u0027vcpus\u0027] \u003d host_vcpus"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            for metric in self.metrics:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_04d36a05","line":197,"in_reply_to":"bab6814e_da9a32c5","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"845aa5e9cd4793b1735f85f0c2b1cf56306a2a06","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            for vm_id in vm_ids:"},{"line_number":206,"context_line":"                vm \u003d current_model.get_vm_from_id(vm_id)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"                if vm.state !\u003d vm_state.VMState.ACTIVE.value:"},{"line_number":209,"context_line":"                    continue"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"                vm_load \u003d self.get_vm_load(vm_id)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_8e3945a6","line":208,"range":{"start_line":208,"start_character":47,"end_line":208,"end_character":54},"updated":"2016-05-25 07:34:47.000000000","message":"The vm in PAUSED still use CPU and MEM.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            for vm_id in vm_ids:"},{"line_number":206,"context_line":"                vm \u003d current_model.get_vm_from_id(vm_id)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"                if vm.state !\u003d vm_state.VMState.ACTIVE.value:"},{"line_number":209,"context_line":"                    continue"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"                vm_load \u003d self.get_vm_load(vm_id)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_a9624314","line":208,"range":{"start_line":208,"start_character":47,"end_line":208,"end_character":54},"in_reply_to":"bab6814e_8e3945a6","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":18934,"name":"ecelik","email":"celik.esra@tubitak.gov.tr","username":"esracelik"},"change_message_id":"5656cc9faf4c4c34a8134b07e3624377618dd0df","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                        self.transform_vm_cpu(vm_load, host_vcpus)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"                for metric in self.metrics:"},{"line_number":217,"context_line":"                    hosts_load[hypervisor_id][metric] +\u003d vm_load[metric]"},{"line_number":218,"context_line":"        return hosts_load"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def get_sd(self, hosts, meter_name):"}],"source_content_type":"text/x-python","patch_set":16,"id":"dab17558_2c35d345","line":217,"updated":"2016-05-13 13:31:50.000000000","message":"A host\u0027s real load could be gattered by metrics like compute.node.cpu.frequency, compute.node.cpu.percent etc. from ceilometer, so if there is another service running on this host overloads the resources you can be aware of it.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                        self.transform_vm_cpu(vm_load, host_vcpus)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"                for metric in self.metrics:"},{"line_number":217,"context_line":"                    hosts_load[hypervisor_id][metric] +\u003d vm_load[metric]"},{"line_number":218,"context_line":"        return hosts_load"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def get_sd(self, hosts, meter_name):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_6b15a13e","line":217,"in_reply_to":"bab6814e_0bb0eef3","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                        self.transform_vm_cpu(vm_load, host_vcpus)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"                for metric in self.metrics:"},{"line_number":217,"context_line":"                    hosts_load[hypervisor_id][metric] +\u003d vm_load[metric]"},{"line_number":218,"context_line":"        return hosts_load"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def get_sd(self, hosts, meter_name):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_0b0cd539","line":217,"in_reply_to":"dab17558_2c35d345","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                        self.transform_vm_cpu(vm_load, host_vcpus)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"                for metric in self.metrics:"},{"line_number":217,"context_line":"                    hosts_load[hypervisor_id][metric] +\u003d vm_load[metric]"},{"line_number":218,"context_line":"        return hosts_load"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def get_sd(self, hosts, meter_name):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_0bb0eef3","line":217,"in_reply_to":"dab17558_2c35d345","updated":"2016-05-18 13:16:54.000000000","message":"I totally agree.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":18934,"name":"ecelik","email":"celik.esra@tubitak.gov.tr","username":"esracelik"},"change_message_id":"5656cc9faf4c4c34a8134b07e3624377618dd0df","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                    hosts_load[hypervisor_id][metric] +\u003d vm_load[metric]"},{"line_number":218,"context_line":"        return hosts_load"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def get_sd(self, hosts, meter_name):"},{"line_number":221,"context_line":"        \"\"\"Get standard deviation among hosts by specified meter\"\"\""},{"line_number":222,"context_line":"        mean \u003d 0"},{"line_number":223,"context_line":"        variaton \u003d 0"}],"source_content_type":"text/x-python","patch_set":16,"id":"dab17558_7db9392e","line":220,"updated":"2016-05-13 13:31:50.000000000","message":"If the entire active hosts are not enough to relieve overloaded hosts, watcher should activate a sleeping host, am I right?","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                    hosts_load[hypervisor_id][metric] +\u003d vm_load[metric]"},{"line_number":218,"context_line":"        return hosts_load"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def get_sd(self, hosts, meter_name):"},{"line_number":221,"context_line":"        \"\"\"Get standard deviation among hosts by specified meter\"\"\""},{"line_number":222,"context_line":"        mean \u003d 0"},{"line_number":223,"context_line":"        variaton \u003d 0"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_7f9fa650","line":220,"in_reply_to":"bab6814e_0b74679a","updated":"2016-05-25 08:25:27.000000000","message":"I\u0027ll investigate whether this feature can be added to this strategy or not. Thank you.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                    hosts_load[hypervisor_id][metric] +\u003d vm_load[metric]"},{"line_number":218,"context_line":"        return hosts_load"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def get_sd(self, hosts, meter_name):"},{"line_number":221,"context_line":"        \"\"\"Get standard deviation among hosts by specified meter\"\"\""},{"line_number":222,"context_line":"        mean \u003d 0"},{"line_number":223,"context_line":"        variaton \u003d 0"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_bfa90e7e","line":220,"in_reply_to":"dab17558_7db9392e","updated":"2016-05-25 08:25:27.000000000","message":"I\u0027ll investigate whether this feature can be added to this strategy or not. Thank you.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                    hosts_load[hypervisor_id][metric] +\u003d vm_load[metric]"},{"line_number":218,"context_line":"        return hosts_load"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def get_sd(self, hosts, meter_name):"},{"line_number":221,"context_line":"        \"\"\"Get standard deviation among hosts by specified meter\"\"\""},{"line_number":222,"context_line":"        mean \u003d 0"},{"line_number":223,"context_line":"        variaton \u003d 0"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_0b74679a","line":220,"in_reply_to":"dab17558_7db9392e","updated":"2016-05-18 13:16:54.000000000","message":"IMHO, it only happen if we have over-committed resources. But yes we could add an action to activate a sleeping host.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        \"\"\"Get standard deviation among hosts by specified meter\"\"\""},{"line_number":222,"context_line":"        mean \u003d 0"},{"line_number":223,"context_line":"        variaton \u003d 0"},{"line_number":224,"context_line":"        for x in hosts:"},{"line_number":225,"context_line":"            mean +\u003d hosts[x][meter_name]"},{"line_number":226,"context_line":"        mean /\u003d len(hosts)"},{"line_number":227,"context_line":"        for x in hosts:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_da5d12ee","line":224,"updated":"2016-05-18 13:16:54.000000000","message":"s/x/host_id","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        \"\"\"Get standard deviation among hosts by specified meter\"\"\""},{"line_number":222,"context_line":"        mean \u003d 0"},{"line_number":223,"context_line":"        variaton \u003d 0"},{"line_number":224,"context_line":"        for x in hosts:"},{"line_number":225,"context_line":"            mean +\u003d hosts[x][meter_name]"},{"line_number":226,"context_line":"        mean /\u003d len(hosts)"},{"line_number":227,"context_line":"        for x in hosts:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_ebb398e7","line":224,"in_reply_to":"bab6814e_da5d12ee","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        for x in hosts:"},{"line_number":225,"context_line":"            mean +\u003d hosts[x][meter_name]"},{"line_number":226,"context_line":"        mean /\u003d len(hosts)"},{"line_number":227,"context_line":"        for x in hosts:"},{"line_number":228,"context_line":"            variaton +\u003d (hosts[x][meter_name] - mean) ** 2"},{"line_number":229,"context_line":"        variaton /\u003d len(hosts)"},{"line_number":230,"context_line":"        sd \u003d math.sqrt(variaton)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_1a583afa","line":227,"updated":"2016-05-18 13:16:54.000000000","message":"s/x/host_id","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        for x in hosts:"},{"line_number":225,"context_line":"            mean +\u003d hosts[x][meter_name]"},{"line_number":226,"context_line":"        mean /\u003d len(hosts)"},{"line_number":227,"context_line":"        for x in hosts:"},{"line_number":228,"context_line":"            variaton +\u003d (hosts[x][meter_name] - mean) ** 2"},{"line_number":229,"context_line":"        variaton /\u003d len(hosts)"},{"line_number":230,"context_line":"        sd \u003d math.sqrt(variaton)"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_0bb1bce1","line":227,"in_reply_to":"bab6814e_1a583afa","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            vms_id \u003d current_model.get_mapping(). \\"},{"line_number":284,"context_line":"                get_node_vms_from_id(source_hp_id)"},{"line_number":285,"context_line":"            for vm_id in vms_id:"},{"line_number":286,"context_line":"                min_sd_case \u003d {\u0027value\u0027: len(self.metrics)}"},{"line_number":287,"context_line":"                vm \u003d current_model.get_vm_from_id(vm_id)"},{"line_number":288,"context_line":"                if vm.state !\u003d vm_state.VMState.ACTIVE.value:"},{"line_number":289,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_6cfee66c","line":286,"updated":"2016-05-18 13:16:54.000000000","message":"It can be very computationally expensive to explore every possible solutions especially when at each step we have to make a request to Ceilometer.\n\nIMHO, we can use a heuristic and avoid to calling ceilometer at each step.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            vms_id \u003d current_model.get_mapping(). \\"},{"line_number":284,"context_line":"                get_node_vms_from_id(source_hp_id)"},{"line_number":285,"context_line":"            for vm_id in vms_id:"},{"line_number":286,"context_line":"                min_sd_case \u003d {\u0027value\u0027: len(self.metrics)}"},{"line_number":287,"context_line":"                vm \u003d current_model.get_vm_from_id(vm_id)"},{"line_number":288,"context_line":"                if vm.state !\u003d vm_state.VMState.ACTIVE.value:"},{"line_number":289,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_05f76b59","line":286,"in_reply_to":"bab6814e_6cfee66c","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"5c382ebcdebacb9c264b997da1639af3817905fa","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                if weighted_sd \u003c min_sd:"},{"line_number":366,"context_line":"                    min_sd \u003d weighted_sd"},{"line_number":367,"context_line":"                    hosts_load \u003d vm_load[-1]"},{"line_number":368,"context_line":"                    self.migrate(current_model, vm_host[\u0027vm\u0027],"},{"line_number":369,"context_line":"                                 vm_host[\u0027s_host\u0027], vm_host[\u0027host\u0027])"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"                for metric, value in zip(self.metrics, vm_load[:-1]):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_9f96ca92","line":368,"updated":"2016-05-18 13:16:54.000000000","message":"The migration of a virtual machine can failed because you are not taking into account the image size of the VM.\n\nIt is possible that the size of the VM is bigger that available disk space.","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"d627a2c3c31d3e768417d78f2e2bb1e8abe235ef","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                if weighted_sd \u003c min_sd:"},{"line_number":366,"context_line":"                    min_sd \u003d weighted_sd"},{"line_number":367,"context_line":"                    hosts_load \u003d vm_load[-1]"},{"line_number":368,"context_line":"                    self.migrate(current_model, vm_host[\u0027vm\u0027],"},{"line_number":369,"context_line":"                                 vm_host[\u0027s_host\u0027], vm_host[\u0027host\u0027])"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"                for metric, value in zip(self.metrics, vm_load[:-1]):"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_e5050746","line":368,"in_reply_to":"bab6814e_9f96ca92","updated":"2016-05-25 08:25:27.000000000","message":"Done","commit_id":"446058346e5f7842ed7b301b9e2970bdd5fc254e"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"3706f8d4a2fde0e9b98742d59cdb018b98a85af9","unresolved":false,"context_lines":[{"line_number":39,"context_line":"metrics \u003d [\u0027cpu_util\u0027, \u0027memory.resident\u0027]"},{"line_number":40,"context_line":"thresholds_dict \u003d {\u0027cpu_util\u0027: 0.2, \u0027memory.resident\u0027: 0.2}"},{"line_number":41,"context_line":"weights_dict \u003d {\u0027cpu_util_weight\u0027: 1.0, \u0027memory.resident_weight\u0027: 1.0}"},{"line_number":42,"context_line":"vm_host_measures \u003d {\u0027cpu_util\u0027: \u0027hardware.cpu.util\u0027,"},{"line_number":43,"context_line":"                    \u0027memory.resident\u0027: \u0027hardware.memory.used\u0027}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"ws_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_aef2926d","line":42,"updated":"2016-05-27 10:12:17.000000000","message":"I didn\u0027t found the meter \"hardware.cpu.util\" in the official list. \nhttp://docs.openstack.org/admin-guide/telemetry-measurements.html\n\nI would prefer that the selected meters are available by default.\nDo you think that compute.node.cpu.percent\u0027 fit your needs ?","commit_id":"9f7a9818738bf695e0c5a69bc96767101fce5573"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"3706f8d4a2fde0e9b98742d59cdb018b98a85af9","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        \"\"\"Gathering vm load through ceilometer statistic."},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        :param vm_uuid: vm for which statistic is gathered."},{"line_number":171,"context_line":"        :return: dict"},{"line_number":172,"context_line":"        \"\"\""},{"line_number":173,"context_line":"        LOG.debug(_LI(\u0027get_vm_load started\u0027))"},{"line_number":174,"context_line":"        vm_vcpus \u003d current_model.get_resource_from_id("}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_ce30b60a","line":171,"updated":"2016-05-27 10:12:17.000000000","message":"Nit: missing current_model in docstring","commit_id":"9f7a9818738bf695e0c5a69bc96767101fce5573"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"3706f8d4a2fde0e9b98742d59cdb018b98a85af9","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        Return list of standard deviation values, that appearing in case of"},{"line_number":260,"context_line":"        migration of vm from source host to destination host"},{"line_number":261,"context_line":"        :param hosts: hosts with their workload"},{"line_number":262,"context_line":"        :param vm_id: the virtual machine"},{"line_number":263,"context_line":"        :param src_hp_id: the source hypervisor id"},{"line_number":264,"context_line":"        :param dst_hp_id: the destination hypervisor id"},{"line_number":265,"context_line":"        :return: list of standard deviation values"}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_ee3f7ad4","line":262,"updated":"2016-05-27 10:12:17.000000000","message":"Nit: missing current_model in docstring","commit_id":"9f7a9818738bf695e0c5a69bc96767101fce5573"}]}
