)]}'
{"nova/cmd/manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"349f8249253328f2ea36d735c0cb3b1c1d051a71","unresolved":false,"context_lines":[{"line_number":1810,"context_line":"                # between runs where the user is specifying --max-count. We"},{"line_number":1811,"context_line":"                # could add support for passing in --marker and dumping the"},{"line_number":1812,"context_line":"                # last checked instance from the previous run if --verbose."},{"line_number":1813,"context_line":"                # FIXME(mriedem): If --max-count is not specified, we\u0027ll only"},{"line_number":1814,"context_line":"                # get 50 instances from this cell and not try to process any"},{"line_number":1815,"context_line":"                # more even though not specifying --max-count basically means"},{"line_number":1816,"context_line":"                # no limit."},{"line_number":1817,"context_line":"                instances \u003d objects.InstanceList.get_by_filters("},{"line_number":1818,"context_line":"                    cctxt, filters, limit\u003dmax_count,"},{"line_number":1819,"context_line":"                    expected_attrs\u003d[\u0027flavor\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_97b796d9","line":1816,"range":{"start_line":1813,"start_character":16,"end_line":1816,"end_character":27},"updated":"2018-05-03 20:07:37.000000000","message":"Yes I still need to deal with this.","commit_id":"95ce15fe12447fba88811b9d82426d25ffaa74e8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9149d000948f74388bcafe5d2914550613bf86fc","unresolved":false,"context_lines":[{"line_number":1788,"context_line":"                # on its embedded flavor."},{"line_number":1789,"context_line":"                resources \u003d scheduler_utils.resources_from_flavor("},{"line_number":1790,"context_line":"                    instance, instance.flavor)"},{"line_number":1791,"context_line":"                if placement.put_allocations("},{"line_number":1792,"context_line":"                        ctxt, node_uuid, instance.uuid, resources,"},{"line_number":1793,"context_line":"                        instance.project_id, instance.user_id):"},{"line_number":1794,"context_line":"                    num_processed +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_3b82db50","line":1791,"range":{"start_line":1791,"start_character":29,"end_line":1791,"end_character":44},"updated":"2018-05-09 08:40:41.000000000","message":"This could raise a Retry if concurrent update happens and that exception would bubble up to the user. Either we should catch it and raise AllocationCreateFailed; or implement the retry mechanism.","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"be9e7005e51d54ca49346c4687bd00b822e186f2","unresolved":false,"context_lines":[{"line_number":1788,"context_line":"                # on its embedded flavor."},{"line_number":1789,"context_line":"                resources \u003d scheduler_utils.resources_from_flavor("},{"line_number":1790,"context_line":"                    instance, instance.flavor)"},{"line_number":1791,"context_line":"                if placement.put_allocations("},{"line_number":1792,"context_line":"                        ctxt, node_uuid, instance.uuid, resources,"},{"line_number":1793,"context_line":"                        instance.project_id, instance.user_id):"},{"line_number":1794,"context_line":"                    num_processed +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_a4e23a00","line":1791,"range":{"start_line":1791,"start_character":29,"end_line":1791,"end_character":44},"in_reply_to":"5f7c97a3_04852e5a","updated":"2018-05-09 19:40:06.000000000","message":"Actually it doesn\u0027t raise Retry. The put_allocations method can raise Retry and the retires decorator will allow that 3 times before it returns False, so we\u0027re still OK here as far as not having to handle Retry getting raised. We might say that we failed to create allocations, but we wouldn\u0027t really know why and the worst thing the operator has to do is re-run this.","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7bb38680399904027837c3a12933b3af46ec9822","unresolved":false,"context_lines":[{"line_number":1788,"context_line":"                # on its embedded flavor."},{"line_number":1789,"context_line":"                resources \u003d scheduler_utils.resources_from_flavor("},{"line_number":1790,"context_line":"                    instance, instance.flavor)"},{"line_number":1791,"context_line":"                if placement.put_allocations("},{"line_number":1792,"context_line":"                        ctxt, node_uuid, instance.uuid, resources,"},{"line_number":1793,"context_line":"                        instance.project_id, instance.user_id):"},{"line_number":1794,"context_line":"                    num_processed +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_04852e5a","line":1791,"range":{"start_line":1791,"start_character":29,"end_line":1791,"end_character":44},"in_reply_to":"5f7c97a3_3b82db50","updated":"2018-05-09 19:28:07.000000000","message":"Good catch. I think in this case we want to just log it and more on because if we hit that, for this particular call, it means something else is already putting allocations for the instance which is what we want to happen ultimately. So I\u0027ll add a catch and ignore handler.","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"66463ee40e952a61d0235d90f0f492423335b1e5","unresolved":false,"context_lines":[{"line_number":1788,"context_line":"                # on its embedded flavor."},{"line_number":1789,"context_line":"                resources \u003d scheduler_utils.resources_from_flavor("},{"line_number":1790,"context_line":"                    instance, instance.flavor)"},{"line_number":1791,"context_line":"                if placement.put_allocations("},{"line_number":1792,"context_line":"                        ctxt, node_uuid, instance.uuid, resources,"},{"line_number":1793,"context_line":"                        instance.project_id, instance.user_id):"},{"line_number":1794,"context_line":"                    num_processed +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_439ce50d","line":1791,"range":{"start_line":1791,"start_character":29,"end_line":1791,"end_character":44},"in_reply_to":"5f7c97a3_a4e23a00","updated":"2018-06-04 14:21:24.000000000","message":"You are right.","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d3afe5e7693a5325d0ca7a14bd05c079fdde5f7","unresolved":false,"context_lines":[{"line_number":1857,"context_line":"        # - allow passing a specific cell to heal"},{"line_number":1858,"context_line":"        # - allow filtering on enabled/disabled cells"},{"line_number":1859,"context_line":"        # - allow passing a specific instance to heal"},{"line_number":1860,"context_line":"        # - allow passing a --marker instance uuid for paging with --max-count"},{"line_number":1861,"context_line":"        # - add a force option to force allocations for instances which have"},{"line_number":1862,"context_line":"        #   task_state is not None (would get complicated during a migration)"},{"line_number":1863,"context_line":"        # - add an option to overwrite allocations for instances which already"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_174a0aab","line":1860,"updated":"2018-05-12 18:53:06.000000000","message":"I chatted with dansmith about this one in IRC and we were thinking this would be not-so-great UX for a CLI, and we already do batch/marker type stuff with map_instances; the difference here would be how we do the marker between runs. We were thinking we could stash something in the instance_system_metadata table but (1) you\u0027d have to iterate the cells first to find if there is a marker instance and (2) make sure we set/cleanup the marker instance properly on each run, including if there were failures, e.g. say we start at marker A, process 3 instances, and then fail, we need to make sure we still set a marker (and remove the old one).","commit_id":"e715e0883fafc73294d88124286e4656d2560fea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"48460bca66d5f4d0726dd7a35ee817179c5dcad3","unresolved":false,"context_lines":[{"line_number":1766,"context_line":"        # automatically pick up where we left off without the user having"},{"line_number":1767,"context_line":"        # to pass it in (if unlimited is False)."},{"line_number":1768,"context_line":"        instances \u003d objects.InstanceList.get_by_filters("},{"line_number":1769,"context_line":"            ctxt, filters\u003d{}, sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027asc\u0027,"},{"line_number":1770,"context_line":"            limit\u003dmax_count, expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":1771,"context_line":"        while instances:"},{"line_number":1772,"context_line":"            if verbose:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_ccd94a83","line":1769,"range":{"start_line":1769,"start_character":30,"end_line":1769,"end_character":67},"updated":"2018-05-30 21:35:38.000000000","message":"ok, so oldest first.\n\n++","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c72450edb6e96d305db9d643620cb9a1efc49e9","unresolved":false,"context_lines":[{"line_number":1766,"context_line":"        # automatically pick up where we left off without the user having"},{"line_number":1767,"context_line":"        # to pass it in (if unlimited is False)."},{"line_number":1768,"context_line":"        instances \u003d objects.InstanceList.get_by_filters("},{"line_number":1769,"context_line":"            ctxt, filters\u003d{}, sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027asc\u0027,"},{"line_number":1770,"context_line":"            limit\u003dmax_count, expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":1771,"context_line":"        while instances:"},{"line_number":1772,"context_line":"            if verbose:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_07970fee","line":1769,"range":{"start_line":1769,"start_character":30,"end_line":1769,"end_character":67},"in_reply_to":"5f7c97a3_ccd94a83","updated":"2018-05-31 16:39:44.000000000","message":"Yup, also noted on L1762 above.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"48460bca66d5f4d0726dd7a35ee817179c5dcad3","unresolved":false,"context_lines":[{"line_number":1769,"context_line":"            ctxt, filters\u003d{}, sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027asc\u0027,"},{"line_number":1770,"context_line":"            limit\u003dmax_count, expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":1771,"context_line":"        while instances:"},{"line_number":1772,"context_line":"            if verbose:"},{"line_number":1773,"context_line":"                print(_(\u0027Found %s candidate instances.\u0027) % len(instances))"},{"line_number":1774,"context_line":"            # For each instance in this list, we need to see if it has"},{"line_number":1775,"context_line":"            # allocations in placement and if so, assume it\u0027s correct and"},{"line_number":1776,"context_line":"            # continue."}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_4c653ab4","line":1773,"range":{"start_line":1772,"start_character":12,"end_line":1773,"end_character":74},"updated":"2018-05-30 21:35:38.000000000","message":"Just a suggestion... instead of repeating the:\n\n if verbose:\n     print(...)\n\nyou could create a functor that would just be an empty lambda when verbose \u003d False, otherwise output the functor\u0027s arguments.\n\nSomething like this in the heal_allocations() function:\n\n printer \u003d lambda: None\n if verbose:\n     printer \u003d lambda msg: print(msg)\n\nand then pass the printer argument to _heal_instances_in_cell() instead of the verbose argument.\n\nThat way you won\u0027t need all the:\n\n if verbose:\n     print(...)\n\ninvocations. Instead, you\u0027d just always do:\n\n printer(...)","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c72450edb6e96d305db9d643620cb9a1efc49e9","unresolved":false,"context_lines":[{"line_number":1769,"context_line":"            ctxt, filters\u003d{}, sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027asc\u0027,"},{"line_number":1770,"context_line":"            limit\u003dmax_count, expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":1771,"context_line":"        while instances:"},{"line_number":1772,"context_line":"            if verbose:"},{"line_number":1773,"context_line":"                print(_(\u0027Found %s candidate instances.\u0027) % len(instances))"},{"line_number":1774,"context_line":"            # For each instance in this list, we need to see if it has"},{"line_number":1775,"context_line":"            # allocations in placement and if so, assume it\u0027s correct and"},{"line_number":1776,"context_line":"            # continue."}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_878a3fbc","line":1773,"range":{"start_line":1772,"start_character":12,"end_line":1773,"end_character":74},"in_reply_to":"5f7c97a3_4c653ab4","updated":"2018-05-31 16:39:44.000000000","message":"Good point, Dan did something similar with the discover_hosts stuff.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad02154413d368e923f179ab8ba145870655753f","unresolved":false,"context_lines":[{"line_number":1769,"context_line":"            ctxt, filters\u003d{}, sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027asc\u0027,"},{"line_number":1770,"context_line":"            limit\u003dmax_count, expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":1771,"context_line":"        while instances:"},{"line_number":1772,"context_line":"            if verbose:"},{"line_number":1773,"context_line":"                print(_(\u0027Found %s candidate instances.\u0027) % len(instances))"},{"line_number":1774,"context_line":"            # For each instance in this list, we need to see if it has"},{"line_number":1775,"context_line":"            # allocations in placement and if so, assume it\u0027s correct and"},{"line_number":1776,"context_line":"            # continue."}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_08ab80d5","line":1773,"range":{"start_line":1772,"start_character":12,"end_line":1773,"end_character":74},"in_reply_to":"5f7c97a3_878a3fbc","updated":"2018-06-01 22:40:43.000000000","message":"Done","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c72450edb6e96d305db9d643620cb9a1efc49e9","unresolved":false,"context_lines":[{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"                allocations \u003d placement.get_allocations_for_consumer("},{"line_number":1793,"context_line":"                    ctxt, instance.uuid)"},{"line_number":1794,"context_line":"                if allocations:"},{"line_number":1795,"context_line":"                    if verbose:"},{"line_number":1796,"context_line":"                        print(_(\u0027Instance %s already has allocations.\u0027) %"},{"line_number":1797,"context_line":"                              instance.uuid)"},{"line_number":1798,"context_line":"                    continue"},{"line_number":1799,"context_line":""},{"line_number":1800,"context_line":"                # This instance doesn\u0027t have allocations so we need to find"},{"line_number":1801,"context_line":"                # its compute node resource provider."}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_074e2f96","line":1798,"range":{"start_line":1794,"start_character":16,"end_line":1798,"end_character":28},"updated":"2018-05-31 16:39:44.000000000","message":"Add a TODO here that for the consumer generation stuff, any older allocations with missing consumer information are going to get populated using config option values as sentinels, and at some point we need to heal those, so even if the instance has allocations, we should check to see if those allocations against the same project/user as the instance and if not, update the project/user on the allocations, see:\n\nhttps://specs.openstack.org/openstack/nova-specs/specs/rocky/approved/add-consumer-generation.html#upgrade-impact\n\nhttps://review.openstack.org/#/c/567678/","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad02154413d368e923f179ab8ba145870655753f","unresolved":false,"context_lines":[{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"                allocations \u003d placement.get_allocations_for_consumer("},{"line_number":1793,"context_line":"                    ctxt, instance.uuid)"},{"line_number":1794,"context_line":"                if allocations:"},{"line_number":1795,"context_line":"                    if verbose:"},{"line_number":1796,"context_line":"                        print(_(\u0027Instance %s already has allocations.\u0027) %"},{"line_number":1797,"context_line":"                              instance.uuid)"},{"line_number":1798,"context_line":"                    continue"},{"line_number":1799,"context_line":""},{"line_number":1800,"context_line":"                # This instance doesn\u0027t have allocations so we need to find"},{"line_number":1801,"context_line":"                # its compute node resource provider."}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_a8b5ac33","line":1798,"range":{"start_line":1794,"start_character":16,"end_line":1798,"end_character":28},"in_reply_to":"5f7c97a3_074e2f96","updated":"2018-06-01 22:40:43.000000000","message":"Done","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"48460bca66d5f4d0726dd7a35ee817179c5dcad3","unresolved":false,"context_lines":[{"line_number":1774,"context_line":"            # For each instance in this list, we need to see if it has"},{"line_number":1775,"context_line":"            # allocations in placement and if so, assume it\u0027s correct and"},{"line_number":1776,"context_line":"            # continue."},{"line_number":1777,"context_line":"            for instance in instances:"},{"line_number":1778,"context_line":"                if instance.task_state is not None:"},{"line_number":1779,"context_line":"                    if verbose:"},{"line_number":1780,"context_line":"                        print(_(\u0027Instance %(instance)s is undergoing a task \u0027"},{"line_number":1781,"context_line":"                                \u0027state transition: %(task_state)s\u0027) %"},{"line_number":1782,"context_line":"                              {\u0027instance\u0027: instance.uuid,"},{"line_number":1783,"context_line":"                               \u0027task_state\u0027: instance.task_state})"},{"line_number":1784,"context_line":"                    continue"},{"line_number":1785,"context_line":""},{"line_number":1786,"context_line":"                if instance.node is None:"},{"line_number":1787,"context_line":"                    if verbose:"},{"line_number":1788,"context_line":"                        print(_(\u0027Instance %s is not on a host.\u0027) %"},{"line_number":1789,"context_line":"                              instance.uuid)"},{"line_number":1790,"context_line":"                    continue"},{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"                allocations \u003d placement.get_allocations_for_consumer("},{"line_number":1793,"context_line":"                    ctxt, instance.uuid)"},{"line_number":1794,"context_line":"                if allocations:"},{"line_number":1795,"context_line":"                    if verbose:"},{"line_number":1796,"context_line":"                        print(_(\u0027Instance %s already has allocations.\u0027) %"},{"line_number":1797,"context_line":"                              instance.uuid)"},{"line_number":1798,"context_line":"                    continue"},{"line_number":1799,"context_line":""},{"line_number":1800,"context_line":"                # This instance doesn\u0027t have allocations so we need to find"},{"line_number":1801,"context_line":"                # its compute node resource provider."},{"line_number":1802,"context_line":"                node_uuid \u003d self._get_compute_node_uuid("},{"line_number":1803,"context_line":"                    ctxt, instance, node_cache)"},{"line_number":1804,"context_line":""},{"line_number":1805,"context_line":"                # Now get the resource allocations for the instance based"},{"line_number":1806,"context_line":"                # on its embedded flavor."},{"line_number":1807,"context_line":"                resources \u003d scheduler_utils.resources_from_flavor("},{"line_number":1808,"context_line":"                    instance, instance.flavor)"},{"line_number":1809,"context_line":"                if placement.put_allocations("},{"line_number":1810,"context_line":"                        ctxt, node_uuid, instance.uuid, resources,"},{"line_number":1811,"context_line":"                        instance.project_id, instance.user_id):"},{"line_number":1812,"context_line":"                    num_processed +\u003d 1"},{"line_number":1813,"context_line":"                    if verbose:"},{"line_number":1814,"context_line":"                        print(_(\u0027Successfully created allocations for \u0027"},{"line_number":1815,"context_line":"                                \u0027instance %(instance)s against resource \u0027"},{"line_number":1816,"context_line":"                                \u0027provider %(provider)s.\u0027) %"},{"line_number":1817,"context_line":"                              {\u0027instance\u0027: instance.uuid,"},{"line_number":1818,"context_line":"                               \u0027provider\u0027: node_uuid})"},{"line_number":1819,"context_line":"                else:"},{"line_number":1820,"context_line":"                    raise exception.AllocationCreateFailed("},{"line_number":1821,"context_line":"                        instance\u003dinstance.uuid, provider\u003dnode_uuid)"},{"line_number":1822,"context_line":""},{"line_number":1823,"context_line":"            # Make sure we don\u0027t go over the max count. Note that we"},{"line_number":1824,"context_line":"            # don\u0027t include instances that already have allocations in the"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_2ca31eb4","line":1821,"range":{"start_line":1777,"start_character":0,"end_line":1821,"end_character":67},"updated":"2018-05-30 21:35:38.000000000","message":"++","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"dda4b84588034a8e47050a469576e861d1ff4570","unresolved":false,"context_lines":[{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"            # Use a marker to get the next page of instances in this cell."},{"line_number":1831,"context_line":"            # Note that InstanceList doesn\u0027t support slice notation."},{"line_number":1832,"context_line":"            marker \u003d instances[len(instances) - 1].uuid"},{"line_number":1833,"context_line":"            instances \u003d objects.InstanceList.get_by_filters("},{"line_number":1834,"context_line":"                ctxt, filters\u003d{}, limit\u003dmax_count, marker\u003dmarker,"},{"line_number":1835,"context_line":"                expected_attrs\u003d[\u0027flavor\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_901b97c8","line":1832,"updated":"2018-05-28 12:41:24.000000000","message":"here we walk through all the existing instances every time we enter a cell. I wonder if we should somehow persist that marker so we would avoid to loop over for example 100,000 instances for nothing before we create the allocations for the last 10 ones (just because Placement was gone the last minute)","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"48460bca66d5f4d0726dd7a35ee817179c5dcad3","unresolved":false,"context_lines":[{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"            # Use a marker to get the next page of instances in this cell."},{"line_number":1831,"context_line":"            # Note that InstanceList doesn\u0027t support slice notation."},{"line_number":1832,"context_line":"            marker \u003d instances[len(instances) - 1].uuid"},{"line_number":1833,"context_line":"            instances \u003d objects.InstanceList.get_by_filters("},{"line_number":1834,"context_line":"                ctxt, filters\u003d{}, limit\u003dmax_count, marker\u003dmarker,"},{"line_number":1835,"context_line":"                expected_attrs\u003d[\u0027flavor\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_aca40ea7","line":1832,"in_reply_to":"5f7c97a3_901b97c8","updated":"2018-05-30 21:35:38.000000000","message":"maybe you could save a file named for the cell ID with the marker instance\u0027s UUID.\n\nNot sure it\u0027s a huge problem, though. And Matt does call out on line 1763 he\u0027s aware of the issue.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c72450edb6e96d305db9d643620cb9a1efc49e9","unresolved":false,"context_lines":[{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"            # Use a marker to get the next page of instances in this cell."},{"line_number":1831,"context_line":"            # Note that InstanceList doesn\u0027t support slice notation."},{"line_number":1832,"context_line":"            marker \u003d instances[len(instances) - 1].uuid"},{"line_number":1833,"context_line":"            instances \u003d objects.InstanceList.get_by_filters("},{"line_number":1834,"context_line":"                ctxt, filters\u003d{}, limit\u003dmax_count, marker\u003dmarker,"},{"line_number":1835,"context_line":"                expected_attrs\u003d[\u0027flavor\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_7d753463","line":1832,"in_reply_to":"5f7c97a3_aca40ea7","updated":"2018-05-31 16:39:44.000000000","message":"Right, in discussing this with Dan, we talked about storing a marker in the instance system_metadata so we\u0027d have to do a first pass across all cells to find the marker instance (if there is one), and then we\u0027d start at that cell and instance. It\u0027s doable, just more work and code and was something I wasn\u0027t sure was needed in the first iteration of this patch which is already quite large.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"48460bca66d5f4d0726dd7a35ee817179c5dcad3","unresolved":false,"context_lines":[{"line_number":1831,"context_line":"            # Note that InstanceList doesn\u0027t support slice notation."},{"line_number":1832,"context_line":"            marker \u003d instances[len(instances) - 1].uuid"},{"line_number":1833,"context_line":"            instances \u003d objects.InstanceList.get_by_filters("},{"line_number":1834,"context_line":"                ctxt, filters\u003d{}, limit\u003dmax_count, marker\u003dmarker,"},{"line_number":1835,"context_line":"                expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":1836,"context_line":""},{"line_number":1837,"context_line":"        return num_processed"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_eca8c68c","line":1834,"updated":"2018-05-30 21:35:38.000000000","message":"you will want to use the same sorting as you did on line 1769 here, in order to get predictable results:\n\n sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027asc\u0027,","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad02154413d368e923f179ab8ba145870655753f","unresolved":false,"context_lines":[{"line_number":1831,"context_line":"            # Note that InstanceList doesn\u0027t support slice notation."},{"line_number":1832,"context_line":"            marker \u003d instances[len(instances) - 1].uuid"},{"line_number":1833,"context_line":"            instances \u003d objects.InstanceList.get_by_filters("},{"line_number":1834,"context_line":"                ctxt, filters\u003d{}, limit\u003dmax_count, marker\u003dmarker,"},{"line_number":1835,"context_line":"                expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":1836,"context_line":""},{"line_number":1837,"context_line":"        return num_processed"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_c8b02843","line":1834,"in_reply_to":"5f7c97a3_5d6638bd","updated":"2018-06-01 22:40:43.000000000","message":"Done","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c72450edb6e96d305db9d643620cb9a1efc49e9","unresolved":false,"context_lines":[{"line_number":1831,"context_line":"            # Note that InstanceList doesn\u0027t support slice notation."},{"line_number":1832,"context_line":"            marker \u003d instances[len(instances) - 1].uuid"},{"line_number":1833,"context_line":"            instances \u003d objects.InstanceList.get_by_filters("},{"line_number":1834,"context_line":"                ctxt, filters\u003d{}, limit\u003dmax_count, marker\u003dmarker,"},{"line_number":1835,"context_line":"                expected_attrs\u003d[\u0027flavor\u0027])"},{"line_number":1836,"context_line":""},{"line_number":1837,"context_line":"        return num_processed"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_5d6638bd","line":1834,"in_reply_to":"5f7c97a3_eca8c68c","updated":"2018-05-31 16:39:44.000000000","message":"Ah yes, nice catch.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"48460bca66d5f4d0726dd7a35ee817179c5dcad3","unresolved":false,"context_lines":[{"line_number":1852,"context_line":"               \u00270 or 4.\u0027)"},{"line_number":1853,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, dest\u003d\u0027verbose\u0027, default\u003dFalse,"},{"line_number":1854,"context_line":"          help\u003d\u0027Provide verbose output during execution.\u0027)"},{"line_number":1855,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse):"},{"line_number":1856,"context_line":"        \"\"\"Heals instance allocations in the Placement service"},{"line_number":1857,"context_line":""},{"line_number":1858,"context_line":"        Return codes:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_4ce21ad7","line":1855,"range":{"start_line":1855,"start_character":8,"end_line":1855,"end_character":24},"updated":"2018-05-30 21:35:38.000000000","message":"recommend calling this create_missing_allocations() or placement_create_missing_allocations(). \"heal\" doesn\u0027t really describe what is being done here and explicit is better IMHO.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c72450edb6e96d305db9d643620cb9a1efc49e9","unresolved":false,"context_lines":[{"line_number":1852,"context_line":"               \u00270 or 4.\u0027)"},{"line_number":1853,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, dest\u003d\u0027verbose\u0027, default\u003dFalse,"},{"line_number":1854,"context_line":"          help\u003d\u0027Provide verbose output during execution.\u0027)"},{"line_number":1855,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse):"},{"line_number":1856,"context_line":"        \"\"\"Heals instance allocations in the Placement service"},{"line_number":1857,"context_line":""},{"line_number":1858,"context_line":"        Return codes:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_9df5b0cd","line":1855,"range":{"start_line":1855,"start_character":8,"end_line":1855,"end_character":24},"in_reply_to":"5f7c97a3_4ce21ad7","updated":"2018-05-31 16:39:44.000000000","message":"I\u0027m hesitant to call this \"create_missing_allocations\" especially if we add knobs or conditions to update or overwrite existing allocations. Two cases which have come up so far:\n\n1. The missing consumer records - as noted above, we can use this CLI to heal existing allocation records which either (a) don\u0027t have project/user set or (b) are using the config option values for the project/user and need to be updated to use the actual instance project/user for proper quota counting using placement.\n\n2. CERN pointed out that they have existing allocations for ironic instances which predate custom resource classes, so the allocations are on VCPU, MEMORY_MB and DISK_GB and they want to drop those and just use the custom resource class associated with the instance.flavor (after we online migrated the embedded flavor in the ironic driver). So that\u0027s a case for the --force option to overwrite the allocations for a given instance.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6c2de089e23ee6e3fe0eedd06a5d2d39c11799a1","unresolved":false,"context_lines":[{"line_number":1852,"context_line":"               \u00270 or 4.\u0027)"},{"line_number":1853,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, dest\u003d\u0027verbose\u0027, default\u003dFalse,"},{"line_number":1854,"context_line":"          help\u003d\u0027Provide verbose output during execution.\u0027)"},{"line_number":1855,"context_line":"    def heal_allocations(self, max_count\u003dNone, verbose\u003dFalse):"},{"line_number":1856,"context_line":"        \"\"\"Heals instance allocations in the Placement service"},{"line_number":1857,"context_line":""},{"line_number":1858,"context_line":"        Return codes:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_1d9a0013","line":1855,"range":{"start_line":1855,"start_character":8,"end_line":1855,"end_character":24},"in_reply_to":"5f7c97a3_9df5b0cd","updated":"2018-05-31 17:04:52.000000000","message":"ack, all good points. heal it is, then. certainly pithier. :)","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c72450edb6e96d305db9d643620cb9a1efc49e9","unresolved":false,"context_lines":[{"line_number":1871,"context_line":"        # - allow passing a specific cell to heal"},{"line_number":1872,"context_line":"        # - allow filtering on enabled/disabled cells"},{"line_number":1873,"context_line":"        # - allow passing a specific instance to heal"},{"line_number":1874,"context_line":"        # - add a force option to force allocations for instances which have"},{"line_number":1875,"context_line":"        #   task_state is not None (would get complicated during a migration)"},{"line_number":1876,"context_line":"        # - add an option to overwrite allocations for instances which already"},{"line_number":1877,"context_line":"        #   have allocations (but the operator thinks might be wrong?); this"},{"line_number":1878,"context_line":"        #   would probably only be safe with a specific instance."}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_fd2f043c","line":1875,"range":{"start_line":1874,"start_character":10,"end_line":1875,"end_character":77},"updated":"2018-05-31 16:39:44.000000000","message":"As noted above, CERN has a need for this with ironic instances.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad02154413d368e923f179ab8ba145870655753f","unresolved":false,"context_lines":[{"line_number":1871,"context_line":"        # - allow passing a specific cell to heal"},{"line_number":1872,"context_line":"        # - allow filtering on enabled/disabled cells"},{"line_number":1873,"context_line":"        # - allow passing a specific instance to heal"},{"line_number":1874,"context_line":"        # - add a force option to force allocations for instances which have"},{"line_number":1875,"context_line":"        #   task_state is not None (would get complicated during a migration)"},{"line_number":1876,"context_line":"        # - add an option to overwrite allocations for instances which already"},{"line_number":1877,"context_line":"        #   have allocations (but the operator thinks might be wrong?); this"},{"line_number":1878,"context_line":"        #   would probably only be safe with a specific instance."}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_68ea340f","line":1875,"range":{"start_line":1874,"start_character":10,"end_line":1875,"end_character":77},"in_reply_to":"5f7c97a3_fd2f043c","updated":"2018-06-01 22:40:43.000000000","message":"Done","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f042b282335ed4b1f755577d5d84f980c28486db","unresolved":false,"context_lines":[{"line_number":1875,"context_line":"        #   task_state is not None (would get complicated during a migration)"},{"line_number":1876,"context_line":"        # - add an option to overwrite allocations for instances which already"},{"line_number":1877,"context_line":"        #   have allocations (but the operator thinks might be wrong?); this"},{"line_number":1878,"context_line":"        #   would probably only be safe with a specific instance."},{"line_number":1879,"context_line":""},{"line_number":1880,"context_line":"        # TODO(mriedem): Rather than --max-count being both a total and batch"},{"line_number":1881,"context_line":"        # count, should we have separate options to be specific, i.e. --total"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_b056d35b","line":1878,"updated":"2018-05-28 12:42:48.000000000","message":"also a good possibility I guess for operators would only be checking instances in between some timeline (like, I know Placement was gone between 1am and 3am today, let\u0027s check allocations only for that time period).","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"dda4b84588034a8e47050a469576e861d1ff4570","unresolved":false,"context_lines":[{"line_number":1880,"context_line":"        # TODO(mriedem): Rather than --max-count being both a total and batch"},{"line_number":1881,"context_line":"        # count, should we have separate options to be specific, i.e. --total"},{"line_number":1882,"context_line":"        # and --batch-size? Then --batch-size defaults to 50 and --total"},{"line_number":1883,"context_line":"        # defaults to None to mean unlimited."},{"line_number":1884,"context_line":"        if max_count is not None:"},{"line_number":1885,"context_line":"            try:"},{"line_number":1886,"context_line":"                max_count \u003d int(max_count)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_b0fa5372","line":1883,"updated":"2018-05-28 12:41:24.000000000","message":"well, we generally have both a marker and a page size, right?","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"48460bca66d5f4d0726dd7a35ee817179c5dcad3","unresolved":false,"context_lines":[{"line_number":1880,"context_line":"        # TODO(mriedem): Rather than --max-count being both a total and batch"},{"line_number":1881,"context_line":"        # count, should we have separate options to be specific, i.e. --total"},{"line_number":1882,"context_line":"        # and --batch-size? Then --batch-size defaults to 50 and --total"},{"line_number":1883,"context_line":"        # defaults to None to mean unlimited."},{"line_number":1884,"context_line":"        if max_count is not None:"},{"line_number":1885,"context_line":"            try:"},{"line_number":1886,"context_line":"                max_count \u003d int(max_count)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_cccdca5d","line":1883,"in_reply_to":"5f7c97a3_b0fa5372","updated":"2018-05-30 21:35:38.000000000","message":"that\u0027s not what Matt is referring to. He is referring to the total amount of processed records vs the per-cell batch size for processing instances with missing allocation records.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c72450edb6e96d305db9d643620cb9a1efc49e9","unresolved":false,"context_lines":[{"line_number":1880,"context_line":"        # TODO(mriedem): Rather than --max-count being both a total and batch"},{"line_number":1881,"context_line":"        # count, should we have separate options to be specific, i.e. --total"},{"line_number":1882,"context_line":"        # and --batch-size? Then --batch-size defaults to 50 and --total"},{"line_number":1883,"context_line":"        # defaults to None to mean unlimited."},{"line_number":1884,"context_line":"        if max_count is not None:"},{"line_number":1885,"context_line":"            try:"},{"line_number":1886,"context_line":"                max_count \u003d int(max_count)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_7d23f456","line":1883,"in_reply_to":"5f7c97a3_cccdca5d","updated":"2018-05-31 16:39:44.000000000","message":"Yeah what Jay said.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"dda4b84588034a8e47050a469576e861d1ff4570","unresolved":false,"context_lines":[{"line_number":1924,"context_line":"            with context.target_cell(ctxt, cell) as cctxt:"},{"line_number":1925,"context_line":"                try:"},{"line_number":1926,"context_line":"                    num_processed +\u003d self._heal_instances_in_cell("},{"line_number":1927,"context_line":"                        cctxt, limit_per_cell, unlimited, verbose, placement)"},{"line_number":1928,"context_line":"                except exception.ComputeHostNotFound as e:"},{"line_number":1929,"context_line":"                    print(e.format_message())"},{"line_number":1930,"context_line":"                    return 2"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_b03fb323","line":1927,"range":{"start_line":1927,"start_character":31,"end_line":1927,"end_character":56},"updated":"2018-05-28 12:41:24.000000000","message":"do we really need to have two params here ? Can\u0027t we just assume that if no limit per cell, we\u0027re unlimited ?","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c72450edb6e96d305db9d643620cb9a1efc49e9","unresolved":false,"context_lines":[{"line_number":1924,"context_line":"            with context.target_cell(ctxt, cell) as cctxt:"},{"line_number":1925,"context_line":"                try:"},{"line_number":1926,"context_line":"                    num_processed +\u003d self._heal_instances_in_cell("},{"line_number":1927,"context_line":"                        cctxt, limit_per_cell, unlimited, verbose, placement)"},{"line_number":1928,"context_line":"                except exception.ComputeHostNotFound as e:"},{"line_number":1929,"context_line":"                    print(e.format_message())"},{"line_number":1930,"context_line":"                    return 2"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_fdd4e421","line":1927,"range":{"start_line":1927,"start_character":31,"end_line":1927,"end_character":56},"in_reply_to":"5f7c97a3_8cd35201","updated":"2018-05-31 16:39:44.000000000","message":"Right, they need to be separate things, otherwise the log gets really impossible - I went in circles with this for awhile.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"48460bca66d5f4d0726dd7a35ee817179c5dcad3","unresolved":false,"context_lines":[{"line_number":1924,"context_line":"            with context.target_cell(ctxt, cell) as cctxt:"},{"line_number":1925,"context_line":"                try:"},{"line_number":1926,"context_line":"                    num_processed +\u003d self._heal_instances_in_cell("},{"line_number":1927,"context_line":"                        cctxt, limit_per_cell, unlimited, verbose, placement)"},{"line_number":1928,"context_line":"                except exception.ComputeHostNotFound as e:"},{"line_number":1929,"context_line":"                    print(e.format_message())"},{"line_number":1930,"context_line":"                    return 2"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_8cd35201","line":1927,"range":{"start_line":1927,"start_character":31,"end_line":1927,"end_character":56},"in_reply_to":"5f7c97a3_b03fb323","updated":"2018-05-30 21:35:38.000000000","message":"They are different things. See comment above.","commit_id":"5c71353c27bef36dbffa5082df5122806c942e62"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"3574351213c532f16f409514ed8e7affee46b73c","unresolved":false,"context_lines":[{"line_number":1740,"context_line":"        :param max_count: batch size (limit per instance query)"},{"line_number":1741,"context_line":"        :param unlimited: True if all instances in the cell should be"},{"line_number":1742,"context_line":"            processed, else False to just process $max_count instances"},{"line_number":1743,"context_line":"        :param outout: function that takes a single message for verbose output"},{"line_number":1744,"context_line":"        :param placement: nova.scheduler.client.report.SchedulerReportClient"},{"line_number":1745,"context_line":"            to communicate with the Placement service API."},{"line_number":1746,"context_line":"        :return: Number of instances that had allocations created."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_adc92826","line":1743,"range":{"start_line":1743,"start_character":15,"end_line":1743,"end_character":21},"updated":"2018-06-04 13:11:50.000000000","message":"output","commit_id":"95106d2fa1ab86607231c338fa0abc0c3488f0f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"10cbdbbe722402b0e9cf356c6ba166fcc719cbce","unresolved":false,"context_lines":[{"line_number":1740,"context_line":"        :param max_count: batch size (limit per instance query)"},{"line_number":1741,"context_line":"        :param unlimited: True if all instances in the cell should be"},{"line_number":1742,"context_line":"            processed, else False to just process $max_count instances"},{"line_number":1743,"context_line":"        :param outout: function that takes a single message for verbose output"},{"line_number":1744,"context_line":"        :param placement: nova.scheduler.client.report.SchedulerReportClient"},{"line_number":1745,"context_line":"            to communicate with the Placement service API."},{"line_number":1746,"context_line":"        :return: Number of instances that had allocations created."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_b8df1f0b","line":1743,"range":{"start_line":1743,"start_character":15,"end_line":1743,"end_character":21},"in_reply_to":"5f7c97a3_adc92826","updated":"2018-06-04 20:21:54.000000000","message":"Oops. Will fix in a respin if I need to for something else, or fix in a follow up - there is lots more to add to this CLI as you can see.","commit_id":"95106d2fa1ab86607231c338fa0abc0c3488f0f8"}],"nova/tests/functional/test_nova_manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"624de83439fea08352f23f44ed2bc9bc52271e40","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        server \u003d self._wait_for_state_change("},{"line_number":469,"context_line":"            self.admin_api, server, \u0027SHELVED_OFFLOADED\u0027)"},{"line_number":470,"context_line":"        result \u003d self.cli.heal_allocations(verbose\u003dTrue)"},{"line_number":471,"context_line":"        self.assertEqual(4, result)"},{"line_number":472,"context_line":"        # Check that the server has no allocations."},{"line_number":473,"context_line":"        allocations \u003d self._get_allocations_by_server_uuid(server[\u0027id\u0027])"},{"line_number":474,"context_line":"        self.assertEqual({}, allocations,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_8c45491a","line":471,"updated":"2018-05-03 18:31:19.000000000","message":"This failed the functional py35 job, but it doesn\u0027t look like that\u0027s due to anything specific to python3, I\u0027ll see if I can recreate locally, otherwise it could be a race?\n\nhttp://logs.openstack.org/86/565886/5/check/nova-tox-functional-py35/098981d/testr_results.html.gz","commit_id":"9eecdf88f0c808fa731bbdf4267bdbbc12cd0e06"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9149d000948f74388bcafe5d2914550613bf86fc","unresolved":false,"context_lines":[{"line_number":475,"context_line":""},{"line_number":476,"context_line":"    def test_heal_allocations_paging_more_instances_remain(self):"},{"line_number":477,"context_line":"        \"\"\"Tests that there is one instance in cell1 and two instances in"},{"line_number":478,"context_line":"        cell2, with a --max-count\u003d2. This tests tha twe stop in cell2 once"},{"line_number":479,"context_line":"        max_count is reached."},{"line_number":480,"context_line":"        \"\"\""},{"line_number":481,"context_line":"        self._boot_and_assert_no_allocations(self.flavor, \u0027cell1\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_1b5d9f79","line":478,"range":{"start_line":478,"start_character":48,"end_line":478,"end_character":55},"updated":"2018-05-09 08:40:41.000000000","message":"nit: that we","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7bb38680399904027837c3a12933b3af46ec9822","unresolved":false,"context_lines":[{"line_number":475,"context_line":""},{"line_number":476,"context_line":"    def test_heal_allocations_paging_more_instances_remain(self):"},{"line_number":477,"context_line":"        \"\"\"Tests that there is one instance in cell1 and two instances in"},{"line_number":478,"context_line":"        cell2, with a --max-count\u003d2. This tests tha twe stop in cell2 once"},{"line_number":479,"context_line":"        max_count is reached."},{"line_number":480,"context_line":"        \"\"\""},{"line_number":481,"context_line":"        self._boot_and_assert_no_allocations(self.flavor, \u0027cell1\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_24886a6f","line":478,"range":{"start_line":478,"start_character":48,"end_line":478,"end_character":55},"in_reply_to":"5f7c97a3_1b5d9f79","updated":"2018-05-09 19:28:07.000000000","message":"Done","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9149d000948f74388bcafe5d2914550613bf86fc","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        result \u003d self.cli.heal_allocations(verbose\u003dTrue)"},{"line_number":497,"context_line":"        self.assertEqual(0, result, self.output.getvalue())"},{"line_number":498,"context_line":"        self.assertIn(\u0027Processed 3 instances.\u0027, self.output.getvalue())"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def test_heal_allocations_shelved(self):"},{"line_number":501,"context_line":"        \"\"\"Tests the scenario that an instance with no allocations is shelved"},{"line_number":502,"context_line":"        so heal_allocations skips it (since the instance is not on a host)."}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_5bf1d76a","line":499,"updated":"2018-05-09 08:40:41.000000000","message":"You could add couple of self._assert_healed() calls to the above tests for completeness.","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7bb38680399904027837c3a12933b3af46ec9822","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        result \u003d self.cli.heal_allocations(verbose\u003dTrue)"},{"line_number":497,"context_line":"        self.assertEqual(0, result, self.output.getvalue())"},{"line_number":498,"context_line":"        self.assertIn(\u0027Processed 3 instances.\u0027, self.output.getvalue())"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def test_heal_allocations_shelved(self):"},{"line_number":501,"context_line":"        \"\"\"Tests the scenario that an instance with no allocations is shelved"},{"line_number":502,"context_line":"        so heal_allocations skips it (since the instance is not on a host)."}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_c47e566a","line":499,"in_reply_to":"5f7c97a3_5bf1d76a","updated":"2018-05-09 19:28:07.000000000","message":"Done","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"}],"nova/tests/unit/test_nova_manage.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9149d000948f74388bcafe5d2914550613bf86fc","unresolved":false,"context_lines":[{"line_number":2457,"context_line":"                return_value\u003dmock.sentinel.resources)"},{"line_number":2458,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":2459,"context_line":"                \u0027put_allocations\u0027, return_value\u003dFalse)"},{"line_number":2460,"context_line":"    def test_heal_allocations_put_allocations_fails("},{"line_number":2461,"context_line":"            self, mock_put_allocations, mock_res_from_flavor,"},{"line_number":2462,"context_line":"            mock_get_compute_node, mock_get_allocs, mock_get_instances,"},{"line_number":2463,"context_line":"            mock_get_all_cells):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_9bc68f48","line":2460,"range":{"start_line":2460,"start_character":0,"end_line":2460,"end_character":52},"updated":"2018-05-09 08:40:41.000000000","message":"add one more test where put_allocation raises Retry","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7bb38680399904027837c3a12933b3af46ec9822","unresolved":false,"context_lines":[{"line_number":2457,"context_line":"                return_value\u003dmock.sentinel.resources)"},{"line_number":2458,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":2459,"context_line":"                \u0027put_allocations\u0027, return_value\u003dFalse)"},{"line_number":2460,"context_line":"    def test_heal_allocations_put_allocations_fails("},{"line_number":2461,"context_line":"            self, mock_put_allocations, mock_res_from_flavor,"},{"line_number":2462,"context_line":"            mock_get_compute_node, mock_get_allocs, mock_get_instances,"},{"line_number":2463,"context_line":"            mock_get_all_cells):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_e481124c","line":2460,"range":{"start_line":2460,"start_character":0,"end_line":2460,"end_character":52},"in_reply_to":"5f7c97a3_9bc68f48","updated":"2018-05-09 19:28:07.000000000","message":"Done","commit_id":"4d9516cd30668e483d5ebf787f56797527d3003b"}]}
