)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"f0e800ae5d3cbac287ef73b5015e39d5d2f85be4","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    libvirt: not setting membacking when mempages are empty host topology"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"The problem arising from this is that the hosts are still reporting"},{"line_number":26,"context_line":"to the schedular that they can support NUMA and huge pages if"},{"line_number":27,"context_line":"libvirt \u003e\u003d 1.0.4, but we are silently discarding the guest config"},{"line_number":28,"context_line":"if libvirt \u003c 1.2.7 (numa) or 1.2.8 (huge pages)."},{"line_number":29,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa963961_a50d6839","line":26,"updated":"2015-03-27 16:51:01.000000000","message":"typo: schedular -\u003e scheduler","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2cb0694ac46a76ac724291dcb6fa592d0cb9f98f","unresolved":false,"context_lines":[{"line_number":42,"context_line":"In summary, we are moving the version checks added by the two"},{"line_number":43,"context_line":"commits above to the point at which host capability reporting"},{"line_number":44,"context_line":"is done. We add a fatal error check in the guest XML config"},{"line_number":45,"context_line":"generator methods, so that if there is some future schedular"},{"line_number":46,"context_line":"bug causing it to not honour host capabilities, we see a"},{"line_number":47,"context_line":"clear error instead of silently starting guests with the"},{"line_number":48,"context_line":"wrong config."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"baa041b7_2ad1ce57","line":45,"updated":"2015-04-03 15:46:59.000000000","message":"s/schedular/scheduler/","commit_id":"945ab28df04e22f3c1b8948972f538ee6b5e7410"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"622b06a755e8565f66aa1447538d238d085be8ca","unresolved":false,"context_lines":[{"line_number":1379,"context_line":"    def test_get_guest_config_numa_old_version(self):"},{"line_number":1380,"context_line":"        self.flags(virt_type\u003d\u0027kvm\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"        def fake_version(ver):"},{"line_number":1383,"context_line":"            gotver \u003d utils.convert_version_to_int("},{"line_number":1384,"context_line":"                libvirt_driver.MIN_LIBVIRT_NUMA_VERSION"},{"line_number":1385,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6ced46_5b7790d4","line":1382,"updated":"2015-03-24 00:02:10.000000000","message":"This seems kind of convoluted.  Would it make more sense to stub out Host.get_connection() and have conn.getLibVersion() report MIN_LIBVIRT_VERSION?  Same thing applies to other tests below.","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"f0e800ae5d3cbac287ef73b5015e39d5d2f85be4","unresolved":false,"context_lines":[{"line_number":1379,"context_line":"    def test_get_guest_config_numa_old_version(self):"},{"line_number":1380,"context_line":"        self.flags(virt_type\u003d\u0027kvm\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"        def fake_version(ver):"},{"line_number":1383,"context_line":"            gotver \u003d utils.convert_version_to_int("},{"line_number":1384,"context_line":"                libvirt_driver.MIN_LIBVIRT_NUMA_VERSION"},{"line_number":1385,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa963961_7b5c7125","line":1382,"in_reply_to":"1a6ced46_5b7790d4","updated":"2015-03-27 16:51:01.000000000","message":"Agree. The existing tests are difficult to follow at first glance.","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"622b06a755e8565f66aa1447538d238d085be8ca","unresolved":false,"context_lines":[{"line_number":8803,"context_line":""},{"line_number":8804,"context_line":"    @mock.patch.object(host.Host, \u0027has_min_version\u0027)"},{"line_number":8805,"context_line":"    def test_get_host_numa_topology(self, mock_version):"},{"line_number":8806,"context_line":"        self._test_get_host_numa_topology(mempages\u003dTrue)"},{"line_number":8807,"context_line":""},{"line_number":8808,"context_line":"        def fake_version(ver):"},{"line_number":8809,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6ced46_763e23ba","line":8806,"updated":"2015-03-24 00:02:10.000000000","message":"is line 8806 supposed to be here?  Seems like it\u0027s duplicated at line 8812.","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"7c2d2c4fcea17e3d73558e8385a82a2c0ff1f2b9","unresolved":false,"context_lines":[{"line_number":8803,"context_line":""},{"line_number":8804,"context_line":"    @mock.patch.object(host.Host, \u0027has_min_version\u0027)"},{"line_number":8805,"context_line":"    def test_get_host_numa_topology(self, mock_version):"},{"line_number":8806,"context_line":"        self._test_get_host_numa_topology(mempages\u003dTrue)"},{"line_number":8807,"context_line":""},{"line_number":8808,"context_line":"        def fake_version(ver):"},{"line_number":8809,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa963961_4d5d81e8","line":8806,"in_reply_to":"1a6ced46_763e23ba","updated":"2015-03-27 09:38:25.000000000","message":"Done","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2cb0694ac46a76ac724291dcb6fa592d0cb9f98f","unresolved":false,"context_lines":[{"line_number":8812,"context_line":"            return True"},{"line_number":8813,"context_line":""},{"line_number":8814,"context_line":"        mock_version.side_effect \u003d fake_version"},{"line_number":8815,"context_line":"        self._test_get_host_numa_topology(mempages\u003dTrue)"},{"line_number":8816,"context_line":""},{"line_number":8817,"context_line":"    @mock.patch.object(fakelibvirt.Connection, \u0027getLibVersion\u0027)"},{"line_number":8818,"context_line":"    def test_get_host_numa_topology_no_mempages(self, mock_version):"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_2a7aeef1","line":8815,"updated":"2015-04-03 15:46:59.000000000","message":"A little more concise:\n\n @mock.patch.object(host.Host, \u0027has_min_version\u0027, return_value\u003dTrue)\n def test_get_host_numa_topoloy(self, mock_version):\n     self._test_get_host_numa_topology(mempages\u003dTrue)","commit_id":"945ab28df04e22f3c1b8948972f538ee6b5e7410"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cac8683488bbda18e31b4bb329a0549a69dbc797","unresolved":false,"context_lines":[{"line_number":3800,"context_line":""},{"line_number":3801,"context_line":"    def _get_guest_memory_backing_config(self, inst_topology, numatune):"},{"line_number":3802,"context_line":"        wantsmempages \u003d False"},{"line_number":3803,"context_line":"        if inst_topology:"},{"line_number":3804,"context_line":"            for cell in inst_topology.cells:"},{"line_number":3805,"context_line":"                if cell.pagesize:"},{"line_number":3806,"context_line":"                    wantsmempages \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_e342db3c","line":3803,"updated":"2015-02-25 13:50:02.000000000","message":"if not any([cell.pagesize for cell in inst_topology.cells]):\n    # No custom memory page size requested.\n    return","commit_id":"639fec3f54a06da84f4d89ad36217d0951823251"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cac8683488bbda18e31b4bb329a0549a69dbc797","unresolved":false,"context_lines":[{"line_number":3808,"context_line":"        if not wantsmempages:"},{"line_number":3809,"context_line":"            return"},{"line_number":3810,"context_line":""},{"line_number":3811,"context_line":"        if not self._has_hugepage_support():"},{"line_number":3812,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3813,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3814,"context_line":"            # in the first place. Just in case of a schedular"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_83067f1b","line":3811,"updated":"2015-02-25 13:50:02.000000000","message":"We can do this check in the beginning to quit early.","commit_id":"639fec3f54a06da84f4d89ad36217d0951823251"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"4d356dc3c2f59356db05a50de8bb199dd789ee52","unresolved":false,"context_lines":[{"line_number":3808,"context_line":"        if not wantsmempages:"},{"line_number":3809,"context_line":"            return"},{"line_number":3810,"context_line":""},{"line_number":3811,"context_line":"        if not self._has_hugepage_support():"},{"line_number":3812,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3813,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3814,"context_line":"            # in the first place. Just in case of a schedular"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_c63ec5d9","line":3811,"in_reply_to":"ba7be1f8_6660b9a5","updated":"2015-02-25 14:09:21.000000000","message":"Right, sorry.","commit_id":"639fec3f54a06da84f4d89ad36217d0951823251"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"119e5f495155718f70f1190a6994a06961a22494","unresolved":false,"context_lines":[{"line_number":3808,"context_line":"        if not wantsmempages:"},{"line_number":3809,"context_line":"            return"},{"line_number":3810,"context_line":""},{"line_number":3811,"context_line":"        if not self._has_hugepage_support():"},{"line_number":3812,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3813,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3814,"context_line":"            # in the first place. Just in case of a schedular"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_6660b9a5","line":3811,"in_reply_to":"ba7be1f8_83067f1b","updated":"2015-02-25 14:01:19.000000000","message":"No, we can\u0027t - we must only do this check if the guest config actually has cell.pagesize being non-None, otherwise we\u0027d raise an error for all guests instead of just those requesting hugepages. So this is the earliest point at which we can check","commit_id":"639fec3f54a06da84f4d89ad36217d0951823251"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cac8683488bbda18e31b4bb329a0549a69dbc797","unresolved":false,"context_lines":[{"line_number":3837,"context_line":"                        pages.append(page)"},{"line_number":3838,"context_line":"                        break  # Quit early..."},{"line_number":3839,"context_line":""},{"line_number":3840,"context_line":"        membacking \u003d vconfig.LibvirtConfigGuestMemoryBacking()"},{"line_number":3841,"context_line":"        membacking.hugepages \u003d pages"},{"line_number":3842,"context_line":""},{"line_number":3843,"context_line":"        return membacking"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_03e60f15","line":3840,"updated":"2015-02-25 13:50:02.000000000","message":"Instead of the block line 3802 you could do a check here:\n\n  if pages:\n    # Custom pages size has been requested by instance.\n    membacking \u003d vconfig.LibvirtConfigGuestMemoryBacking()\n    membacking.hugepages \u003d pages","commit_id":"639fec3f54a06da84f4d89ad36217d0951823251"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"119e5f495155718f70f1190a6994a06961a22494","unresolved":false,"context_lines":[{"line_number":3837,"context_line":"                        pages.append(page)"},{"line_number":3838,"context_line":"                        break  # Quit early..."},{"line_number":3839,"context_line":""},{"line_number":3840,"context_line":"        membacking \u003d vconfig.LibvirtConfigGuestMemoryBacking()"},{"line_number":3841,"context_line":"        membacking.hugepages \u003d pages"},{"line_number":3842,"context_line":""},{"line_number":3843,"context_line":"        return membacking"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_c6124508","line":3840,"in_reply_to":"ba7be1f8_03e60f15","updated":"2015-02-25 14:01:19.000000000","message":"I think it is clearer to check for huge page support  upfront, rather than running all the code and then throwing away the result.","commit_id":"639fec3f54a06da84f4d89ad36217d0951823251"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cac8683488bbda18e31b4bb329a0549a69dbc797","unresolved":false,"context_lines":[{"line_number":4795,"context_line":"            siblings \u003d [sib for sib in siblings if len(sib) \u003e 1]"},{"line_number":4796,"context_line":""},{"line_number":4797,"context_line":"            mempages \u003d []"},{"line_number":4798,"context_line":"            if wantmempages:"},{"line_number":4799,"context_line":"                mempages \u003d ["},{"line_number":4800,"context_line":"                    objects.NUMAPagesTopology("},{"line_number":4801,"context_line":"                        size_kb\u003dpages.size,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_105d7347","line":4798,"updated":"2015-02-25 13:50:02.000000000","message":"s/if wantmempages:/if self._has_hugepage_support():","commit_id":"639fec3f54a06da84f4d89ad36217d0951823251"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"119e5f495155718f70f1190a6994a06961a22494","unresolved":false,"context_lines":[{"line_number":4795,"context_line":"            siblings \u003d [sib for sib in siblings if len(sib) \u003e 1]"},{"line_number":4796,"context_line":""},{"line_number":4797,"context_line":"            mempages \u003d []"},{"line_number":4798,"context_line":"            if wantmempages:"},{"line_number":4799,"context_line":"                mempages \u003d ["},{"line_number":4800,"context_line":"                    objects.NUMAPagesTopology("},{"line_number":4801,"context_line":"                        size_kb\u003dpages.size,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_2618811d","line":4798,"in_reply_to":"ba7be1f8_105d7347","updated":"2015-02-25 14:01:19.000000000","message":"I used a variable because this check runs inside the body of the loop and I don\u0027t want to be querying the libvirt version on every iteration of the loop.","commit_id":"639fec3f54a06da84f4d89ad36217d0951823251"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"4d356dc3c2f59356db05a50de8bb199dd789ee52","unresolved":false,"context_lines":[{"line_number":4795,"context_line":"            siblings \u003d [sib for sib in siblings if len(sib) \u003e 1]"},{"line_number":4796,"context_line":""},{"line_number":4797,"context_line":"            mempages \u003d []"},{"line_number":4798,"context_line":"            if wantmempages:"},{"line_number":4799,"context_line":"                mempages \u003d ["},{"line_number":4800,"context_line":"                    objects.NUMAPagesTopology("},{"line_number":4801,"context_line":"                        size_kb\u003dpages.size,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_661a797e","line":4798,"in_reply_to":"ba7be1f8_2618811d","updated":"2015-02-25 14:09:21.000000000","message":"Makes senses, the diff mask me the loop.","commit_id":"639fec3f54a06da84f4d89ad36217d0951823251"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e8b9bc4af439017204cbee12526a9cc3ce5d4b5e","unresolved":false,"context_lines":[{"line_number":3543,"context_line":"                return GuestNumaConfig(allowed_cpus, None,"},{"line_number":3544,"context_line":"                                       guest_cpu_numa_config, None)"},{"line_number":3545,"context_line":""},{"line_number":3546,"context_line":"    def _get_guest_numa_tune_memnodes(self, guest_cpu_numa_config,"},{"line_number":3547,"context_line":"                                      numa_memnodes):"},{"line_number":3548,"context_line":"        if not self._host.has_min_version(MIN_LIBVIRT_MEMNODE_VERSION):"},{"line_number":3549,"context_line":"            return []"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_97568004","side":"PARENT","line":3546,"updated":"2015-02-26 14:51:40.000000000","message":"Would it maybe be better to revert this change first for stable branches sake (not sure that it matter really)","commit_id":"7d37e47df378b49e606078d591b9ed6e7240a0d2"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"cd304dd8235728ac262f5e8a64022427eb5c2b7f","unresolved":false,"context_lines":[{"line_number":3543,"context_line":"                return GuestNumaConfig(allowed_cpus, None,"},{"line_number":3544,"context_line":"                                       guest_cpu_numa_config, None)"},{"line_number":3545,"context_line":""},{"line_number":3546,"context_line":"    def _get_guest_numa_tune_memnodes(self, guest_cpu_numa_config,"},{"line_number":3547,"context_line":"                                      numa_memnodes):"},{"line_number":3548,"context_line":"        if not self._host.has_min_version(MIN_LIBVIRT_MEMNODE_VERSION):"},{"line_number":3549,"context_line":"            return []"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_979e8005","side":"PARENT","line":3546,"in_reply_to":"ba7be1f8_97568004","updated":"2015-02-26 15:00:53.000000000","message":"Regardless, we\u0027re going to have conflicts on the stable branch to resolve manually, because stable only has NUMA but no hugepages. So its not really worth going through pain of an extra review imho","commit_id":"7d37e47df378b49e606078d591b9ed6e7240a0d2"},{"author":{"_account_id":12909,"name":"Mark Wu","email":"wudx05@gmail.com","username":"markw"},"change_message_id":"6bab2b56338fe5552bf20422ba74b0548b5c01ec","unresolved":false,"context_lines":[{"line_number":363,"context_line":"# While earlier versions could support NUMA reporting and"},{"line_number":364,"context_line":"# NUMA placement, not until 1.2.7 was there the ability"},{"line_number":365,"context_line":"# to pin guest nodes to host nodes, so mandate that. Without"},{"line_number":366,"context_line":"# this the schedular cannot make guaranteed decisions, as the"},{"line_number":367,"context_line":"# guest placement may not match what was requested"},{"line_number":368,"context_line":"MIN_LIBVIRT_NUMA_VERSION \u003d (1, 2, 7)"},{"line_number":369,"context_line":"# While earlier versions could support hugepage backed"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_5d9a4dc6","line":366,"updated":"2015-02-27 03:36:22.000000000","message":"s/schedular/scheduler/    ?","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":12909,"name":"Mark Wu","email":"wudx05@gmail.com","username":"markw"},"change_message_id":"6bab2b56338fe5552bf20422ba74b0548b5c01ec","unresolved":false,"context_lines":[{"line_number":368,"context_line":"MIN_LIBVIRT_NUMA_VERSION \u003d (1, 2, 7)"},{"line_number":369,"context_line":"# While earlier versions could support hugepage backed"},{"line_number":370,"context_line":"# guests, not until 1.2.8 was there the ability to request"},{"line_number":371,"context_line":"# a particular huge page size. Without this the schedler"},{"line_number":372,"context_line":"# cannot make guaranteed decisions, as the huge page size"},{"line_number":373,"context_line":"# used by the guest may not match what was requested"},{"line_number":374,"context_line":"MIN_LIBVIRT_HUGEPAGE_VERSION \u003d (1, 2, 8)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_fdaa21d1","line":371,"updated":"2015-02-27 03:36:22.000000000","message":"s/schedler/scheduler/","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e8b9bc4af439017204cbee12526a9cc3ce5d4b5e","unresolved":false,"context_lines":[{"line_number":3445,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3446,"context_line":"            # in the first place. Just in case of a schedular"},{"line_number":3447,"context_line":"            # mess up though, raise an exception"},{"line_number":3448,"context_line":"            raise exception.NUMATopologyUnsupported()"},{"line_number":3449,"context_line":""},{"line_number":3450,"context_line":"        topology \u003d self._get_host_numa_topology()"},{"line_number":3451,"context_line":"        # We have instance NUMA so translate it to the config class"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_772cac99","line":3448,"updated":"2015-02-26 14:51:40.000000000","message":"hmm - so this seems a bit wrong to me. Or at least with the way the filter works now. The filter will pass a host that does not report any NUMA always.\n\nThis will not work well with this change above.\n\nThere are 2 distinct cases here - the libvirt is not new enough for these features to work, and there is no NUMA topology, but we want to be able to have NUMA enabled guests anyway (we may not care about this case, and may want to replace it with \"pack a multi-cell guest into a host cell if possible\" flag) in which case None means what it does in this patch and that is avoid.\n\nBut this requires the filter to change.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"4d575c92e1680038ef26a8fe7d4e39b0e783c829","unresolved":false,"context_lines":[{"line_number":3445,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3446,"context_line":"            # in the first place. Just in case of a schedular"},{"line_number":3447,"context_line":"            # mess up though, raise an exception"},{"line_number":3448,"context_line":"            raise exception.NUMATopologyUnsupported()"},{"line_number":3449,"context_line":""},{"line_number":3450,"context_line":"        topology \u003d self._get_host_numa_topology()"},{"line_number":3451,"context_line":"        # We have instance NUMA so translate it to the config class"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_47226c02","line":3448,"in_reply_to":"ba7be1f8_57b968ca","updated":"2015-02-27 11:43:54.000000000","message":"Hmmm so it does... I was almost certain it would pass a host with no info.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"cd304dd8235728ac262f5e8a64022427eb5c2b7f","unresolved":false,"context_lines":[{"line_number":3445,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3446,"context_line":"            # in the first place. Just in case of a schedular"},{"line_number":3447,"context_line":"            # mess up though, raise an exception"},{"line_number":3448,"context_line":"            raise exception.NUMATopologyUnsupported()"},{"line_number":3449,"context_line":""},{"line_number":3450,"context_line":"        topology \u003d self._get_host_numa_topology()"},{"line_number":3451,"context_line":"        # We have instance NUMA so translate it to the config class"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_57b968ca","line":3448,"in_reply_to":"ba7be1f8_772cac99","updated":"2015-02-26 15:00:53.000000000","message":"I\u0027ve tested this by launching a guest with does not request NUMA topology (ie no hw:numa_nodes setting in the flavour), and the guest successfully boots. Likewise if the flavour does request NUMA topology, then scheduler correctly ignores the host so this error path doesn\u0027t get hit (which is good as we only want this hit if someone screws up the scheduler logic and places a NUMA guest on a host which can\u0027t support NUMA).","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":12909,"name":"Mark Wu","email":"wudx05@gmail.com","username":"markw"},"change_message_id":"6bab2b56338fe5552bf20422ba74b0548b5c01ec","unresolved":false,"context_lines":[{"line_number":3789,"context_line":""},{"line_number":3790,"context_line":"    def _get_guest_memory_backing_config(self, inst_topology, numatune):"},{"line_number":3791,"context_line":"        wantsmempages \u003d False"},{"line_number":3792,"context_line":"        if inst_topology:"},{"line_number":3793,"context_line":"            for cell in inst_topology.cells:"},{"line_number":3794,"context_line":"                if cell.pagesize:"},{"line_number":3795,"context_line":"                    wantsmempages \u003d True"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_9dc925af","line":3792,"updated":"2015-02-27 03:36:22.000000000","message":"Does \u0027wantsmempages\u0027 comply with the naming convention of nova? Should it be wants_mempages?  I am not sure.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"4d575c92e1680038ef26a8fe7d4e39b0e783c829","unresolved":false,"context_lines":[{"line_number":3789,"context_line":""},{"line_number":3790,"context_line":"    def _get_guest_memory_backing_config(self, inst_topology, numatune):"},{"line_number":3791,"context_line":"        wantsmempages \u003d False"},{"line_number":3792,"context_line":"        if inst_topology:"},{"line_number":3793,"context_line":"            for cell in inst_topology.cells:"},{"line_number":3794,"context_line":"                if cell.pagesize:"},{"line_number":3795,"context_line":"                    wantsmempages \u003d True"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_4a0fd32e","line":3792,"in_reply_to":"ba7be1f8_9dc925af","updated":"2015-02-27 11:43:54.000000000","message":"There is no naming convention that would dictate such a thing.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":12909,"name":"Mark Wu","email":"wudx05@gmail.com","username":"markw"},"change_message_id":"6bab2b56338fe5552bf20422ba74b0548b5c01ec","unresolved":false,"context_lines":[{"line_number":3800,"context_line":"        if not self._has_hugepage_support():"},{"line_number":3801,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3802,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3803,"context_line":"            # in the first place. Just in case of a schedular"},{"line_number":3804,"context_line":"            # mess up though, raise an exception"},{"line_number":3805,"context_line":"            raise exception.MemoryPagesUnsupported()"},{"line_number":3806,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_5d816d4c","line":3803,"updated":"2015-02-27 03:36:22.000000000","message":"s/schedular/scheduler","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":12909,"name":"Mark Wu","email":"wudx05@gmail.com","username":"markw"},"change_message_id":"6bab2b56338fe5552bf20422ba74b0548b5c01ec","unresolved":false,"context_lines":[{"line_number":3827,"context_line":"                        break  # Quit early..."},{"line_number":3828,"context_line":""},{"line_number":3829,"context_line":"        membacking \u003d vconfig.LibvirtConfigGuestMemoryBacking()"},{"line_number":3830,"context_line":"        membacking.hugepages \u003d pages"},{"line_number":3831,"context_line":""},{"line_number":3832,"context_line":"        return membacking"},{"line_number":3833,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_3da9197c","line":3830,"updated":"2015-02-27 03:36:22.000000000","message":"This change removes the checking of \u0027pages\u0027,  it will cause an empty membacking when the specified page size in flavor is any or small. I am not sure if it\u0027s a valid input for libvirt. But at least it\u0027s not clear from the POV of code.  Actually,  I would like to suggest to make the check in line 3793 stricter: only construct LibvirtConfigGuestMemoryBacking when it really requests hugepage (ie the pagesize is larger than normal system page)  With this change, we don\u0027t need the libvirt fix in https://bugzilla.redhat.com/show_bug.cgi?id\u003d1173507.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"4d575c92e1680038ef26a8fe7d4e39b0e783c829","unresolved":false,"context_lines":[{"line_number":3827,"context_line":"                        break  # Quit early..."},{"line_number":3828,"context_line":""},{"line_number":3829,"context_line":"        membacking \u003d vconfig.LibvirtConfigGuestMemoryBacking()"},{"line_number":3830,"context_line":"        membacking.hugepages \u003d pages"},{"line_number":3831,"context_line":""},{"line_number":3832,"context_line":"        return membacking"},{"line_number":3833,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_ca0903df","line":3830,"in_reply_to":"ba7be1f8_3da9197c","updated":"2015-02-27 11:43:54.000000000","message":"This is correct - we should not remove the if pages check here. Nice catch.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3571a03779a3b2a3e92ab3fdc8df9ad60ed512b0","unresolved":false,"context_lines":[{"line_number":3827,"context_line":"                        break  # Quit early..."},{"line_number":3828,"context_line":""},{"line_number":3829,"context_line":"        membacking \u003d vconfig.LibvirtConfigGuestMemoryBacking()"},{"line_number":3830,"context_line":"        membacking.hugepages \u003d pages"},{"line_number":3831,"context_line":""},{"line_number":3832,"context_line":"        return membacking"},{"line_number":3833,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_b89425e9","line":3830,"in_reply_to":"ba7be1f8_3da9197c","updated":"2015-02-27 12:49:34.000000000","message":"This is not related to the bug BZ 1173507, it\u0027s a different case.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":12909,"name":"Mark Wu","email":"wudx05@gmail.com","username":"markw"},"change_message_id":"6bab2b56338fe5552bf20422ba74b0548b5c01ec","unresolved":false,"context_lines":[{"line_number":4754,"context_line":"        if not self._has_numa_support():"},{"line_number":4755,"context_line":"            return"},{"line_number":4756,"context_line":""},{"line_number":4757,"context_line":"        wantmempages \u003d self._has_hugepage_support()"},{"line_number":4758,"context_line":""},{"line_number":4759,"context_line":"        caps \u003d self._host.get_capabilities()"},{"line_number":4760,"context_line":"        topology \u003d caps.host.topology"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_9d5765ca","line":4757,"updated":"2015-02-27 03:36:22.000000000","message":"I don\u0027t think the var name wantmempages is a little bit misleading because it\u0027s in the context of capabilities reporting rather than  requirements of request.  Maybe has_mempages makes more sense.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"4d575c92e1680038ef26a8fe7d4e39b0e783c829","unresolved":false,"context_lines":[{"line_number":4754,"context_line":"        if not self._has_numa_support():"},{"line_number":4755,"context_line":"            return"},{"line_number":4756,"context_line":""},{"line_number":4757,"context_line":"        wantmempages \u003d self._has_hugepage_support()"},{"line_number":4758,"context_line":""},{"line_number":4759,"context_line":"        caps \u003d self._host.get_capabilities()"},{"line_number":4760,"context_line":"        topology \u003d caps.host.topology"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_ea25e75c","line":4757,"in_reply_to":"ba7be1f8_9d5765ca","updated":"2015-02-27 11:43:54.000000000","message":"Also agreed.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"9cdb8d002f538a14785a668cf60a4af350199627","unresolved":false,"context_lines":[{"line_number":4754,"context_line":"        if not self._has_numa_support():"},{"line_number":4755,"context_line":"            return"},{"line_number":4756,"context_line":""},{"line_number":4757,"context_line":"        wantmempages \u003d self._has_hugepage_support()"},{"line_number":4758,"context_line":""},{"line_number":4759,"context_line":"        caps \u003d self._host.get_capabilities()"},{"line_number":4760,"context_line":"        topology \u003d caps.host.topology"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_ca2f43f5","line":4757,"in_reply_to":"ba7be1f8_9d5765ca","updated":"2015-02-27 11:50:33.000000000","message":"I disagree actually. The host may well have memory page support, this is about deciding if we can use that support. So \u0027want\u0027 better expresses the intention than \u0027has\u0027 really.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":12909,"name":"Mark Wu","email":"wudx05@gmail.com","username":"markw"},"change_message_id":"aada730a9ad9f300edc091bce02bc0d945d017b2","unresolved":false,"context_lines":[{"line_number":4754,"context_line":"        if not self._has_numa_support():"},{"line_number":4755,"context_line":"            return"},{"line_number":4756,"context_line":""},{"line_number":4757,"context_line":"        wantmempages \u003d self._has_hugepage_support()"},{"line_number":4758,"context_line":""},{"line_number":4759,"context_line":"        caps \u003d self._host.get_capabilities()"},{"line_number":4760,"context_line":"        topology \u003d caps.host.topology"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_187291e5","line":4757,"in_reply_to":"ba7be1f8_ca2f43f5","updated":"2015-02-27 12:49:26.000000000","message":"Personally,  I still think \u0027has\u0027 is more suitable. As the function name conveys,  the result is whether the host can provide the support of hugepage in fact rather than if you want to use it.  Please re-consider it if you have anything else to re-spin.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e8b9bc4af439017204cbee12526a9cc3ce5d4b5e","unresolved":false,"context_lines":[{"line_number":4783,"context_line":"            siblings \u003d [sib for sib in siblings if len(sib) \u003e 1]"},{"line_number":4784,"context_line":""},{"line_number":4785,"context_line":"            mempages \u003d []"},{"line_number":4786,"context_line":"            if wantmempages:"},{"line_number":4787,"context_line":"                mempages \u003d ["},{"line_number":4788,"context_line":"                    objects.NUMAPagesTopology("},{"line_number":4789,"context_line":"                        size_kb\u003dpages.size,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_570888d9","line":4786,"updated":"2015-02-26 14:51:40.000000000","message":"Will this work in the case this host will not be considered for any request that has mempages?","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"4d575c92e1680038ef26a8fe7d4e39b0e783c829","unresolved":false,"context_lines":[{"line_number":4783,"context_line":"            siblings \u003d [sib for sib in siblings if len(sib) \u003e 1]"},{"line_number":4784,"context_line":""},{"line_number":4785,"context_line":"            mempages \u003d []"},{"line_number":4786,"context_line":"            if wantmempages:"},{"line_number":4787,"context_line":"                mempages \u003d ["},{"line_number":4788,"context_line":"                    objects.NUMAPagesTopology("},{"line_number":4789,"context_line":"                        size_kb\u003dpages.size,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_ca03c30b","line":4786,"in_reply_to":"ba7be1f8_374314b0","updated":"2015-02-27 11:43:54.000000000","message":"Upon further review this is also correct so not setting is fine.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"cd304dd8235728ac262f5e8a64022427eb5c2b7f","unresolved":false,"context_lines":[{"line_number":4783,"context_line":"            siblings \u003d [sib for sib in siblings if len(sib) \u003e 1]"},{"line_number":4784,"context_line":""},{"line_number":4785,"context_line":"            mempages \u003d []"},{"line_number":4786,"context_line":"            if wantmempages:"},{"line_number":4787,"context_line":"                mempages \u003d ["},{"line_number":4788,"context_line":"                    objects.NUMAPagesTopology("},{"line_number":4789,"context_line":"                        size_kb\u003dpages.size,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_374314b0","line":4786,"in_reply_to":"ba7be1f8_570888d9","updated":"2015-02-26 15:00:53.000000000","message":"I\u0027m not sure what you mean here, but again empirical testing  shows that if you don\u0027t report mempages in the topology here, and try to launch a guest with a flavour that requested huge pages, the scheduler correctly ignores this host.","commit_id":"5d5e7d16e9fb9e28cd679f9e1a948522da0289ff"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2eeadae0961571d6980cf8f5b81f4cbef0ade126","unresolved":false,"context_lines":[{"line_number":3789,"context_line":""},{"line_number":3790,"context_line":"    def _get_guest_memory_backing_config(self, inst_topology, numatune):"},{"line_number":3791,"context_line":"        wantsmempages \u003d False"},{"line_number":3792,"context_line":"        if inst_topology:"},{"line_number":3793,"context_line":"            for cell in inst_topology.cells:"},{"line_number":3794,"context_line":"                if cell.pagesize:"},{"line_number":3795,"context_line":"                    wantsmempages \u003d True"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_185ff173","line":3792,"updated":"2015-02-27 12:50:21.000000000","message":"I guess since you have added the condition line 3829, you can now remove this block if you have to respin.","commit_id":"03771600d4e4f26695bd0a2b338abb54978df6f3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a8d102566c7a2390daa106c873f6fbe87f6f59f7","unresolved":false,"context_lines":[{"line_number":3805,"context_line":"            raise exception.MemoryPagesUnsupported()"},{"line_number":3806,"context_line":""},{"line_number":3807,"context_line":"        host_topology \u003d self._get_host_numa_topology()"},{"line_number":3808,"context_line":""},{"line_number":3809,"context_line":"        # Currently libvirt does not support the smallest"},{"line_number":3810,"context_line":"        # pagesize set as a backend memory."},{"line_number":3811,"context_line":"        # https://bugzilla.redhat.com/show_bug.cgi?id\u003d1173507"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_19da05e8","line":3808,"updated":"2015-03-08 14:32:35.000000000","message":"what is host_topology is None?\n\nhttps://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L4723\n\nhttps://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L4729\n...","commit_id":"cd837f2255fbc59ab2baac283cf05ec10e144843"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"fcae92486428acedf8252afce1361b88a8237df5","unresolved":false,"context_lines":[{"line_number":3805,"context_line":"            raise exception.MemoryPagesUnsupported()"},{"line_number":3806,"context_line":""},{"line_number":3807,"context_line":"        host_topology \u003d self._get_host_numa_topology()"},{"line_number":3808,"context_line":""},{"line_number":3809,"context_line":"        # Currently libvirt does not support the smallest"},{"line_number":3810,"context_line":"        # pagesize set as a backend memory."},{"line_number":3811,"context_line":"        # https://bugzilla.redhat.com/show_bug.cgi?id\u003d1173507"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_88d12e25","line":3808,"in_reply_to":"9a80dd14_19da05e8","updated":"2015-03-09 12:58:21.000000000","message":"I was going to say it can\u0027t be None here, because the version check in self._has_hugepage_support would prevent us reaching here. But I forgot that Armv7 architecture in libvirt isn\u0027t reporting NUMA info at all.","commit_id":"cd837f2255fbc59ab2baac283cf05ec10e144843"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"b050c26d39b07efedba5bb74b975bddd5df6e264","unresolved":false,"context_lines":[{"line_number":3805,"context_line":"            raise exception.MemoryPagesUnsupported()"},{"line_number":3806,"context_line":""},{"line_number":3807,"context_line":"        host_topology \u003d self._get_host_numa_topology()"},{"line_number":3808,"context_line":""},{"line_number":3809,"context_line":"        # Currently libvirt does not support the smallest"},{"line_number":3810,"context_line":"        # pagesize set as a backend memory."},{"line_number":3811,"context_line":"        # https://bugzilla.redhat.com/show_bug.cgi?id\u003d1173507"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_480c9694","line":3808,"in_reply_to":"9a80dd14_88d12e25","updated":"2015-03-09 13:07:44.000000000","message":"Actually this is in fact unreachable /if/ the schedular is correctly honouring the NUMA info reported for the host. If _get_host_numa_topology returns None, then we should never try to schedule any guest with memory pages on this host. So the checks in the lines before will prevent us reaching here. None the less it doesn\u0027t hurt throw MemoryPagesUnsupported if host_topology is None, as a safety net.","commit_id":"cd837f2255fbc59ab2baac283cf05ec10e144843"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a8d102566c7a2390daa106c873f6fbe87f6f59f7","unresolved":false,"context_lines":[{"line_number":3831,"context_line":"            membacking.hugepages \u003d pages"},{"line_number":3832,"context_line":"            return membacking"},{"line_number":3833,"context_line":"        else:"},{"line_number":3834,"context_line":"            return None"},{"line_number":3835,"context_line":""},{"line_number":3836,"context_line":"    def _get_flavor(self, ctxt, instance, flavor):"},{"line_number":3837,"context_line":"        if flavor is not None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_d9d4edbe","line":3834,"updated":"2015-03-08 14:32:35.000000000","message":"you do not need return None. By default a method returns None","commit_id":"cd837f2255fbc59ab2baac283cf05ec10e144843"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"cb0dc2a1582938e85e89ad1cb8b12956fb7b62f8","unresolved":false,"context_lines":[{"line_number":3439,"context_line":"        \"\"\""},{"line_number":3440,"context_line":""},{"line_number":3441,"context_line":"        if (not self._has_numa_support() and"},{"line_number":3442,"context_line":"                instance_numa_topology is not None):"},{"line_number":3443,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3444,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3445,"context_line":"            # in the first place. Just in case of a scheduler"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa963961_42b9f22d","line":3442,"updated":"2015-03-26 13:29:19.000000000","message":"Dead code? Wouldn\u0027t be cleaner to just leave this out and deal with any bugs that might occur / have a test to validate this cannot happen.","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"7c2d2c4fcea17e3d73558e8385a82a2c0ff1f2b9","unresolved":false,"context_lines":[{"line_number":3439,"context_line":"        \"\"\""},{"line_number":3440,"context_line":""},{"line_number":3441,"context_line":"        if (not self._has_numa_support() and"},{"line_number":3442,"context_line":"                instance_numa_topology is not None):"},{"line_number":3443,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3444,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3445,"context_line":"            # in the first place. Just in case of a scheduler"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa963961_cd3191ee","line":3442,"in_reply_to":"fa963961_42b9f22d","updated":"2015-03-27 09:38:25.000000000","message":"Well not exactly dead - it might happen if the scheduler does not have the proper filter configured, so it\u0027s not a completely unlikely condition and it\u0027s better to fail then to do the wrong thing silently.\n\nSome debug would be good tho.","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"cb0dc2a1582938e85e89ad1cb8b12956fb7b62f8","unresolved":false,"context_lines":[{"line_number":3800,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3801,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3802,"context_line":"            # in the first place. Just in case of a scheduler"},{"line_number":3803,"context_line":"            # mess up though, raise an exception"},{"line_number":3804,"context_line":"            raise exception.MemoryPagesUnsupported()"},{"line_number":3805,"context_line":""},{"line_number":3806,"context_line":"        host_topology \u003d self._get_host_numa_topology()"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa963961_425572c4","line":3803,"updated":"2015-03-26 13:29:19.000000000","message":"Dead code? Wouldn\u0027t be cleaner to just leave this out and deal with any bugs that might occur / have a test to validate this cannot happen.","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"7c2d2c4fcea17e3d73558e8385a82a2c0ff1f2b9","unresolved":false,"context_lines":[{"line_number":3800,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3801,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3802,"context_line":"            # in the first place. Just in case of a scheduler"},{"line_number":3803,"context_line":"            # mess up though, raise an exception"},{"line_number":3804,"context_line":"            raise exception.MemoryPagesUnsupported()"},{"line_number":3805,"context_line":""},{"line_number":3806,"context_line":"        host_topology \u003d self._get_host_numa_topology()"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa963961_ad376daf","line":3803,"in_reply_to":"fa963961_425572c4","updated":"2015-03-27 09:38:25.000000000","message":"Same as above","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"cb0dc2a1582938e85e89ad1cb8b12956fb7b62f8","unresolved":false,"context_lines":[{"line_number":3805,"context_line":""},{"line_number":3806,"context_line":"        host_topology \u003d self._get_host_numa_topology()"},{"line_number":3807,"context_line":""},{"line_number":3808,"context_line":"        if host_topology is None:"},{"line_number":3809,"context_line":"            # As above, we should not get here but just in case..."},{"line_number":3810,"context_line":"            raise exception.MemoryPagesUnsupported()"},{"line_number":3811,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa963961_421a1219","line":3808,"updated":"2015-03-26 13:29:19.000000000","message":"Dead code? Wouldn\u0027t be cleaner to just leave this out and deal with any bugs that might occur / have a test to validate this cannot happen.","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"f0e800ae5d3cbac287ef73b5015e39d5d2f85be4","unresolved":false,"context_lines":[{"line_number":3834,"context_line":"            membacking.hugepages \u003d pages"},{"line_number":3835,"context_line":"            return membacking"},{"line_number":3836,"context_line":"        else:"},{"line_number":3837,"context_line":"            return"},{"line_number":3838,"context_line":""},{"line_number":3839,"context_line":"    def _get_flavor(self, ctxt, instance, flavor):"},{"line_number":3840,"context_line":"        if flavor is not None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa963961_e0956ce4","line":3837,"updated":"2015-03-27 16:51:01.000000000","message":"This else branch seems unnecessary...","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"622b06a755e8565f66aa1447538d238d085be8ca","unresolved":false,"context_lines":[{"line_number":4727,"context_line":"        return jsonutils.dumps(pci_info)"},{"line_number":4728,"context_line":""},{"line_number":4729,"context_line":"    def _has_numa_support(self):"},{"line_number":4730,"context_line":"        if not self._host.has_min_version(MIN_LIBVIRT_NUMA_VERSION):"},{"line_number":4731,"context_line":"            return False"},{"line_number":4732,"context_line":""},{"line_number":4733,"context_line":"        if CONF.libvirt.virt_type not in [\u0027qemu\u0027, \u0027kvm\u0027]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6ced46_5baf90e3","line":4730,"updated":"2015-03-24 00:02:10.000000000","message":"Do we also want to add a check for QEMU \u003e\u003d 2.1 both here and in _has_hugepage_support() below?  That would address bug #1422775.\n\nAlternately, I\u0027d be happy to make a follow-on patch with that change.","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"64b9fa42bc2d4a7c8c8861795debdd6b2507c121","unresolved":false,"context_lines":[{"line_number":4727,"context_line":"        return jsonutils.dumps(pci_info)"},{"line_number":4728,"context_line":""},{"line_number":4729,"context_line":"    def _has_numa_support(self):"},{"line_number":4730,"context_line":"        if not self._host.has_min_version(MIN_LIBVIRT_NUMA_VERSION):"},{"line_number":4731,"context_line":"            return False"},{"line_number":4732,"context_line":""},{"line_number":4733,"context_line":"        if CONF.libvirt.virt_type not in [\u0027qemu\u0027, \u0027kvm\u0027]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa041b7_5793c05b","line":4730,"in_reply_to":"1a6ced46_5baf90e3","updated":"2015-04-02 15:45:33.000000000","message":"As discussed on the bug - let\u0027s do a followup","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"622b06a755e8565f66aa1447538d238d085be8ca","unresolved":false,"context_lines":[{"line_number":4748,"context_line":"        if not self._has_numa_support():"},{"line_number":4749,"context_line":"            return"},{"line_number":4750,"context_line":""},{"line_number":4751,"context_line":"        wantmempages \u003d self._has_hugepage_support()"},{"line_number":4752,"context_line":""},{"line_number":4753,"context_line":"        caps \u003d self._host.get_capabilities()"},{"line_number":4754,"context_line":"        topology \u003d caps.host.topology"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6ced46_3bf9f4e9","line":4751,"updated":"2015-03-24 00:02:10.000000000","message":"We only use this in the one place below, so maybe get rid of this line and just call \"if self._has_hugepage_support()\" below?","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"f0e800ae5d3cbac287ef73b5015e39d5d2f85be4","unresolved":false,"context_lines":[{"line_number":4748,"context_line":"        if not self._has_numa_support():"},{"line_number":4749,"context_line":"            return"},{"line_number":4750,"context_line":""},{"line_number":4751,"context_line":"        wantmempages \u003d self._has_hugepage_support()"},{"line_number":4752,"context_line":""},{"line_number":4753,"context_line":"        caps \u003d self._host.get_capabilities()"},{"line_number":4754,"context_line":"        topology \u003d caps.host.topology"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa963961_60783cc5","line":4751,"in_reply_to":"1a6ced46_3bf9f4e9","updated":"2015-03-27 16:51:01.000000000","message":"Concur.","commit_id":"6b52c208f17a22295b52ab3bd36966ab758ea64a"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c56bc7fd509ee1d5208e0340440d54a8158a4d73","unresolved":false,"context_lines":[{"line_number":3786,"context_line":"        if inst_topology:"},{"line_number":3787,"context_line":"            for cell in inst_topology.cells:"},{"line_number":3788,"context_line":"                if cell.pagesize:"},{"line_number":3789,"context_line":"                    wantsmempages \u003d True"},{"line_number":3790,"context_line":""},{"line_number":3791,"context_line":"        if not wantsmempages:"},{"line_number":3792,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_026a9880","line":3789,"updated":"2015-04-02 16:03:12.000000000","message":"So we can break the loop early here since wantsmempages is equal to True","commit_id":"945ab28df04e22f3c1b8948972f538ee6b5e7410"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2cb0694ac46a76ac724291dcb6fa592d0cb9f98f","unresolved":false,"context_lines":[{"line_number":3786,"context_line":"        if inst_topology:"},{"line_number":3787,"context_line":"            for cell in inst_topology.cells:"},{"line_number":3788,"context_line":"                if cell.pagesize:"},{"line_number":3789,"context_line":"                    wantsmempages \u003d True"},{"line_number":3790,"context_line":""},{"line_number":3791,"context_line":"        if not wantsmempages:"},{"line_number":3792,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_6a1b561c","line":3789,"in_reply_to":"baa041b7_026a9880","updated":"2015-04-03 15:46:59.000000000","message":"Agree with Sahid. Insert a break above.","commit_id":"945ab28df04e22f3c1b8948972f538ee6b5e7410"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c56bc7fd509ee1d5208e0340440d54a8158a4d73","unresolved":false,"context_lines":[{"line_number":3791,"context_line":"        if not wantsmempages:"},{"line_number":3792,"context_line":"            return"},{"line_number":3793,"context_line":""},{"line_number":3794,"context_line":"        if not self._has_hugepage_support():"},{"line_number":3795,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3796,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3797,"context_line":"            # in the first place. Just in case of a scheduler"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_02ef38e9","line":3794,"updated":"2015-04-02 16:03:12.000000000","message":"We can reorder the algorithm to make it more concise.\n\n   host_topology \u003d self._get_host_numa_topology()\n   if not self._has_hugepage_support() or not host_topology:\n     # We should...\n     raise exception.MemoryPagesUnsupported()","commit_id":"945ab28df04e22f3c1b8948972f538ee6b5e7410"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2cb0694ac46a76ac724291dcb6fa592d0cb9f98f","unresolved":false,"context_lines":[{"line_number":3791,"context_line":"        if not wantsmempages:"},{"line_number":3792,"context_line":"            return"},{"line_number":3793,"context_line":""},{"line_number":3794,"context_line":"        if not self._has_hugepage_support():"},{"line_number":3795,"context_line":"            # We should not get here, since we should have avoided"},{"line_number":3796,"context_line":"            # reporting NUMA topology from _get_host_numa_topology"},{"line_number":3797,"context_line":"            # in the first place. Just in case of a scheduler"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_6ac91678","line":3794,"in_reply_to":"baa041b7_02ef38e9","updated":"2015-04-03 15:46:59.000000000","message":"Well, there\u0027s no reason to call self._get_host_numa_topology() if self._has_hugepage_support() is False... so this code can be considered slightly more efficient, even if a little less concise.","commit_id":"945ab28df04e22f3c1b8948972f538ee6b5e7410"}]}
