)]}'
{"ironic/nova/scheduler/filters/exact_core_filter.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a821d7200050aa4991a077763226343749d6e69d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        if not instance_type:"},{"line_number":31,"context_line":"            return True"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        instance_vcpus \u003d instance_type[\u0027vcpus\u0027]"},{"line_number":34,"context_line":"        vcpus_total \u003d host_state.vcpus_total"},{"line_number":35,"context_line":"        usable_vcpus \u003d vcpus_total - host_state.vcpus_used"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BKrI%3D","line":33,"updated":"2014-03-28 18:12:51.000000000","message":"These four lines can be more clearly expressed. Also, there should be some error checking of host_state. I think this would be better:\n\n  if not host_state.vcpus_total:\n    # Fail safe\n    LOG.warning(_(\"VCPUs not set; assuming CPU collection broken\"))\n    return True\n\n  instance_vcpus \u003d instance_type[\u0027vcpus\u0027]\n  usable_vcpus \u003d host_state.vcpus_total - host_state.vcpus_used\n\n  if usable_vcpus !\u003d instance_vcpus:\n    ...","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a821d7200050aa4991a077763226343749d6e69d","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                        \u0027usable_vcpus\u0027: usable_vcpus})"},{"line_number":44,"context_line":"            return False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        # Only provide a VCPU limit to compute if the virt driver is reporting"},{"line_number":47,"context_line":"        # an accurate count of installed VCPUs. (XenServer driver does not)"},{"line_number":48,"context_line":"        if vcpus_total \u003e 0:"},{"line_number":49,"context_line":"            host_state.limits[\u0027vcpu\u0027] \u003d vcpus_total"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BKoM%3D","line":46,"updated":"2014-03-28 18:12:51.000000000","message":"this section does not seem appropriate because, at least for Ironic, there is no hypervisor to honor the host_state.limits settings. \n\nPlease remove it so the code is not misleading.","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"}],"ironic/nova/scheduler/filters/exact_disk_filter.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a821d7200050aa4991a077763226343749d6e69d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                         instance_type[\u0027swap\u0027])"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        free_disk_mb \u003d host_state.free_disk_mb"},{"line_number":34,"context_line":"        total_usable_disk_mb \u003d host_state.total_usable_disk_gb * 1024"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        disk_mb_limit \u003d total_usable_disk_mb"},{"line_number":37,"context_line":"        used_disk_mb \u003d total_usable_disk_mb - free_disk_mb"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BKM0%3D","line":34,"updated":"2014-03-28 18:12:51.000000000","message":"total_usable_disk_gb does not appear to be set by IronicHostManager ... it\u0027s just always 0 .... ugh. Fixing in another patch","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a821d7200050aa4991a077763226343749d6e69d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                               \u0027usable_disk_mb\u0027: usable_disk_mb})"},{"line_number":46,"context_line":"            return False"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        disk_gb_limit \u003d disk_mb_limit / 1024"},{"line_number":49,"context_line":"        host_state.limits[\u0027disk_gb\u0027] \u003d disk_gb_limit"},{"line_number":50,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BKL8%3D","line":48,"updated":"2014-03-28 18:12:51.000000000","message":"As with exact_core_filter, I don\u0027t think there is any benefit to setting host_states.limits here.","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"}],"ironic/nova/scheduler/filters/exact_ram_filter.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a821d7200050aa4991a077763226343749d6e69d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        requested_ram \u003d instance_type[\u0027memory_mb\u0027]"},{"line_number":29,"context_line":"        free_ram_mb \u003d host_state.free_ram_mb"},{"line_number":30,"context_line":"        total_usable_ram_mb \u003d host_state.total_usable_ram_mb"},{"line_number":31,"context_line":"        memory_mb_limit \u003d total_usable_ram_mb"},{"line_number":32,"context_line":"        used_ram_mb \u003d total_usable_ram_mb - free_ram_mb"},{"line_number":33,"context_line":"        usable_ram \u003d memory_mb_limit - used_ram_mb"},{"line_number":34,"context_line":"        if usable_ram !\u003d requested_ram:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BKLY%3D","line":31,"updated":"2014-03-28 18:12:51.000000000","message":"limit does not make sense in the context of an ironic node where all resources are consumed by a single instance","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a821d7200050aa4991a077763226343749d6e69d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        total_usable_ram_mb \u003d host_state.total_usable_ram_mb"},{"line_number":31,"context_line":"        memory_mb_limit \u003d total_usable_ram_mb"},{"line_number":32,"context_line":"        used_ram_mb \u003d total_usable_ram_mb - free_ram_mb"},{"line_number":33,"context_line":"        usable_ram \u003d memory_mb_limit - used_ram_mb"},{"line_number":34,"context_line":"        if usable_ram !\u003d requested_ram:"},{"line_number":35,"context_line":"            LOG.debug(_(\"%(host_state)s does not have %(requested_ram)s MB \""},{"line_number":36,"context_line":"                    \"usable ram, it only has %(usable_ram)s MB usable ram.\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BKKM%3D","line":33,"updated":"2014-03-28 18:12:51.000000000","message":"I would condense L29 - 34 like this:\n\n  if requested_ram !\u003d host_state.free_ram_mb:\n    LOG...\n    return False","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a821d7200050aa4991a077763226343749d6e69d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            return False"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        # save oversubscription limit for compute node to test against:"},{"line_number":43,"context_line":"        host_state.limits[\u0027memory_mb\u0027] \u003d memory_mb_limit"},{"line_number":44,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BKLI%3D","line":43,"updated":"2014-03-28 18:12:51.000000000","message":"again, no need for host_state.limits","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"}],"ironic/nova/scheduler/ironic_host_manager.py":[{"author":{"_account_id":7589,"name":"linggao","email":"linggao@us.ibm.com","username":"linggao"},"change_message_id":"eb22070667db3f0c4f6b5a49336bda62a1ef60d3","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    ]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"CONF \u003d cfg.CONF"},{"line_number":40,"context_line":"CONF.register_opts(host_manager_opts)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BLGI%3D","line":40,"updated":"2014-03-28 16:30:05.000000000","message":"Please do not register the default filters here. It will fail with \"DuplicateOptError: duplicate option: scheduler_default_filters\"\n\nSuggestion:\n\nCONF \u003d cfg.CONF\nCONF.scheduler_default_filters \u003d [\n                  \u0027ExactRamFilter\u0027,\n                  \u0027ExactDiskFilter\u0027,\n                  \u0027ExactCoreFilter\u0027,\n                  ]","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"c605cb4479ce03be03ce2ef9786965b17b194f61","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    ]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"CONF \u003d cfg.CONF"},{"line_number":40,"context_line":"CONF.register_opts(host_manager_opts)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BLOY%3D","line":40,"updated":"2014-03-28 16:21:38.000000000","message":"We can\u0027t duplicate the scheduler_default_filters options, it\u0027s going to fail with: http://paste.openstack.org/show/74575/","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a821d7200050aa4991a077763226343749d6e69d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    ]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"CONF \u003d cfg.CONF"},{"line_number":40,"context_line":"CONF.register_opts(host_manager_opts)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BKH8%3D","line":40,"in_reply_to":"AAAAWH%2F%2BLGI%3D","updated":"2014-03-28 18:12:51.000000000","message":"Yep, what they said.\n\nOne possibility would be to add two new options:\n\n  baremetal_scheduler_default_filters ...\n  scheduler_use_baremetal_filters, default\u003dFalse\n\nOr we need to document the list of filters for baremetal and require folks to manually change them.","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"dcfb7beebbda1fedba24e026e1449c979c32a7df","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"host_manager_opts \u003d ["},{"line_number":29,"context_line":"    cfg.ListOpt(\u0027baremetal_scheduler_default_filters\u0027,"},{"line_number":30,"context_line":"                default\u003d["},{"line_number":31,"context_line":"                  \u0027ExactRamFilter\u0027,"},{"line_number":32,"context_line":"                  \u0027ExactDiskFilter\u0027,"},{"line_number":33,"context_line":"                  \u0027ExactCoreFilter\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BI2U%3D","line":30,"updated":"2014-03-28 21:16:30.000000000","message":"I think this should also list the other default filters, so a complete list would be:\n\n  RetryFilter\n  AvailabilityZoneFilter\n  ComputeFilter\n  ComputeCapabilitiesFilter\n  ImagePropertiesFilter\n  ExactRamFilter\n  ExactDiskFilter\n  ExactCoreFilter\n\n\nWe may need to use a slightly fuzzy disk filter, actually -- but I\u0027ll punt that to Robert for now :)","commit_id":"dcee314da0a79f847f99425e575436fa0571f5bf"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"e1c64c08beff7f175f298430478dbf851f73a24c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"host_manager_opts \u003d ["},{"line_number":29,"context_line":"    cfg.ListOpt(\u0027baremetal_scheduler_default_filters\u0027,"},{"line_number":30,"context_line":"                default\u003d["},{"line_number":31,"context_line":"                  \u0027ExactRamFilter\u0027,"},{"line_number":32,"context_line":"                  \u0027ExactDiskFilter\u0027,"},{"line_number":33,"context_line":"                  \u0027ExactCoreFilter\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BIvo%3D","line":30,"in_reply_to":"AAAAWH%2F%2BI2U%3D","updated":"2014-03-28 21:34:18.000000000","message":"I think exact disk is fine; the key source of skew - partition table - is something we can explicitly handle somewhere. That will really only matter when auto-discovered disk sizes happen.\n\nHow will we keep this in sync?","commit_id":"dcee314da0a79f847f99425e575436fa0571f5bf"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"dcfb7beebbda1fedba24e026e1449c979c32a7df","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                     \u0027baremetal hosts when not specified in the request.\u0027),"},{"line_number":37,"context_line":"    cfg.BoolOpt(\u0027scheduler_use_baremetal_filters\u0027,"},{"line_number":38,"context_line":"                default\u003dFalse,"},{"line_number":39,"context_line":"               help\u003d\u0027Flag to decide whether to use \u0027"},{"line_number":40,"context_line":"                    \u0027baremetal_scheduler_default_filters or not.\u0027),"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    ]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BI2I%3D","line":39,"updated":"2014-03-28 21:16:30.000000000","message":"uneven indent","commit_id":"dcee314da0a79f847f99425e575436fa0571f5bf"},{"author":{"_account_id":7589,"name":"linggao","email":"linggao@us.ibm.com","username":"linggao"},"change_message_id":"32a090eb9c169862a89a153f791b9ec4f9c204d7","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    # Override."},{"line_number":94,"context_line":"    # Yes, this is not a class, and it is OK"},{"line_number":95,"context_line":"    host_state_cls \u003d new_host_state"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def __init__(self):"},{"line_number":98,"context_line":"        super(IronicHostManager, self).__init__()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BI0I%3D","line":96,"updated":"2014-03-28 21:23:35.000000000","message":"Please add the code here to read in the new CONF settings baremetal_scheduler_default_filters  and scheduler_use_baremetal_filters. And overrides the CONF.scheduler_default_filters if scheduler_use_baremetal_filters is True.","commit_id":"dcee314da0a79f847f99425e575436fa0571f5bf"}],"ironic/nova/tests/scheduler/test_host_filters.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"c605cb4479ce03be03ce2ef9786965b17b194f61","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2011 OpenStack Foundation  # All Rights Reserved."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BLMU%3D","line":1,"updated":"2014-03-28 16:21:38.000000000","message":"nit: new line for the \"# All Rights Reserved.\"","commit_id":"f946bb79efc92bbe9f89310df364b6e7c92c4128"}]}
