)]}'
{"nova/scheduler/host_manager.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a195250d48443d4d3948038c64be210351708313","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":157,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":158,"context_line":"        least \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":159,"context_line":"        free_disk_mb \u003d min(val for val in [least, free_gb] if val is not None)"},{"line_number":160,"context_line":"        free_disk_mb *\u003d 1024"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F09E%3D","line":158,"updated":"2013-12-30 16:22:23.000000000","message":"I would prefer this to be changed to least_gb for clarification.  Since all other values appear to be prefixed with a unit it would be nice to bring this in line, especially since it\u0027s being compared against.","commit_id":"668eecdef1c39ba2a2085a886f65b44e67e9ad30"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"a152b833a243e4b061a8ff6a2fffaa79f015ce2f","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":157,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":158,"context_line":"        least \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":159,"context_line":"        free_disk_mb \u003d min(val for val in [least, free_gb] if val is not None)"},{"line_number":160,"context_line":"        free_disk_mb *\u003d 1024"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B4Ms%3D","line":158,"in_reply_to":"AAAAT3%2F%2F09E%3D","updated":"2014-01-21 06:54:47.000000000","message":"Seems like a reasonable tidy up","commit_id":"668eecdef1c39ba2a2085a886f65b44e67e9ad30"},{"author":{"_account_id":7133,"name":"Ryan Moore","email":"ryan.moore@hpe.com","username":"moory"},"change_message_id":"dcb13558c3062e34c76832f97e8de60ac073b4fe","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":157,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":158,"context_line":"        least \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":159,"context_line":"        free_disk_mb \u003d min(val for val in [least, free_gb] if val is not None)"},{"line_number":160,"context_line":"        free_disk_mb *\u003d 1024"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B3j0%3D","line":158,"in_reply_to":"AAAAT3%2F%2F09E%3D","updated":"2014-01-24 10:54:41.000000000","message":"added measure suffix in next patch set","commit_id":"668eecdef1c39ba2a2085a886f65b44e67e9ad30"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a195250d48443d4d3948038c64be210351708313","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":157,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":158,"context_line":"        least \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":159,"context_line":"        free_disk_mb \u003d min(val for val in [least, free_gb] if val is not None)"},{"line_number":160,"context_line":"        free_disk_mb *\u003d 1024"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self.disk_mb_used \u003d compute[\u0027local_gb_used\u0027] * 1024"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F09U%3D","line":159,"updated":"2013-12-30 16:22:23.000000000","message":"The bug report claims that least should always be less than free_gb but that doesn\u0027t always hold.  So this solution is papering over an issue that should be resolved at the source.  At the very least I think something should be logged here if least \u003e free_gb to get a sense of the issue.  Additionally I would like to see a bug report for that issue, or for this to not close the bug that\u0027s already open.","commit_id":"668eecdef1c39ba2a2085a886f65b44e67e9ad30"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"a152b833a243e4b061a8ff6a2fffaa79f015ce2f","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":157,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":158,"context_line":"        least \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":159,"context_line":"        free_disk_mb \u003d min(val for val in [least, free_gb] if val is not None)"},{"line_number":160,"context_line":"        free_disk_mb *\u003d 1024"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self.disk_mb_used \u003d compute[\u0027local_gb_used\u0027] * 1024"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B4G8%3D","line":159,"in_reply_to":"AAAAT3%2F%2F09U%3D","updated":"2014-01-21 06:54:47.000000000","message":"I agree that adding a warning here would be useful.\n\nPinning down why free_gb is less that least has been frustratingly difficult - and not something that we can reproduce at will.  Happy to raise a bug for that though so that we can track it as an open issue.\n\nThe main point of the bug addressed by this fix (and maybe I didn\u0027t word it very well) is that that scheduler and compute manger are currently using two different views of available disc capacity, which can\u0027t be good.\n\nIf the scheduler view is more restrictive than the compute manager (which is what this change does) then that would be robust.","commit_id":"668eecdef1c39ba2a2085a886f65b44e67e9ad30"},{"author":{"_account_id":7133,"name":"Ryan Moore","email":"ryan.moore@hpe.com","username":"moory"},"change_message_id":"dcb13558c3062e34c76832f97e8de60ac073b4fe","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":157,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":158,"context_line":"        least \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":159,"context_line":"        free_disk_mb \u003d min(val for val in [least, free_gb] if val is not None)"},{"line_number":160,"context_line":"        free_disk_mb *\u003d 1024"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self.disk_mb_used \u003d compute[\u0027local_gb_used\u0027] * 1024"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BkJ0%3D","line":159,"in_reply_to":"AAAAT3%2F%2F09U%3D","updated":"2014-01-24 10:54:41.000000000","message":"added a warning in next patch set","commit_id":"668eecdef1c39ba2a2085a886f65b44e67e9ad30"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2762e37d9bb6f6ba19cb681b2d1f828b8a109f17","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":157,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":158,"context_line":"        least \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":159,"context_line":"        free_disk_mb \u003d min(val for val in [least, free_gb] if val is not None)"},{"line_number":160,"context_line":"        free_disk_mb *\u003d 1024"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self.disk_mb_used \u003d compute[\u0027local_gb_used\u0027] * 1024"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B1Q0%3D","line":159,"in_reply_to":"AAAAUH%2F%2B2JU%3D","updated":"2014-01-21 16:25:55.000000000","message":"Thanks for the explanation, and for updating the bug.\n\nIt seems like the condition of an instance being in the db and not on the hypervisor is something that should be a bug report on it\u0027s own, but I don\u0027t see that as something to hold this up.","commit_id":"668eecdef1c39ba2a2085a886f65b44e67e9ad30"},{"author":{"_account_id":7133,"name":"Ryan Moore","email":"ryan.moore@hpe.com","username":"moory"},"change_message_id":"dcb13558c3062e34c76832f97e8de60ac073b4fe","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":157,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":158,"context_line":"        least \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":159,"context_line":"        free_disk_mb \u003d min(val for val in [least, free_gb] if val is not None)"},{"line_number":160,"context_line":"        free_disk_mb *\u003d 1024"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self.disk_mb_used \u003d compute[\u0027local_gb_used\u0027] * 1024"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BkJk%3D","line":159,"in_reply_to":"AAAAUH%2F%2B2JU%3D","updated":"2014-01-24 10:54:41.000000000","message":"commit message updated in next patch set","commit_id":"668eecdef1c39ba2a2085a886f65b44e67e9ad30"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"f1338d1a5a61bd067c6a36878232f4133338afe3","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":157,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":158,"context_line":"        least \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":159,"context_line":"        free_disk_mb \u003d min(val for val in [least, free_gb] if val is not None)"},{"line_number":160,"context_line":"        free_disk_mb *\u003d 1024"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self.disk_mb_used \u003d compute[\u0027local_gb_used\u0027] * 1024"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B2JU%3D","line":159,"in_reply_to":"AAAAUH%2F%2B4G8%3D","updated":"2014-01-21 14:03:20.000000000","message":"Sorry  - got confused there (not enough coffee before I wrote the above).    We do know why this happens, and its when an instance exists in the DB but not on the hypervisor (which can happen in some error cases)\n\nIn this case the \"missing\" VM is included in the calculation of \"free_gb\" but not included in \"disk_available_least\".\n\nSo either value can represent the minimum amount of free disc space depending on the circumstances.\n\nI\u0027ve updated the Bug text to reflect this - Ryan you might want to also update the commit message to better reflect this","commit_id":"668eecdef1c39ba2a2085a886f65b44e67e9ad30"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8012dac32ec927b8146a22367a921bd5ff4cb53d","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":186,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":187,"context_line":"        least_gb \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":188,"context_line":"        if least_gb \u003e free_gb and free_gb:"},{"line_number":189,"context_line":"            # can occur when an instance in database is not on host"},{"line_number":190,"context_line":"            LOG.warn(_(\"Host has more disk space than database expected\""},{"line_number":191,"context_line":"                       \" (%(physical)sgb \u003e %(database)sgb)\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BifM%3D","line":188,"updated":"2014-01-24 16:14:46.000000000","message":"What\u0027s the purpose of the \u0027and free_gb\u0027 check?  The previous code guarded against \u0027disk_available_least\u0027 being None and this code doesn\u0027t, instead it checks against \u0027free_disk_gb\u0027.  I\u0027m just not clear on why.","commit_id":"56688707138d2343a65e25f8c27586ffd44875cf"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"4a95f2375b55be006be6de2eb162903edb59239e","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":186,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":187,"context_line":"        least_gb \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":188,"context_line":"        if least_gb \u003e free_gb and free_gb:"},{"line_number":189,"context_line":"            # can occur when an instance in database is not on host"},{"line_number":190,"context_line":"            LOG.warn(_(\"Host has more disk space than database expected\""},{"line_number":191,"context_line":"                       \" (%(physical)sgb \u003e %(database)sgb)\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Fa2w%3D","line":188,"in_reply_to":"AAAAUH%2F%2Bh40%3D","updated":"2014-02-13 10:48:44.000000000","message":"I\u0027m with Andrew here. It makes me uneasy, but it\u0027s not a big deal.\n\nI\u0027m going to +2 this, but I\u0027ve submitted I3973eab6b4ca016df546de8b57245fc0d0f03a80 to hopefully resolve the concern over free_disk_gb","commit_id":"56688707138d2343a65e25f8c27586ffd44875cf"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"d54ef3a2aa9828454e38b9d256d2126d2d75fcae","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":186,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":187,"context_line":"        least_gb \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":188,"context_line":"        if least_gb \u003e free_gb and free_gb:"},{"line_number":189,"context_line":"            # can occur when an instance in database is not on host"},{"line_number":190,"context_line":"            LOG.warn(_(\"Host has more disk space than database expected\""},{"line_number":191,"context_line":"                       \" (%(physical)sgb \u003e %(database)sgb)\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2Bh40%3D","line":188,"in_reply_to":"AAAAUH%2F%2BiIQ%3D","updated":"2014-01-24 17:48:18.000000000","message":"That\u0027s fair.  I have some uneasiness just around the idea that either of these would be None, when really it seems that they shouldn\u0027t ever be, so I\u0027d rather not add more checks in case they are.  But I don\u0027t see any real issues with this.","commit_id":"56688707138d2343a65e25f8c27586ffd44875cf"},{"author":{"_account_id":7133,"name":"Ryan Moore","email":"ryan.moore@hpe.com","username":"moory"},"change_message_id":"abcd189ab033bb6d72d67d87f0654fca27097d48","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        # Assume virtual size is all consumed by instances if use qcow2 disk."},{"line_number":186,"context_line":"        free_gb \u003d compute.get(\u0027free_disk_gb\u0027)"},{"line_number":187,"context_line":"        least_gb \u003d compute.get(\u0027disk_available_least\u0027)"},{"line_number":188,"context_line":"        if least_gb \u003e free_gb and free_gb:"},{"line_number":189,"context_line":"            # can occur when an instance in database is not on host"},{"line_number":190,"context_line":"            LOG.warn(_(\"Host has more disk space than database expected\""},{"line_number":191,"context_line":"                       \" (%(physical)sgb \u003e %(database)sgb)\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BiIQ%3D","line":188,"in_reply_to":"AAAAUH%2F%2BifM%3D","updated":"2014-01-24 17:04:08.000000000","message":"When warning that \"Host has more disk space than database expected\" there is no need to check against least_gb being None as if it is None it will not be greater than free_gb. I check free_gb for None as if it is None(so not set in database), and physical has been calculated I didn\u0027t think a warning would be required?\n\nThe check against disk_available_least and/or free_disk_gb being None still applies when calculating free_disk_mb.","commit_id":"56688707138d2343a65e25f8c27586ffd44875cf"}],"nova/tests/scheduler/fakes.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"4a95f2375b55be006be6de2eb162903edb59239e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"             hypervisor_version\u003d0),"},{"line_number":35,"context_line":"        dict(id\u003d2, local_gb\u003d2048, memory_mb\u003d2048, vcpus\u003d2,"},{"line_number":36,"context_line":"             disk_available_least\u003d1024, free_ram_mb\u003d1024, vcpus_used\u003d2,"},{"line_number":37,"context_line":"             free_disk_gb\u003dNone, local_gb_used\u003d0, updated_at\u003dNone,"},{"line_number":38,"context_line":"             service\u003ddict(host\u003d\u0027host2\u0027, disabled\u003dTrue),"},{"line_number":39,"context_line":"             hypervisor_hostname\u003d\u0027node2\u0027, host_ip\u003d\u0027127.0.0.1\u0027,"},{"line_number":40,"context_line":"             hypervisor_version\u003d0),"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Fa3U%3D","line":37,"updated":"2014-02-13 10:48:44.000000000","message":"Wrt to Andrew\u0027s point - this condition should never actually happen","commit_id":"56688707138d2343a65e25f8c27586ffd44875cf"}]}
