)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c8e9c6b997f3f09ede78cb7c0117ebac3af53aaf","unresolved":false,"context_lines":[{"line_number":18,"context_line":"That likely needs to happen in a change that provides"},{"line_number":19,"context_line":"an opt-in option for that behavior since it could be"},{"line_number":20,"context_line":"destructive for externally-managed provider aggregates"},{"line_number":21,"context_line":"for things like ironic nodes or shared storage pools."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Part of blueprint placement-mirror-host-aggregates"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5f7c97a3_c38c75da","line":21,"updated":"2018-07-11 11:43:55.000000000","message":"+","commit_id":"357858b178e28dad7fd8a1cb1418e1792911f7ac"}],"doc/source/cli/nova-manage.rst":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b4a6168b8435f33de4234dc0e950699461557f80","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"``nova-manage placement sync_aggregates [--verbose]``"},{"line_number":325,"context_line":"    Mirrors compute host aggregates to resource provider aggregates"},{"line_number":326,"context_line":"    in the Placement service. Requires the ``[api_database]`` and"},{"line_number":327,"context_line":"    ``[placement]`` sections of the nova configuration file to be"},{"line_number":328,"context_line":"    populated."},{"line_number":329,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_1835f3dc","line":326,"range":{"start_line":326,"start_character":46,"end_line":326,"end_character":58},"updated":"2018-07-23 15:55:15.000000000","message":"or ``[placement_database]``, right cdent?","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"763bb1460fbae444e8d2c808790470181da7ab79","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"``nova-manage placement sync_aggregates [--verbose]``"},{"line_number":325,"context_line":"    Mirrors compute host aggregates to resource provider aggregates"},{"line_number":326,"context_line":"    in the Placement service. Requires the ``[api_database]`` and"},{"line_number":327,"context_line":"    ``[placement]`` sections of the nova configuration file to be"},{"line_number":328,"context_line":"    populated."},{"line_number":329,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_ec2958f1","line":326,"range":{"start_line":326,"start_character":46,"end_line":326,"end_character":58},"in_reply_to":"5f7c97a3_1835f3dc","updated":"2018-07-23 15:58:03.000000000","message":"Not on this host. This command talks to placement over the api. Only the placement server needs to be aware of [placement_database] if it is being used.\n\nBut it talks to the database for compute nodes and aggregates, right?","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbc2e54648efe81871b6677d1ed48704d8d4ad9","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"``nova-manage placement sync_aggregates [--verbose]``"},{"line_number":325,"context_line":"    Mirrors compute host aggregates to resource provider aggregates"},{"line_number":326,"context_line":"    in the Placement service. Requires the ``[api_database]`` and"},{"line_number":327,"context_line":"    ``[placement]`` sections of the nova configuration file to be"},{"line_number":328,"context_line":"    populated."},{"line_number":329,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_8fc53693","line":326,"range":{"start_line":326,"start_character":46,"end_line":326,"end_character":58},"in_reply_to":"5f7c97a3_ec2958f1","updated":"2018-07-23 16:20:03.000000000","message":"Ahh, right right.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"55c18c81bee10a99ccc103190f8619b47d56528b","unresolved":false,"context_lines":[{"line_number":324,"context_line":"``nova-manage placement sync_aggregates [--verbose]``"},{"line_number":325,"context_line":"    Mirrors compute host aggregates to resource provider aggregates"},{"line_number":326,"context_line":"    in the Placement service. Requires the ``[api_database]`` and"},{"line_number":327,"context_line":"    ``[placement]`` sections of the nova configuration file to be"},{"line_number":328,"context_line":"    populated."},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    Specify ``--verbose`` to get detailed progress output during execution."},{"line_number":331,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_5b2112fd","line":328,"range":{"start_line":327,"start_character":4,"end_line":328,"end_character":14},"updated":"2018-07-24 09:17:17.000000000","message":"well, since Placement is mandatory from Ocata, the [placement] section should be populated for at least scheduler, compute services and now API services. I understand that operators could call nova-manage from other nodes so that\u0027s why you provide this comment, but maybe we should ask operators to make sure that [placement] section should be there for all of Nova services ?","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d95d54a3f360c295aebd277262362b34137f9fdf","unresolved":false,"context_lines":[{"line_number":324,"context_line":"``nova-manage placement sync_aggregates [--verbose]``"},{"line_number":325,"context_line":"    Mirrors compute host aggregates to resource provider aggregates"},{"line_number":326,"context_line":"    in the Placement service. Requires the ``[api_database]`` and"},{"line_number":327,"context_line":"    ``[placement]`` sections of the nova configuration file to be"},{"line_number":328,"context_line":"    populated."},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    Specify ``--verbose`` to get detailed progress output during execution."},{"line_number":331,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_6d052b79","line":328,"range":{"start_line":327,"start_character":4,"end_line":328,"end_character":14},"in_reply_to":"5f7c97a3_0a0edd3c","updated":"2018-07-24 13:24:39.000000000","message":"Sure, of course nova.conf files can be different between services. When I said the above, I meant that we could possibly tell operators to make sure that they set [placement] for all of the services. Anyway, sorry, I forgot to tell it was just a nitpick.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4eb42c120c81effeef7d7e29df7077d073d7b6d3","unresolved":false,"context_lines":[{"line_number":324,"context_line":"``nova-manage placement sync_aggregates [--verbose]``"},{"line_number":325,"context_line":"    Mirrors compute host aggregates to resource provider aggregates"},{"line_number":326,"context_line":"    in the Placement service. Requires the ``[api_database]`` and"},{"line_number":327,"context_line":"    ``[placement]`` sections of the nova configuration file to be"},{"line_number":328,"context_line":"    populated."},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    Specify ``--verbose`` to get detailed progress output during execution."},{"line_number":331,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_0a0edd3c","line":328,"range":{"start_line":327,"start_character":4,"end_line":328,"end_character":14},"in_reply_to":"5f7c97a3_5b2112fd","updated":"2018-07-24 13:06:18.000000000","message":"Placement wasn\u0027t required in n-api or n-cond in Ocata, those were added in over time and in special / optional cases, and I\u0027ve heard you yourself say before that we can\u0027t assume that the nova.conf is universal across services, like n-cpu and n-sch for example.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"55c18c81bee10a99ccc103190f8619b47d56528b","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    Return codes:"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    * 0: Successful run"},{"line_number":337,"context_line":"    * 1: A host was found with more than one matching compute node record"},{"line_number":338,"context_line":"    * 2: An unexpected error occurred while working with the placement API"},{"line_number":339,"context_line":"    * 3: Failed updating provider aggregates in placement"},{"line_number":340,"context_line":"    * 4: Host mappings not found for one or more host aggregate members"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_1b1b9acb","line":337,"updated":"2018-07-24 09:17:17.000000000","message":"While I understand why it wouldn\u0027t work (b/c aggregates only accept host names, not tuples (host, node)), I think we should explain above the limitation, and not only by a return code.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    Return codes:"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    * 0: Successful run"},{"line_number":337,"context_line":"    * 1: A host was found with more than one matching compute node record"},{"line_number":338,"context_line":"    * 2: An unexpected error occurred while working with the placement API"},{"line_number":339,"context_line":"    * 3: Failed updating provider aggregates in placement"},{"line_number":340,"context_line":"    * 4: Host mappings not found for one or more host aggregate members"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_1bb151e1","line":337,"in_reply_to":"5f7c97a3_0d7d97e5","updated":"2018-07-24 15:20:56.000000000","message":"I don\u0027t see anything specific to ironic here:\n\nhttps://docs.openstack.org/nova/latest/user/aggregates.html\n\nor here:\n\nhttps://developer.openstack.org/api-ref/compute/#host-aggregates-os-aggregates","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4eb42c120c81effeef7d7e29df7077d073d7b6d3","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    Return codes:"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    * 0: Successful run"},{"line_number":337,"context_line":"    * 1: A host was found with more than one matching compute node record"},{"line_number":338,"context_line":"    * 2: An unexpected error occurred while working with the placement API"},{"line_number":339,"context_line":"    * 3: Failed updating provider aggregates in placement"},{"line_number":340,"context_line":"    * 4: Host mappings not found for one or more host aggregate members"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_ed093b29","line":337,"in_reply_to":"5f7c97a3_1b1b9acb","updated":"2018-07-24 13:06:18.000000000","message":"I\u0027m not sure what you want me to do for this. Mention that ironic compute nodes are not supported in aggregates and therefore if you have \u003e1 compute node per host in an aggregate it\u0027s a problem in the database for that host?","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d95d54a3f360c295aebd277262362b34137f9fdf","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    Return codes:"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    * 0: Successful run"},{"line_number":337,"context_line":"    * 1: A host was found with more than one matching compute node record"},{"line_number":338,"context_line":"    * 2: An unexpected error occurred while working with the placement API"},{"line_number":339,"context_line":"    * 3: Failed updating provider aggregates in placement"},{"line_number":340,"context_line":"    * 4: Host mappings not found for one or more host aggregate members"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_0d7d97e5","line":337,"in_reply_to":"5f7c97a3_ed093b29","updated":"2018-07-24 13:24:39.000000000","message":"Do we have some documentation that already tells that aggregates aren\u0027t working for Ironic nodes ? Either in the API documentation or in the virt docs ? I don\u0027t think so. Maybe something we should do in a follow-up.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"}],"nova/cmd/manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"236379def121e91b24ad0d77aab3c770d4101cdd","unresolved":false,"context_lines":[{"line_number":2118,"context_line":"                            # provider."},{"line_number":2119,"context_line":"                            providers_not_found[host] \u003d rp_uuid"},{"line_number":2120,"context_line":"                        else:"},{"line_number":2121,"context_line":"                            # TODO(mriedem): Handle 409 conflicts by retrying"},{"line_number":2122,"context_line":"                            # the operation."},{"line_number":2123,"context_line":"                            print(\u0027Failed updating provider aggregates for \u0027"},{"line_number":2124,"context_line":"                                  \u0027host (%s), provider (%s) and aggregate \u0027"},{"line_number":2125,"context_line":"                                  \u0027(%s). Error: %s\u0027 %"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_6956762d","line":2122,"range":{"start_line":2121,"start_character":28,"end_line":2122,"end_character":44},"updated":"2018-06-18 14:36:52.000000000","message":"If using the SchedulerReportClient, rebase on top of https://review.openstack.org/#/c/556669/ to get the aggregate generation conflict resolution.","commit_id":"faef5f77f037771508cbf0be1a818ba623710749"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bf9f818f80f52ed5db952c09af598f4989279e91","unresolved":false,"context_lines":[{"line_number":2128,"context_line":"                            return 3"},{"line_number":2129,"context_line":"                elif resp.status_code \u003d\u003d 404:"},{"line_number":2130,"context_line":"                    # The resource provider wasn\u0027t found. Store this for later."},{"line_number":2131,"context_line":"                    providers_not_found.append(rp_uuid)"},{"line_number":2132,"context_line":"                else:"},{"line_number":2133,"context_line":"                    print(\u0027An error occurred getting resource provider \u0027"},{"line_number":2134,"context_line":"                          \u0027aggregates from placement for provider %s. \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_710ebc3d","line":2131,"range":{"start_line":2131,"start_character":20,"end_line":2131,"end_character":55},"updated":"2018-07-09 18:59:15.000000000","message":"Should be:\n\nproviders_not_found[host] \u003d rp_uuid","commit_id":"faef5f77f037771508cbf0be1a818ba623710749"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8df0e605c59ef16d90c29a7530097e5807bbd8cf","unresolved":false,"context_lines":[{"line_number":2128,"context_line":"                            return 3"},{"line_number":2129,"context_line":"                elif resp.status_code \u003d\u003d 404:"},{"line_number":2130,"context_line":"                    # The resource provider wasn\u0027t found. Store this for later."},{"line_number":2131,"context_line":"                    providers_not_found.append(rp_uuid)"},{"line_number":2132,"context_line":"                else:"},{"line_number":2133,"context_line":"                    print(\u0027An error occurred getting resource provider \u0027"},{"line_number":2134,"context_line":"                          \u0027aggregates from placement for provider %s. \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_74ac6a87","line":2131,"range":{"start_line":2131,"start_character":20,"end_line":2131,"end_character":55},"in_reply_to":"5f7c97a3_710ebc3d","updated":"2018-07-09 19:18:48.000000000","message":"Done","commit_id":"faef5f77f037771508cbf0be1a818ba623710749"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c8e9c6b997f3f09ede78cb7c0117ebac3af53aaf","unresolved":false,"context_lines":[{"line_number":2012,"context_line":"    # placement, but regarding removal, what if the operator or some external"},{"line_number":2013,"context_line":"    # tool added the resource provider to an aggregate but there is no matching"},{"line_number":2014,"context_line":"    # host aggregate, e.g. ironic nodes or shared storage provider"},{"line_number":2015,"context_line":"    # relationships?"},{"line_number":2016,"context_line":"    # TODO(mriedem): Probably want an option to pass a specific host instead of"},{"line_number":2017,"context_line":"    # doing all of them."},{"line_number":2018,"context_line":"    def sync_aggregates(self, verbose\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_835d1d56","line":2015,"updated":"2018-07-11 11:43:55.000000000","message":"this todo no longer in sync with the commit message","commit_id":"357858b178e28dad7fd8a1cb1418e1792911f7ac"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a29be6bc0212f1de7612c7933551deeacac3fa1b","unresolved":false,"context_lines":[{"line_number":2012,"context_line":"    # placement, but regarding removal, what if the operator or some external"},{"line_number":2013,"context_line":"    # tool added the resource provider to an aggregate but there is no matching"},{"line_number":2014,"context_line":"    # host aggregate, e.g. ironic nodes or shared storage provider"},{"line_number":2015,"context_line":"    # relationships?"},{"line_number":2016,"context_line":"    # TODO(mriedem): Probably want an option to pass a specific host instead of"},{"line_number":2017,"context_line":"    # doing all of them."},{"line_number":2018,"context_line":"    def sync_aggregates(self, verbose\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_cc7821f9","line":2015,"in_reply_to":"5f7c97a3_835d1d56","updated":"2018-07-11 14:11:21.000000000","message":"As in it\u0027s not a question anymore?","commit_id":"357858b178e28dad7fd8a1cb1418e1792911f7ac"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"55c18c81bee10a99ccc103190f8619b47d56528b","unresolved":false,"context_lines":[{"line_number":2024,"context_line":"            # There should really only be one, since only ironic"},{"line_number":2025,"context_line":"            # hosts can have multiple nodes, and you can\u0027t have"},{"line_number":2026,"context_line":"            # ironic hosts in aggregates for that reason. If we"},{"line_number":2027,"context_line":"            # find more than one, it\u0027s an error."},{"line_number":2028,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host("},{"line_number":2029,"context_line":"                cctxt, host)"},{"line_number":2030,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_9bca4a17","line":2027,"updated":"2018-07-24 09:17:17.000000000","message":"well, it\u0027s more the fact that aggregates only work with hosts but not compute nodes *for the moment* , hence Ironic not accepting it. That\u0027s a limitation, but in a next cycle, someone could ask for a microversion with aggregates API for accepting (host, node) tuples for example.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4eb42c120c81effeef7d7e29df7077d073d7b6d3","unresolved":false,"context_lines":[{"line_number":2024,"context_line":"            # There should really only be one, since only ironic"},{"line_number":2025,"context_line":"            # hosts can have multiple nodes, and you can\u0027t have"},{"line_number":2026,"context_line":"            # ironic hosts in aggregates for that reason. If we"},{"line_number":2027,"context_line":"            # find more than one, it\u0027s an error."},{"line_number":2028,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host("},{"line_number":2029,"context_line":"                cctxt, host)"},{"line_number":2030,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_0d1cb764","line":2027,"in_reply_to":"5f7c97a3_9bca4a17","updated":"2018-07-24 13:06:18.000000000","message":"I don\u0027t plan on putting something in here about potential future requirements.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b4a6168b8435f33de4234dc0e950699461557f80","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"                # won\u0027t know which node to use."},{"line_number":2034,"context_line":"                raise exception.TooManyComputesForHost("},{"line_number":2035,"context_line":"                    num_computes\u003dlen(nodes), host\u003dhost)"},{"line_number":2036,"context_line":"            return nodes[0].uuid"},{"line_number":2037,"context_line":""},{"line_number":2038,"context_line":"    @action_description("},{"line_number":2039,"context_line":"        _(\"Mirrors compute host aggregates to resource provider aggregates \""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_b882bf50","line":2036,"range":{"start_line":2036,"start_character":19,"end_line":2036,"end_character":27},"updated":"2018-07-23 15:55:15.000000000","message":"Does something above this raise if there are no nodes?\n\nIOW, is there a way for len(nodes) to be zero here (and cause IndexError)?\n\n[Later] Based on the `except` clauses on L2097-2105, I guess it\u0027s covered, though it\u0027s not clear to me which exception(s) would result from that condition.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"                # won\u0027t know which node to use."},{"line_number":2034,"context_line":"                raise exception.TooManyComputesForHost("},{"line_number":2035,"context_line":"                    num_computes\u003dlen(nodes), host\u003dhost)"},{"line_number":2036,"context_line":"            return nodes[0].uuid"},{"line_number":2037,"context_line":""},{"line_number":2038,"context_line":"    @action_description("},{"line_number":2039,"context_line":"        _(\"Mirrors compute host aggregates to resource provider aggregates \""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_fbe015ce","line":2036,"range":{"start_line":2036,"start_character":19,"end_line":2036,"end_character":27},"in_reply_to":"5f7c97a3_65c6bb6c","updated":"2018-07-24 15:20:56.000000000","message":"I\u0027ll add a docstring with the appropriate raises.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73550b6b59a6102631c5ad31e5b886e799e286f9","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"                # won\u0027t know which node to use."},{"line_number":2034,"context_line":"                raise exception.TooManyComputesForHost("},{"line_number":2035,"context_line":"                    num_computes\u003dlen(nodes), host\u003dhost)"},{"line_number":2036,"context_line":"            return nodes[0].uuid"},{"line_number":2037,"context_line":""},{"line_number":2038,"context_line":"    @action_description("},{"line_number":2039,"context_line":"        _(\"Mirrors compute host aggregates to resource provider aggregates \""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_65c6bb6c","line":2036,"range":{"start_line":2036,"start_character":19,"end_line":2036,"end_character":27},"in_reply_to":"5f7c97a3_b882bf50","updated":"2018-07-23 17:56:06.000000000","message":"ComputeNodeList.get_by_host will raise ComputeHostNotFound if none found for that host.\n\nhttps://github.com/openstack/nova/blob/838f6dfb03aa7313b44eebfebeeb5470ff16de4d/nova/db/sqlalchemy/api.py#L657","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b4a6168b8435f33de4234dc0e950699461557f80","unresolved":false,"context_lines":[{"line_number":2037,"context_line":""},{"line_number":2038,"context_line":"    @action_description("},{"line_number":2039,"context_line":"        _(\"Mirrors compute host aggregates to resource provider aggregates \""},{"line_number":2040,"context_line":"          \"in the Placement service. Requires the [api_database] and \""},{"line_number":2041,"context_line":"          \"[placement] sections of the nova configuration file to be \""},{"line_number":2042,"context_line":"          \"populated.\"))"},{"line_number":2043,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, dest\u003d\u0027verbose\u0027, default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_f84a7722","line":2040,"range":{"start_line":2040,"start_character":51,"end_line":2040,"end_character":63},"updated":"2018-07-23 15:55:15.000000000","message":"or [placement_database]","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f07a5bca184b142b445484726528c2c828339f0c","unresolved":false,"context_lines":[{"line_number":2037,"context_line":""},{"line_number":2038,"context_line":"    @action_description("},{"line_number":2039,"context_line":"        _(\"Mirrors compute host aggregates to resource provider aggregates \""},{"line_number":2040,"context_line":"          \"in the Placement service. Requires the [api_database] and \""},{"line_number":2041,"context_line":"          \"[placement] sections of the nova configuration file to be \""},{"line_number":2042,"context_line":"          \"populated.\"))"},{"line_number":2043,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, dest\u003d\u0027verbose\u0027, default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_454fffbe","line":2040,"range":{"start_line":2040,"start_character":51,"end_line":2040,"end_character":63},"in_reply_to":"5f7c97a3_85a437ba","updated":"2018-07-23 18:09:59.000000000","message":"Yup, Chris explained, thanks.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73550b6b59a6102631c5ad31e5b886e799e286f9","unresolved":false,"context_lines":[{"line_number":2037,"context_line":""},{"line_number":2038,"context_line":"    @action_description("},{"line_number":2039,"context_line":"        _(\"Mirrors compute host aggregates to resource provider aggregates \""},{"line_number":2040,"context_line":"          \"in the Placement service. Requires the [api_database] and \""},{"line_number":2041,"context_line":"          \"[placement] sections of the nova configuration file to be \""},{"line_number":2042,"context_line":"          \"populated.\"))"},{"line_number":2043,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, dest\u003d\u0027verbose\u0027, default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_85a437ba","line":2040,"range":{"start_line":2040,"start_character":51,"end_line":2040,"end_character":63},"in_reply_to":"5f7c97a3_f84a7722","updated":"2018-07-23 17:56:06.000000000","message":"As noted in the man page docs, we don\u0027t need the placement database for this. We need the nova API database to find the nova host aggregates. We talk to placement over the REST API.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"55c18c81bee10a99ccc103190f8619b47d56528b","unresolved":false,"context_lines":[{"line_number":2068,"context_line":"        # Start by getting all host aggregates."},{"line_number":2069,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":2070,"context_line":"        aggregate_api \u003d compute_api.AggregateAPI()"},{"line_number":2071,"context_line":"        placement \u003d aggregate_api.placement_client"},{"line_number":2072,"context_line":"        aggregates \u003d aggregate_api.get_aggregate_list(ctxt)"},{"line_number":2073,"context_line":"        # Now we\u0027re going to loop over the existing compute hosts in aggregates"},{"line_number":2074,"context_line":"        # and check to see if their corresponding resource provider, found via"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_5b59125a","line":2071,"updated":"2018-07-24 09:17:17.000000000","message":"that\u0027s one way to use an existing placement client...","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"55c18c81bee10a99ccc103190f8619b47d56528b","unresolved":false,"context_lines":[{"line_number":2076,"context_line":"        # add the resource provider to the aggregate in Placement."},{"line_number":2077,"context_line":"        output \u003d lambda msg: None"},{"line_number":2078,"context_line":"        if verbose:"},{"line_number":2079,"context_line":"            output \u003d lambda msg: print(msg)"},{"line_number":2080,"context_line":"        output(\u0027Filling in missing placement aggregates\u0027)"},{"line_number":2081,"context_line":"        # Since hosts can be in more than one aggregate, keep track of the host"},{"line_number":2082,"context_line":"        # to it\u0027s corresponding resource provider uuid to avoid redundant"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_db5c425a","line":2079,"range":{"start_line":2079,"start_character":38,"end_line":2079,"end_character":43},"updated":"2018-07-24 09:17:17.000000000","message":"we should translate this message, if possible.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d95d54a3f360c295aebd277262362b34137f9fdf","unresolved":false,"context_lines":[{"line_number":2076,"context_line":"        # add the resource provider to the aggregate in Placement."},{"line_number":2077,"context_line":"        output \u003d lambda msg: None"},{"line_number":2078,"context_line":"        if verbose:"},{"line_number":2079,"context_line":"            output \u003d lambda msg: print(msg)"},{"line_number":2080,"context_line":"        output(\u0027Filling in missing placement aggregates\u0027)"},{"line_number":2081,"context_line":"        # Since hosts can be in more than one aggregate, keep track of the host"},{"line_number":2082,"context_line":"        # to it\u0027s corresponding resource provider uuid to avoid redundant"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_ed993b6b","line":2079,"range":{"start_line":2079,"start_character":38,"end_line":2079,"end_character":43},"in_reply_to":"5f7c97a3_0d51170e","updated":"2018-07-24 13:24:39.000000000","message":"Yup, you\u0027re right, I just commented here simply, but of course we need to translate each of them directly.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4eb42c120c81effeef7d7e29df7077d073d7b6d3","unresolved":false,"context_lines":[{"line_number":2076,"context_line":"        # add the resource provider to the aggregate in Placement."},{"line_number":2077,"context_line":"        output \u003d lambda msg: None"},{"line_number":2078,"context_line":"        if verbose:"},{"line_number":2079,"context_line":"            output \u003d lambda msg: print(msg)"},{"line_number":2080,"context_line":"        output(\u0027Filling in missing placement aggregates\u0027)"},{"line_number":2081,"context_line":"        # Since hosts can be in more than one aggregate, keep track of the host"},{"line_number":2082,"context_line":"        # to it\u0027s corresponding resource provider uuid to avoid redundant"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_0d51170e","line":2079,"range":{"start_line":2079,"start_character":38,"end_line":2079,"end_character":43},"in_reply_to":"5f7c97a3_db5c425a","updated":"2018-07-24 13:06:18.000000000","message":"Marking this specific line for translation wouldn\u0027t do anything, you\u0027d have to mark every other message that goes to this output function as translatable ( _() ) - is that what you want?","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":2076,"context_line":"        # add the resource provider to the aggregate in Placement."},{"line_number":2077,"context_line":"        output \u003d lambda msg: None"},{"line_number":2078,"context_line":"        if verbose:"},{"line_number":2079,"context_line":"            output \u003d lambda msg: print(msg)"},{"line_number":2080,"context_line":"        output(\u0027Filling in missing placement aggregates\u0027)"},{"line_number":2081,"context_line":"        # Since hosts can be in more than one aggregate, keep track of the host"},{"line_number":2082,"context_line":"        # to it\u0027s corresponding resource provider uuid to avoid redundant"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_7bde45dc","line":2079,"range":{"start_line":2079,"start_character":38,"end_line":2079,"end_character":43},"in_reply_to":"5f7c97a3_ed993b6b","updated":"2018-07-24 15:20:56.000000000","message":"Done","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b4a6168b8435f33de4234dc0e950699461557f80","unresolved":false,"context_lines":[{"line_number":2079,"context_line":"            output \u003d lambda msg: print(msg)"},{"line_number":2080,"context_line":"        output(\u0027Filling in missing placement aggregates\u0027)"},{"line_number":2081,"context_line":"        # Since hosts can be in more than one aggregate, keep track of the host"},{"line_number":2082,"context_line":"        # to it\u0027s corresponding resource provider uuid to avoid redundant"},{"line_number":2083,"context_line":"        # lookups."},{"line_number":2084,"context_line":"        host_to_rp_uuid \u003d {}"},{"line_number":2085,"context_line":"        unmapped_hosts \u003d set([])  # keep track of any missing host mappings"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_587dab1c","line":2082,"range":{"start_line":2082,"start_character":13,"end_line":2082,"end_character":17},"updated":"2018-07-23 15:55:15.000000000","message":"its","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":2079,"context_line":"            output \u003d lambda msg: print(msg)"},{"line_number":2080,"context_line":"        output(\u0027Filling in missing placement aggregates\u0027)"},{"line_number":2081,"context_line":"        # Since hosts can be in more than one aggregate, keep track of the host"},{"line_number":2082,"context_line":"        # to it\u0027s corresponding resource provider uuid to avoid redundant"},{"line_number":2083,"context_line":"        # lookups."},{"line_number":2084,"context_line":"        host_to_rp_uuid \u003d {}"},{"line_number":2085,"context_line":"        unmapped_hosts \u003d set([])  # keep track of any missing host mappings"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_5b190985","line":2082,"range":{"start_line":2082,"start_character":13,"end_line":2082,"end_character":17},"in_reply_to":"5f7c97a3_587dab1c","updated":"2018-07-24 15:20:56.000000000","message":"Done","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b4a6168b8435f33de4234dc0e950699461557f80","unresolved":false,"context_lines":[{"line_number":2082,"context_line":"        # to it\u0027s corresponding resource provider uuid to avoid redundant"},{"line_number":2083,"context_line":"        # lookups."},{"line_number":2084,"context_line":"        host_to_rp_uuid \u003d {}"},{"line_number":2085,"context_line":"        unmapped_hosts \u003d set([])  # keep track of any missing host mappings"},{"line_number":2086,"context_line":"        computes_not_found \u003d set([])  # keep track of missing nodes"},{"line_number":2087,"context_line":"        providers_not_found \u003d {}  # map of hostname to missing provider uuid"},{"line_number":2088,"context_line":"        for aggregate in aggregates:"},{"line_number":2089,"context_line":"            output(\u0027Processing aggregate: %s\u0027 % aggregate.name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_58928b4c","line":2086,"range":{"start_line":2085,"start_character":0,"end_line":2086,"end_character":67},"updated":"2018-07-23 15:55:15.000000000","message":"nit: [] redundant","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":2082,"context_line":"        # to it\u0027s corresponding resource provider uuid to avoid redundant"},{"line_number":2083,"context_line":"        # lookups."},{"line_number":2084,"context_line":"        host_to_rp_uuid \u003d {}"},{"line_number":2085,"context_line":"        unmapped_hosts \u003d set([])  # keep track of any missing host mappings"},{"line_number":2086,"context_line":"        computes_not_found \u003d set([])  # keep track of missing nodes"},{"line_number":2087,"context_line":"        providers_not_found \u003d {}  # map of hostname to missing provider uuid"},{"line_number":2088,"context_line":"        for aggregate in aggregates:"},{"line_number":2089,"context_line":"            output(\u0027Processing aggregate: %s\u0027 % aggregate.name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_db04391c","line":2086,"range":{"start_line":2085,"start_character":0,"end_line":2086,"end_character":67},"in_reply_to":"5f7c97a3_58928b4c","updated":"2018-07-24 15:20:56.000000000","message":"Done","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b4a6168b8435f33de4234dc0e950699461557f80","unresolved":false,"context_lines":[{"line_number":2113,"context_line":"                # node uuid, is in the same aggregate in placement, found via"},{"line_number":2114,"context_line":"                # aggregate uuid."},{"line_number":2115,"context_line":"                # NOTE(mriedem): We could re-use placement.aggregate_add_host"},{"line_number":2116,"context_line":"                # here although that doesn\u0027t take into account generation yet"},{"line_number":2117,"context_line":"                # and has to do the provider lookup by host as well."},{"line_number":2118,"context_line":"                resp \u003d placement.get(  # use 1.19 to get the generation"},{"line_number":2119,"context_line":"                    \u0027/resource_providers/%s/aggregates\u0027 % rp_uuid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_ccfedcb4","line":2116,"range":{"start_line":2116,"start_character":23,"end_line":2116,"end_character":77},"updated":"2018-07-23 15:55:15.000000000","message":"Yeah, no longer true. Please edit if you respin.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":2113,"context_line":"                # node uuid, is in the same aggregate in placement, found via"},{"line_number":2114,"context_line":"                # aggregate uuid."},{"line_number":2115,"context_line":"                # NOTE(mriedem): We could re-use placement.aggregate_add_host"},{"line_number":2116,"context_line":"                # here although that doesn\u0027t take into account generation yet"},{"line_number":2117,"context_line":"                # and has to do the provider lookup by host as well."},{"line_number":2118,"context_line":"                resp \u003d placement.get(  # use 1.19 to get the generation"},{"line_number":2119,"context_line":"                    \u0027/resource_providers/%s/aggregates\u0027 % rp_uuid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_1621289f","line":2116,"range":{"start_line":2116,"start_character":23,"end_line":2116,"end_character":77},"in_reply_to":"5f7c97a3_ccfedcb4","updated":"2018-07-24 15:20:56.000000000","message":"Done","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"55c18c81bee10a99ccc103190f8619b47d56528b","unresolved":false,"context_lines":[{"line_number":2117,"context_line":"                # and has to do the provider lookup by host as well."},{"line_number":2118,"context_line":"                resp \u003d placement.get(  # use 1.19 to get the generation"},{"line_number":2119,"context_line":"                    \u0027/resource_providers/%s/aggregates\u0027 % rp_uuid,"},{"line_number":2120,"context_line":"                    version\u003d\u00271.19\u0027)"},{"line_number":2121,"context_line":"                if resp:"},{"line_number":2122,"context_line":"                    body \u003d resp.json()"},{"line_number":2123,"context_line":"                    provider_aggregate_uuids \u003d body[\u0027aggregates\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_963221f3","line":2120,"updated":"2018-07-24 09:17:17.000000000","message":"just a slight note that we make N calls to Placement per N hosts in aggregates (even if one host is part of two aggregates) which could be a performance concern for operators where they could potentially require more placement workers (at least for the duration of this call only).\n\nCaching could help - with the price it takes (and I\u0027m not sure it\u0027s a big help as it could create more problems than it solves), or at least some marker/limit.\n\nLet\u0027s punt this as a TODO, but I feel we should somehow advertise the operators in the documentation that they need to have performant placement API workers and DB.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":2117,"context_line":"                # and has to do the provider lookup by host as well."},{"line_number":2118,"context_line":"                resp \u003d placement.get(  # use 1.19 to get the generation"},{"line_number":2119,"context_line":"                    \u0027/resource_providers/%s/aggregates\u0027 % rp_uuid,"},{"line_number":2120,"context_line":"                    version\u003d\u00271.19\u0027)"},{"line_number":2121,"context_line":"                if resp:"},{"line_number":2122,"context_line":"                    body \u003d resp.json()"},{"line_number":2123,"context_line":"                    provider_aggregate_uuids \u003d body[\u0027aggregates\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_762f3c89","line":2120,"in_reply_to":"5f7c97a3_4d462f81","updated":"2018-07-24 15:20:56.000000000","message":"Done","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d95d54a3f360c295aebd277262362b34137f9fdf","unresolved":false,"context_lines":[{"line_number":2117,"context_line":"                # and has to do the provider lookup by host as well."},{"line_number":2118,"context_line":"                resp \u003d placement.get(  # use 1.19 to get the generation"},{"line_number":2119,"context_line":"                    \u0027/resource_providers/%s/aggregates\u0027 % rp_uuid,"},{"line_number":2120,"context_line":"                    version\u003d\u00271.19\u0027)"},{"line_number":2121,"context_line":"                if resp:"},{"line_number":2122,"context_line":"                    body \u003d resp.json()"},{"line_number":2123,"context_line":"                    provider_aggregate_uuids \u003d body[\u0027aggregates\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_4d462f81","line":2120,"in_reply_to":"5f7c97a3_6d9a0bc5","updated":"2018-07-24 13:24:39.000000000","message":"The performance concern I have is not about the host/RP UUID mapping, it\u0027s about the fact we call N times Placement for getting the list of RPs of a specific placement aggregate, where N is the number of times we have hosts in nova aggregate (remembering that one host can be in multiple nova aggregates per se).\n\nAnyway, I\u0027ll try to amend the nova-manage man page with what we discussed in IRC.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4eb42c120c81effeef7d7e29df7077d073d7b6d3","unresolved":false,"context_lines":[{"line_number":2117,"context_line":"                # and has to do the provider lookup by host as well."},{"line_number":2118,"context_line":"                resp \u003d placement.get(  # use 1.19 to get the generation"},{"line_number":2119,"context_line":"                    \u0027/resource_providers/%s/aggregates\u0027 % rp_uuid,"},{"line_number":2120,"context_line":"                    version\u003d\u00271.19\u0027)"},{"line_number":2121,"context_line":"                if resp:"},{"line_number":2122,"context_line":"                    body \u003d resp.json()"},{"line_number":2123,"context_line":"                    provider_aggregate_uuids \u003d body[\u0027aggregates\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_6d9a0bc5","line":2120,"in_reply_to":"5f7c97a3_963221f3","updated":"2018-07-24 13:06:18.000000000","message":"Note that we do cache the host -\u003e RP UUID mapping above:\n\n  rp_uuid \u003d host_to_rp_uuid.get(host)\n\nSo if a host is in more than one aggregate, we only need to look up it\u0027s RP UUID once.\n\nOtherwise I don\u0027t know what you want in the docs for this. This is nowhere near the scale impact that people have when they enable all of their computes to hit placement in the ResourceTracker. I don\u0027t know how to tell someone to make sure they have performant placement API workers and DB w/o actually knowing what impact this would have on their existing setup.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b4a6168b8435f33de4234dc0e950699461557f80","unresolved":false,"context_lines":[{"line_number":2157,"context_line":"                elif resp.status_code \u003d\u003d 404:"},{"line_number":2158,"context_line":"                    # The resource provider wasn\u0027t found. Store this for later."},{"line_number":2159,"context_line":"                    providers_not_found[host] \u003d rp_uuid"},{"line_number":2160,"context_line":"                else:"},{"line_number":2161,"context_line":"                    print(\u0027An error occurred getting resource provider \u0027"},{"line_number":2162,"context_line":"                          \u0027aggregates from placement for provider %s. \u0027"},{"line_number":2163,"context_line":"                          \u0027Error: %s\u0027 % (rp_uuid, resp.text))"},{"line_number":2164,"context_line":"                    return 2"},{"line_number":2165,"context_line":""},{"line_number":2166,"context_line":"        # Now do our error handling."},{"line_number":2167,"context_line":"        if unmapped_hosts:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_0c2ff489","line":2164,"range":{"start_line":2160,"start_character":16,"end_line":2164,"end_character":28},"updated":"2018-07-23 15:55:15.000000000","message":"Not sure what the protocol is, but should you accumulate these and report them at the end? Otherwise you\u0027ve processed an unpredictable subset of hosts and left an unpredictable subset behind.\n\nPerhaps your thinking is that this error, whatever it is, probably means our link to placement is busted, so we would likely fail all of them?","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73550b6b59a6102631c5ad31e5b886e799e286f9","unresolved":false,"context_lines":[{"line_number":2157,"context_line":"                elif resp.status_code \u003d\u003d 404:"},{"line_number":2158,"context_line":"                    # The resource provider wasn\u0027t found. Store this for later."},{"line_number":2159,"context_line":"                    providers_not_found[host] \u003d rp_uuid"},{"line_number":2160,"context_line":"                else:"},{"line_number":2161,"context_line":"                    print(\u0027An error occurred getting resource provider \u0027"},{"line_number":2162,"context_line":"                          \u0027aggregates from placement for provider %s. \u0027"},{"line_number":2163,"context_line":"                          \u0027Error: %s\u0027 % (rp_uuid, resp.text))"},{"line_number":2164,"context_line":"                    return 2"},{"line_number":2165,"context_line":""},{"line_number":2166,"context_line":"        # Now do our error handling."},{"line_number":2167,"context_line":"        if unmapped_hosts:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_4577ff3d","line":2164,"range":{"start_line":2160,"start_character":16,"end_line":2164,"end_character":28},"in_reply_to":"5f7c97a3_0c2ff489","updated":"2018-07-23 17:56:06.000000000","message":"Right if we don\u0027t get something or a 404, then consider placement to be fubar and we just stop.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"55c18c81bee10a99ccc103190f8619b47d56528b","unresolved":false,"context_lines":[{"line_number":2157,"context_line":"                elif resp.status_code \u003d\u003d 404:"},{"line_number":2158,"context_line":"                    # The resource provider wasn\u0027t found. Store this for later."},{"line_number":2159,"context_line":"                    providers_not_found[host] \u003d rp_uuid"},{"line_number":2160,"context_line":"                else:"},{"line_number":2161,"context_line":"                    print(\u0027An error occurred getting resource provider \u0027"},{"line_number":2162,"context_line":"                          \u0027aggregates from placement for provider %s. \u0027"},{"line_number":2163,"context_line":"                          \u0027Error: %s\u0027 % (rp_uuid, resp.text))"},{"line_number":2164,"context_line":"                    return 2"},{"line_number":2165,"context_line":""},{"line_number":2166,"context_line":"        # Now do our error handling."},{"line_number":2167,"context_line":"        if unmapped_hosts:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_9b0d6a42","line":2164,"range":{"start_line":2160,"start_character":16,"end_line":2164,"end_character":28},"in_reply_to":"5f7c97a3_4577ff3d","updated":"2018-07-24 09:17:17.000000000","message":"Agreed with Matt here.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b4a6168b8435f33de4234dc0e950699461557f80","unresolved":false,"context_lines":[{"line_number":2186,"context_line":"                  \u0027,\u0027.join(\u0027(%s\u003d%s)\u0027 % (host, providers_not_found[host])"},{"line_number":2187,"context_line":"                           for host in sorted(providers_not_found.keys())))"},{"line_number":2188,"context_line":"            return 6"},{"line_number":2189,"context_line":""},{"line_number":2190,"context_line":"        return 0"},{"line_number":2191,"context_line":""},{"line_number":2192,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_0c5db415","line":2189,"updated":"2018-07-23 15:55:15.000000000","message":"It\u0027s a little weird that the error conditions have a \"priority\". I mean, I get that we can only have one RC in the end. But perhaps we should emit all of the applicable messages, even though we\u0027re picking just one RC?","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73550b6b59a6102631c5ad31e5b886e799e286f9","unresolved":false,"context_lines":[{"line_number":2186,"context_line":"                  \u0027,\u0027.join(\u0027(%s\u003d%s)\u0027 % (host, providers_not_found[host])"},{"line_number":2187,"context_line":"                           for host in sorted(providers_not_found.keys())))"},{"line_number":2188,"context_line":"            return 6"},{"line_number":2189,"context_line":""},{"line_number":2190,"context_line":"        return 0"},{"line_number":2191,"context_line":""},{"line_number":2192,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_6599db69","line":2189,"in_reply_to":"5f7c97a3_0c5db415","updated":"2018-07-23 17:56:06.000000000","message":"I guess I didn\u0027t think about them as being in some kind of priority order, I think I just started writing the first one this way and then added the others. If we want to dump all errors, we could do that at the end or per location that we hit the error and then this just becomes error checking for the return code value.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f07a5bca184b142b445484726528c2c828339f0c","unresolved":false,"context_lines":[{"line_number":2186,"context_line":"                  \u0027,\u0027.join(\u0027(%s\u003d%s)\u0027 % (host, providers_not_found[host])"},{"line_number":2187,"context_line":"                           for host in sorted(providers_not_found.keys())))"},{"line_number":2188,"context_line":"            return 6"},{"line_number":2189,"context_line":""},{"line_number":2190,"context_line":"        return 0"},{"line_number":2191,"context_line":""},{"line_number":2192,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_65d1dbca","line":2189,"in_reply_to":"5f7c97a3_6599db69","updated":"2018-07-23 18:09:59.000000000","message":"I think that would be a better UX. Otherwise I go fix one thing and run again and run into the next thing. If I got all the errors at once, I could potentially fix them all at once.\n\nIt\u0027s a minor thing.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":2186,"context_line":"                  \u0027,\u0027.join(\u0027(%s\u003d%s)\u0027 % (host, providers_not_found[host])"},{"line_number":2187,"context_line":"                           for host in sorted(providers_not_found.keys())))"},{"line_number":2188,"context_line":"            return 6"},{"line_number":2189,"context_line":""},{"line_number":2190,"context_line":"        return 0"},{"line_number":2191,"context_line":""},{"line_number":2192,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_f6502c0c","line":2189,"in_reply_to":"5f7c97a3_65d1dbca","updated":"2018-07-24 15:20:56.000000000","message":"Done","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"50aecde4f07dec9af0fcff67cff79d4dc1448520","unresolved":false,"context_lines":[{"line_number":2028,"context_line":"        :raises: nova.exception.ComputeHostNotFound if no compute_nodes record"},{"line_number":2029,"context_line":"            is found in the cell database for the host; indicates the"},{"line_number":2030,"context_line":"            nova-compute service on that host might need to be restarted."},{"line_number":2031,"context_line":"        :raises: nova.exception.TooManyComputesForHost if there are more than"},{"line_number":2032,"context_line":"            one compute_nodes records in the cell database for the host which"},{"line_number":2033,"context_line":"            is only possible (under normal circumstances) for ironic hosts but"},{"line_number":2034,"context_line":"            ironic hosts are not currently supported with host aggregates so"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_2183bc05","line":2031,"range":{"start_line":2031,"start_character":64,"end_line":2031,"end_character":67},"updated":"2018-07-24 15:32:49.000000000","message":"is","commit_id":"aa6360d68385f36062034bdd1d982e918ea33c94"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"50aecde4f07dec9af0fcff67cff79d4dc1448520","unresolved":false,"context_lines":[{"line_number":2029,"context_line":"            is found in the cell database for the host; indicates the"},{"line_number":2030,"context_line":"            nova-compute service on that host might need to be restarted."},{"line_number":2031,"context_line":"        :raises: nova.exception.TooManyComputesForHost if there are more than"},{"line_number":2032,"context_line":"            one compute_nodes records in the cell database for the host which"},{"line_number":2033,"context_line":"            is only possible (under normal circumstances) for ironic hosts but"},{"line_number":2034,"context_line":"            ironic hosts are not currently supported with host aggregates so"},{"line_number":2035,"context_line":"            if more than one compute node is found for the host, it is"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_e174e439","line":2032,"range":{"start_line":2032,"start_character":30,"end_line":2032,"end_character":37},"updated":"2018-07-24 15:32:49.000000000","message":"record","commit_id":"aa6360d68385f36062034bdd1d982e918ea33c94"}],"nova/exception.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c8e9c6b997f3f09ede78cb7c0117ebac3af53aaf","unresolved":false,"context_lines":[{"line_number":2286,"context_line":"                \u0027against resource provider %(provider)s.\u0027)"},{"line_number":2287,"context_line":""},{"line_number":2288,"context_line":""},{"line_number":2289,"context_line":"class TooManyComputesForHost(NovaException):"},{"line_number":2290,"context_line":"    msg_fmt \u003d _(\u0027Unexpected number of compute node records \u0027"},{"line_number":2291,"context_line":"                \u0027(%(num_computes)d) found for host %(host)s. There should \u0027"},{"line_number":2292,"context_line":"                \u0027only be a one-to-one mapping.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_4335c5f5","line":2289,"updated":"2018-07-11 11:43:55.000000000","message":"Out of curiosity, how can this happen?","commit_id":"357858b178e28dad7fd8a1cb1418e1792911f7ac"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a29be6bc0212f1de7612c7933551deeacac3fa1b","unresolved":false,"context_lines":[{"line_number":2286,"context_line":"                \u0027against resource provider %(provider)s.\u0027)"},{"line_number":2287,"context_line":""},{"line_number":2288,"context_line":""},{"line_number":2289,"context_line":"class TooManyComputesForHost(NovaException):"},{"line_number":2290,"context_line":"    msg_fmt \u003d _(\u0027Unexpected number of compute node records \u0027"},{"line_number":2291,"context_line":"                \u0027(%(num_computes)d) found for host %(host)s. There should \u0027"},{"line_number":2292,"context_line":"                \u0027only be a one-to-one mapping.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_6cb22d99","line":2289,"in_reply_to":"5f7c97a3_4335c5f5","updated":"2018-07-11 14:11:21.000000000","message":"It shouldn\u0027t happen for non-ironic hosts. I added it as a precaution since I\u0027m calling ComputeNodeList.get_all_by_host() which returns a list and I expect only 1 but if there is more than 1 for whatever reason (did someone put an ironic host in an aggregate? did the virt driver report a different hypervisor_hostname for some reason?) it\u0027s a clear failure. Alternatively I could use ComputeNode.get_first_node_by_host_for_old_compat but there is a TODO on that saying it\u0027s basically deprecated and callers shouldn\u0027t be using it anymore.","commit_id":"357858b178e28dad7fd8a1cb1418e1792911f7ac"}],"nova/tests/functional/test_nova_manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce37167e63e747a3a1e968f3bbc8fa5248dc27a7","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        - add each host to a unique aggregate"},{"line_number":620,"context_line":"        - add both hosts to a shared aggregate"},{"line_number":621,"context_line":"        - run sync_aggregates and assert both providers are in two aggregates"},{"line_number":622,"context_line":"        - remove host1 from the shared aggregate, run sync_aggregates and"},{"line_number":623,"context_line":"          assert the provider for host1 is in one aggregate and host2\u0027s"},{"line_number":624,"context_line":"          provider is still in two aggregates"},{"line_number":625,"context_line":"        - run sync_aggregates again and make sure nothing changed"},{"line_number":626,"context_line":"        \"\"\""},{"line_number":627,"context_line":"        # create three aggregates, one per host and one shared"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_7a08d17e","line":624,"range":{"start_line":622,"start_character":10,"end_line":624,"end_character":45},"updated":"2018-07-09 21:05:55.000000000","message":"If we make the removal flow an option (which I think we will), then this changes to \"assert the provider for host1 is still in two placement aggregates\".","commit_id":"357858b178e28dad7fd8a1cb1418e1792911f7ac"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce37167e63e747a3a1e968f3bbc8fa5248dc27a7","unresolved":false,"context_lines":[{"line_number":663,"context_line":"            self.admin_api.remove_host_from_aggregate("},{"line_number":664,"context_line":"                shared_agg[\u0027id\u0027], \u0027host1\u0027)"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"        # Run sync_aggregates and assert the provider for host1 is in one"},{"line_number":667,"context_line":"        # aggregate and host2\u0027s provider is still in two aggregates."},{"line_number":668,"context_line":"        result \u003d self.cli.sync_aggregates(verbose\u003dTrue)"},{"line_number":669,"context_line":"        self.assertEqual(0, result, self.output.getvalue())"},{"line_number":670,"context_line":"        for host in (\u0027host1\u0027, \u0027host2\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_da7a45ee","line":667,"range":{"start_line":666,"start_character":29,"end_line":667,"end_character":19},"updated":"2018-07-09 21:05:55.000000000","message":"Same - this gets updated since we\u0027ll use an option for removing provider aggregates.","commit_id":"357858b178e28dad7fd8a1cb1418e1792911f7ac"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"55c18c81bee10a99ccc103190f8619b47d56528b","unresolved":false,"context_lines":[{"line_number":719,"context_line":""},{"line_number":720,"context_line":"        # Run sync_aggregates and assert the provider for host1 is still in two"},{"line_number":721,"context_line":"        # aggregates and host2\u0027s provider is still in two aggregates."},{"line_number":722,"context_line":"        # TODO(mriedem): When we add an option to remove providers from"},{"line_number":723,"context_line":"        # aggregates when the corresponding host isn\u0027t in an aggregate, we can"},{"line_number":724,"context_line":"        # test that the host1 provider is only left in one aggregate."},{"line_number":725,"context_line":"        result \u003d self.cli.sync_aggregates(verbose\u003dTrue)"},{"line_number":726,"context_line":"        self.assertEqual(0, result, self.output.getvalue())"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_36b22d4c","line":723,"range":{"start_line":722,"start_character":66,"end_line":723,"end_character":20},"updated":"2018-07-24 09:17:17.000000000","message":"nit: from *placement aggregates*","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":719,"context_line":""},{"line_number":720,"context_line":"        # Run sync_aggregates and assert the provider for host1 is still in two"},{"line_number":721,"context_line":"        # aggregates and host2\u0027s provider is still in two aggregates."},{"line_number":722,"context_line":"        # TODO(mriedem): When we add an option to remove providers from"},{"line_number":723,"context_line":"        # aggregates when the corresponding host isn\u0027t in an aggregate, we can"},{"line_number":724,"context_line":"        # test that the host1 provider is only left in one aggregate."},{"line_number":725,"context_line":"        result \u003d self.cli.sync_aggregates(verbose\u003dTrue)"},{"line_number":726,"context_line":"        self.assertEqual(0, result, self.output.getvalue())"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_b691549e","line":723,"range":{"start_line":722,"start_character":66,"end_line":723,"end_character":20},"in_reply_to":"5f7c97a3_36b22d4c","updated":"2018-07-24 15:20:56.000000000","message":"Done","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"}],"releasenotes/notes/nova-manage-placement-sync-aggregates-1e6380eceda7dc9b.yaml":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"55c18c81bee10a99ccc103190f8619b47d56528b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    A ``nova-manage placement sync_aggregates`` command has been added which"},{"line_number":5,"context_line":"    can be used to mirror nova host aggregates to resource provider aggregates"},{"line_number":6,"context_line":"    in the placement service. This is a useful tool if you are using aggregates"},{"line_number":7,"context_line":"    in placement to optimize scheduling:"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    https://docs.openstack.org/nova/latest/admin/configuration/schedulers.html#aggregates-in-placement"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"5f7c97a3_16e85113","line":7,"updated":"2018-07-24 09:17:17.000000000","message":"you should add that we already mirror hosts directly when you add/remove hosts from the aggregates API, so this command is only useful with an already setup cloud with aggregates.","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0650a1bf4417599576a9bc15e9a11d48281ca200","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    A ``nova-manage placement sync_aggregates`` command has been added which"},{"line_number":5,"context_line":"    can be used to mirror nova host aggregates to resource provider aggregates"},{"line_number":6,"context_line":"    in the placement service. This is a useful tool if you are using aggregates"},{"line_number":7,"context_line":"    in placement to optimize scheduling:"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    https://docs.openstack.org/nova/latest/admin/configuration/schedulers.html#aggregates-in-placement"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"5f7c97a3_9688d86b","line":7,"in_reply_to":"5f7c97a3_16e85113","updated":"2018-07-24 15:20:56.000000000","message":"Done","commit_id":"06e057d61666ed56d4e854c178feb026faa739b4"}]}
