)]}'
{"nova/compute/resource_tracker.py":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"61ca77ec7231cdd610884984b335a4a2ab16a0d5","unresolved":false,"context_lines":[{"line_number":19,"context_line":"model."},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import copy"},{"line_number":23,"context_line":"from nova.compute import vm_states"},{"line_number":24,"context_line":"from nova import context"},{"line_number":25,"context_line":"from nova import db"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FXoE%3D","line":22,"updated":"2012-09-18 06:23:44.000000000","message":"remove","commit_id":"e89bd5275d0b1e67b0b245b9a9d39a77e6aa3b60"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"f627452b8d4e42ca5727a549a3ea668e5495a423","unresolved":false,"context_lines":[{"line_number":19,"context_line":"model."},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import copy"},{"line_number":23,"context_line":"from nova.compute import vm_states"},{"line_number":24,"context_line":"from nova import context"},{"line_number":25,"context_line":"from nova import db"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FXdQ%3D","line":22,"in_reply_to":"AAAALH%2F%2FXoE%3D","updated":"2012-09-18 18:23:10.000000000","message":"Done","commit_id":"e89bd5275d0b1e67b0b245b9a9d39a77e6aa3b60"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"61ca77ec7231cdd610884984b335a4a2ab16a0d5","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    correct decisions with respect to host selection."},{"line_number":59,"context_line":"    \"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __init__(self, instance, host, timeout):"},{"line_number":62,"context_line":"        self.instance \u003d copy.copy(instance)"},{"line_number":63,"context_line":"        self.timeout \u003d timeout"},{"line_number":64,"context_line":"        self.expire_ts \u003d timeutils.utcnow_ts() + timeout"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FXn8%3D","line":61,"updated":"2012-09-18 06:23:44.000000000","message":"why pass host if you don\u0027t use it?","commit_id":"e89bd5275d0b1e67b0b245b9a9d39a77e6aa3b60"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"f627452b8d4e42ca5727a549a3ea668e5495a423","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    correct decisions with respect to host selection."},{"line_number":59,"context_line":"    \"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __init__(self, instance, host, timeout):"},{"line_number":62,"context_line":"        self.instance \u003d copy.copy(instance)"},{"line_number":63,"context_line":"        self.timeout \u003d timeout"},{"line_number":64,"context_line":"        self.expire_ts \u003d timeutils.utcnow_ts() + timeout"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FXdM%3D","line":61,"in_reply_to":"AAAALH%2F%2FXn8%3D","updated":"2012-09-18 18:23:10.000000000","message":"Done","commit_id":"e89bd5275d0b1e67b0b245b9a9d39a77e6aa3b60"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"61ca77ec7231cdd610884984b335a4a2ab16a0d5","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    \"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __init__(self, instance, host, timeout):"},{"line_number":62,"context_line":"        self.instance \u003d copy.copy(instance)"},{"line_number":63,"context_line":"        self.timeout \u003d timeout"},{"line_number":64,"context_line":"        self.expire_ts \u003d timeutils.utcnow_ts() + timeout"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FXoA%3D","line":62,"updated":"2012-09-18 06:23:44.000000000","message":"instance.copy() or utils.to_primitive(instance).copy() if necessary","commit_id":"e89bd5275d0b1e67b0b245b9a9d39a77e6aa3b60"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"f627452b8d4e42ca5727a549a3ea668e5495a423","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    \"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __init__(self, instance, host, timeout):"},{"line_number":62,"context_line":"        self.instance \u003d copy.copy(instance)"},{"line_number":63,"context_line":"        self.timeout \u003d timeout"},{"line_number":64,"context_line":"        self.expire_ts \u003d timeutils.utcnow_ts() + timeout"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FXdI%3D","line":62,"in_reply_to":"AAAALH%2F%2FXoA%3D","updated":"2012-09-18 18:23:10.000000000","message":"Done","commit_id":"e89bd5275d0b1e67b0b245b9a9d39a77e6aa3b60"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"a3c7bc1842dadb9ebd22a4bb7abdadc7822ed812","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        vcpu_limit \u003d limits.get(\u0027vcpu\u0027)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        if not memory_mb_limit:"},{"line_number":173,"context_line":"            # default to total memory:"},{"line_number":174,"context_line":"            memory_mb_limit \u003d self.compute_node[\u0027memory_mb\u0027]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        if not disk_gb_limit:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FXCg%3D","line":173,"updated":"2012-09-18 19:18:24.000000000","message":"To maintain backwards compatibility, default should be unlimited.  As that was the default setting in Essex.","commit_id":"8669a6fad17b3620a2d505e1f06a960ec855db0b"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"88503d319a0b39c22ff49c1ead217ed11ad8751a","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        vcpu_limit \u003d limits.get(\u0027vcpu\u0027)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        if not memory_mb_limit:"},{"line_number":173,"context_line":"            # default to total memory:"},{"line_number":174,"context_line":"            memory_mb_limit \u003d self.compute_node[\u0027memory_mb\u0027]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        if not disk_gb_limit:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FWcQ%3D","line":173,"in_reply_to":"AAAALH%2F%2FXCg%3D","updated":"2012-09-19 16:29:57.000000000","message":"Done","commit_id":"8669a6fad17b3620a2d505e1f06a960ec855db0b"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"a3c7bc1842dadb9ebd22a4bb7abdadc7822ed812","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            memory_mb_limit \u003d self.compute_node[\u0027memory_mb\u0027]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        if not disk_gb_limit:"},{"line_number":177,"context_line":"            # default to total disk space:"},{"line_number":178,"context_line":"            disk_gb_limit \u003d self.compute_node[\u0027local_gb\u0027]"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        memory_mb \u003d instance_ref[\u0027memory_mb\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FXCs%3D","line":177,"updated":"2012-09-18 19:18:24.000000000","message":"In Essex, Default behavior was no limit. Additionally The actual limiting should be done as a Scheduler Filter.","commit_id":"8669a6fad17b3620a2d505e1f06a960ec855db0b"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"88503d319a0b39c22ff49c1ead217ed11ad8751a","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            memory_mb_limit \u003d self.compute_node[\u0027memory_mb\u0027]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        if not disk_gb_limit:"},{"line_number":177,"context_line":"            # default to total disk space:"},{"line_number":178,"context_line":"            disk_gb_limit \u003d self.compute_node[\u0027local_gb\u0027]"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        memory_mb \u003d instance_ref[\u0027memory_mb\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FWcU%3D","line":177,"in_reply_to":"AAAALH%2F%2FXCs%3D","updated":"2012-09-19 16:29:57.000000000","message":"Can\u0027t do limiting solely in scheduler filters because of possible races of multiple schedulers hitting the same compute node, but I agree with the regression aspect and will default to unlimited here.","commit_id":"8669a6fad17b3620a2d505e1f06a960ec855db0b"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"bb2782f14f8262f44fed556b777a4854040dd3c4","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.stats \u003d importutils.import_object(FLAGS.compute_stats_class)"},{"line_number":127,"context_line":"        self.tracked_instances \u003d {}"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def resource_claim(self, context, instance_ref, limits\u003d{}):"},{"line_number":130,"context_line":"        claim \u003d self.begin_resource_claim(context, instance_ref, limits)"},{"line_number":131,"context_line":"        return ResourceContextManager(context, claim, self)"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWWQ%3D","line":129,"updated":"2012-09-19 16:19:21.000000000","message":"should make this: limits\u003dNone  and init it later.","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"8b01a4ef057fc23d0e78eeab0cc169a39d2e3798","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.stats \u003d importutils.import_object(FLAGS.compute_stats_class)"},{"line_number":127,"context_line":"        self.tracked_instances \u003d {}"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def resource_claim(self, context, instance_ref, limits\u003d{}):"},{"line_number":130,"context_line":"        claim \u003d self.begin_resource_claim(context, instance_ref, limits)"},{"line_number":131,"context_line":"        return ResourceContextManager(context, claim, self)"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWU4%3D","line":129,"in_reply_to":"AAAALH%2F%2FWWQ%3D","updated":"2012-09-19 16:46:40.000000000","message":"Done","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"0eb41424444c91daf5700be7c76485626b204dae","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        filters \u003d {\u0027host\u0027: self.host, \u0027deleted\u0027: False}"},{"line_number":393,"context_line":"        instances \u003d db.instance_get_all_by_filters(context, filters)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        # Now calculate useage based on instance utilization:"},{"line_number":396,"context_line":"        self._update_usage_from_instances(resources, instances)"},{"line_number":397,"context_line":"        self._report_final_resource_view(resources)"},{"line_number":398,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWWA%3D","line":395,"updated":"2012-09-19 16:37:09.000000000","message":"typo: usage","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"8b01a4ef057fc23d0e78eeab0cc169a39d2e3798","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        filters \u003d {\u0027host\u0027: self.host, \u0027deleted\u0027: False}"},{"line_number":393,"context_line":"        instances \u003d db.instance_get_all_by_filters(context, filters)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        # Now calculate useage based on instance utilization:"},{"line_number":396,"context_line":"        self._update_usage_from_instances(resources, instances)"},{"line_number":397,"context_line":"        self._report_final_resource_view(resources)"},{"line_number":398,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWU0%3D","line":395,"in_reply_to":"AAAALH%2F%2FWWA%3D","updated":"2012-09-19 16:46:40.000000000","message":"Done","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"0eb41424444c91daf5700be7c76485626b204dae","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        \"\"\"Persist the compute node updates to the DB\"\"\""},{"line_number":484,"context_line":"        compute_node \u003d db.compute_node_update(context,"},{"line_number":485,"context_line":"                self.compute_node[\u0027id\u0027], values, prune_stats)"},{"line_number":486,"context_line":"        self.compute_node \u003d dict(compute_node)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    def _update_usage_from_instance(self, resources, instance):"},{"line_number":489,"context_line":"        \"\"\"Update usage for a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWVk%3D","line":486,"updated":"2012-09-19 16:37:09.000000000","message":"I thought we needed to use dict(compute_node.iteritems()) on sqlalchemy models.  Is this not exercised (perhaps stubbed out) in a test such that this doesn\u0027t fail unit tests?","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"8b01a4ef057fc23d0e78eeab0cc169a39d2e3798","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        \"\"\"Persist the compute node updates to the DB\"\"\""},{"line_number":484,"context_line":"        compute_node \u003d db.compute_node_update(context,"},{"line_number":485,"context_line":"                self.compute_node[\u0027id\u0027], values, prune_stats)"},{"line_number":486,"context_line":"        self.compute_node \u003d dict(compute_node)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    def _update_usage_from_instance(self, resources, instance):"},{"line_number":489,"context_line":"        \"\"\"Update usage for a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWUw%3D","line":486,"in_reply_to":"AAAALH%2F%2FWVk%3D","updated":"2012-09-19 16:46:40.000000000","message":"the local copy, self.compute_node, is a dictionary, not an actual sqlalchemy model.\n\nI can change the name if it would make that clearer","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":19,"context_line":"model."},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import copy"},{"line_number":23,"context_line":"from nova.compute import vm_states"},{"line_number":24,"context_line":"from nova import context"},{"line_number":25,"context_line":"from nova import db"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWNY%3D","line":22,"updated":"2012-09-19 20:06:46.000000000","message":"add a newline under this import","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":19,"context_line":"model."},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import copy"},{"line_number":23,"context_line":"from nova.compute import vm_states"},{"line_number":24,"context_line":"from nova import context"},{"line_number":25,"context_line":"from nova import db"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV6I%3D","line":22,"in_reply_to":"AAAALH%2F%2FWNY%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"resource_tracker_opts \u003d ["},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027reserved_host_disk_mb\u0027, default\u003d0,"},{"line_number":37,"context_line":"               help\u003d\u0027Amount of disk in MB to reserve for host/dom0\u0027),"},{"line_number":38,"context_line":"    cfg.IntOpt(\u0027reserved_host_memory_mb\u0027, default\u003d512,"},{"line_number":39,"context_line":"               help\u003d\u0027Amount of memory in MB to reserve for host/dom0\u0027),"},{"line_number":40,"context_line":"    cfg.IntOpt(\u0027claim_timeout_seconds\u0027, default\u003d600,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWNU%3D","line":37,"updated":"2012-09-19 20:06:46.000000000","message":"Can we just call it \u0027host\u0027? That covers \u0027dom0\u0027 which doesn\u0027t really mean anything in a kvm world","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"df947e708b440d122a564b12fd89f23bf37902ce","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"resource_tracker_opts \u003d ["},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027reserved_host_disk_mb\u0027, default\u003d0,"},{"line_number":37,"context_line":"               help\u003d\u0027Amount of disk in MB to reserve for host/dom0\u0027),"},{"line_number":38,"context_line":"    cfg.IntOpt(\u0027reserved_host_memory_mb\u0027, default\u003d512,"},{"line_number":39,"context_line":"               help\u003d\u0027Amount of memory in MB to reserve for host/dom0\u0027),"},{"line_number":40,"context_line":"    cfg.IntOpt(\u0027claim_timeout_seconds\u0027, default\u003d600,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV6Q%3D","line":37,"in_reply_to":"AAAALH%2F%2FV%2F0%3D","updated":"2012-09-20 00:37:30.000000000","message":"Is it important to make that distinction at this level, or is it just an implementation detail for the compute driver to care about?","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"resource_tracker_opts \u003d ["},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027reserved_host_disk_mb\u0027, default\u003d0,"},{"line_number":37,"context_line":"               help\u003d\u0027Amount of disk in MB to reserve for host/dom0\u0027),"},{"line_number":38,"context_line":"    cfg.IntOpt(\u0027reserved_host_memory_mb\u0027, default\u003d512,"},{"line_number":39,"context_line":"               help\u003d\u0027Amount of memory in MB to reserve for host/dom0\u0027),"},{"line_number":40,"context_line":"    cfg.IntOpt(\u0027claim_timeout_seconds\u0027, default\u003d600,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV50%3D","line":37,"in_reply_to":"AAAALH%2F%2FV6Q%3D","updated":"2012-09-20 01:08:25.000000000","message":"I\u0027m just going to say \u0027the host\u0027 and if that\u0027s not sufficiently accurate, I shall incur a small amount of bad karma.","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"8bdadabdd46e1ee4eb0596fda6f2eca07bebbd91","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"resource_tracker_opts \u003d ["},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027reserved_host_disk_mb\u0027, default\u003d0,"},{"line_number":37,"context_line":"               help\u003d\u0027Amount of disk in MB to reserve for host/dom0\u0027),"},{"line_number":38,"context_line":"    cfg.IntOpt(\u0027reserved_host_memory_mb\u0027, default\u003d512,"},{"line_number":39,"context_line":"               help\u003d\u0027Amount of memory in MB to reserve for host/dom0\u0027),"},{"line_number":40,"context_line":"    cfg.IntOpt(\u0027claim_timeout_seconds\u0027, default\u003d600,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV%2F0%3D","line":37,"in_reply_to":"AAAALH%2F%2FWNU%3D","updated":"2012-09-19 22:40:50.000000000","message":"\u0027host\u0027 does not cover \u0027dom0\u0027.  \u0027host\u0027 is not accurate to refer to dom0 under Xen.  The \u0027host OS\u0027 for Xen is actually the xen hypervisor which runs below dom0.","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"resource_tracker_opts \u003d ["},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027reserved_host_disk_mb\u0027, default\u003d0,"},{"line_number":37,"context_line":"               help\u003d\u0027Amount of disk in MB to reserve for host/dom0\u0027),"},{"line_number":38,"context_line":"    cfg.IntOpt(\u0027reserved_host_memory_mb\u0027, default\u003d512,"},{"line_number":39,"context_line":"               help\u003d\u0027Amount of memory in MB to reserve for host/dom0\u0027),"},{"line_number":40,"context_line":"    cfg.IntOpt(\u0027claim_timeout_seconds\u0027, default\u003d600,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV6E%3D","line":37,"in_reply_to":"AAAALH%2F%2FWNU%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                        free_mem\u003dself.compute_node[\u0027local_gb_used\u0027])"},{"line_number":209,"context_line":"        LOG.audit(msg)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        if not memory_mb_limit:"},{"line_number":212,"context_line":"            # treat memory as unlimited:"},{"line_number":213,"context_line":"            LOG.audit(_(\"Memory limit not specified, defaulting to unlimited\"))"},{"line_number":214,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWM8%3D","line":211,"updated":"2012-09-19 20:06:46.000000000","message":"Are you intending to treat None and 0 as equivalent? As a user of this class, if I send a memory_mb_limit of 0 that means something different than not sending memory_mb_limit.","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                        free_mem\u003dself.compute_node[\u0027local_gb_used\u0027])"},{"line_number":209,"context_line":"        LOG.audit(msg)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        if not memory_mb_limit:"},{"line_number":212,"context_line":"            # treat memory as unlimited:"},{"line_number":213,"context_line":"            LOG.audit(_(\"Memory limit not specified, defaulting to unlimited\"))"},{"line_number":214,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV5w%3D","line":211,"in_reply_to":"AAAALH%2F%2FWM8%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        # Confirm resources dictionary contains expected keys:"},{"line_number":383,"context_line":"        self._verify_resources(resources)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        # Free memory and disk according to the hypervisor:"},{"line_number":386,"context_line":"        self._report_hypervisor_resource_view(resources)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        # Purge expired claims:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWMo%3D","line":385,"updated":"2012-09-19 20:06:46.000000000","message":"I do want to point out that commenting functions like this is rather excessive. Your function names already represent what\u0027s happening, so you don\u0027t need to repeat yourself.","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        # Confirm resources dictionary contains expected keys:"},{"line_number":383,"context_line":"        self._verify_resources(resources)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        # Free memory and disk according to the hypervisor:"},{"line_number":386,"context_line":"        self._report_hypervisor_resource_view(resources)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        # Purge expired claims:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV5k%3D","line":385,"in_reply_to":"AAAALH%2F%2FWMo%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":423,"context_line":"            LOG.info(_(\u0027Compute_service record updated for %s \u0027) % self.host)"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def _expire_claims(self):"},{"line_number":426,"context_line":"        \"\"\"Purge expired resource claims\"\"\""},{"line_number":427,"context_line":"        for claim_id in self.claims.keys():"},{"line_number":428,"context_line":"            c \u003d self.claims[claim_id]"},{"line_number":429,"context_line":"            if c.is_expired():"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWMg%3D","line":426,"updated":"2012-09-19 20:06:46.000000000","message":"\u0027_expire_claims\u0027 doesn\u0027t mean \u0027Purge expired resource claims\u0027. Let\u0027s call this function \u0027_purge_expired_claims\u0027","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":423,"context_line":"            LOG.info(_(\u0027Compute_service record updated for %s \u0027) % self.host)"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def _expire_claims(self):"},{"line_number":426,"context_line":"        \"\"\"Purge expired resource claims\"\"\""},{"line_number":427,"context_line":"        for claim_id in self.claims.keys():"},{"line_number":428,"context_line":"            c \u003d self.claims[claim_id]"},{"line_number":429,"context_line":"            if c.is_expired():"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV5g%3D","line":426,"in_reply_to":"AAAALH%2F%2FWMg%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # Add a retry entry for the selected compute host:"},{"line_number":128,"context_line":"        self._add_retry_host(filter_properties, weighted_host.host_state.host)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        # Add oversubscription policy info:"},{"line_number":131,"context_line":"        self._add_oversubscription_policy(filter_properties,"},{"line_number":132,"context_line":"                weighted_host.host_state)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWMc%3D","line":130,"updated":"2012-09-19 20:06:46.000000000","message":"delete this comment","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # Add a retry entry for the selected compute host:"},{"line_number":128,"context_line":"        self._add_retry_host(filter_properties, weighted_host.host_state.host)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        # Add oversubscription policy info:"},{"line_number":131,"context_line":"        self._add_oversubscription_policy(filter_properties,"},{"line_number":132,"context_line":"                weighted_host.host_state)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV5c%3D","line":130,"in_reply_to":"AAAALH%2F%2FWMc%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"}],"nova/scheduler/filters/core_filter.py":[{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        instance_vcpus \u003d instance_type[\u0027vcpus\u0027]"},{"line_number":49,"context_line":"        vcpus_total \u003d host_state.vcpus_total * FLAGS.cpu_allocation_ratio"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # save a cpu usage limit for compute host to test again:"},{"line_number":52,"context_line":"        if vcpus_total:"},{"line_number":53,"context_line":"            host_state.limits[\u0027vcpu\u0027] \u003d vcpus_total"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWMY%3D","line":51,"updated":"2012-09-19 20:06:46.000000000","message":"delete this comment","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        vcpus_total \u003d host_state.vcpus_total * FLAGS.cpu_allocation_ratio"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # save a cpu usage limit for compute host to test again:"},{"line_number":52,"context_line":"        if vcpus_total:"},{"line_number":53,"context_line":"            host_state.limits[\u0027vcpu\u0027] \u003d vcpus_total"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        return (vcpus_total - host_state.vcpus_used) \u003e\u003d instance_vcpus"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWMU%3D","line":52,"updated":"2012-09-19 20:06:46.000000000","message":"zero vs. None - does it matter?","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        vcpus_total \u003d host_state.vcpus_total * FLAGS.cpu_allocation_ratio"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # save a cpu usage limit for compute host to test again:"},{"line_number":52,"context_line":"        if vcpus_total:"},{"line_number":53,"context_line":"            host_state.limits[\u0027vcpu\u0027] \u003d vcpus_total"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        return (vcpus_total - host_state.vcpus_used) \u003e\u003d instance_vcpus"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV5M%3D","line":52,"in_reply_to":"AAAALH%2F%2FWMU%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"}],"nova/scheduler/filters/disk_filter.py":[{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011 OpenStack, LLC."},{"line_number":2,"context_line":"# Copyright (c) 2012 Cloudscaling"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWMI%3D","line":1,"updated":"2012-09-19 20:06:46.000000000","message":"2012","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011 OpenStack, LLC."},{"line_number":2,"context_line":"# Copyright (c) 2012 Cloudscaling"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV5E%3D","line":1,"in_reply_to":"AAAALH%2F%2FWMI%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011 OpenStack, LLC."},{"line_number":2,"context_line":"# Copyright (c) 2012 Cloudscaling"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWMM%3D","line":2,"updated":"2012-09-19 20:06:46.000000000","message":"Cloudscaling?","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011 OpenStack, LLC."},{"line_number":2,"context_line":"# Copyright (c) 2012 Cloudscaling"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV5A%3D","line":2,"in_reply_to":"AAAALH%2F%2FWMM%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"07b5d1a422c8581563aa9c3923b1288ebd1e3911","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                    \"disk.\"), locals())"},{"line_number":51,"context_line":"            return False"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # save oversubscription limit for compute node to test against:"},{"line_number":54,"context_line":"        disk_gb_limit \u003d disk_mb_limit / 1024"},{"line_number":55,"context_line":"        host_state.limits[\u0027disk_gb\u0027] \u003d disk_gb_limit"},{"line_number":56,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FWMA%3D","line":53,"updated":"2012-09-19 20:06:46.000000000","message":"delete this comment","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ae197f89a5dab5b45ede6e862a985b2026f32f0","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                    \"disk.\"), locals())"},{"line_number":51,"context_line":"            return False"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # save oversubscription limit for compute node to test against:"},{"line_number":54,"context_line":"        disk_gb_limit \u003d disk_mb_limit / 1024"},{"line_number":55,"context_line":"        host_state.limits[\u0027disk_gb\u0027] \u003d disk_gb_limit"},{"line_number":56,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FV48%3D","line":53,"in_reply_to":"AAAALH%2F%2FWMA%3D","updated":"2012-09-20 01:08:25.000000000","message":"Done","commit_id":"6f46088b97d03241203088d30224e608fdbeeec0"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"b5302d80b58236a2c91d3d587c62b9ff4f80af09","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"disk_allocation_ratio_opt \u003d cfg.FloatOpt(\"disk_allocation_ratio\", default\u003d0.0,"},{"line_number":24,"context_line":"                         help\u003d\"virtual disk to physical disk allocation ratio\")"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"FLAGS \u003d flags.FLAGS"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FVyc%3D","line":23,"updated":"2012-09-20 03:55:47.000000000","message":"guessing this should default to 1.0, also, so that if someone enables it (it\u0027s not in the default list)... it\u0027ll actually work.  Otherwise, 0.0 will cause this to always fail to pass.","commit_id":"02758640bbab846f268c149e1b2fdd4a89914f3f"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"0eb41424444c91daf5700be7c76485626b204dae","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                        help\u003d\"virtual ram to physical ram allocation ratio\")"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"FLAGS \u003d flags.FLAGS"},{"line_number":35,"context_line":"FLAGS.register_opt(ram_allocation_ratio_opt)"},{"line_number":36,"context_line":"host_manager_opts \u003d ["},{"line_number":37,"context_line":"    cfg.MultiStrOpt(\u0027scheduler_available_filters\u0027,"},{"line_number":38,"context_line":"            default\u003d[\u0027nova.scheduler.filters.standard_filters\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWVc%3D","line":35,"updated":"2012-09-19 16:37:09.000000000","message":"Move this cfg.FloatOpt() into the below list and remove the last 2 lines above ?","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"8b01a4ef057fc23d0e78eeab0cc169a39d2e3798","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                        help\u003d\"virtual ram to physical ram allocation ratio\")"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"FLAGS \u003d flags.FLAGS"},{"line_number":35,"context_line":"FLAGS.register_opt(ram_allocation_ratio_opt)"},{"line_number":36,"context_line":"host_manager_opts \u003d ["},{"line_number":37,"context_line":"    cfg.MultiStrOpt(\u0027scheduler_available_filters\u0027,"},{"line_number":38,"context_line":"            default\u003d[\u0027nova.scheduler.filters.standard_filters\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWUs%3D","line":35,"in_reply_to":"AAAALH%2F%2FWVc%3D","updated":"2012-09-19 16:46:40.000000000","message":"Done","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"0eb41424444c91daf5700be7c76485626b204dae","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                help\u003d\u0027Which filter class names to use for filtering hosts \u0027"},{"line_number":53,"context_line":"                      \u0027when not specified in the request.\u0027),"},{"line_number":54,"context_line":"    cfg.FloatOpt(\"disk_allocation_ratio\", default\u003d0.0,"},{"line_number":55,"context_line":"                 help\u003d\"virtual disk to physical disk allocation ratio\")"},{"line_number":56,"context_line":"    ]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"FLAGS \u003d flags.FLAGS"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWVQ%3D","line":55,"updated":"2012-09-19 16:37:09.000000000","message":"Hm.  I see.  These are duplicated options that are defined with the filters.  See comment below.","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"8b01a4ef057fc23d0e78eeab0cc169a39d2e3798","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                help\u003d\u0027Which filter class names to use for filtering hosts \u0027"},{"line_number":53,"context_line":"                      \u0027when not specified in the request.\u0027),"},{"line_number":54,"context_line":"    cfg.FloatOpt(\"disk_allocation_ratio\", default\u003d0.0,"},{"line_number":55,"context_line":"                 help\u003d\"virtual disk to physical disk allocation ratio\")"},{"line_number":56,"context_line":"    ]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"FLAGS \u003d flags.FLAGS"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWUo%3D","line":55,"in_reply_to":"AAAALH%2F%2FWVQ%3D","updated":"2012-09-19 16:46:40.000000000","message":"Done","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"0eb41424444c91daf5700be7c76485626b204dae","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        if FLAGS.disk_allocation_ratio \u003e\u003d 1.0:"},{"line_number":152,"context_line":"            self.disk_gb_limit \u003d (self.total_usable_disk_gb *"},{"line_number":153,"context_line":"                                  FLAGS.disk_allocation_ratio)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def consume_from_instance(self, instance):"},{"line_number":156,"context_line":"        \"\"\"Incrementally update host state from an instance\"\"\""},{"line_number":157,"context_line":"        disk_mb \u003d (instance[\u0027root_gb\u0027] + instance[\u0027ephemeral_gb\u0027]) * 1024"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWVE%3D","line":154,"updated":"2012-09-19 16:37:09.000000000","message":"I don\u0027t like this filter specific code... as the filters are supposed to be pluggable.  I suspect you don\u0027t like this either, but it was the easiest solution. :)   As a rough idea, what do you think about:\n\nsetting something like a self.limits \u003d {} here... and letting the filters add things to this dictionary if they need to?  This would allow you to remove the duplicated flags... and this \u0027magic\u0027.","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"8b01a4ef057fc23d0e78eeab0cc169a39d2e3798","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        if FLAGS.disk_allocation_ratio \u003e\u003d 1.0:"},{"line_number":152,"context_line":"            self.disk_gb_limit \u003d (self.total_usable_disk_gb *"},{"line_number":153,"context_line":"                                  FLAGS.disk_allocation_ratio)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def consume_from_instance(self, instance):"},{"line_number":156,"context_line":"        \"\"\"Incrementally update host state from an instance\"\"\""},{"line_number":157,"context_line":"        disk_mb \u003d (instance[\u0027root_gb\u0027] + instance[\u0027ephemeral_gb\u0027]) * 1024"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALH%2F%2FWUg%3D","line":154,"in_reply_to":"AAAALH%2F%2FWVE%3D","updated":"2012-09-19 16:46:40.000000000","message":"Done","commit_id":"8ab33112d61ba49fc485506ab21c197c6b30524f"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"0dd08e8d115cd6475e0e5885b133a3b363095752","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            free_disk_mb -\u003d FLAGS.reserved_host_disk_mb"},{"line_number":134,"context_line":"        if FLAGS.reserved_host_memory_mb \u003e 0:"},{"line_number":135,"context_line":"            all_ram_mb -\u003d FLAGS.reserved_host_memory_mb"},{"line_number":136,"context_line":"            free_ram_mb -\u003d FLAGS.reserved_host_memory_mb"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        #NOTE(jogo) free_ram_mb can be negative"},{"line_number":139,"context_line":"        self.free_ram_mb \u003d free_ram_mb"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FVzE%3D","side":"PARENT","line":136,"updated":"2012-09-20 03:44:17.000000000","message":"I feel like we should still check these on the scheduling side to avoid unneeded casts to compute and retries.  They should probably happen in the filters, though.  (Looks like these are not checked by the scheduler anymore.. correct me if I\u0027m wrong)","commit_id":"2628697679ae9ccdba96ad4d0d2af4104f48de7f"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"b75ce439964c0abf16281ba9c3e7f5a9cddc5582","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            free_disk_mb -\u003d FLAGS.reserved_host_disk_mb"},{"line_number":134,"context_line":"        if FLAGS.reserved_host_memory_mb \u003e 0:"},{"line_number":135,"context_line":"            all_ram_mb -\u003d FLAGS.reserved_host_memory_mb"},{"line_number":136,"context_line":"            free_ram_mb -\u003d FLAGS.reserved_host_memory_mb"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        #NOTE(jogo) free_ram_mb can be negative"},{"line_number":139,"context_line":"        self.free_ram_mb \u003d free_ram_mb"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FVwM%3D","side":"PARENT","line":136,"in_reply_to":"AAAALH%2F%2FVzE%3D","updated":"2012-09-20 05:12:02.000000000","message":"Nevermind... informed that we are... since this is accounted for in the compute_nodes entries stuffed into the DB.","commit_id":"2628697679ae9ccdba96ad4d0d2af4104f48de7f"}]}
