)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"41876382737660559005ca6952a1ca9286fd3b95","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mark Mielke \u003cmark.mielke@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-02-07 01:52:06 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DiskFilter should only check if sufficient available storage exists, if storage has been requested."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I146ee15a89a69aa132b20ae98ad76dba6f63355b"},{"line_number":10,"context_line":"Closes-Bug: 1662432"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a430d35_77155247","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":99},"updated":"2017-02-08 06:04:45.000000000","message":"This line is too long.\nSee https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"e33fc9981be840254225a1f98c81e83decab9638"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"21aaf7646de0e33e9315ff4245acc58f8f743941","unresolved":false,"context_lines":[{"line_number":34,"context_line":"be scheduled that do no require any ephemeral storage."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Change-Id: I146ee15a89a69aa132b20ae98ad76dba6f63355b"},{"line_number":37,"context_line":"Closes-Bug: 1662432"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"da36d5c6_e87af475","line":37,"updated":"2017-02-27 11:28:15.000000000","message":"Could you please change Closes-Bug to Partial-Bug, as we\u0027re working around, not fixing the issue? Either that or open a second bug for the incorrect data issue and reference the new bug in the comments I\u0027ve requested below?","commit_id":"8011ddc3086d2fc6bf32ecc81d9d39cb4080e47f"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"21aaf7646de0e33e9315ff4245acc58f8f743941","unresolved":false,"context_lines":[{"line_number":393,"context_line":"                numa_topology \u003d self._get_migration_context_resource("},{"line_number":394,"context_line":"                    \u0027numa_topology\u0027, instance, prefix\u003dprefix)"},{"line_number":395,"context_line":"                usage \u003d self._get_usage_dict("},{"line_number":396,"context_line":"                        instance, numa_topology\u003dnuma_topology)"},{"line_number":397,"context_line":"                self._drop_pci_devices(instance, nodename, prefix)"},{"line_number":398,"context_line":"                self._update_usage(usage, nodename, sign\u003d-1)"},{"line_number":399,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_4d523268","line":396,"updated":"2017-02-27 11:28:15.000000000","message":"As noted in the bug I think this is a good change. However, it serves no purpose unless we also fix _get_usage_dict. As this you\u0027re not going down that route here it\u0027s not related. Could you please remove it?","commit_id":"8011ddc3086d2fc6bf32ecc81d9d39cb4080e47f"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"21aaf7646de0e33e9315ff4245acc58f8f743941","unresolved":false,"context_lines":[{"line_number":847,"context_line":"        if itype:"},{"line_number":848,"context_line":"            cn \u003d self.compute_nodes[nodename]"},{"line_number":849,"context_line":"            usage \u003d self._get_usage_dict("},{"line_number":850,"context_line":"                        instance, numa_topology\u003dnuma_topology)"},{"line_number":851,"context_line":"            if self.pci_tracker and sign:"},{"line_number":852,"context_line":"                self.pci_tracker.update_pci_for_instance("},{"line_number":853,"context_line":"                    context, instance, sign\u003dsign)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_8d48aab4","line":850,"updated":"2017-02-27 11:28:15.000000000","message":"Ditto.","commit_id":"8011ddc3086d2fc6bf32ecc81d9d39cb4080e47f"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"21aaf7646de0e33e9315ff4245acc58f8f743941","unresolved":false,"context_lines":[{"line_number":1050,"context_line":"                     \u0027vcpus\u0027: object_or_dict.flavor.vcpus,"},{"line_number":1051,"context_line":"                     \u0027root_gb\u0027: object_or_dict.flavor.root_gb,"},{"line_number":1052,"context_line":"                     \u0027ephemeral_gb\u0027: object_or_dict.flavor.ephemeral_gb,"},{"line_number":1053,"context_line":"                     \u0027numa_topology\u0027: object_or_dict.numa_topology}"},{"line_number":1054,"context_line":"        elif isinstance(object_or_dict, objects.Flavor):"},{"line_number":1055,"context_line":"            usage \u003d obj_base.obj_to_primitive(object_or_dict)"},{"line_number":1056,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_68f0c4c9","line":1053,"updated":"2017-02-27 11:28:15.000000000","message":"In working through this bug we\u0027ve discovered (at some expense) that this code is wrong because it doesn\u0027t handle instances with user-specified BDMs for local disks, with particularly bad consequences on systems which use predominantly BFV instances. Fixing this shouldn\u0027t be very hard, but I appreciate it\u0027s not nearly as straightforward as the workaround you\u0027ve proposed here. However, we don\u0027t want to lose the context now we\u0027ve got it.\n\nCould you please add a comment here referencing the original bug explaining that:\n\n  1. All callers of _get_usage_dict need to pass an instance\n  2. This code *must* take account of BDMs, and cannot assume that the flavor values are the values actually in use.","commit_id":"8011ddc3086d2fc6bf32ecc81d9d39cb4080e47f"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ebdd4597bb677c3a7dda0f26b0ddf9f72545100b","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"        # the block device mappings. As the block device mappings"},{"line_number":1056,"context_line":"        # requires an instance for context, all callers to this method"},{"line_number":1057,"context_line":"        # that are calculating usage will need to pass the instance,"},{"line_number":1058,"context_line":"        # and not the flavor."},{"line_number":1059,"context_line":"        if isinstance(object_or_dict, objects.Instance):"},{"line_number":1060,"context_line":"            usage \u003d {\u0027memory_mb\u0027: object_or_dict.flavor.memory_mb,"},{"line_number":1061,"context_line":"                     \u0027vcpus\u0027: object_or_dict.flavor.vcpus,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba2be162_734f9992","line":1058,"updated":"2017-03-01 15:27:30.000000000","message":"Nice.","commit_id":"0a0564fd6fe14a58e42de596c03832ea8cb08f4f"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"90f2eed960cdfa72d3983caf12102dd7a656b211","unresolved":false,"context_lines":[{"line_number":870,"context_line":"        if itype:"},{"line_number":871,"context_line":"            cn \u003d self.compute_nodes[nodename]"},{"line_number":872,"context_line":"            usage \u003d self._get_usage_dict("},{"line_number":873,"context_line":"                        instance, context, numa_topology\u003dnuma_topology)"},{"line_number":874,"context_line":"            if self.pci_tracker and sign:"},{"line_number":875,"context_line":"                self.pci_tracker.update_pci_for_instance("},{"line_number":876,"context_line":"                    context, instance, sign\u003dsign)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dfeb2761_d3ceef2b","line":873,"updated":"2017-04-04 16:25:04.000000000","message":"Hmm. This use case is a bit more complex because it needs to account for resize. I think we need to either promote the resize logic somewhere and stash it, or at least refactor the resize logic so we can also call it from here.\n\nThe resize logic in this case being which existing disks we\u0027re going to resize if the target flavor has a bigger disk than the source flavor. This is its own can of worms, btw.","commit_id":"b9a96f0819ce2c5a30ee6211324492f3dff89d6f"},{"author":{"_account_id":25089,"name":"MarkMielke","email":"mark.mielke@gmail.com","username":"MarkMielke"},"change_message_id":"469d6eef960de3e7e0184fbba0323472278c45b1","unresolved":false,"context_lines":[{"line_number":870,"context_line":"        if itype:"},{"line_number":871,"context_line":"            cn \u003d self.compute_nodes[nodename]"},{"line_number":872,"context_line":"            usage \u003d self._get_usage_dict("},{"line_number":873,"context_line":"                        instance, context, numa_topology\u003dnuma_topology)"},{"line_number":874,"context_line":"            if self.pci_tracker and sign:"},{"line_number":875,"context_line":"                self.pci_tracker.update_pci_for_instance("},{"line_number":876,"context_line":"                    context, instance, sign\u003dsign)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bff0334d_9c03e473","line":873,"in_reply_to":"dfeb2761_d3ceef2b","updated":"2017-04-08 08:11:31.000000000","message":"Yep, agree. I noticed this the first time around but failed to notice it this time.\n\nIn the next update, I believe I have made it at least as good as it was before my change, however, there are many edge cases that the previous code missed. I will describe this in another comment.","commit_id":"b9a96f0819ce2c5a30ee6211324492f3dff89d6f"}],"nova/scheduler/filters/disk_filter.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"05e4afd119d8fb3ac8dd2a7b525d4087e17ab581","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        # Do not allow an instance to overcommit against itself, only against"},{"line_number":44,"context_line":"        # other instances.  In other words, if there isn\u0027t room for even just"},{"line_number":45,"context_line":"        # this one instance in total_usable_disk space, consider the host full."},{"line_number":46,"context_line":"        if requested_disk \u003e 0 and total_usable_disk_mb \u003c requested_disk:"},{"line_number":47,"context_line":"            LOG.debug(\"%(host_state)s does not have %(requested_disk)s \""},{"line_number":48,"context_line":"                      \"MB usable disk space before overcommit, it only \""},{"line_number":49,"context_line":"                      \"has %(physical_disk_size)s MB.\","}],"source_content_type":"text/x-python","patch_set":4,"id":"fa31d9ce_f2156a9b","line":46,"updated":"2017-02-16 16:16:20.000000000","message":"I don\u0027t like this, because I don\u0027t think it solves the problem. It allows us to boot without examining total_usable_disk when we\u0027re not using any ephemeral disk. However, if total_usable_disk is less than zero that\u0027s a problem. We\u0027re just selectively sweeping the problem under the rug for a single edge case.\n\nThe issue here is that total_usable_disk is less than zero. Lets try to work out how it got that way, and fix that instead. This means we don\u0027t have to add an additional edge case test here, and also it means we can schedule instances which do use ephemeral disk which are currently blocked erroneously by the same invalid total_usable_disk.","commit_id":"36bb8526d21421e1281bd6016a85048f4a4209b2"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"21aaf7646de0e33e9315ff4245acc58f8f743941","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                      \" usable disk. Using 0 MB usable disk instead.\","},{"line_number":69,"context_line":"                      {\u0027host_state\u0027: host_state,"},{"line_number":70,"context_line":"                       \u0027usable_disk_mb\u0027: usable_disk_mb})"},{"line_number":71,"context_line":"            usable_disk_mb \u003d 0"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        if not usable_disk_mb \u003e\u003d requested_disk:"},{"line_number":74,"context_line":"            LOG.debug(\"%(host_state)s does not have %(requested_disk)s MB \""}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_8d434aae","line":71,"updated":"2017-02-27 11:28:15.000000000","message":"This doesn\u0027t fix the underlying issue either, but I like this much better because it doesn\u0027t special case anything, and it makes it explicit and obvious that we\u0027re working around buggy data. This is a more reasonable and comprehensible \u0027handle obviously wrong data\u0027.\n\nCould you please reference the bug in the comment so when the underlying issue is fixed a future maintainer can confidently remove this?","commit_id":"8011ddc3086d2fc6bf32ecc81d9d39cb4080e47f"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ebdd4597bb677c3a7dda0f26b0ddf9f72545100b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        if usable_disk_mb \u003c 0:"},{"line_number":64,"context_line":"            # The usable_disk_mb should never be less than zero."},{"line_number":65,"context_line":"            # Log the issue and gracefully handle the situation by"},{"line_number":66,"context_line":"            # presuming that usable_disk_mb is zero."},{"line_number":67,"context_line":"            LOG.warning(\"%(host_state)s suggests %(usable_disk_mb)s MB \""},{"line_number":68,"context_line":"                        \" usable disk. Using 0 MB usable disk instead.\","},{"line_number":69,"context_line":"                        {\u0027host_state\u0027: host_state,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba2be162_56ffe300","line":66,"updated":"2017-03-01 15:27:30.000000000","message":"As you\u0027re going to have to touch this again anyway, could you please add something along the lines of:\n\n# This workaround can be removed when bug X is fixed.","commit_id":"0a0564fd6fe14a58e42de596c03832ea8cb08f4f"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ebdd4597bb677c3a7dda0f26b0ddf9f72545100b","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            # The usable_disk_mb should never be less than zero."},{"line_number":65,"context_line":"            # Log the issue and gracefully handle the situation by"},{"line_number":66,"context_line":"            # presuming that usable_disk_mb is zero."},{"line_number":67,"context_line":"            LOG.warning(\"%(host_state)s suggests %(usable_disk_mb)s MB \""},{"line_number":68,"context_line":"                        \" usable disk. Using 0 MB usable disk instead.\","},{"line_number":69,"context_line":"                        {\u0027host_state\u0027: host_state,"},{"line_number":70,"context_line":"                         \u0027usable_disk_mb\u0027: usable_disk_mb})"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba2be162_730a39d4","line":67,"updated":"2017-03-01 15:27:30.000000000","message":"_LW() needed: see pep8 failure.","commit_id":"0a0564fd6fe14a58e42de596c03832ea8cb08f4f"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":25089,"name":"MarkMielke","email":"mark.mielke@gmail.com","username":"MarkMielke"},"change_message_id":"066ecc954e7a73cfd03d4a5f0573f3bf16fa26f5","unresolved":false,"context_lines":[{"line_number":2228,"context_line":"                                            _NODENAME)"},{"line_number":2229,"context_line":""},{"line_number":2230,"context_line":"        mock_update_usage.assert_called_once_with("},{"line_number":2231,"context_line":"            self.rt._get_usage_dict(self.instance, context), _NODENAME, sign\u003d1)"},{"line_number":2232,"context_line":""},{"line_number":2233,"context_line":"    @mock.patch(\u0027nova.compute.resource_tracker.ResourceTracker.\u0027"},{"line_number":2234,"context_line":"                \u0027_update_usage\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dfeb2761_40b9f12b","line":2231,"updated":"2017-04-04 10:14:51.000000000","message":"I could use some advice on how to best set up these unit tests. as _get_usage_dict() now calls the BlockDeviceMappings code, it is now more difficult to set up mock tests.","commit_id":"b9a96f0819ce2c5a30ee6211324492f3dff89d6f"}],"nova/tests/unit/scheduler/filters/test_disk_filters.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2e5c9bfaf9a1fbd9b59655f47cb140d649e41a9a","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        spec_obj \u003d objects.RequestSpec("},{"line_number":72,"context_line":"            flavor\u003dobjects.Flavor("},{"line_number":73,"context_line":"                root_gb\u003d0, ephemeral_gb\u003d0, swap\u003d0))"},{"line_number":74,"context_line":"        # If free_disk_mb is negative, but the flavor does not require"},{"line_number":75,"context_line":"        # any ephemeral disk storage, schedule should succeed."},{"line_number":76,"context_line":"        # This should not happen, but if it does, the DiskFilter should"},{"line_number":77,"context_line":"        # gracefully handle this situation. One known case where this"},{"line_number":78,"context_line":"        # has occurred is instances of a flavor that permits ephemeral"},{"line_number":79,"context_line":"        # storage, where the instances used volume storage instead."},{"line_number":80,"context_line":"        # The theoretical sum of all ephemeral storage from a flavor"},{"line_number":81,"context_line":"        # perspective could significantly exceed the actual usable"},{"line_number":82,"context_line":"        # disk, leading to a negative free_disk_mb."},{"line_number":83,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027,"},{"line_number":84,"context_line":"                {\u0027free_disk_mb\u0027: -1 * 1024, \u0027total_usable_disk_gb\u0027: 10,"},{"line_number":85,"context_line":"                 \u0027disk_allocation_ratio\u0027: 1.0})"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa31d9ce_db2fac3c","line":82,"range":{"start_line":74,"start_character":2,"end_line":82,"end_character":51},"updated":"2017-02-16 13:37:16.000000000","message":"Can you move this into the commit message, it\u0027s a useful context to anyone reviewing this fix.","commit_id":"36bb8526d21421e1281bd6016a85048f4a4209b2"}]}
