)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is the first step in syncing the nova host aggregate"},{"line_number":10,"context_line":"information with the placement service. The scheduler report client gets"},{"line_number":11,"context_line":"a couple new public methods -- aggregate_add_host() and"},{"line_number":12,"context_line":"aggregate_remove_host(). Both of these methods do **NOT** impact the"},{"line_number":13,"context_line":"provider tree cache that the scheduler reportclient keeps when"},{"line_number":14,"context_line":"instantiated inside the compute resource tracker."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Instead, these two new reportclient methods look up a resource provider"},{"line_number":17,"context_line":"by *name* (not UUID) since that is what is supplied by the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"df7087c5_34446db7","line":14,"range":{"start_line":12,"start_character":25,"end_line":14,"end_character":49},"updated":"2018-03-19 19:16:47.000000000","message":"As written, this isn\u0027t true.\n\nBut why wouldn\u0027t we want them to?","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"provider tree cache that the scheduler reportclient keeps when"},{"line_number":14,"context_line":"instantiated inside the compute resource tracker."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Instead, these two new reportclient methods look up a resource provider"},{"line_number":17,"context_line":"by *name* (not UUID) since that is what is supplied by the"},{"line_number":18,"context_line":"os-aggregates Compute API when adding or removing a \"host\" to/from a"},{"line_number":19,"context_line":"nova host aggregate."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Ibd7aa4f8c4ea787774becece324d9051521c44b6"},{"line_number":22,"context_line":"blueprint: placement-mirror-host-aggregates"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5f7c97a3_727e9fe4","line":19,"range":{"start_line":16,"start_character":0,"end_line":19,"end_character":20},"updated":"2018-05-16 17:42:52.000000000","message":"True story:\n\nhttps://developer.openstack.org/api-ref/compute/#add-host\n\nhttps://developer.openstack.org/api-ref/compute/#remove-host","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"}],"doc/source/admin/configuration/schedulers.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"79b902df9bd93439102a54e3d911ff7cf28e0343","unresolved":false,"context_lines":[{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":".. note::"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    The nova-api service will now attempt to automatically mirror the"},{"line_number":1197,"context_line":"    association of a compute host with an aggregate when an administrator calls"},{"line_number":1198,"context_line":"    the `POST /os-aggregates/{aggregate_id}/action` Compute API call to add or"},{"line_number":1199,"context_line":"    remove a host to/from a nova host aggregate. This should alleviate the need"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5f7c97a3_e7f0216a","line":1196,"range":{"start_line":1196,"start_character":30,"end_line":1196,"end_character":33},"updated":"2018-05-25 14:52:05.000000000","message":"nit: we should explicitly say since 18.0.0 Rocky because otherwise this will get stale.","commit_id":"f7446c950d5341fc97a76fcb8c3c6087ed3acadb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0d1f352cef9948cc96aee00709d97db2b820008d","unresolved":false,"context_lines":[{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":".. note::"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    The nova-api service will now attempt to automatically mirror the"},{"line_number":1197,"context_line":"    association of a compute host with an aggregate when an administrator calls"},{"line_number":1198,"context_line":"    the `POST /os-aggregates/{aggregate_id}/action` Compute API call to add or"},{"line_number":1199,"context_line":"    remove a host to/from a nova host aggregate. This should alleviate the need"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5f7c97a3_c25633cf","line":1196,"range":{"start_line":1196,"start_character":30,"end_line":1196,"end_character":33},"in_reply_to":"5f7c97a3_e7f0216a","updated":"2018-05-25 15:31:18.000000000","message":"Done","commit_id":"f7446c950d5341fc97a76fcb8c3c6087ed3acadb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"79b902df9bd93439102a54e3d911ff7cf28e0343","unresolved":false,"context_lines":[{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"  $ openstack --os-placement-api-version\u003d1.2 resource provider aggregate set --aggregate 019e2189-31b3-49e1-aff2-b220ebd91c24 815a5634-86fb-4e1e-8824-8a631fee3e06"},{"line_number":1250,"context_line":""},{"line_number":1251,"context_line":".. note::"},{"line_number":1252,"context_line":""},{"line_number":1253,"context_line":"    The nova-api service will now attempt to automatically mirror the"},{"line_number":1254,"context_line":"    association of a compute host with an aggregate when an administrator calls"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5f7c97a3_87012d3b","line":1251,"updated":"2018-05-25 14:52:05.000000000","message":"I\u0027m not sure we need to repeat the note in the other two sections here, I think the essentially introductory section on placement aggregates is enough, but we can see what efried thinks.","commit_id":"f7446c950d5341fc97a76fcb8c3c6087ed3acadb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0d1f352cef9948cc96aee00709d97db2b820008d","unresolved":false,"context_lines":[{"line_number":1248,"context_line":""},{"line_number":1249,"context_line":"  $ openstack --os-placement-api-version\u003d1.2 resource provider aggregate set --aggregate 019e2189-31b3-49e1-aff2-b220ebd91c24 815a5634-86fb-4e1e-8824-8a631fee3e06"},{"line_number":1250,"context_line":""},{"line_number":1251,"context_line":".. note::"},{"line_number":1252,"context_line":""},{"line_number":1253,"context_line":"    The nova-api service will now attempt to automatically mirror the"},{"line_number":1254,"context_line":"    association of a compute host with an aggregate when an administrator calls"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5f7c97a3_02066bcf","line":1251,"in_reply_to":"5f7c97a3_87012d3b","updated":"2018-05-25 15:31:18.000000000","message":"np, I can remove.","commit_id":"f7446c950d5341fc97a76fcb8c3c6087ed3acadb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"380e59c6eabc45f130a51aa1ab7d987ff0615692","unresolved":false,"context_lines":[{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":".. note::"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    The nova-api service will attempts (as of nova 18.0.0) to automatically"},{"line_number":1197,"context_line":"    mirror the association of a compute host with an aggregate when an"},{"line_number":1198,"context_line":"    administrator calls the `POST /os-aggregates/{aggregate_id}/action` Compute"},{"line_number":1199,"context_line":"    API call to add or remove a host to/from a nova host aggregate. This should"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_a2cd3786","line":1196,"range":{"start_line":1196,"start_character":25,"end_line":1196,"end_character":38},"updated":"2018-05-25 15:34:37.000000000","message":"nit: Either just \"attempts\" or \"will attempt\".","commit_id":"e2b06dc9180b36382ee988364e1f577bc151e85d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c83b7a9d3934f5ab443e0cfd118f18e543018081","unresolved":false,"context_lines":[{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    The nova-api service will attempt (as of nova 18.0.0) to automatically"},{"line_number":1197,"context_line":"    mirror the association of a compute host with an aggregate when an"},{"line_number":1198,"context_line":"    administrator calls the `POST /os-aggregates/{aggregate_id}/action` Compute"},{"line_number":1199,"context_line":"    API call to add or remove a host to/from a nova host aggregate. This should"},{"line_number":1200,"context_line":"    alleviate the need to manually create those association records in the"},{"line_number":1201,"context_line":"    placement API using the `openstack resource provider aggregate set` CLI"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_18f6dc64","line":1198,"range":{"start_line":1198,"start_character":28,"end_line":1198,"end_character":71},"updated":"2018-05-25 19:22:41.000000000","message":"double backticks","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    The nova-api service will attempt (as of nova 18.0.0) to automatically"},{"line_number":1197,"context_line":"    mirror the association of a compute host with an aggregate when an"},{"line_number":1198,"context_line":"    administrator calls the `POST /os-aggregates/{aggregate_id}/action` Compute"},{"line_number":1199,"context_line":"    API call to add or remove a host to/from a nova host aggregate. This should"},{"line_number":1200,"context_line":"    alleviate the need to manually create those association records in the"},{"line_number":1201,"context_line":"    placement API using the `openstack resource provider aggregate set` CLI"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_87e7e412","line":1198,"range":{"start_line":1198,"start_character":28,"end_line":1198,"end_character":71},"in_reply_to":"5f7c97a3_18f6dc64","updated":"2018-05-27 11:54:39.000000000","message":"Done","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c83b7a9d3934f5ab443e0cfd118f18e543018081","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"    The nova-api service will attempt (as of nova 18.0.0) to automatically"},{"line_number":1197,"context_line":"    mirror the association of a compute host with an aggregate when an"},{"line_number":1198,"context_line":"    administrator calls the `POST /os-aggregates/{aggregate_id}/action` Compute"},{"line_number":1199,"context_line":"    API call to add or remove a host to/from a nova host aggregate. This should"},{"line_number":1200,"context_line":"    alleviate the need to manually create those association records in the"},{"line_number":1201,"context_line":"    placement API using the `openstack resource provider aggregate set` CLI"},{"line_number":1202,"context_line":"    invocation."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_d8a06445","line":1199,"range":{"start_line":1199,"start_character":4,"end_line":1199,"end_character":7},"updated":"2018-05-25 19:22:41.000000000","message":"Since the rest of this document talks in CLIs, should this do the same (also/instead)?","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"968d66947eccbc66ffd561d1c78efcdd6d7052c6","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"    The nova-api service will attempt (as of nova 18.0.0) to automatically"},{"line_number":1197,"context_line":"    mirror the association of a compute host with an aggregate when an"},{"line_number":1198,"context_line":"    administrator calls the `POST /os-aggregates/{aggregate_id}/action` Compute"},{"line_number":1199,"context_line":"    API call to add or remove a host to/from a nova host aggregate. This should"},{"line_number":1200,"context_line":"    alleviate the need to manually create those association records in the"},{"line_number":1201,"context_line":"    placement API using the `openstack resource provider aggregate set` CLI"},{"line_number":1202,"context_line":"    invocation."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_7c67bfb8","line":1199,"range":{"start_line":1199,"start_character":4,"end_line":1199,"end_character":7},"in_reply_to":"5f7c97a3_33a73ac0","updated":"2018-05-27 00:05:20.000000000","message":"You\u0027re suggesting just cutting this down to  \"...when an administrator adds or removes a host to/from...\"? I can dig that.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"    The nova-api service will attempt (as of nova 18.0.0) to automatically"},{"line_number":1197,"context_line":"    mirror the association of a compute host with an aggregate when an"},{"line_number":1198,"context_line":"    administrator calls the `POST /os-aggregates/{aggregate_id}/action` Compute"},{"line_number":1199,"context_line":"    API call to add or remove a host to/from a nova host aggregate. This should"},{"line_number":1200,"context_line":"    alleviate the need to manually create those association records in the"},{"line_number":1201,"context_line":"    placement API using the `openstack resource provider aggregate set` CLI"},{"line_number":1202,"context_line":"    invocation."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_c7d95c56","line":1199,"range":{"start_line":1199,"start_character":4,"end_line":1199,"end_character":7},"in_reply_to":"5f7c97a3_7c67bfb8","updated":"2018-05-27 11:54:39.000000000","message":"Done","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"131fec35a32424f219c45b12021d07614c65c300","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"    The nova-api service will attempt (as of nova 18.0.0) to automatically"},{"line_number":1197,"context_line":"    mirror the association of a compute host with an aggregate when an"},{"line_number":1198,"context_line":"    administrator calls the `POST /os-aggregates/{aggregate_id}/action` Compute"},{"line_number":1199,"context_line":"    API call to add or remove a host to/from a nova host aggregate. This should"},{"line_number":1200,"context_line":"    alleviate the need to manually create those association records in the"},{"line_number":1201,"context_line":"    placement API using the `openstack resource provider aggregate set` CLI"},{"line_number":1202,"context_line":"    invocation."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_33a73ac0","line":1199,"range":{"start_line":1199,"start_character":4,"end_line":1199,"end_character":7},"in_reply_to":"5f7c97a3_d8a06445","updated":"2018-05-25 22:57:43.000000000","message":"I don\u0027t think that\u0027s necessary to explicitly tell people how to add/remove hosts from aggregates in this doc.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c83b7a9d3934f5ab443e0cfd118f18e543018081","unresolved":false,"context_lines":[{"line_number":1198,"context_line":"    administrator calls the `POST /os-aggregates/{aggregate_id}/action` Compute"},{"line_number":1199,"context_line":"    API call to add or remove a host to/from a nova host aggregate. This should"},{"line_number":1200,"context_line":"    alleviate the need to manually create those association records in the"},{"line_number":1201,"context_line":"    placement API using the `openstack resource provider aggregate set` CLI"},{"line_number":1202,"context_line":"    invocation."},{"line_number":1203,"context_line":""},{"line_number":1204,"context_line":"Tenant Isolation with Placement"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_b8e6c8af","line":1201,"range":{"start_line":1201,"start_character":28,"end_line":1201,"end_character":71},"updated":"2018-05-25 19:22:41.000000000","message":"double backticks","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":1198,"context_line":"    administrator calls the `POST /os-aggregates/{aggregate_id}/action` Compute"},{"line_number":1199,"context_line":"    API call to add or remove a host to/from a nova host aggregate. This should"},{"line_number":1200,"context_line":"    alleviate the need to manually create those association records in the"},{"line_number":1201,"context_line":"    placement API using the `openstack resource provider aggregate set` CLI"},{"line_number":1202,"context_line":"    invocation."},{"line_number":1203,"context_line":""},{"line_number":1204,"context_line":"Tenant Isolation with Placement"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_e7ded83c","line":1201,"range":{"start_line":1201,"start_character":28,"end_line":1201,"end_character":71},"in_reply_to":"5f7c97a3_b8e6c8af","updated":"2018-05-27 11:54:39.000000000","message":"Done","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fca34c2a6780010feeff6db18566d5df77abfae3","unresolved":false,"context_lines":[{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":".. note::"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    The nova-api service will attempts (as of nova 18.0.0) to automatically"},{"line_number":1197,"context_line":"    mirror the association of a compute host with an aggregate when an"},{"line_number":1198,"context_line":"    administrator adds or remove a host to/from a nova host aggregate. This"},{"line_number":1199,"context_line":"    should alleviate the need to manually create those association records in"}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_f59f4f4d","line":1196,"range":{"start_line":1196,"start_character":25,"end_line":1196,"end_character":38},"updated":"2018-05-29 13:30:43.000000000","message":"s/will// or s/attempts/attempt/\n\nLooks like revert of PS10..11 :(","commit_id":"5480d65416f17a8311b6e6447d1501a2b5709b8c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fca34c2a6780010feeff6db18566d5df77abfae3","unresolved":false,"context_lines":[{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    The nova-api service will attempts (as of nova 18.0.0) to automatically"},{"line_number":1197,"context_line":"    mirror the association of a compute host with an aggregate when an"},{"line_number":1198,"context_line":"    administrator adds or remove a host to/from a nova host aggregate. This"},{"line_number":1199,"context_line":"    should alleviate the need to manually create those association records in"},{"line_number":1200,"context_line":"    the placement API using the ``openstack resource provider aggregate set``"},{"line_number":1201,"context_line":"    CLI invocation."}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_55b883c6","line":1198,"range":{"start_line":1198,"start_character":26,"end_line":1198,"end_character":32},"updated":"2018-05-29 13:30:43.000000000","message":"removes","commit_id":"5480d65416f17a8311b6e6447d1501a2b5709b8c"}],"nova/api/openstack/placement/exception.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"40f2cca40dd786fcf8e2e11a4be954f58bbb97e3","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    msg_fmt \u003d _(\"No such resource class %(resource_class)s.\")"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class ResourceProviderNotFound(NotFound):"},{"line_number":146,"context_line":"    msg_fmt \u003d _(\"No such resource provider %(name_or_uuid)s.\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_32220b03","line":145,"updated":"2018-04-09 18:03:03.000000000","message":"Based on how and where you are using this, I think you want it in nova/exception.py, it\u0027s a nova exception, not a placement exception.","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb2c8c9013fe578fa465c9d6f03130e4b2e01cb2","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    msg_fmt \u003d _(\"No such resource class %(resource_class)s.\")"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class ResourceProviderNotFound(NotFound):"},{"line_number":146,"context_line":"    msg_fmt \u003d _(\"No such resource provider %(name_or_uuid)s.\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_a38c8f35","line":145,"in_reply_to":"bf659307_32220b03","updated":"2018-04-09 19:54:42.000000000","message":"gotcha. yep, makes sense.","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"}],"nova/compute/api.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":4961,"context_line":"    def __init__(self, **kwargs):"},{"line_number":4962,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi.ComputeAPI()"},{"line_number":4963,"context_line":"        self.scheduler_client \u003d scheduler_client.SchedulerClient()"},{"line_number":4964,"context_line":"        self.placement_client \u003d report.SchedulerReportClient()"},{"line_number":4965,"context_line":"        super(AggregateAPI, self).__init__(**kwargs)"},{"line_number":4966,"context_line":""},{"line_number":4967,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_7490a54f","line":4964,"range":{"start_line":4964,"start_character":32,"end_line":4964,"end_character":62},"updated":"2018-03-19 19:16:47.000000000","message":"Why a separate one rather than self.scheduler_client.reportclient?","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3e37785b8d65343244231bc0b2ba596223550af1","unresolved":false,"context_lines":[{"line_number":4961,"context_line":"    def __init__(self, **kwargs):"},{"line_number":4962,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi.ComputeAPI()"},{"line_number":4963,"context_line":"        self.scheduler_client \u003d scheduler_client.SchedulerClient()"},{"line_number":4964,"context_line":"        self.placement_client \u003d report.SchedulerReportClient()"},{"line_number":4965,"context_line":"        super(AggregateAPI, self).__init__(**kwargs)"},{"line_number":4966,"context_line":""},{"line_number":4967,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_60cbf41d","line":4964,"range":{"start_line":4964,"start_character":32,"end_line":4964,"end_character":62},"in_reply_to":"bf659307_8fef5be8","updated":"2018-04-06 20:22:45.000000000","message":"Sorry, I wasn\u0027t talking about using self.scheduler_client.\u003cmethod\u003e() - I was talking about saying\n\n self.placement_client \u003d self.scheduler_client.reportclent\n\nthereby reusing the instance (and cache) we\u0027ve already got rather than building up a new one with a new connection, etc.\n\nFor that matter, as far as I\u0027m concerned, we can quit calling it SchedulerReportClient at all and start calling it PlacementClient.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a96112a2dda64230e843cad8d09416331e5f826","unresolved":false,"context_lines":[{"line_number":4961,"context_line":"    def __init__(self, **kwargs):"},{"line_number":4962,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi.ComputeAPI()"},{"line_number":4963,"context_line":"        self.scheduler_client \u003d scheduler_client.SchedulerClient()"},{"line_number":4964,"context_line":"        self.placement_client \u003d report.SchedulerReportClient()"},{"line_number":4965,"context_line":"        super(AggregateAPI, self).__init__(**kwargs)"},{"line_number":4966,"context_line":""},{"line_number":4967,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_8fef5be8","line":4964,"range":{"start_line":4964,"start_character":32,"end_line":4964,"end_character":62},"in_reply_to":"df7087c5_7490a54f","updated":"2018-04-06 17:08:50.000000000","message":"couple reasons. first is because we have long since stopped keeping the schedulerclient facade up to date with the reportclient interface. secondly, I think it\u0027s useful to have this marked specifically as *placement\u0027s client*, because that is what we\u0027re doing with this client object: talking with the placement service.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":5149,"context_line":"        except (exception.ResourceProviderNotFound,"},{"line_number":5150,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5151,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5152,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5153,"context_line":"                        \"aggregate: %s\", host_name, err)"},{"line_number":5154,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5155,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"},{"line_number":5156,"context_line":"        self.compute_rpcapi.add_aggregate_host(context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_f4bb55c1","line":5153,"range":{"start_line":5152,"start_character":0,"end_line":5153,"end_character":56},"updated":"2018-03-19 19:16:47.000000000","message":"That it?  Why don\u0027t we want these (or some) exceptions to raise up from here?  The other pieces of this method don\u0027t swallow exceptions.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3e37785b8d65343244231bc0b2ba596223550af1","unresolved":false,"context_lines":[{"line_number":5149,"context_line":"        except (exception.ResourceProviderNotFound,"},{"line_number":5150,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5151,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5152,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5153,"context_line":"                        \"aggregate: %s\", host_name, err)"},{"line_number":5154,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5155,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"},{"line_number":5156,"context_line":"        self.compute_rpcapi.add_aggregate_host(context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_e0ff0432","line":5153,"range":{"start_line":5152,"start_character":0,"end_line":5153,"end_character":56},"in_reply_to":"bf659307_0faa6b84","updated":"2018-04-06 20:22:45.000000000","message":"Okay.  As I said in the spec, I\u0027m not up on why the failure of the placement side doesn\u0027t result in failure of the overarching operation (rollback of the host aggregate part, failure reported to the user).  Or how you \"recover\" from that (how would you get the placement side synced up after the fact?)  If you\u0027ve thought that through and determined that it\u0027s okay if the host agg side is set up but the placement side isn\u0027t, peace with that.  But it would be nice to have a comment here declaring that we\u0027re deliberately swallowing the exception, and why.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a96112a2dda64230e843cad8d09416331e5f826","unresolved":false,"context_lines":[{"line_number":5149,"context_line":"        except (exception.ResourceProviderNotFound,"},{"line_number":5150,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5151,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5152,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5153,"context_line":"                        \"aggregate: %s\", host_name, err)"},{"line_number":5154,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5155,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"},{"line_number":5156,"context_line":"        self.compute_rpcapi.add_aggregate_host(context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_0faa6b84","line":5153,"range":{"start_line":5152,"start_character":0,"end_line":5153,"end_character":56},"in_reply_to":"df7087c5_f4bb55c1","updated":"2018-04-06 17:08:50.000000000","message":"Yeah, I suppose I could bubble this back up to the end user. The issue, as I noted on the spec, is that this really is an implementation detail and end users would probably be pretty confused to get an error back about the placement service at all, considering they wouldn\u0027t necessarily know about the placement service. The end user\u0027s first reaction will probably be to re-issue the failed call, which they will then get back another failure about trying to add a duplicate host to an aggregate, which would make them even more confused...","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":5196,"context_line":"        except (exception.ResourceProviderNotFound,"},{"line_number":5197,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5198,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5199,"context_line":"            LOG.warning(\"Failed to remove association of %s with a placement \""},{"line_number":5200,"context_line":"                        \"aggregate: %s\", host_name, err)"},{"line_number":5201,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5202,"context_line":"        self.compute_rpcapi.remove_aggregate_host(context,"},{"line_number":5203,"context_line":"                aggregate\u003daggregate, host_param\u003dhost_name, host\u003dhost_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_74c74547","line":5200,"range":{"start_line":5199,"start_character":0,"end_line":5200,"end_character":56},"updated":"2018-03-19 19:16:47.000000000","message":"ditto","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"40f2cca40dd786fcf8e2e11a4be954f58bbb97e3","unresolved":false,"context_lines":[{"line_number":38,"context_line":"import six"},{"line_number":39,"context_line":"from six.moves import range"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"from nova.api.openstack.placement import exception as placement_exc"},{"line_number":42,"context_line":"from nova import availability_zones"},{"line_number":43,"context_line":"from nova import block_device"},{"line_number":44,"context_line":"from nova.cells import opts as cells_opts"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_928e7725","line":41,"updated":"2018-04-09 18:03:03.000000000","message":"Don\u0027t import from ...placement into nova please.","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb2c8c9013fe578fa465c9d6f03130e4b2e01cb2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"import six"},{"line_number":39,"context_line":"from six.moves import range"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"from nova.api.openstack.placement import exception as placement_exc"},{"line_number":42,"context_line":"from nova import availability_zones"},{"line_number":43,"context_line":"from nova import block_device"},{"line_number":44,"context_line":"from nova.cells import opts as cells_opts"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_63867716","line":41,"in_reply_to":"bf659307_928e7725","updated":"2018-04-09 19:54:42.000000000","message":"ack. will change it up.","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1abe7f462e43027a23f2ab05a21defcbc15b6312","unresolved":false,"context_lines":[{"line_number":5149,"context_line":"        except (placement_exc.ResourceProviderNotFound,"},{"line_number":5150,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5151,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5152,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5153,"context_line":"                        \"aggregate: %s\", host_name, err)"},{"line_number":5154,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5155,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"},{"line_number":5156,"context_line":"        self.compute_rpcapi.add_aggregate_host(context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_ed261c69","line":5153,"range":{"start_line":5152,"start_character":12,"end_line":5153,"end_character":56},"updated":"2018-04-06 22:10:10.000000000","message":"Where\u0027s my shiny comment about why it\u0027s okay to swallow this exception?","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb2c8c9013fe578fa465c9d6f03130e4b2e01cb2","unresolved":false,"context_lines":[{"line_number":5149,"context_line":"        except (placement_exc.ResourceProviderNotFound,"},{"line_number":5150,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5151,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5152,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5153,"context_line":"                        \"aggregate: %s\", host_name, err)"},{"line_number":5154,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5155,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"},{"line_number":5156,"context_line":"        self.compute_rpcapi.add_aggregate_host(context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_23787f29","line":5153,"range":{"start_line":5152,"start_character":12,"end_line":5153,"end_character":56},"in_reply_to":"bf659307_ed261c69","updated":"2018-04-09 19:54:42.000000000","message":"Done","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1abe7f462e43027a23f2ab05a21defcbc15b6312","unresolved":false,"context_lines":[{"line_number":5196,"context_line":"        except (placement_exc.ResourceProviderNotFound,"},{"line_number":5197,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5198,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5199,"context_line":"            LOG.warning(\"Failed to remove association of %s with a placement \""},{"line_number":5200,"context_line":"                        \"aggregate: %s\", host_name, err)"},{"line_number":5201,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5202,"context_line":"        self.compute_rpcapi.remove_aggregate_host(context,"},{"line_number":5203,"context_line":"                aggregate\u003daggregate, host_param\u003dhost_name, host\u003dhost_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_ad20244b","line":5200,"range":{"start_line":5199,"start_character":12,"end_line":5200,"end_character":56},"updated":"2018-04-06 22:10:10.000000000","message":"ditto","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb2c8c9013fe578fa465c9d6f03130e4b2e01cb2","unresolved":false,"context_lines":[{"line_number":5196,"context_line":"        except (placement_exc.ResourceProviderNotFound,"},{"line_number":5197,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5198,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5199,"context_line":"            LOG.warning(\"Failed to remove association of %s with a placement \""},{"line_number":5200,"context_line":"                        \"aggregate: %s\", host_name, err)"},{"line_number":5201,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5202,"context_line":"        self.compute_rpcapi.remove_aggregate_host(context,"},{"line_number":5203,"context_line":"                aggregate\u003daggregate, host_param\u003dhost_name, host\u003dhost_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_c376633f","line":5200,"range":{"start_line":5199,"start_character":12,"end_line":5200,"end_character":56},"in_reply_to":"bf659307_ad20244b","updated":"2018-04-09 19:54:42.000000000","message":"Done","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c858386a6fa03fed34a5e47123c4304d6d153ac5","unresolved":false,"context_lines":[{"line_number":5151,"context_line":"            # NOTE(jaypipes): We don\u0027t want a failure to communicate with the"},{"line_number":5152,"context_line":"            # placement service to be returned to the user (they probably don\u0027t"},{"line_number":5153,"context_line":"            # know anything about the placement service and would just be"},{"line_number":5154,"context_line":"            # confused). So, we just log a warning here, noting that on the"},{"line_number":5155,"context_line":"            # next run of nova-manage sync_placement_aggregates things will go"},{"line_number":5156,"context_line":"            # back to normal"},{"line_number":5157,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5158,"context_line":"                        \"aggregate: %s\", host_name, err)"},{"line_number":5159,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_4276caa6","line":5156,"range":{"start_line":5154,"start_character":57,"end_line":5156,"end_character":28},"updated":"2018-04-09 22:37:13.000000000","message":"Noting that where?  Should that be part of the log message?","commit_id":"585e96b79ee240e0ef1e2e0095ba0a6dc9ea2f16"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04e632c50fd37146b3432593afedbf2b047275a1","unresolved":false,"context_lines":[{"line_number":5156,"context_line":"            # back to normal"},{"line_number":5157,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5158,"context_line":"                        \"aggregate: %s. This may be corrected after running \""},{"line_number":5159,"context_line":"                        \"nova-manage sync_placement_aggregates.\","},{"line_number":5160,"context_line":"                        host_name, err)"},{"line_number":5161,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5162,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_8047a577","line":5159,"range":{"start_line":5159,"start_character":25,"end_line":5159,"end_character":62},"updated":"2018-04-12 15:34:30.000000000","message":"This won\u0027t be the CLI name, since it needs a subgroup, so \"nova-manage \u003csomething\u003e sync_placement_aggregates\".\n\nI\u0027d recommend we plan on a new \"placement\" subgroup, so:\n\nnova-manage placement sync_aggregates","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"617d53148a2c0f3d792dcb3479efced6aa492902","unresolved":false,"context_lines":[{"line_number":5156,"context_line":"            # back to normal"},{"line_number":5157,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5158,"context_line":"                        \"aggregate: %s. This may be corrected after running \""},{"line_number":5159,"context_line":"                        \"nova-manage sync_placement_aggregates.\","},{"line_number":5160,"context_line":"                        host_name, err)"},{"line_number":5161,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5162,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_60d93154","line":5159,"updated":"2018-04-12 15:15:34.000000000","message":"ah, nice.","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"248a25339a97e0521aab4c029af78a99488ba6ad","unresolved":false,"context_lines":[{"line_number":5156,"context_line":"            # back to normal"},{"line_number":5157,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5158,"context_line":"                        \"aggregate: %s. This may be corrected after running \""},{"line_number":5159,"context_line":"                        \"nova-manage sync_placement_aggregates.\","},{"line_number":5160,"context_line":"                        host_name, err)"},{"line_number":5161,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5162,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f6a8fd7_a576e005","line":5159,"range":{"start_line":5159,"start_character":25,"end_line":5159,"end_character":62},"in_reply_to":"bf659307_8047a577","updated":"2018-05-24 18:32:54.000000000","message":"Done","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":5011,"context_line":"            action\u003dfields_obj.NotificationAction.DELETE,"},{"line_number":5012,"context_line":"            phase\u003dfields_obj.NotificationPhase.START)"},{"line_number":5013,"context_line":""},{"line_number":5014,"context_line":"        if len(aggregate.hosts) \u003e 0:"},{"line_number":5015,"context_line":"            msg \u003d _(\"Host aggregate is not empty\")"},{"line_number":5016,"context_line":"            raise exception.InvalidAggregateActionDelete("},{"line_number":5017,"context_line":"                aggregate_id\u003daggregate_id, reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_325d8778","line":5014,"range":{"start_line":5014,"start_character":8,"end_line":5014,"end_character":36},"updated":"2018-05-16 17:42:52.000000000","message":"OK so we don\u0027t need to worry about deleting an aggregate leaving a sync issue in placement because the API blocks that if the aggregate has hosts in it.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77a958fc39f11573d50cff356de3bb2a397377df","unresolved":false,"context_lines":[{"line_number":5011,"context_line":"            action\u003dfields_obj.NotificationAction.DELETE,"},{"line_number":5012,"context_line":"            phase\u003dfields_obj.NotificationPhase.START)"},{"line_number":5013,"context_line":""},{"line_number":5014,"context_line":"        if len(aggregate.hosts) \u003e 0:"},{"line_number":5015,"context_line":"            msg \u003d _(\"Host aggregate is not empty\")"},{"line_number":5016,"context_line":"            raise exception.InvalidAggregateActionDelete("},{"line_number":5017,"context_line":"                aggregate_id\u003daggregate_id, reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_fd868065","line":5014,"range":{"start_line":5014,"start_character":8,"end_line":5014,"end_character":36},"in_reply_to":"5f7c97a3_325d8778","updated":"2018-05-24 19:49:45.000000000","message":"right.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":5120,"context_line":"        try:"},{"line_number":5121,"context_line":"            self.placement_client.aggregate_add_host("},{"line_number":5122,"context_line":"                context, aggregate.uuid, host_name)"},{"line_number":5123,"context_line":"        except (exception.ResourceProviderNotFound,"},{"line_number":5124,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5125,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5126,"context_line":"            # NOTE(jaypipes): We don\u0027t want a failure to communicate with the"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_edae4e2c","line":5123,"updated":"2018-05-16 17:42:52.000000000","message":"Don\u0027t see any test coverage for making sure these exceptions are handled.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":5124,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5125,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5126,"context_line":"            # NOTE(jaypipes): We don\u0027t want a failure to communicate with the"},{"line_number":5127,"context_line":"            # placement service to be returned to the user (they probably don\u0027t"},{"line_number":5128,"context_line":"            # know anything about the placement service and would just be"},{"line_number":5129,"context_line":"            # confused). So, we just log a warning here, noting that on the"},{"line_number":5130,"context_line":"            # next run of nova-manage sync_placement_aggregates things will go"},{"line_number":5131,"context_line":"            # back to normal"},{"line_number":5132,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_d20f7334","line":5129,"range":{"start_line":5127,"start_character":59,"end_line":5129,"end_character":23},"updated":"2018-05-16 17:42:52.000000000","message":"Well, this is an admin-only API by default, so chances are good the operator (assuming they are the admin and we\u0027re not in the system vs project scope admin land yet) knows about placement.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c20e731615dec53202d62ae1dfd1806e0dae1697","unresolved":false,"context_lines":[{"line_number":5124,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5125,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5126,"context_line":"            # NOTE(jaypipes): We don\u0027t want a failure to communicate with the"},{"line_number":5127,"context_line":"            # placement service to be returned to the user (they probably don\u0027t"},{"line_number":5128,"context_line":"            # know anything about the placement service and would just be"},{"line_number":5129,"context_line":"            # confused). So, we just log a warning here, noting that on the"},{"line_number":5130,"context_line":"            # next run of nova-manage sync_placement_aggregates things will go"},{"line_number":5131,"context_line":"            # back to normal"},{"line_number":5132,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_f5d7f84e","line":5129,"range":{"start_line":5127,"start_character":59,"end_line":5129,"end_character":23},"in_reply_to":"5f7c97a3_d20f7334","updated":"2018-05-16 17:59:05.000000000","message":"Note that I want this to eventually fail hard and roll back the nova-side aggregate change. I know we\u0027re going to make it graceful for rocky, but in stein, it should either all work or all fail.\n\nImagine someone who has api improperly configured for placement, or some firewall issue prevents them from talking. I have configured for placement-based-tenant-isolation and I add a host, then try to do a boot and it fails because there are no hosts for the tenant. Over and over I try and fail, until I get a look at the logs and see that we\u0027re just failing to talk to placement.\n\nUnless I *remove* it and add it again, it won\u0027t try again, and if I\u0027m not yet doing the background fix-up sync (or it won\u0027t run for hours), then I\u0027m sunk.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":5127,"context_line":"            # placement service to be returned to the user (they probably don\u0027t"},{"line_number":5128,"context_line":"            # know anything about the placement service and would just be"},{"line_number":5129,"context_line":"            # confused). So, we just log a warning here, noting that on the"},{"line_number":5130,"context_line":"            # next run of nova-manage sync_placement_aggregates things will go"},{"line_number":5131,"context_line":"            # back to normal"},{"line_number":5132,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5133,"context_line":"                        \"aggregate: %s. This may be corrected after running \""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_32d267d2","line":5130,"range":{"start_line":5130,"start_character":26,"end_line":5130,"end_character":63},"updated":"2018-05-16 17:42:52.000000000","message":"nit: nova-manage placement sync_aggregates","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":5131,"context_line":"            # back to normal"},{"line_number":5132,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5133,"context_line":"                        \"aggregate: %s. This may be corrected after running \""},{"line_number":5134,"context_line":"                        \"nova-manage sync_placement_aggregates.\","},{"line_number":5135,"context_line":"                        host_name, err)"},{"line_number":5136,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5137,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_b2dd17de","line":5134,"range":{"start_line":5134,"start_character":37,"end_line":5134,"end_character":62},"updated":"2018-05-16 17:42:52.000000000","message":"same","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":5175,"context_line":"        try:"},{"line_number":5176,"context_line":"            self.placement_client.aggregate_remove_host("},{"line_number":5177,"context_line":"                context, aggregate.uuid, host_name)"},{"line_number":5178,"context_line":"        except (exception.ResourceProviderNotFound,"},{"line_number":5179,"context_line":"                exception.ResourceProviderAggregateRetrievalFailed,"},{"line_number":5180,"context_line":"                exception.ResourceProviderUpdateFailed) as err:"},{"line_number":5181,"context_line":"            # NOTE(jaypipes): We don\u0027t want a failure to communicate with the"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_ada4d64b","line":5178,"updated":"2018-05-16 17:42:52.000000000","message":"Same - don\u0027t see any error handling test coverage for these.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":5182,"context_line":"            # placement service to be returned to the user (they probably don\u0027t"},{"line_number":5183,"context_line":"            # know anything about the placement service and would just be"},{"line_number":5184,"context_line":"            # confused). So, we just log a warning here, noting that on the"},{"line_number":5185,"context_line":"            # next run of nova-manage sync_placement_aggregates things will go"},{"line_number":5186,"context_line":"            # back to normal"},{"line_number":5187,"context_line":"            LOG.warning(\"Failed to remove association of %s with a placement \""},{"line_number":5188,"context_line":"                        \"aggregate: %s. This may be corrected after running \""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_1212cb62","line":5185,"range":{"start_line":5185,"start_character":38,"end_line":5185,"end_character":63},"updated":"2018-05-16 17:42:52.000000000","message":"ditto","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":5186,"context_line":"            # back to normal"},{"line_number":5187,"context_line":"            LOG.warning(\"Failed to remove association of %s with a placement \""},{"line_number":5188,"context_line":"                        \"aggregate: %s. This may be corrected after running \""},{"line_number":5189,"context_line":"                        \"nova-manage sync_placement_aggregates.\","},{"line_number":5190,"context_line":"                        host_name, err)"},{"line_number":5191,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5192,"context_line":"        self.compute_rpcapi.remove_aggregate_host(context,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_32158749","line":5189,"range":{"start_line":5189,"start_character":37,"end_line":5189,"end_character":62},"updated":"2018-05-16 17:42:52.000000000","message":"ditto","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62304af34f738f983b0d202ecf71b5526c3a701c","unresolved":false,"context_lines":[{"line_number":5163,"context_line":"            # action in the placement service to be returned to the user (they"},{"line_number":5164,"context_line":"            # probably don\u0027t know anything about the placement service and"},{"line_number":5165,"context_line":"            # would just be confused). So, we just log a warning here, noting"},{"line_number":5166,"context_line":"            # that on the next run of nova-manage sync_placement_aggregates"},{"line_number":5167,"context_line":"            # things will go back to normal"},{"line_number":5168,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5169,"context_line":"                        \"aggregate: %s. This may be corrected after running \""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_e8e23bd5","line":5166,"range":{"start_line":5166,"start_character":38,"end_line":5166,"end_character":75},"updated":"2018-05-24 21:59:14.000000000","message":"nova-manage placement sync_aggregates","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dcceb8e0897290f40b98fe51c2a895def05934eb","unresolved":false,"context_lines":[{"line_number":5163,"context_line":"            # action in the placement service to be returned to the user (they"},{"line_number":5164,"context_line":"            # probably don\u0027t know anything about the placement service and"},{"line_number":5165,"context_line":"            # would just be confused). So, we just log a warning here, noting"},{"line_number":5166,"context_line":"            # that on the next run of nova-manage sync_placement_aggregates"},{"line_number":5167,"context_line":"            # things will go back to normal"},{"line_number":5168,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5169,"context_line":"                        \"aggregate: %s. This may be corrected after running \""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_84228bb8","line":5166,"range":{"start_line":5166,"start_character":38,"end_line":5166,"end_character":75},"in_reply_to":"5f7c97a3_e8e23bd5","updated":"2018-05-25 13:47:29.000000000","message":"Done","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62304af34f738f983b0d202ecf71b5526c3a701c","unresolved":false,"context_lines":[{"line_number":5167,"context_line":"            # things will go back to normal"},{"line_number":5168,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5169,"context_line":"                        \"aggregate: %s. This may be corrected after running \""},{"line_number":5170,"context_line":"                        \"nova-manage sync_placement_aggregates.\","},{"line_number":5171,"context_line":"                        host_name, err)"},{"line_number":5172,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5173,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_88e387d8","line":5170,"range":{"start_line":5170,"start_character":25,"end_line":5170,"end_character":62},"updated":"2018-05-24 21:59:14.000000000","message":"nova-manage placement sync_aggregates","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dcceb8e0897290f40b98fe51c2a895def05934eb","unresolved":false,"context_lines":[{"line_number":5167,"context_line":"            # things will go back to normal"},{"line_number":5168,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5169,"context_line":"                        \"aggregate: %s. This may be corrected after running \""},{"line_number":5170,"context_line":"                        \"nova-manage sync_placement_aggregates.\","},{"line_number":5171,"context_line":"                        host_name, err)"},{"line_number":5172,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5173,"context_line":"        # NOTE(jogo): Send message to host to support resource pools"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_a410e75a","line":5170,"range":{"start_line":5170,"start_character":25,"end_line":5170,"end_character":62},"in_reply_to":"5f7c97a3_88e387d8","updated":"2018-05-25 13:47:29.000000000","message":"Done","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62304af34f738f983b0d202ecf71b5526c3a701c","unresolved":false,"context_lines":[{"line_number":5228,"context_line":"            # action in the placement service to be returned to the user (they"},{"line_number":5229,"context_line":"            # probably don\u0027t know anything about the placement service and"},{"line_number":5230,"context_line":"            # would just be confused). So, we just log a warning here, noting"},{"line_number":5231,"context_line":"            # that on the next run of nova-manage sync_placement_aggregates"},{"line_number":5232,"context_line":"            # things will go back to normal"},{"line_number":5233,"context_line":"            LOG.warning(\"Failed to remove association of %s with a placement \""},{"line_number":5234,"context_line":"                        \"aggregate: %s. This may be corrected after running \""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_a8e8c3b2","line":5231,"range":{"start_line":5231,"start_character":38,"end_line":5231,"end_character":75},"updated":"2018-05-24 21:59:14.000000000","message":"nova-manage placement sync_aggregates","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dcceb8e0897290f40b98fe51c2a895def05934eb","unresolved":false,"context_lines":[{"line_number":5228,"context_line":"            # action in the placement service to be returned to the user (they"},{"line_number":5229,"context_line":"            # probably don\u0027t know anything about the placement service and"},{"line_number":5230,"context_line":"            # would just be confused). So, we just log a warning here, noting"},{"line_number":5231,"context_line":"            # that on the next run of nova-manage sync_placement_aggregates"},{"line_number":5232,"context_line":"            # things will go back to normal"},{"line_number":5233,"context_line":"            LOG.warning(\"Failed to remove association of %s with a placement \""},{"line_number":5234,"context_line":"                        \"aggregate: %s. This may be corrected after running \""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_c415e34a","line":5231,"range":{"start_line":5231,"start_character":38,"end_line":5231,"end_character":75},"in_reply_to":"5f7c97a3_a8e8c3b2","updated":"2018-05-25 13:47:29.000000000","message":"Done","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62304af34f738f983b0d202ecf71b5526c3a701c","unresolved":false,"context_lines":[{"line_number":5232,"context_line":"            # things will go back to normal"},{"line_number":5233,"context_line":"            LOG.warning(\"Failed to remove association of %s with a placement \""},{"line_number":5234,"context_line":"                        \"aggregate: %s. This may be corrected after running \""},{"line_number":5235,"context_line":"                        \"nova-manage sync_placement_aggregates.\","},{"line_number":5236,"context_line":"                        host_name, err)"},{"line_number":5237,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5238,"context_line":"        self.compute_rpcapi.remove_aggregate_host(context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_48d1effa","line":5235,"range":{"start_line":5235,"start_character":25,"end_line":5235,"end_character":62},"updated":"2018-05-24 21:59:14.000000000","message":"nova-manage placement sync_aggregates","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dcceb8e0897290f40b98fe51c2a895def05934eb","unresolved":false,"context_lines":[{"line_number":5232,"context_line":"            # things will go back to normal"},{"line_number":5233,"context_line":"            LOG.warning(\"Failed to remove association of %s with a placement \""},{"line_number":5234,"context_line":"                        \"aggregate: %s. This may be corrected after running \""},{"line_number":5235,"context_line":"                        \"nova-manage sync_placement_aggregates.\","},{"line_number":5236,"context_line":"                        host_name, err)"},{"line_number":5237,"context_line":"        self._update_az_cache_for_host(context, host_name, aggregate.metadata)"},{"line_number":5238,"context_line":"        self.compute_rpcapi.remove_aggregate_host(context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_840b6b28","line":5235,"range":{"start_line":5235,"start_character":25,"end_line":5235,"end_character":62},"in_reply_to":"5f7c97a3_48d1effa","updated":"2018-05-25 13:47:29.000000000","message":"Done","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"79b902df9bd93439102a54e3d911ff7cf28e0343","unresolved":false,"context_lines":[{"line_number":5163,"context_line":"            # action in the placement service to be returned to the user (they"},{"line_number":5164,"context_line":"            # probably don\u0027t know anything about the placement service and"},{"line_number":5165,"context_line":"            # would just be confused). So, we just log a warning here, noting"},{"line_number":5166,"context_line":"            # that on the next run of nova-manage placment sync_aggregates"},{"line_number":5167,"context_line":"            # things will go back to normal"},{"line_number":5168,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5169,"context_line":"                        \"aggregate: %s. This may be corrected after running \""}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_27fa9942","line":5166,"range":{"start_line":5166,"start_character":50,"end_line":5166,"end_character":58},"updated":"2018-05-25 14:52:05.000000000","message":"nit: placement","commit_id":"f7446c950d5341fc97a76fcb8c3c6087ed3acadb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0d1f352cef9948cc96aee00709d97db2b820008d","unresolved":false,"context_lines":[{"line_number":5163,"context_line":"            # action in the placement service to be returned to the user (they"},{"line_number":5164,"context_line":"            # probably don\u0027t know anything about the placement service and"},{"line_number":5165,"context_line":"            # would just be confused). So, we just log a warning here, noting"},{"line_number":5166,"context_line":"            # that on the next run of nova-manage placment sync_aggregates"},{"line_number":5167,"context_line":"            # things will go back to normal"},{"line_number":5168,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5169,"context_line":"                        \"aggregate: %s. This may be corrected after running \""}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_e2100f03","line":5166,"range":{"start_line":5166,"start_character":50,"end_line":5166,"end_character":58},"in_reply_to":"5f7c97a3_27fa9942","updated":"2018-05-25 15:31:18.000000000","message":"Done","commit_id":"f7446c950d5341fc97a76fcb8c3c6087ed3acadb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"968d66947eccbc66ffd561d1c78efcdd6d7052c6","unresolved":false,"context_lines":[{"line_number":5153,"context_line":"            # TODO(jaypipes): Remove this in Stein, when placement must be able"},{"line_number":5154,"context_line":"            # to be contacted from the nova-api service."},{"line_number":5155,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5156,"context_line":"                        \"aggregate: %s. There was a failure to communicate \""},{"line_number":5157,"context_line":"                        \"with the placement service.\","},{"line_number":5158,"context_line":"                        host_name, aggregate.uuid)"},{"line_number":5159,"context_line":"        except (exception.ResourceProviderNotFound,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_7cfc9fb4","line":5156,"range":{"start_line":5156,"start_character":52,"end_line":5156,"end_character":74},"updated":"2018-05-27 00:05:20.000000000","message":"What we\u0027ve got here is a failure to communicate.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":5153,"context_line":"            # TODO(jaypipes): Remove this in Stein, when placement must be able"},{"line_number":5154,"context_line":"            # to be contacted from the nova-api service."},{"line_number":5155,"context_line":"            LOG.warning(\"Failed to associate %s with a placement \""},{"line_number":5156,"context_line":"                        \"aggregate: %s. There was a failure to communicate \""},{"line_number":5157,"context_line":"                        \"with the placement service.\","},{"line_number":5158,"context_line":"                        host_name, aggregate.uuid)"},{"line_number":5159,"context_line":"        except (exception.ResourceProviderNotFound,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_47ed4cee","line":5156,"range":{"start_line":5156,"start_character":52,"end_line":5156,"end_character":74},"in_reply_to":"5f7c97a3_7cfc9fb4","updated":"2018-05-27 11:54:39.000000000","message":":)","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"}],"nova/exception.py":[{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f0f269004d0f2347915c148d06f1a59594813963","unresolved":false,"context_lines":[{"line_number":2154,"context_line":""},{"line_number":2155,"context_line":""},{"line_number":2156,"context_line":"class PlacementAPIConnectFailure(NovaException):"},{"line_number":2157,"context_line":"    msg_fmt \u003d _(\"Unable to community with the Placement API.\")"},{"line_number":2158,"context_line":""},{"line_number":2159,"context_line":""},{"line_number":2160,"context_line":"class PlacementAPIConflict(NovaException):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_27c6196a","line":2157,"range":{"start_line":2157,"start_character":27,"end_line":2157,"end_character":36},"updated":"2018-05-25 15:12:41.000000000","message":"nit: communicate","commit_id":"f7446c950d5341fc97a76fcb8c3c6087ed3acadb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0d1f352cef9948cc96aee00709d97db2b820008d","unresolved":false,"context_lines":[{"line_number":2154,"context_line":""},{"line_number":2155,"context_line":""},{"line_number":2156,"context_line":"class PlacementAPIConnectFailure(NovaException):"},{"line_number":2157,"context_line":"    msg_fmt \u003d _(\"Unable to community with the Placement API.\")"},{"line_number":2158,"context_line":""},{"line_number":2159,"context_line":""},{"line_number":2160,"context_line":"class PlacementAPIConflict(NovaException):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_22d92756","line":2157,"range":{"start_line":2157,"start_character":27,"end_line":2157,"end_character":36},"in_reply_to":"5f7c97a3_27c6196a","updated":"2018-05-25 15:31:18.000000000","message":"LOL! Nice catch :) Fixed.","commit_id":"f7446c950d5341fc97a76fcb8c3c6087ed3acadb"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":1789,"context_line":"        \"\"\"Looks up a resource provider by the supplied host name, and adds the"},{"line_number":1790,"context_line":"        aggregate with supplied UUID to that resource provider."},{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"        :note: This method does NOT use the cached provider tree. It is only"},{"line_number":1793,"context_line":"               called from the Compute API when a nova host aggregate is"},{"line_number":1794,"context_line":"               modified"},{"line_number":1795,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_b4b95dea","line":1792,"range":{"start_line":1792,"start_character":15,"end_line":1792,"end_character":65},"updated":"2018-03-19 19:16:47.000000000","message":"...for retrieval.  But it DOES update the cache (set_aggregates_for_provider does that).  But only if we made a change.  Which means the cache will *usually* be made current by this method; but there are a couple of edge cases where the cache was stale before we started, and remains stale(r) after we\u0027re done.\n\nWhich doesn\u0027t really make a lot of sense to me.  I don\u0027t necessarily have a problem with the initial GET directly from placement rather than the cache, but why not make sure the cache is updated by the end?","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3e37785b8d65343244231bc0b2ba596223550af1","unresolved":false,"context_lines":[{"line_number":1789,"context_line":"        \"\"\"Looks up a resource provider by the supplied host name, and adds the"},{"line_number":1790,"context_line":"        aggregate with supplied UUID to that resource provider."},{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"        :note: This method does NOT use the cached provider tree. It is only"},{"line_number":1793,"context_line":"               called from the Compute API when a nova host aggregate is"},{"line_number":1794,"context_line":"               modified"},{"line_number":1795,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_20a3bc51","line":1792,"range":{"start_line":1792,"start_character":15,"end_line":1792,"end_character":65},"in_reply_to":"bf659307_4f1383b9","updated":"2018-04-06 20:22:45.000000000","message":"YES - but Dan was trying to use the same method and running afoul of that exact ValueError because he *wasn\u0027t* doing anything to prepopulate the cache for that provider.  So I think we have a hole here.  More below...","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a96112a2dda64230e843cad8d09416331e5f826","unresolved":false,"context_lines":[{"line_number":1789,"context_line":"        \"\"\"Looks up a resource provider by the supplied host name, and adds the"},{"line_number":1790,"context_line":"        aggregate with supplied UUID to that resource provider."},{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"        :note: This method does NOT use the cached provider tree. It is only"},{"line_number":1793,"context_line":"               called from the Compute API when a nova host aggregate is"},{"line_number":1794,"context_line":"               modified"},{"line_number":1795,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_4f1383b9","line":1792,"range":{"start_line":1792,"start_character":15,"end_line":1792,"end_character":65},"in_reply_to":"df7087c5_b4b95dea","updated":"2018-04-06 17:08:50.000000000","message":"So, yeah... the set_aggregates_for_provider() call tries to update aggregates for the provider in the cached provider tree:\n\n self._provider_tree.update_aggregates(rp_uuid, placement_aggs)\n\nThe weird thing is, that should raise ValueError if rp_uuid isn\u0027t found in the provider tree cache. Which, I don\u0027t think it *would* be in the cache since _get_provider_aggregates() definitely doesn\u0027t fill the cache...\n\nSo I\u0027m actually not sure how the functional tests are passing.... they really should raise ValueError when attempting to set aggregates for the provider at first.\n\n[LATER ON...]\n\nOK, looking at the functional tests, I now understand why the func tests were working. In them, I\u0027m calling the reportclient\u0027s get_provider_tree_and_ensure_root() function, which obviously populates the cache with the resource provider record and enables the test to pass when it gets to calling aggregate_add_host() here.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":1824,"context_line":"        \"\"\"Looks up a resource provider by the supplied host name, and removes"},{"line_number":1825,"context_line":"        the aggregate with supplied UUID from that resource provider."},{"line_number":1826,"context_line":""},{"line_number":1827,"context_line":"        :note: This method does NOT use the cached provider tree. It is only"},{"line_number":1828,"context_line":"               called from the Compute API when a nova host aggregate is"},{"line_number":1829,"context_line":"               modified"},{"line_number":1830,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_54cec183","line":1827,"range":{"start_line":1827,"start_character":15,"end_line":1827,"end_character":65},"updated":"2018-03-19 19:16:47.000000000","message":"ditto","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"40f2cca40dd786fcf8e2e11a4be954f58bbb97e3","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from oslo_utils import versionutils"},{"line_number":27,"context_line":"from six.moves.urllib import parse"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from nova.api.openstack.placement import exception as placement_exc"},{"line_number":30,"context_line":"from nova.compute import provider_tree"},{"line_number":31,"context_line":"from nova.compute import utils as compute_utils"},{"line_number":32,"context_line":"import nova.conf"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_b2913b49","line":29,"updated":"2018-04-09 18:03:03.000000000","message":"These exceptions are only for use by the placement service, not clients.","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb2c8c9013fe578fa465c9d6f03130e4b2e01cb2","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from oslo_utils import versionutils"},{"line_number":27,"context_line":"from six.moves.urllib import parse"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from nova.api.openstack.placement import exception as placement_exc"},{"line_number":30,"context_line":"from nova.compute import provider_tree"},{"line_number":31,"context_line":"from nova.compute import utils as compute_utils"},{"line_number":32,"context_line":"import nova.conf"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_e3eda7b7","line":29,"in_reply_to":"bf659307_b2913b49","updated":"2018-04-09 19:54:42.000000000","message":"Done","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1abe7f462e43027a23f2ab05a21defcbc15b6312","unresolved":false,"context_lines":[{"line_number":1955,"context_line":""},{"line_number":1956,"context_line":"        raise placement_exc.ResourceProviderNotFound(name_or_uuid\u003dname)"},{"line_number":1957,"context_line":""},{"line_number":1958,"context_line":"    def aggregate_add_host(self, context, agg_uuid, host_name):"},{"line_number":1959,"context_line":"        \"\"\"Looks up a resource provider by the supplied host name, and adds the"},{"line_number":1960,"context_line":"        aggregate with supplied UUID to that resource provider."},{"line_number":1961,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_edb4dcf4","line":1958,"range":{"start_line":1958,"start_character":42,"end_line":1958,"end_character":50},"updated":"2018-04-06 22:10:10.000000000","message":"Are we ever going to want to do more than one of these at once?  Consider putting it last and making it *agg_uuids or a list?","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1abe7f462e43027a23f2ab05a21defcbc15b6312","unresolved":false,"context_lines":[{"line_number":1974,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1975,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1976,"context_line":"        \"\"\""},{"line_number":1977,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1978,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1979,"context_line":""},{"line_number":1980,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1981,"context_line":"        # want to overwrite any other aggregates the provider may be associated"},{"line_number":1982,"context_line":"        # with, however, so we first grab the list of aggregates for this"},{"line_number":1983,"context_line":"        # provider and add the aggregate to the list of aggregates it already"},{"line_number":1984,"context_line":"        # has"},{"line_number":1985,"context_line":"        existing_aggs \u003d self._get_provider_aggregates(context, rp_uuid)"},{"line_number":1986,"context_line":"        if agg_uuid in existing_aggs:"},{"line_number":1987,"context_line":"            return"},{"line_number":1988,"context_line":""},{"line_number":1989,"context_line":"        new_aggs \u003d existing_aggs | set([agg_uuid])"},{"line_number":1990,"context_line":"        self.set_aggregates_for_provider("},{"line_number":1991,"context_line":"            context, rp_uuid, new_aggs, use_cache\u003dFalse)"},{"line_number":1992,"context_line":""},{"line_number":1993,"context_line":"    def aggregate_remove_host(self, context, agg_uuid, host_name):"},{"line_number":1994,"context_line":"        \"\"\"Looks up a resource provider by the supplied host name, and removes"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_8d9a006c","line":1991,"range":{"start_line":1977,"start_character":0,"end_line":1991,"end_character":56},"updated":"2018-04-06 22:10:10.000000000","message":"This needs to handle generations.\n\nBut I guess L1329-30 will happily conflict with [1] - whichever merges first.  Or we can fold them into a series and avoid the issue...\n\n[1] https://review.openstack.org/#/c/556669/1/nova/scheduler/client/report.py@1298","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1abe7f462e43027a23f2ab05a21defcbc15b6312","unresolved":false,"context_lines":[{"line_number":2022,"context_line":"            return"},{"line_number":2023,"context_line":""},{"line_number":2024,"context_line":"        new_aggs \u003d existing_aggs - set([agg_uuid])"},{"line_number":2025,"context_line":"        self.set_aggregates_for_provider("},{"line_number":2026,"context_line":"            context, rp_uuid, new_aggs, use_cache\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_2d897425","line":2025,"updated":"2018-04-06 22:10:10.000000000","message":"ditto","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"75f25d8f560fcbd72da2fe407cfed51ba88ac0b1","unresolved":false,"context_lines":[{"line_number":2023,"context_line":"        # provider and remove the aggregate from the list of aggregates it"},{"line_number":2024,"context_line":"        # already has"},{"line_number":2025,"context_line":"        existing_aggs \u003d self._get_provider_aggregates(context, rp_uuid)"},{"line_number":2026,"context_line":"        if agg_uuid not in existing_aggs:"},{"line_number":2027,"context_line":"            return"},{"line_number":2028,"context_line":""},{"line_number":2029,"context_line":"        new_aggs \u003d existing_aggs - set([agg_uuid])"},{"line_number":2030,"context_line":"        self.set_aggregates_for_provider("}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_d1837803","line":2027,"range":{"start_line":2026,"start_character":8,"end_line":2027,"end_character":18},"updated":"2018-04-10 12:38:51.000000000","message":"I prefer this behavior, but there are other places where attempting to remove something that isn\u0027t there raises an exception. Just something to keep in mind.","commit_id":"585e96b79ee240e0ef1e2e0095ba0a6dc9ea2f16"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c7de18b15f6268ed0677fd69430b18ab2bfe4889","unresolved":false,"context_lines":[{"line_number":2023,"context_line":"        # provider and remove the aggregate from the list of aggregates it"},{"line_number":2024,"context_line":"        # already has"},{"line_number":2025,"context_line":"        existing_aggs \u003d self._get_provider_aggregates(context, rp_uuid)"},{"line_number":2026,"context_line":"        if agg_uuid not in existing_aggs:"},{"line_number":2027,"context_line":"            return"},{"line_number":2028,"context_line":""},{"line_number":2029,"context_line":"        new_aggs \u003d existing_aggs - set([agg_uuid])"},{"line_number":2030,"context_line":"        self.set_aggregates_for_provider("}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_cba623c2","line":2027,"range":{"start_line":2026,"start_character":8,"end_line":2027,"end_character":18},"in_reply_to":"bf659307_d1837803","updated":"2018-04-12 14:19:27.000000000","message":"ack.","commit_id":"585e96b79ee240e0ef1e2e0095ba0a6dc9ea2f16"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f5583fb17c69401fc5ffb4209c9b885f73ab400","unresolved":false,"context_lines":[{"line_number":1970,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1971,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1972,"context_line":"        \"\"\""},{"line_number":1973,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1974,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1975,"context_line":""},{"line_number":1976,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1977,"context_line":"        # want to overwrite any other aggregates the provider may be associated"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_407bcd26","line":1974,"range":{"start_line":1973,"start_character":8,"end_line":1974,"end_character":28},"updated":"2018-04-12 15:18:32.000000000","message":"If [placement] isn\u0027t configured in nova.conf for nova-api when this gets used, _get_provider_by_name is going to log a warning because of @safe_connect and then return None, which will result in a NoneType error here.","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0a0e569c2d8ae173836fa33b793712f6a35f93ee","unresolved":false,"context_lines":[{"line_number":1970,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1971,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1972,"context_line":"        \"\"\""},{"line_number":1973,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1974,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1975,"context_line":""},{"line_number":1976,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1977,"context_line":"        # want to overwrite any other aggregates the provider may be associated"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_c2e03d9a","line":1974,"range":{"start_line":1973,"start_character":8,"end_line":1974,"end_character":28},"in_reply_to":"bf659307_407bcd26","updated":"2018-04-12 18:57:55.000000000","message":"IMO that\u0027s a bug in safe_connect and/or its usage.  We should be using safe_connect only to decorate top-level methods, and... somehow dealing with nested decorators such that only the outermost one is observed.  I\u0027m also not convinced that safe_connect should just be passing when it receives an error - I think it should raise.\n\nIn any case, this is following the pattern of the other methods in report client.  Though I guess your concern is because of who\u0027s calling it, which is a new path.","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bdf20400e40248b57da823f1e928c439c08016b1","unresolved":false,"context_lines":[{"line_number":1970,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1971,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1972,"context_line":"        \"\"\""},{"line_number":1973,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1974,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1975,"context_line":""},{"line_number":1976,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1977,"context_line":"        # want to overwrite any other aggregates the provider may be associated"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f6a8fd7_53c5613b","line":1974,"range":{"start_line":1973,"start_character":8,"end_line":1974,"end_character":28},"in_reply_to":"bf659307_c2e03d9a","updated":"2018-04-17 21:19:57.000000000","message":"Yes, the API code which is calling this is relying on safe_connect to not explode if you haven\u0027t yet configured nova.conf driving your nova-api service for placement since it\u0027s a new requirement in rocky and I thought we could be graceful about it, especially if we are adding a \"sync aggregates\" function.\n\nBased on discussions today in IRC:\n\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2018-04-17.log.html#t2018-04-17T21:04:26\n\nMaybe in Rocky we need to gut a lot of safe_connect and add some new exception handling specific to nova-api for the graceful upgrade and then drop that compat code in Stein.","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f5583fb17c69401fc5ffb4209c9b885f73ab400","unresolved":false,"context_lines":[{"line_number":2005,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":2006,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":2007,"context_line":"        \"\"\""},{"line_number":2008,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":2009,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":2010,"context_line":""},{"line_number":2011,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":2012,"context_line":"        # want to overwrite any other aggregates the provider may be associated"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_c094bd39","line":2009,"range":{"start_line":2008,"start_character":8,"end_line":2009,"end_character":28},"updated":"2018-04-12 15:18:32.000000000","message":"same","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":1922,"context_line":"            if len(data[\u0027resource_providers\u0027]) \u003d\u003d 1:"},{"line_number":1923,"context_line":"                return data[\u0027resource_providers\u0027][0]"},{"line_number":1924,"context_line":""},{"line_number":1925,"context_line":"        raise exception.ResourceProviderNotFound(name_or_uuid\u003dname)"},{"line_number":1926,"context_line":""},{"line_number":1927,"context_line":"    def aggregate_add_host(self, context, agg_uuid, host_name):"},{"line_number":1928,"context_line":"        \"\"\"Looks up a resource provider by the supplied host name, and adds the"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_4debc211","line":1925,"updated":"2018-05-16 17:42:52.000000000","message":"Technically we might have failed for some non-404 case...not sure if you\u0027d want to log something or what.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77a958fc39f11573d50cff356de3bb2a397377df","unresolved":false,"context_lines":[{"line_number":1922,"context_line":"            if len(data[\u0027resource_providers\u0027]) \u003d\u003d 1:"},{"line_number":1923,"context_line":"                return data[\u0027resource_providers\u0027][0]"},{"line_number":1924,"context_line":""},{"line_number":1925,"context_line":"        raise exception.ResourceProviderNotFound(name_or_uuid\u003dname)"},{"line_number":1926,"context_line":""},{"line_number":1927,"context_line":"    def aggregate_add_host(self, context, agg_uuid, host_name):"},{"line_number":1928,"context_line":"        \"\"\"Looks up a resource provider by the supplied host name, and adds the"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_9df2ec05","line":1925,"in_reply_to":"5f7c97a3_4debc211","updated":"2018-05-24 19:49:45.000000000","message":"ack, I\u0027ll log if it\u0027s not a 404.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":1943,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1944,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1945,"context_line":"        \"\"\""},{"line_number":1946,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1947,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1948,"context_line":""},{"line_number":1949,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_b2f6775c","line":1946,"updated":"2018-05-16 17:42:52.000000000","message":"Because of @safe_connect on _get_provider_by_name, this can return None and then we\u0027ll get a TypeError.\n\nI believe https://review.openstack.org/#/c/560706/ is the first nova-api change to require placement for that service, however, that change is also idempotent and you\u0027ll get warnings if [placement] isn\u0027t configured for nova-api. But with this change, you\u0027ll get a 500 error from the add/remove aggregate host APIs.\n\nSo we could check for None here and raise an exception that we can handle in the calling code (AggregateAPI) as a warning in Rocky and make it a hard 500 in Stein, unless there are other opinions. I realize one option is just, eff it, let it break, it\u0027s an admin API anyway and placement is already required by nova-compute, nova-conductor and nova-scheduler, so it\u0027s a pretty safe bet to assume people are already configuring it for nova.conf they use on nova-api. If that\u0027s the case, we should have a release note stating it as a hard dependency when upgrading to Rocky and make sure it\u0027s called out here as well:\n\nhttps://docs.openstack.org/nova/latest/user/placement.html\n\nHaving said this, I should add a Rocky entry to ^ anyway because of https://review.openstack.org/#/c/560706/.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c20e731615dec53202d62ae1dfd1806e0dae1697","unresolved":false,"context_lines":[{"line_number":1943,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1944,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1945,"context_line":"        \"\"\""},{"line_number":1946,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1947,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1948,"context_line":""},{"line_number":1949,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_b5e1802d","line":1946,"in_reply_to":"5f7c97a3_b2f6775c","updated":"2018-05-16 17:59:05.000000000","message":"Yeah, raise something here if None, throw it away in rocky but let it 500 the api service in stein.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6032f20cbf93651064ab3bf4bb23b26875e32250","unresolved":false,"context_lines":[{"line_number":1943,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1944,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1945,"context_line":"        \"\"\""},{"line_number":1946,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1947,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1948,"context_line":""},{"line_number":1949,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_d5867cbb","line":1946,"in_reply_to":"5f7c97a3_b5e1802d","updated":"2018-05-16 18:31:38.000000000","message":"Can build on this for docs:\n\nhttps://review.openstack.org/#/c/568925/","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77a958fc39f11573d50cff356de3bb2a397377df","unresolved":false,"context_lines":[{"line_number":1943,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1944,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1945,"context_line":"        \"\"\""},{"line_number":1946,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1947,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1948,"context_line":""},{"line_number":1949,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_3d4398b1","line":1946,"in_reply_to":"5f7c97a3_d5867cbb","updated":"2018-05-24 19:49:45.000000000","message":"Done","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":1946,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1947,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1948,"context_line":""},{"line_number":1949,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1950,"context_line":"        # want to overwrite any other aggregates the provider may be associated"},{"line_number":1951,"context_line":"        # with, however, so we first grab the list of aggregates for this"},{"line_number":1952,"context_line":"        # provider and add the aggregate to the list of aggregates it already"},{"line_number":1953,"context_line":"        # has"},{"line_number":1954,"context_line":"        existing_aggs \u003d self._get_provider_aggregates(context, rp_uuid)"},{"line_number":1955,"context_line":"        if agg_uuid in existing_aggs:"},{"line_number":1956,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_ed708e74","line":1953,"range":{"start_line":1949,"start_character":69,"end_line":1953,"end_character":13},"updated":"2018-05-16 17:42:52.000000000","message":"Looks like we can\u0027t pass a provider generation to PUT on aggregates:\n\nhttps://developer.openstack.org/api-ref/placement/#update-resource-provider-aggregates\n\nSo we could still be racing here and overwrite any other aggregates set for the provider at the same time.\n\nMicroversion 1.19 will return the resource_provider_generation so I guess we could validate after the fact if we f\u0027ed up and overwrote the allocations but I\u0027m not sure what the point of that would be since we already screwed up.\n\nMaybe a TODO to add a generation to PUT /resource_providers/{uuid}/aggregates later?","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77a958fc39f11573d50cff356de3bb2a397377df","unresolved":false,"context_lines":[{"line_number":1946,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1947,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1948,"context_line":""},{"line_number":1949,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1950,"context_line":"        # want to overwrite any other aggregates the provider may be associated"},{"line_number":1951,"context_line":"        # with, however, so we first grab the list of aggregates for this"},{"line_number":1952,"context_line":"        # provider and add the aggregate to the list of aggregates it already"},{"line_number":1953,"context_line":"        # has"},{"line_number":1954,"context_line":"        existing_aggs \u003d self._get_provider_aggregates(context, rp_uuid)"},{"line_number":1955,"context_line":"        if agg_uuid in existing_aggs:"},{"line_number":1956,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_9d82ecc7","line":1953,"range":{"start_line":1949,"start_character":69,"end_line":1953,"end_character":13},"in_reply_to":"5f7c97a3_ed708e74","updated":"2018-05-24 19:49:45.000000000","message":"Done. Added a TODO","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":1952,"context_line":"        # provider and add the aggregate to the list of aggregates it already"},{"line_number":1953,"context_line":"        # has"},{"line_number":1954,"context_line":"        existing_aggs \u003d self._get_provider_aggregates(context, rp_uuid)"},{"line_number":1955,"context_line":"        if agg_uuid in existing_aggs:"},{"line_number":1956,"context_line":"            return"},{"line_number":1957,"context_line":""},{"line_number":1958,"context_line":"        new_aggs \u003d existing_aggs | set([agg_uuid])"},{"line_number":1959,"context_line":"        self.set_aggregates_for_provider("}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_0db62a8b","line":1956,"range":{"start_line":1955,"start_character":8,"end_line":1956,"end_character":18},"updated":"2018-05-16 17:42:52.000000000","message":"nit: don\u0027t see test coverage for when this evals to True; I did spot test coverage for the same check below.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77a958fc39f11573d50cff356de3bb2a397377df","unresolved":false,"context_lines":[{"line_number":1952,"context_line":"        # provider and add the aggregate to the list of aggregates it already"},{"line_number":1953,"context_line":"        # has"},{"line_number":1954,"context_line":"        existing_aggs \u003d self._get_provider_aggregates(context, rp_uuid)"},{"line_number":1955,"context_line":"        if agg_uuid in existing_aggs:"},{"line_number":1956,"context_line":"            return"},{"line_number":1957,"context_line":""},{"line_number":1958,"context_line":"        new_aggs \u003d existing_aggs | set([agg_uuid])"},{"line_number":1959,"context_line":"        self.set_aggregates_for_provider("}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_3d4ab8ab","line":1956,"range":{"start_line":1955,"start_character":8,"end_line":1956,"end_character":18},"in_reply_to":"5f7c97a3_0db62a8b","updated":"2018-05-24 19:49:45.000000000","message":"It would be unit test coverage. I\u0027ve added some unit tests for things and will include this in the coverage.","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":1978,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1979,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1980,"context_line":"        \"\"\""},{"line_number":1981,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1982,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1983,"context_line":""},{"line_number":1984,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_0de86a79","line":1981,"updated":"2018-05-16 17:42:52.000000000","message":"same as above","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77a958fc39f11573d50cff356de3bb2a397377df","unresolved":false,"context_lines":[{"line_number":1978,"context_line":"        :raises: `exception.ResourceProviderUpdateFailed` if there was a"},{"line_number":1979,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1980,"context_line":"        \"\"\""},{"line_number":1981,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1982,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1983,"context_line":""},{"line_number":1984,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_1de49cab","line":1981,"in_reply_to":"5f7c97a3_0de86a79","updated":"2018-05-24 19:49:45.000000000","message":"Done","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":1981,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1982,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1983,"context_line":""},{"line_number":1984,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1985,"context_line":"        # want to overwrite any other aggregates the provider may be associated"},{"line_number":1986,"context_line":"        # with, however, so we first grab the list of aggregates for this"},{"line_number":1987,"context_line":"        # provider and remove the aggregate from the list of aggregates it"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_cd059247","line":1984,"range":{"start_line":1984,"start_character":25,"end_line":1984,"end_character":28},"updated":"2018-05-16 17:42:52.000000000","message":"remove the aggregate from","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77a958fc39f11573d50cff356de3bb2a397377df","unresolved":false,"context_lines":[{"line_number":1981,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1982,"context_line":"        rp_uuid \u003d rp[\u0027uuid\u0027]"},{"line_number":1983,"context_line":""},{"line_number":1984,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1985,"context_line":"        # want to overwrite any other aggregates the provider may be associated"},{"line_number":1986,"context_line":"        # with, however, so we first grab the list of aggregates for this"},{"line_number":1987,"context_line":"        # provider and remove the aggregate from the list of aggregates it"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_3ddf18d7","line":1984,"range":{"start_line":1984,"start_character":25,"end_line":1984,"end_character":28},"in_reply_to":"5f7c97a3_cd059247","updated":"2018-05-24 19:49:45.000000000","message":"Done","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42d57094138d28173829678269383e9c2aa5ce4d","unresolved":false,"context_lines":[{"line_number":1983,"context_line":""},{"line_number":1984,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1985,"context_line":"        # want to overwrite any other aggregates the provider may be associated"},{"line_number":1986,"context_line":"        # with, however, so we first grab the list of aggregates for this"},{"line_number":1987,"context_line":"        # provider and remove the aggregate from the list of aggregates it"},{"line_number":1988,"context_line":"        # already has"},{"line_number":1989,"context_line":"        existing_aggs \u003d self._get_provider_aggregates(context, rp_uuid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_adf6165c","line":1986,"updated":"2018-05-16 17:42:52.000000000","message":"same as above about generation","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77a958fc39f11573d50cff356de3bb2a397377df","unresolved":false,"context_lines":[{"line_number":1983,"context_line":""},{"line_number":1984,"context_line":"        # Now attempt to add the aggregate to the resource provider. We don\u0027t"},{"line_number":1985,"context_line":"        # want to overwrite any other aggregates the provider may be associated"},{"line_number":1986,"context_line":"        # with, however, so we first grab the list of aggregates for this"},{"line_number":1987,"context_line":"        # provider and remove the aggregate from the list of aggregates it"},{"line_number":1988,"context_line":"        # already has"},{"line_number":1989,"context_line":"        existing_aggs \u003d self._get_provider_aggregates(context, rp_uuid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_fdf2006f","line":1986,"in_reply_to":"5f7c97a3_adf6165c","updated":"2018-05-24 19:49:45.000000000","message":"Done","commit_id":"0ee363db433e1da655f6d82b0137facbb7d51acc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"968d66947eccbc66ffd561d1c78efcdd6d7052c6","unresolved":false,"context_lines":[{"line_number":1894,"context_line":"                return data[\u0027resource_providers\u0027][0]"},{"line_number":1895,"context_line":"            elif num_recs \u003e 1:"},{"line_number":1896,"context_line":"                msg \u003d (\"Found multiple resource provider records for resource \""},{"line_number":1897,"context_line":"                       \"provider %s. This should not happen.\")"},{"line_number":1898,"context_line":"                LOG.warning(msg, name)"},{"line_number":1899,"context_line":"        elif resp.status_code !\u003d 404:"},{"line_number":1900,"context_line":"            msg \u003d (\"Failed to retrieve resource provider information by name \""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_3c0b87d6","line":1897,"range":{"start_line":1897,"start_character":24,"end_line":1897,"end_character":35},"updated":"2018-05-27 00:05:20.000000000","message":"This should probably say \"provider name %s\" - especially since some applications are using uuids as names. Also wouldn\u0027t hurt to list the uuids of the records that were found, to aid debugging.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":1894,"context_line":"                return data[\u0027resource_providers\u0027][0]"},{"line_number":1895,"context_line":"            elif num_recs \u003e 1:"},{"line_number":1896,"context_line":"                msg \u003d (\"Found multiple resource provider records for resource \""},{"line_number":1897,"context_line":"                       \"provider %s. This should not happen.\")"},{"line_number":1898,"context_line":"                LOG.warning(msg, name)"},{"line_number":1899,"context_line":"        elif resp.status_code !\u003d 404:"},{"line_number":1900,"context_line":"            msg \u003d (\"Failed to retrieve resource provider information by name \""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_07d4341f","line":1897,"range":{"start_line":1897,"start_character":24,"end_line":1897,"end_character":35},"in_reply_to":"5f7c97a3_3c0b87d6","updated":"2018-05-27 11:54:39.000000000","message":"Good point. I\u0027ll add in the next revision.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"968d66947eccbc66ffd561d1c78efcdd6d7052c6","unresolved":false,"context_lines":[{"line_number":1923,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1924,"context_line":"        \"\"\""},{"line_number":1925,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1926,"context_line":"        # NOTE(jaypipes): Unfortunately, due to @safe_connect,"},{"line_number":1927,"context_line":"        # _get_provider_by_name() can return None. If that happens, raise an"},{"line_number":1928,"context_line":"        # error so we can trap for it in the Nova API code and ignore in Rocky,"},{"line_number":1929,"context_line":"        # blow up in Stein."}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_5cff63aa","line":1926,"range":{"start_line":1926,"start_character":26,"end_line":1926,"end_character":61},"updated":"2018-05-27 00:05:20.000000000","message":"I\u0027m doing this on my phone, so this is more of a note to self to look later, but:\n\nWhat does @safe_connect buy us in the first place in this context? Would it hurt to just nix the decorator from  _get_provider_by_name?","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":1923,"context_line":"                 failure attempting to save the provider aggregates"},{"line_number":1924,"context_line":"        \"\"\""},{"line_number":1925,"context_line":"        rp \u003d self._get_provider_by_name(context, host_name)"},{"line_number":1926,"context_line":"        # NOTE(jaypipes): Unfortunately, due to @safe_connect,"},{"line_number":1927,"context_line":"        # _get_provider_by_name() can return None. If that happens, raise an"},{"line_number":1928,"context_line":"        # error so we can trap for it in the Nova API code and ignore in Rocky,"},{"line_number":1929,"context_line":"        # blow up in Stein."}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_6715e8e4","line":1926,"range":{"start_line":1926,"start_character":26,"end_line":1926,"end_character":61},"in_reply_to":"5f7c97a3_5cff63aa","updated":"2018-05-27 11:54:39.000000000","message":"As opposed to putting @safe_connect on the aggregate_add_host() and aggregate_remove_host() methods? Good question, I hadn\u0027t thought of that.\n\nIt would eliminate the need to have a PlacementAPIConnectFailure exception but instead of trapping PlacementAPIConnectFailure in the nova-api, we\u0027d have no way to signal to the caller that something wrong happened (since either with or without a @safe_connect, the aggregate_add_host() and aggregate_remove_host() methods return None...","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5562d127ddfdd0e6aa22aafb801addeda3035353","unresolved":false,"context_lines":[{"line_number":1941,"context_line":"            return"},{"line_number":1942,"context_line":""},{"line_number":1943,"context_line":"        new_aggs \u003d existing_aggs | set([agg_uuid])"},{"line_number":1944,"context_line":"        # TODO(jaypipes): Send provider generation (which is in the rp dict)"},{"line_number":1945,"context_line":"        # along to set_aggregates_for_provider()"},{"line_number":1946,"context_line":"        self.set_aggregates_for_provider("},{"line_number":1947,"context_line":"            context, rp_uuid, new_aggs, use_cache\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_7c1b3fc9","line":1944,"range":{"start_line":1944,"start_character":10,"end_line":1944,"end_character":14},"updated":"2018-05-27 05:21:31.000000000","message":"I knew this sounded familiar.\n\nhttps://review.openstack.org/#/c/556669/\n\nNote that that guy assumes the provider exists in the cache, which may not completely work for this code path.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":1941,"context_line":"            return"},{"line_number":1942,"context_line":""},{"line_number":1943,"context_line":"        new_aggs \u003d existing_aggs | set([agg_uuid])"},{"line_number":1944,"context_line":"        # TODO(jaypipes): Send provider generation (which is in the rp dict)"},{"line_number":1945,"context_line":"        # along to set_aggregates_for_provider()"},{"line_number":1946,"context_line":"        self.set_aggregates_for_provider("},{"line_number":1947,"context_line":"            context, rp_uuid, new_aggs, use_cache\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_27d93056","line":1944,"range":{"start_line":1944,"start_character":10,"end_line":1944,"end_character":14},"in_reply_to":"5f7c97a3_7c1b3fc9","updated":"2018-05-27 11:54:39.000000000","message":"Sure though we could add a generation param to set_aggregates_for_provider(). Which would probably be a better design long-term anyway.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"}],"nova/tests/functional/api/openstack/placement/test_report_client.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                    self.context, uuids.cn)[\u0027inventories\u0027])"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"    def test_non_tree_aggregate_membership(self):"},{"line_number":691,"context_line":"        \"\"\"There are some methods of the reportclient that do NOT interact with"},{"line_number":692,"context_line":"        the reportclient\u0027s provider_tree cache of information. These methods"},{"line_number":693,"context_line":"        are called to add and remove members from a nova host aggregate and"},{"line_number":694,"context_line":"        ensure that the placement API has a mirrored record of the resource"},{"line_number":695,"context_line":"        provider\u0027s aggregate associations."}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_b4eabda9","line":692,"range":{"start_line":691,"start_character":59,"end_line":692,"end_character":61},"updated":"2018-03-19 19:16:47.000000000","message":"Yeah, okay, implies that they don\u0027t interact at all, which is patently false.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dcdd230f454d0605c011a8f87e91072bcd0de4c6","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                    self.context, uuids.cn)[\u0027inventories\u0027])"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"    def test_non_tree_aggregate_membership(self):"},{"line_number":691,"context_line":"        \"\"\"There are some methods of the reportclient that do NOT interact with"},{"line_number":692,"context_line":"        the reportclient\u0027s provider_tree cache of information. These methods"},{"line_number":693,"context_line":"        are called to add and remove members from a nova host aggregate and"},{"line_number":694,"context_line":"        ensure that the placement API has a mirrored record of the resource"},{"line_number":695,"context_line":"        provider\u0027s aggregate associations."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_bb113d56","line":692,"range":{"start_line":691,"start_character":59,"end_line":692,"end_character":61},"in_reply_to":"bf659307_a07cacb5","updated":"2018-04-06 20:25:43.000000000","message":"\u003e How about a more general boolean kwarg called.\n\n...called `use_cache`","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7a4405307f98c112ea6a16e5d785fa867c002fcb","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                    self.context, uuids.cn)[\u0027inventories\u0027])"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"    def test_non_tree_aggregate_membership(self):"},{"line_number":691,"context_line":"        \"\"\"There are some methods of the reportclient that do NOT interact with"},{"line_number":692,"context_line":"        the reportclient\u0027s provider_tree cache of information. These methods"},{"line_number":693,"context_line":"        are called to add and remove members from a nova host aggregate and"},{"line_number":694,"context_line":"        ensure that the placement API has a mirrored record of the resource"},{"line_number":695,"context_line":"        provider\u0027s aggregate associations."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_bbc4dd93","line":692,"range":{"start_line":691,"start_character":59,"end_line":692,"end_character":61},"in_reply_to":"bf659307_a07cacb5","updated":"2018-04-06 20:39:34.000000000","message":"k, use_cache it is then. :) We\u0027ll start with a kwarg just on the set_aggregates_for_provider() method and if needed move to a use_cache attribute on the client object in the future.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3e37785b8d65343244231bc0b2ba596223550af1","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                    self.context, uuids.cn)[\u0027inventories\u0027])"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"    def test_non_tree_aggregate_membership(self):"},{"line_number":691,"context_line":"        \"\"\"There are some methods of the reportclient that do NOT interact with"},{"line_number":692,"context_line":"        the reportclient\u0027s provider_tree cache of information. These methods"},{"line_number":693,"context_line":"        are called to add and remove members from a nova host aggregate and"},{"line_number":694,"context_line":"        ensure that the placement API has a mirrored record of the resource"},{"line_number":695,"context_line":"        provider\u0027s aggregate associations."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_a07cacb5","line":692,"range":{"start_line":691,"start_character":59,"end_line":692,"end_character":61},"in_reply_to":"bf659307_aff9ff4d","updated":"2018-04-06 20:22:45.000000000","message":"How about a more general boolean kwarg called.  Meaning we neither *populate* nor *query* the cache when it\u0027s False.  That way we could percolate a similar kwarg throughout the other report client methods as we find we need it, and it would have a familiar semantic throughout.  I.e. if False:\n\n- Retrieve any needed artifacts from placement rather than self.provider_tree; and\n- Don\u0027t push any updates back to self.provider_tree.\n\n*OR*\n\na) since you\u0027re talking about not wanting to use the cache from nova-api at all, and b) for consistency in general, we could make use_cache a SchedulerReportClient __init__ kwarg.  When False, it disables the cache entirely for that instance of the report client.  That would be useful for a number of things, including performance testing, isolating cache bugs (if we switch off the cache and the bug goes away, it\u0027s a cache bug; else it\u0027s not), etc.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a96112a2dda64230e843cad8d09416331e5f826","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                    self.context, uuids.cn)[\u0027inventories\u0027])"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"    def test_non_tree_aggregate_membership(self):"},{"line_number":691,"context_line":"        \"\"\"There are some methods of the reportclient that do NOT interact with"},{"line_number":692,"context_line":"        the reportclient\u0027s provider_tree cache of information. These methods"},{"line_number":693,"context_line":"        are called to add and remove members from a nova host aggregate and"},{"line_number":694,"context_line":"        ensure that the placement API has a mirrored record of the resource"},{"line_number":695,"context_line":"        provider\u0027s aggregate associations."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_aff9ff4d","line":692,"range":{"start_line":691,"start_character":59,"end_line":692,"end_character":61},"in_reply_to":"df7087c5_b4eabda9","updated":"2018-04-06 17:08:50.000000000","message":"I am going to change the set_aggregates_for_provider() method of the reportclient to accept a \"refresh_tree\" boolean parameter. This will be True by default, but the aggregate_add_host() and aggregate_remove_host() will pass False for it.\n\nThe reason is because we do not want the nova-api node to use the ProviderTree cache of the reportclient. nova-api, unlike nova-compute, will need to set aggregate data against thousands of resource providers and I don\u0027t want to have the heavy provider tree cache needed in each nova-api process.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1abe7f462e43027a23f2ab05a21defcbc15b6312","unresolved":false,"context_lines":[{"line_number":896,"context_line":"                self.assertEqual(404, resp.status_code)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"    def test_non_tree_aggregate_membership(self):"},{"line_number":899,"context_line":"        \"\"\"There are some methods of the reportclient that do NOT interact with"},{"line_number":900,"context_line":"        the reportclient\u0027s provider_tree cache of information. These methods"},{"line_number":901,"context_line":"        are called to add and remove members from a nova host aggregate and"},{"line_number":902,"context_line":"        ensure that the placement API has a mirrored record of the resource"},{"line_number":903,"context_line":"        provider\u0027s aggregate associations."}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_2db734db","line":900,"range":{"start_line":899,"start_character":59,"end_line":900,"end_character":46},"updated":"2018-04-06 22:10:10.000000000","message":"Nothing about this test case currently proves that.  Few ways to handle.\n\n- You could whack the cache after get_provider_tree_and_ensure_root.  The rest ought to still work because it only relies on the provider having been created in the placement db.\n- You could mock up the relevant ProviderTree methods and assert they\u0027re not called.\n- You could dive into the cache after the aggregate_add_host and assert that it has no aggregates associated with the RP.  Then call something that refreshes the cache, and assert that they appear.  Then assert that they don\u0027t disappear from the cache after aggregate_remove_host.","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb2c8c9013fe578fa465c9d6f03130e4b2e01cb2","unresolved":false,"context_lines":[{"line_number":896,"context_line":"                self.assertEqual(404, resp.status_code)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"    def test_non_tree_aggregate_membership(self):"},{"line_number":899,"context_line":"        \"\"\"There are some methods of the reportclient that do NOT interact with"},{"line_number":900,"context_line":"        the reportclient\u0027s provider_tree cache of information. These methods"},{"line_number":901,"context_line":"        are called to add and remove members from a nova host aggregate and"},{"line_number":902,"context_line":"        ensure that the placement API has a mirrored record of the resource"},{"line_number":903,"context_line":"        provider\u0027s aggregate associations."}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_4334934a","line":900,"range":{"start_line":899,"start_character":59,"end_line":900,"end_character":46},"in_reply_to":"bf659307_2db734db","updated":"2018-04-09 19:54:42.000000000","message":"Done. Went with mocking out ProviderTree.new_root().","commit_id":"b03cf30355b90da6a8b5d43b9f1285dfe2c807aa"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"75f25d8f560fcbd72da2fe407cfed51ba88ac0b1","unresolved":false,"context_lines":[{"line_number":931,"context_line":"                self.context, agg_uuid, self.compute_name)"},{"line_number":932,"context_line":"            aggs \u003d self.client._get_provider_aggregates("},{"line_number":933,"context_line":"                self.context, self.compute_uuid)"},{"line_number":934,"context_line":"            self.assertEqual(set(), aggs)"},{"line_number":935,"context_line":"        new_root_mock.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_f19b1c63","line":934,"updated":"2018-04-10 12:38:51.000000000","message":"nit: You might also add another attempt to remove the host from the now-empty aggregate to show that it returns without an error.","commit_id":"585e96b79ee240e0ef1e2e0095ba0a6dc9ea2f16"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"95e7d318a1ee121c1b6411f1d19576378daf1207","unresolved":false,"context_lines":[{"line_number":931,"context_line":"                self.context, agg_uuid, self.compute_name)"},{"line_number":932,"context_line":"            aggs \u003d self.client._get_provider_aggregates("},{"line_number":933,"context_line":"                self.context, self.compute_uuid)"},{"line_number":934,"context_line":"            self.assertEqual(set(), aggs)"},{"line_number":935,"context_line":"        new_root_mock.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_abc72f12","line":934,"in_reply_to":"bf659307_f19b1c63","updated":"2018-04-12 14:29:40.000000000","message":"Done","commit_id":"585e96b79ee240e0ef1e2e0095ba0a6dc9ea2f16"}],"nova/tests/functional/test_aggregates.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c85b8f476df321e2707fccb09965f3cc8988e5c7","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        # FIXME(efried): This should be a thing we can do without internals"},{"line_number":148,"context_line":"        self.report_client._ensure_resource_provider("},{"line_number":149,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":150,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _grant_tenant_aggregate(self, agg, tenants):"},{"line_number":153,"context_line":"        \"\"\"Grant a set of tenants access to use an aggregate."}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_c0c35dec","line":150,"range":{"start_line":150,"start_character":8,"end_line":150,"end_character":78},"updated":"2018-04-12 15:32:27.000000000","message":"Why is this needed? Shouldn\u0027t we rely on the new API behavior to implicitly create the resource provider aggregate when the compute host is added to the nova host aggregate?","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c83b7a9d3934f5ab443e0cfd118f18e543018081","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        # FIXME(efried): This should be a thing we can do without internals"},{"line_number":148,"context_line":"        self.report_client._ensure_resource_provider("},{"line_number":149,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":150,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _grant_tenant_aggregate(self, agg, tenants):"},{"line_number":153,"context_line":"        \"\"\"Grant a set of tenants access to use an aggregate."}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_387dd8b1","line":150,"range":{"start_line":150,"start_character":8,"end_line":150,"end_character":78},"in_reply_to":"bf659307_a2f50959","updated":"2018-05-25 19:22:41.000000000","message":"Did this get answered?\n\n[Later] Yeah, sort of - see https://review.openstack.org/#/c/553597/8/nova/tests/functional/test_aggregates.py@148","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0a0e569c2d8ae173836fa33b793712f6a35f93ee","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        # FIXME(efried): This should be a thing we can do without internals"},{"line_number":148,"context_line":"        self.report_client._ensure_resource_provider("},{"line_number":149,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":150,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _grant_tenant_aggregate(self, agg, tenants):"},{"line_number":153,"context_line":"        \"\"\"Grant a set of tenants access to use an aggregate."}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_a2f50959","line":150,"range":{"start_line":150,"start_character":8,"end_line":150,"end_character":78},"in_reply_to":"bf659307_c0c35dec","updated":"2018-04-12 18:57:55.000000000","message":"mm","commit_id":"bc3c8adc2b558d8cb8334790b3dab8b7b522639c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62304af34f738f983b0d202ecf71b5526c3a701c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # FIXME(efried): This should be a thing we can do without internals"},{"line_number":146,"context_line":"        self.report_client._ensure_resource_provider("},{"line_number":147,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":148,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _wait_for_state_change(self, server, from_status):"},{"line_number":151,"context_line":"        for i in range(0, 50):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_486d6f30","line":148,"updated":"2018-05-24 21:59:14.000000000","message":"We shouldn\u0027t have to do this because add_host_to_aggregate above should do this automatically for us, right? Which is exactly the nice thing we want to happen.","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dcceb8e0897290f40b98fe51c2a895def05934eb","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # FIXME(efried): This should be a thing we can do without internals"},{"line_number":146,"context_line":"        self.report_client._ensure_resource_provider("},{"line_number":147,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":148,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _wait_for_state_change(self, server, from_status):"},{"line_number":151,"context_line":"        for i in range(0, 50):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_c723a5a6","line":148,"in_reply_to":"5f7c97a3_486d6f30","updated":"2018-05-25 13:47:29.000000000","message":"No, the problem is that add_host_to_aggregate() doesn\u0027t ever call _ensure_resource_provider() -- that is done in the compute node resource tracker, not the nova-api service. So, either we do this here or we move _ensure_resource_provider() above line 140. I can do that if you\u0027d like, along with a comment.","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"131fec35a32424f219c45b12021d07614c65c300","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # FIXME(efried): This should be a thing we can do without internals"},{"line_number":146,"context_line":"        self.report_client._ensure_resource_provider("},{"line_number":147,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":148,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _wait_for_state_change(self, server, from_status):"},{"line_number":151,"context_line":"        for i in range(0, 50):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_f3ac62a0","line":148,"in_reply_to":"5f7c97a3_b810085b","updated":"2018-05-25 22:57:43.000000000","message":"Would prefer any changes to this in a follow up.","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c83b7a9d3934f5ab443e0cfd118f18e543018081","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # FIXME(efried): This should be a thing we can do without internals"},{"line_number":146,"context_line":"        self.report_client._ensure_resource_provider("},{"line_number":147,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":148,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _wait_for_state_change(self, server, from_status):"},{"line_number":151,"context_line":"        for i in range(0, 50):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_b810085b","line":148,"in_reply_to":"5f7c97a3_c723a5a6","updated":"2018-05-25 19:22:41.000000000","message":"Yeah, that would probably be better visually.","commit_id":"a66b7a84892a90b472e6a0d69c6bc098a7e178f9"}],"nova/tests/functional/test_report_client.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"968d66947eccbc66ffd561d1c78efcdd6d7052c6","unresolved":false,"context_lines":[{"line_number":911,"context_line":"        with self._interceptor():"},{"line_number":912,"context_line":"            # get_provider_tree_and_ensure_root creates a resource provider"},{"line_number":913,"context_line":"            # record for us"},{"line_number":914,"context_line":"            ptree \u003d self.client.get_provider_tree_and_ensure_root("},{"line_number":915,"context_line":"                self.context, self.compute_uuid, name\u003dself.compute_name)"},{"line_number":916,"context_line":"            self.assertEqual([self.compute_uuid], ptree.get_provider_uuids())"},{"line_number":917,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_fc298f36","line":914,"range":{"start_line":914,"start_character":54,"end_line":914,"end_character":65},"updated":"2018-05-27 00:05:20.000000000","message":"Um. This should be populating the cache (via new_root). What gives? (Again, note to self to look later.)","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"968d66947eccbc66ffd561d1c78efcdd6d7052c6","unresolved":false,"context_lines":[{"line_number":928,"context_line":"            aggs \u003d self.client._get_provider_aggregates("},{"line_number":929,"context_line":"                self.context, self.compute_uuid)"},{"line_number":930,"context_line":"            self.assertEqual(set([agg_uuid]), aggs)"},{"line_number":931,"context_line":""},{"line_number":932,"context_line":"            # Finally, remove the association and verify it\u0027s removed in"},{"line_number":933,"context_line":"            # placement"},{"line_number":934,"context_line":"            self.client.aggregate_remove_host("}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_1cd48b1f","line":931,"updated":"2018-05-27 00:05:20.000000000","message":"Guess I expected you to introspect the cache here to prove the aggregate wasn\u0027t added there.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[{"line_number":900,"context_line":"                self.assertEqual(404, resp.status_code)"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":"    @mock.patch(\u0027nova.compute.provider_tree.ProviderTree.new_root\u0027)"},{"line_number":903,"context_line":"    def test_non_tree_aggregate_membership(self, new_root_mock):"},{"line_number":904,"context_line":"        \"\"\"There are some methods of the reportclient that do NOT interact with"},{"line_number":905,"context_line":"        the reportclient\u0027s provider_tree cache of information. These methods"},{"line_number":906,"context_line":"        are called to add and remove members from a nova host aggregate and"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_1753eb17","line":903,"range":{"start_line":903,"start_character":49,"end_line":903,"end_character":62},"updated":"2018-05-29 18:16:10.000000000","message":"Okay, yeah, this mock isn\u0027t having the desired effect, which I assume is to \"prove\" that the aggregate_*_host methods don\u0027t touch the cache.  get_provider_tree_and_ensure_root is in fact populating the cache - but it does it via ProviderTree.populate_from_iterable, which bypasses new_root (essentially inlines that logic because it needs to do a broader range of stuff under lock).  And of course, the aggregate_*_host methods don\u0027t (wouldn\u0027t) use new_root or any variant thereof regardless.\n\nI would say:\n- remove this mock.\n- introspect the cache after L927 and L935 to make sure the aggregate wasn\u0027t added/removed.\n- Optionally add a NonCallableMock for ProviderTree.update_aggregates, since that\u0027s the one you want to prove doesn\u0027t get hit.  (This is kind of brittle, since we could change that call and not notice; so we shouldn\u0027t rely solely on this without the above.)","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[{"line_number":900,"context_line":"                self.assertEqual(404, resp.status_code)"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":"    @mock.patch(\u0027nova.compute.provider_tree.ProviderTree.new_root\u0027)"},{"line_number":903,"context_line":"    def test_non_tree_aggregate_membership(self, new_root_mock):"},{"line_number":904,"context_line":"        \"\"\"There are some methods of the reportclient that do NOT interact with"},{"line_number":905,"context_line":"        the reportclient\u0027s provider_tree cache of information. These methods"},{"line_number":906,"context_line":"        are called to add and remove members from a nova host aggregate and"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_7315803c","line":903,"range":{"start_line":903,"start_character":49,"end_line":903,"end_character":62},"in_reply_to":"5f7c97a3_1753eb17","updated":"2018-05-30 14:39:00.000000000","message":"Done","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8748eae49863b4e87afeaf4444561c059ec09755","unresolved":false,"context_lines":[{"line_number":931,"context_line":"            # the aggregate_add_host() method is only called from nova-api and"},{"line_number":932,"context_line":"            # we don\u0027t want to have a ProviderTree cache at that layer."},{"line_number":933,"context_line":"            cache_data \u003d self.client._provider_tree.data(self.compute_uuid)"},{"line_number":934,"context_line":"            self.assertNotIn(\u0027aggregates\u0027, cache_data)"},{"line_number":935,"context_line":"            aggs \u003d self.client._get_provider_aggregates("},{"line_number":936,"context_line":"                self.context, self.compute_uuid)"},{"line_number":937,"context_line":"            self.assertEqual(set([agg_uuid]), aggs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_e1a8d68c","line":934,"range":{"start_line":934,"start_character":12,"end_line":934,"end_character":54},"updated":"2018-05-30 16:04:01.000000000","message":"This doesn\u0027t seem to work, though I still don\u0027t quite understand why.  Can you just change it to self.assertNotIn(agg_uuid, cache_data.aggregates)?\n\n In [20]: t \u003d pt.ProviderTree()\n\n In [21]: t.new_root(\u0027name\u0027, u.root)\n Out[21]: \u0027b0756659-6834-4182-9824-189a3642188f\u0027\n\n In [22]: d \u003d t.data(\u0027name\u0027)\n\n In [23]: d\n Out[23]: ProviderData(uuid\u003d\u0027b0756659-6834-4182-9824-189a3642188f\u0027, name\u003d\u0027name\u0027, generation\u003dNone, parent_uuid\u003dNone, inventory\u003d{}, traits\u003dset([]), aggregates\u003dset([]))\n\n In [24]: \u0027aggregates\u0027 in d\n Out[24]: False\n\n In [25]: d.aggregates\n Out[25]: set()\n\n In [26]: d.aggregates \u003d\u003d set()\n Out[26]: True\n\n In [27]: t.update_aggregates(\u0027name\u0027, {u.agg1, u.agg2})\n Out[27]: True\n\n In [28]: d \u003d t.data(\u0027name\u0027)\n\n In [29]: \u0027aggregates\u0027 in d\n Out[29]: False     \u003c\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Reports False even when nonempty\n\n In [30]: d.aggregates\n Out[30]: \n {\u00272fa01624-478e-4e39-9c1b-c4890282bca8\u0027,\n  \u00273a139b43-61ea-40c4-a3c8-dad1920bf29f\u0027}\n\n In [31]: d.aggregates \u003d\u003d set()\n Out[31]: False\n\n In [32]: \u0027uuid\u0027 in d\n Out[32]: False     \u003c\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Okay, so maybe it\u0027s always False\n\n In [33]: d.uuid\n Out[33]: \u0027b0756659-6834-4182-9824-189a3642188f\u0027\n\n In [34]: \u0027name\u0027 in d\n Out[34]: True      \u003c\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Oh, but not for this one??\n\nI\u0027m guessing __contains__ just has some bizarre default impl that\u0027s unpredictable.","commit_id":"9f4bf8c48bb8bf47d729576c16856f66a3c5355f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1397ef3d7f9b03b2b6831e6147fa578fdedcd266","unresolved":false,"context_lines":[{"line_number":931,"context_line":"            # the aggregate_add_host() method is only called from nova-api and"},{"line_number":932,"context_line":"            # we don\u0027t want to have a ProviderTree cache at that layer."},{"line_number":933,"context_line":"            cache_data \u003d self.client._provider_tree.data(self.compute_uuid)"},{"line_number":934,"context_line":"            self.assertNotIn(\u0027aggregates\u0027, cache_data)"},{"line_number":935,"context_line":"            aggs \u003d self.client._get_provider_aggregates("},{"line_number":936,"context_line":"                self.context, self.compute_uuid)"},{"line_number":937,"context_line":"            self.assertEqual(set([agg_uuid]), aggs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_1c39b9a2","line":934,"range":{"start_line":934,"start_character":12,"end_line":934,"end_character":54},"in_reply_to":"5f7c97a3_e1a8d68c","updated":"2018-05-30 16:33:14.000000000","message":"oink, yeah... I think I pushed a bit early. Was really just doing a canary test with the self.assertNotIn(\u0027aggregates\u0027, data) thing and forgot to follow up! :(","commit_id":"9f4bf8c48bb8bf47d729576c16856f66a3c5355f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"783b8cfcf21f49a81637bea2c15b4c117707f79f","unresolved":false,"context_lines":[{"line_number":927,"context_line":"                self.context, agg_uuid, self.compute_name)"},{"line_number":928,"context_line":""},{"line_number":929,"context_line":"            # Check that the ProviderTree cache that was populated above during"},{"line_number":930,"context_line":"            # get_provider_tree_and_ensure_root() hasn\u0027t been modified (since"},{"line_number":931,"context_line":"            # the aggregate_add_host() method is only called from nova-api and"},{"line_number":932,"context_line":"            # we don\u0027t want to have a ProviderTree cache at that layer."},{"line_number":933,"context_line":"            cache_data \u003d self.client._provider_tree.data(self.compute_uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_b9de926a","line":930,"range":{"start_line":930,"start_character":71,"end_line":930,"end_character":72},"updated":"2018-05-30 20:09:32.000000000","message":"nit: dangling parenthesis","commit_id":"5eda1fab85e907a59d3be36067bfe25250a7be56"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":11519,"context_line":"                          self.api.delete_aggregate, self.context, aggr.id)"},{"line_number":11520,"context_line":""},{"line_number":11521,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":11522,"context_line":"                \u0027aggregate_add_host\u0027)"},{"line_number":11523,"context_line":"    def test_check_az_for_aggregate(self, mock_add_host):"},{"line_number":11524,"context_line":"        # Ensure all conflict hosts can be returned"},{"line_number":11525,"context_line":"        values \u003d _create_service_entries(self.context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_94fe9969","line":11522,"updated":"2018-03-19 19:16:47.000000000","message":"If you\u0027re not going to use the mock in the method, you can say new\u003dmock.Mock() and leave off the mock_add_host param.\n\n(Throughout)","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"27a8c0b15d51b2fd33e24552917846fa66e2b76c","unresolved":false,"context_lines":[{"line_number":11519,"context_line":"                          self.api.delete_aggregate, self.context, aggr.id)"},{"line_number":11520,"context_line":""},{"line_number":11521,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":11522,"context_line":"                \u0027aggregate_add_host\u0027)"},{"line_number":11523,"context_line":"    def test_check_az_for_aggregate(self, mock_add_host):"},{"line_number":11524,"context_line":"        # Ensure all conflict hosts can be returned"},{"line_number":11525,"context_line":"        values \u003d _create_service_entries(self.context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_2fa3af51","line":11522,"in_reply_to":"df7087c5_94fe9969","updated":"2018-04-06 17:09:52.000000000","message":"meh... I\u0027m following the existing style in the test file.","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"5f7c97a3_176c4bce","updated":"2018-05-29 18:16:10.000000000","message":"nit: anywhere you don\u0027t reference the mock in a test case, you can add\n\n new\u003dmock.Mock()\n\nto the decorator and get rid of the arg.","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"5f7c97a3_3352a814","in_reply_to":"5f7c97a3_176c4bce","updated":"2018-05-30 14:39:00.000000000","message":"We\u0027ve had this discussion before... I\u0027m not a fan of that approach. It\u0027s actually less change and fewer words to just add a mock argument to the function, and it\u0027s clearer that the argument is a mock...","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"}],"nova/tests/unit/compute/test_host_api.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":409,"context_line":"                \u0027aggregate_remove_host\u0027)"},{"line_number":410,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":411,"context_line":"                \u0027aggregate_add_host\u0027)"},{"line_number":412,"context_line":"    def test_service_delete_compute_in_aggregate("},{"line_number":413,"context_line":"            self, mock_add_host, mock_remove_host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_34ef8db1","line":410,"updated":"2018-03-19 19:16:47.000000000","message":"ditto","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                                                   None)"},{"line_number":428,"context_line":"        self.aggregate_api.add_host_to_aggregate(self.ctxt,"},{"line_number":429,"context_line":"                                                 aggregate.id,"},{"line_number":430,"context_line":"                                                 \u0027fake-compute-host\u0027)"},{"line_number":431,"context_line":"        self.controller.delete(self.req, compute.id)"},{"line_number":432,"context_line":"        result \u003d self.aggregate_api.get_aggregate(self.ctxt,"},{"line_number":433,"context_line":"                                                  aggregate.id).hosts"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_f7abcfd2","line":430,"updated":"2018-05-29 18:16:10.000000000","message":"mock_add_host.assert_called_once_with(...)","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                                                   None)"},{"line_number":428,"context_line":"        self.aggregate_api.add_host_to_aggregate(self.ctxt,"},{"line_number":429,"context_line":"                                                 aggregate.id,"},{"line_number":430,"context_line":"                                                 \u0027fake-compute-host\u0027)"},{"line_number":431,"context_line":"        self.controller.delete(self.req, compute.id)"},{"line_number":432,"context_line":"        result \u003d self.aggregate_api.get_aggregate(self.ctxt,"},{"line_number":433,"context_line":"                                                  aggregate.id).hosts"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_13a3ecb3","line":430,"in_reply_to":"5f7c97a3_f7abcfd2","updated":"2018-05-30 14:39:00.000000000","message":"Done","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        # NOTE(jaypipes): We just mock out the HostNapping and Service object"},{"line_number":699,"context_line":"        # lookups in order to bypass the code that does cell lookup stuff,"},{"line_number":700,"context_line":"        # which isn\u0027t germane to these tests"},{"line_number":701,"context_line":"        gbh_mock \u003d mock.patch(\u0027nova.objects.HostMapping.get_by_host\u0027)"},{"line_number":702,"context_line":"        gbh_mock.start()"},{"line_number":703,"context_line":"        targ_mock \u003d mock.patch(\u0027nova.context.set_target_cell\u0027)"},{"line_number":704,"context_line":"        targ_mock.start()"},{"line_number":705,"context_line":"        gbch_mock \u003d mock.patch(\u0027nova.objects.Service.get_by_compute_host\u0027)"},{"line_number":706,"context_line":"        gbch_mock.start()"},{"line_number":707,"context_line":"        self.addCleanup(gbh_mock.stop)"},{"line_number":708,"context_line":"        self.addCleanup(targ_mock.stop)"},{"line_number":709,"context_line":"        self.addCleanup(gbch_mock.stop)"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":712,"context_line":"                \u0027aggregate_add_host\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_f7d98f82","line":709,"range":{"start_line":701,"start_character":0,"end_line":709,"end_character":39},"updated":"2018-05-29 18:16:10.000000000","message":"nit: you can save LOC with:\n\n fixtures.MockPatch(\u0027...\u0027)\n\nThis replaces mock.patch, start(), addCleanup(stop)","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        # NOTE(jaypipes): We just mock out the HostNapping and Service object"},{"line_number":699,"context_line":"        # lookups in order to bypass the code that does cell lookup stuff,"},{"line_number":700,"context_line":"        # which isn\u0027t germane to these tests"},{"line_number":701,"context_line":"        gbh_mock \u003d mock.patch(\u0027nova.objects.HostMapping.get_by_host\u0027)"},{"line_number":702,"context_line":"        gbh_mock.start()"},{"line_number":703,"context_line":"        targ_mock \u003d mock.patch(\u0027nova.context.set_target_cell\u0027)"},{"line_number":704,"context_line":"        targ_mock.start()"},{"line_number":705,"context_line":"        gbch_mock \u003d mock.patch(\u0027nova.objects.Service.get_by_compute_host\u0027)"},{"line_number":706,"context_line":"        gbch_mock.start()"},{"line_number":707,"context_line":"        self.addCleanup(gbh_mock.stop)"},{"line_number":708,"context_line":"        self.addCleanup(targ_mock.stop)"},{"line_number":709,"context_line":"        self.addCleanup(gbch_mock.stop)"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":712,"context_line":"                \u0027aggregate_add_host\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_b3c23884","line":709,"range":{"start_line":701,"start_character":0,"end_line":709,"end_character":39},"in_reply_to":"5f7c97a3_8ba6ef0e","updated":"2018-05-30 14:39:00.000000000","message":"Cool, will change. FTR, I just copy/pasted this from the unit test in test_report.py:\n\n class TestResourceClass(SchedulerReportClientTestCase):\n    def setUp(self):\n        super(TestResourceClass, self).setUp()\n        _put_patch \u003d mock.patch(\n            \"nova.scheduler.client.report.SchedulerReportClient.put\")\n        self.addCleanup(_put_patch.stop)\n        self.mock_put \u003d _put_patch.start()","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"30adcc13900a806ae1463e0a77e99f719480d8d7","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        # NOTE(jaypipes): We just mock out the HostNapping and Service object"},{"line_number":699,"context_line":"        # lookups in order to bypass the code that does cell lookup stuff,"},{"line_number":700,"context_line":"        # which isn\u0027t germane to these tests"},{"line_number":701,"context_line":"        gbh_mock \u003d mock.patch(\u0027nova.objects.HostMapping.get_by_host\u0027)"},{"line_number":702,"context_line":"        gbh_mock.start()"},{"line_number":703,"context_line":"        targ_mock \u003d mock.patch(\u0027nova.context.set_target_cell\u0027)"},{"line_number":704,"context_line":"        targ_mock.start()"},{"line_number":705,"context_line":"        gbch_mock \u003d mock.patch(\u0027nova.objects.Service.get_by_compute_host\u0027)"},{"line_number":706,"context_line":"        gbch_mock.start()"},{"line_number":707,"context_line":"        self.addCleanup(gbh_mock.stop)"},{"line_number":708,"context_line":"        self.addCleanup(targ_mock.stop)"},{"line_number":709,"context_line":"        self.addCleanup(gbch_mock.stop)"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":712,"context_line":"                \u0027aggregate_add_host\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_8ba6ef0e","line":709,"range":{"start_line":701,"start_character":0,"end_line":709,"end_character":39},"in_reply_to":"5f7c97a3_f7d98f82","updated":"2018-05-29 22:39:49.000000000","message":"tbc,\n\n foo_p \u003d mock.patch(\u0027foo\u0027)\n foo_p.start()\n self.addCleanup(foo_p.stop)\n\ncan be replaced with:\n\n self.useFixture(fixtures.MockPatch(\u0027foo\u0027))\n\nIf you need the mock itself:\n\n foo_mock \u003d self.useFixture(fixtures.MockPatch(\u0027foo\u0027)).mock","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[{"line_number":778,"context_line":"        self.aggregate_api.remove_host_from_aggregate("},{"line_number":779,"context_line":"            self.ctxt, aggregate.id, hostname)"},{"line_number":780,"context_line":"        # Nothing should blow up in Rocky, but we should get a warning about"},{"line_number":781,"context_line":"        # placement connectivity failure"},{"line_number":782,"context_line":"        msg \u003d (\"Failed to remove association of %s with a placement \""},{"line_number":783,"context_line":"               \"aggregate: %s. This may be corrected after running \""},{"line_number":784,"context_line":"               \"nova-manage placement sync_aggregates.\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_97693b8d","line":781,"range":{"start_line":781,"start_character":10,"end_line":781,"end_character":40},"updated":"2018-05-29 18:16:10.000000000","message":"copy pasta","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[{"line_number":778,"context_line":"        self.aggregate_api.remove_host_from_aggregate("},{"line_number":779,"context_line":"            self.ctxt, aggregate.id, hostname)"},{"line_number":780,"context_line":"        # Nothing should blow up in Rocky, but we should get a warning about"},{"line_number":781,"context_line":"        # placement connectivity failure"},{"line_number":782,"context_line":"        msg \u003d (\"Failed to remove association of %s with a placement \""},{"line_number":783,"context_line":"               \"aggregate: %s. This may be corrected after running \""},{"line_number":784,"context_line":"               \"nova-manage placement sync_aggregates.\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_33d86851","line":781,"range":{"start_line":781,"start_character":10,"end_line":781,"end_character":40},"in_reply_to":"5f7c97a3_97693b8d","updated":"2018-05-30 14:39:00.000000000","message":"Done","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[{"line_number":3388,"context_line":"    \"\"\""},{"line_number":3389,"context_line":"    def setUp(self):"},{"line_number":3390,"context_line":"        super(TestAggregateAddRemoveHost, self).setUp()"},{"line_number":3391,"context_line":"        _get_patch \u003d mock.patch("},{"line_number":3392,"context_line":"            \"nova.scheduler.client.report.SchedulerReportClient.get\")"},{"line_number":3393,"context_line":"        self.addCleanup(_get_patch.stop)"},{"line_number":3394,"context_line":"        self.mock_get \u003d _get_patch.start()"},{"line_number":3395,"context_line":"        _put_patch \u003d mock.patch("},{"line_number":3396,"context_line":"            \"nova.scheduler.client.report.SchedulerReportClient.put\")"},{"line_number":3397,"context_line":"        self.addCleanup(_put_patch.stop)"},{"line_number":3398,"context_line":"        self.mock_put \u003d _put_patch.start()"},{"line_number":3399,"context_line":""},{"line_number":3400,"context_line":"    def test_get_provider_by_name_success(self):"},{"line_number":3401,"context_line":"        get_resp \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_d7f813c5","line":3398,"range":{"start_line":3391,"start_character":0,"end_line":3398,"end_character":42},"updated":"2018-05-29 18:16:10.000000000","message":"nit: Could use fixtures.MockPatch here too.","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[{"line_number":3388,"context_line":"    \"\"\""},{"line_number":3389,"context_line":"    def setUp(self):"},{"line_number":3390,"context_line":"        super(TestAggregateAddRemoveHost, self).setUp()"},{"line_number":3391,"context_line":"        _get_patch \u003d mock.patch("},{"line_number":3392,"context_line":"            \"nova.scheduler.client.report.SchedulerReportClient.get\")"},{"line_number":3393,"context_line":"        self.addCleanup(_get_patch.stop)"},{"line_number":3394,"context_line":"        self.mock_get \u003d _get_patch.start()"},{"line_number":3395,"context_line":"        _put_patch \u003d mock.patch("},{"line_number":3396,"context_line":"            \"nova.scheduler.client.report.SchedulerReportClient.put\")"},{"line_number":3397,"context_line":"        self.addCleanup(_put_patch.stop)"},{"line_number":3398,"context_line":"        self.mock_put \u003d _put_patch.start()"},{"line_number":3399,"context_line":""},{"line_number":3400,"context_line":"    def test_get_provider_by_name_success(self):"},{"line_number":3401,"context_line":"        get_resp \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_b3f558cd","line":3398,"range":{"start_line":3391,"start_character":0,"end_line":3398,"end_character":42},"in_reply_to":"5f7c97a3_d7f813c5","updated":"2018-05-30 14:39:00.000000000","message":"Done","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[{"line_number":3445,"context_line":"            exception.ResourceProviderNotFound,"},{"line_number":3446,"context_line":"            self.client._get_provider_by_name, self.context, name)"},{"line_number":3447,"context_line":"        mock_log.assert_called_once()"},{"line_number":3448,"context_line":""},{"line_number":3449,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":3450,"context_line":"                \u0027set_aggregates_for_provider\u0027)"},{"line_number":3451,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_d7cfb37c","line":3448,"updated":"2018-05-29 18:16:10.000000000","message":"Test for 404 path (like above, but mock_log not called).\n\n(Personally, I would probably just simplify the method itself to remove that condition and log the warning regardless.)","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[{"line_number":3445,"context_line":"            exception.ResourceProviderNotFound,"},{"line_number":3446,"context_line":"            self.client._get_provider_by_name, self.context, name)"},{"line_number":3447,"context_line":"        mock_log.assert_called_once()"},{"line_number":3448,"context_line":""},{"line_number":3449,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":3450,"context_line":"                \u0027set_aggregates_for_provider\u0027)"},{"line_number":3451,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_338f082b","line":3448,"in_reply_to":"5f7c97a3_d7cfb37c","updated":"2018-05-30 14:39:00.000000000","message":"I think you are asking for a test_get_provider_by_name_404?","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[{"line_number":3480,"context_line":"        name \u003d \u0027cn1\u0027"},{"line_number":3481,"context_line":"        self.client.aggregate_add_host(self.context, agg_uuid, name)"},{"line_number":3482,"context_line":"        mock_set_aggs.assert_not_called()"},{"line_number":3483,"context_line":""},{"line_number":3484,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":3485,"context_line":"                \u0027_get_provider_by_name\u0027)"},{"line_number":3486,"context_line":"    def test_aggregate_add_host_no_placement(self, mock_get_by_name):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_1780cbf6","line":3483,"updated":"2018-05-29 18:16:10.000000000","message":"Wouldn\u0027t mind a test to prove that aggs are properly additive.  E.g. mock_get_aggs returns {agg1, agg2}, we try to add {agg2, agg3}, and assert mock_set_aggs is called with {agg1, agg2, agg3}.","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[{"line_number":3480,"context_line":"        name \u003d \u0027cn1\u0027"},{"line_number":3481,"context_line":"        self.client.aggregate_add_host(self.context, agg_uuid, name)"},{"line_number":3482,"context_line":"        mock_set_aggs.assert_not_called()"},{"line_number":3483,"context_line":""},{"line_number":3484,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":3485,"context_line":"                \u0027_get_provider_by_name\u0027)"},{"line_number":3486,"context_line":"    def test_aggregate_add_host_no_placement(self, mock_get_by_name):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_53f16494","line":3483,"in_reply_to":"5f7c97a3_1780cbf6","updated":"2018-05-30 14:39:00.000000000","message":"You can\u0027t add more than one aggregate with aggregate_add_host().\n\nThat said, I\u0027ve added a bit more to this test to verify that Python sets work.","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8748eae49863b4e87afeaf4444561c059ec09755","unresolved":false,"context_lines":[{"line_number":3480,"context_line":"        name \u003d \u0027cn1\u0027"},{"line_number":3481,"context_line":"        self.client.aggregate_add_host(self.context, agg_uuid, name)"},{"line_number":3482,"context_line":"        mock_set_aggs.assert_not_called()"},{"line_number":3483,"context_line":""},{"line_number":3484,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":3485,"context_line":"                \u0027_get_provider_by_name\u0027)"},{"line_number":3486,"context_line":"    def test_aggregate_add_host_no_placement(self, mock_get_by_name):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_a1cdfe66","line":3483,"in_reply_to":"5f7c97a3_53f16494","updated":"2018-05-30 16:04:01.000000000","message":"Thanks, this looks good.\n\n(BTW Mr. Snarklepuss, hopefully it\u0027s clear that I\u0027m not asking you to verify that Python sets work.  I\u0027m asking you to verify that your code is using them correctly.)","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d5d08583385120ed1e9872806957b7a5922b7e06","unresolved":false,"context_lines":[{"line_number":3480,"context_line":"        name \u003d \u0027cn1\u0027"},{"line_number":3481,"context_line":"        self.client.aggregate_add_host(self.context, agg_uuid, name)"},{"line_number":3482,"context_line":"        mock_set_aggs.assert_not_called()"},{"line_number":3483,"context_line":""},{"line_number":3484,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":3485,"context_line":"                \u0027_get_provider_by_name\u0027)"},{"line_number":3486,"context_line":"    def test_aggregate_add_host_no_placement(self, mock_get_by_name):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_fc5abdef","line":3483,"in_reply_to":"5f7c97a3_a1cdfe66","updated":"2018-05-30 16:34:14.000000000","message":"Snarklepuss is actually my middle name, not my surname.","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"5f7c97a3_578f2322","line":3550,"updated":"2018-05-29 18:16:10.000000000","message":"Likewise, a test to make sure that e.g. deleting {agg1, agg2} from {agg1, agg2, agg3} leaves {agg3}.","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"5f7c97a3_d30b347a","line":3550,"in_reply_to":"5f7c97a3_578f2322","updated":"2018-05-30 14:39:00.000000000","message":"You can\u0027t delete more than one aggregate using aggregate_remove_host().","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"924a92f2d1af25f613939acb247c3b0e5216e500","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"5f7c97a3_7cc22d55","line":3550,"in_reply_to":"5f7c97a3_c17a7a22","updated":"2018-05-30 16:44:41.000000000","message":"Done","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8748eae49863b4e87afeaf4444561c059ec09755","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"5f7c97a3_c17a7a22","line":3550,"in_reply_to":"5f7c97a3_d30b347a","updated":"2018-05-30 16:04:01.000000000","message":"Okay, so similar to the above, here it would be e.g. removing agg2 and asserting called with {agg1, agg3}.","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"783b8cfcf21f49a81637bea2c15b4c117707f79f","unresolved":false,"context_lines":[{"line_number":3447,"context_line":""},{"line_number":3448,"context_line":"    @mock.patch.object(report.LOG, \u0027warning\u0027)"},{"line_number":3449,"context_line":"    def test_get_provider_by_name_404(self, mock_log):"},{"line_number":3450,"context_line":"        get_resp \u003d mock.Mock()"},{"line_number":3451,"context_line":"        get_resp.status_code \u003d 404"},{"line_number":3452,"context_line":"        self.mock_get.return_value \u003d get_resp"},{"line_number":3453,"context_line":"        name \u003d \u0027cn1\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_b94c5242","line":3450,"updated":"2018-05-30 20:09:32.000000000","message":"nit: We could use our FakeResponse object here and elsewhere:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/unit/fake_requests.py","commit_id":"5eda1fab85e907a59d3be36067bfe25250a7be56"}],"nova/tests/unit/virt/xenapi/test_xenapi.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1eef0faac7825d75417673ec068bd3c6c7734b3","unresolved":false,"context_lines":[{"line_number":3254,"context_line":""},{"line_number":3255,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":3256,"context_line":"                \u0027aggregate_remove_host\u0027)"},{"line_number":3257,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":3258,"context_line":"                \u0027aggregate_add_host\u0027)"},{"line_number":3259,"context_line":"    def test_remove_host_from_aggregate_error("},{"line_number":3260,"context_line":"            self, mock_add_host, mock_remove_host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_9433f962","line":3257,"updated":"2018-03-19 19:16:47.000000000","message":"ditto","commit_id":"3a824776b0e3f390a14f1aef0bc6e627a7c21649"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1bbb13d5a68a55ec4a61bf9afdf9c04f5b7f7d5c","unresolved":false,"context_lines":[{"line_number":3198,"context_line":"                                           metadata)"},{"line_number":3199,"context_line":"        for aggregate_host in values[fake_zone]:"},{"line_number":3200,"context_line":"            aggr \u003d self.api.add_host_to_aggregate(self.context,"},{"line_number":3201,"context_line":"                                                  aggr.id, aggregate_host)"},{"line_number":3202,"context_line":"        # let\u0027s mock the fact that the aggregate is in error!"},{"line_number":3203,"context_line":"        expected \u003d self.api.remove_host_from_aggregate(self.context,"},{"line_number":3204,"context_line":"                                                       aggr.id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_379aa761","line":3201,"updated":"2018-05-29 18:16:10.000000000","message":"assert moc_add_host is called?","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ece13d36a05c7d7ffa169b2518cde014723960e9","unresolved":false,"context_lines":[{"line_number":3198,"context_line":"                                           metadata)"},{"line_number":3199,"context_line":"        for aggregate_host in values[fake_zone]:"},{"line_number":3200,"context_line":"            aggr \u003d self.api.add_host_to_aggregate(self.context,"},{"line_number":3201,"context_line":"                                                  aggr.id, aggregate_host)"},{"line_number":3202,"context_line":"        # let\u0027s mock the fact that the aggregate is in error!"},{"line_number":3203,"context_line":"        expected \u003d self.api.remove_host_from_aggregate(self.context,"},{"line_number":3204,"context_line":"                                                       aggr.id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_13be8cd4","line":3201,"in_reply_to":"5f7c97a3_379aa761","updated":"2018-05-30 14:39:00.000000000","message":"No, I\u0027m just going to remove the mock_remove_host.assert... below. It\u0027s not germane to these tests and just indicates bad poor overly-large test surfaces :(","commit_id":"72f0e258f7f4bf191471ece5721513e1da0e1195"}],"releasenotes/notes/mirror-host-aggregates-to-placement-597473efa94ee558.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"79b902df9bd93439102a54e3d911ff7cf28e0343","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    If the [placement] section is missing from the nova-api\u0027s nova.conf file,"},{"line_number":18,"context_line":"    nothing will break however there will be some warnings generated in the"},{"line_number":19,"context_line":"    nova-api\u0027s log file when administrators associated a compute host with a"},{"line_number":20,"context_line":"    host aggregate."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5f7c97a3_a79b0915","line":20,"updated":"2018-05-25 14:52:05.000000000","message":"nit: maybe add \"However, this will be a hard failure starting in the 19.0.0 Stein release.\"","commit_id":"f7446c950d5341fc97a76fcb8c3c6087ed3acadb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"380e59c6eabc45f130a51aa1ab7d987ff0615692","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    If the [placement] section is missing from the nova-api\u0027s nova.conf file,"},{"line_number":18,"context_line":"    nothing will break however there will be some warnings generated in the"},{"line_number":19,"context_line":"    nova-api\u0027s log file when administrators associated a compute host with a"},{"line_number":20,"context_line":"    host aggregate."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"5f7c97a3_c28073fa","line":20,"updated":"2018-05-25 15:34:37.000000000","message":"Add the \"However, this will become a failure starting in the 19.0.0 Stein release.\"","commit_id":"e2b06dc9180b36382ee988364e1f577bc151e85d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c83b7a9d3934f5ab443e0cfd118f18e543018081","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    We now attempt to mirror the association of compute host to host aggregate"},{"line_number":5,"context_line":"    into the placement API. When administrators use the `POST"},{"line_number":6,"context_line":"    /os-aggregates/{aggregate_id}/action` Compute API call to add or remove a"},{"line_number":7,"context_line":"    host from an aggregate, the nova-api service will attempt to ensure that a"},{"line_number":8,"context_line":"    corresponding record is created in the placement API for the resource"},{"line_number":9,"context_line":"    provider (compute host) and host aggregate UUID."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_d8470477","line":6,"range":{"start_line":5,"start_character":57,"end_line":6,"end_character":41},"updated":"2018-05-25 19:22:41.000000000","message":"double backticks","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9de259df53afbf7f56c50ed9d249054adae74e01","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    We now attempt to mirror the association of compute host to host aggregate"},{"line_number":5,"context_line":"    into the placement API. When administrators use the `POST"},{"line_number":6,"context_line":"    /os-aggregates/{aggregate_id}/action` Compute API call to add or remove a"},{"line_number":7,"context_line":"    host from an aggregate, the nova-api service will attempt to ensure that a"},{"line_number":8,"context_line":"    corresponding record is created in the placement API for the resource"},{"line_number":9,"context_line":"    provider (compute host) and host aggregate UUID."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_bc71d778","line":6,"range":{"start_line":5,"start_character":57,"end_line":6,"end_character":41},"in_reply_to":"5f7c97a3_539bd671","updated":"2018-05-26 23:21:11.000000000","message":"I\u0027m mostly regurgitating what I\u0027ve seen stephenfin say in similar situations before, but:\n\nSingle backticks give you the \"default role\" which happens to render in italics, but is actually undefined and may change. Whereas double backticks render as fixed width, which is appropriate for inline code-like stuff, which I would think to include ini excerpts.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    We now attempt to mirror the association of compute host to host aggregate"},{"line_number":5,"context_line":"    into the placement API. When administrators use the `POST"},{"line_number":6,"context_line":"    /os-aggregates/{aggregate_id}/action` Compute API call to add or remove a"},{"line_number":7,"context_line":"    host from an aggregate, the nova-api service will attempt to ensure that a"},{"line_number":8,"context_line":"    corresponding record is created in the placement API for the resource"},{"line_number":9,"context_line":"    provider (compute host) and host aggregate UUID."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_07bd14d7","line":6,"range":{"start_line":5,"start_character":57,"end_line":6,"end_character":41},"in_reply_to":"5f7c97a3_d8470477","updated":"2018-05-27 11:54:39.000000000","message":"Done","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"131fec35a32424f219c45b12021d07614c65c300","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    We now attempt to mirror the association of compute host to host aggregate"},{"line_number":5,"context_line":"    into the placement API. When administrators use the `POST"},{"line_number":6,"context_line":"    /os-aggregates/{aggregate_id}/action` Compute API call to add or remove a"},{"line_number":7,"context_line":"    host from an aggregate, the nova-api service will attempt to ensure that a"},{"line_number":8,"context_line":"    corresponding record is created in the placement API for the resource"},{"line_number":9,"context_line":"    provider (compute host) and host aggregate UUID."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_539bd671","line":6,"range":{"start_line":5,"start_character":57,"end_line":6,"end_character":41},"in_reply_to":"5f7c97a3_d8470477","updated":"2018-05-25 22:57:43.000000000","message":"The single doesn\u0027t bother me, I don\u0027t think we have any hard rules on this right?","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c83b7a9d3934f5ab443e0cfd118f18e543018081","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    The nova-api service needs to understand how to connect to the placement"},{"line_number":12,"context_line":"    service in order for this mirroring process to work. Administrators should"},{"line_number":13,"context_line":"    ensure that there is a [placement] section in the nova.conf file which is"},{"line_number":14,"context_line":"    used by the nova-api service, and that credentials for interacting with"},{"line_number":15,"context_line":"    placement are contained in that section."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_78603002","line":13,"range":{"start_line":13,"start_character":27,"end_line":13,"end_character":38},"updated":"2018-05-25 19:22:41.000000000","message":"``[placement]``","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    The nova-api service needs to understand how to connect to the placement"},{"line_number":12,"context_line":"    service in order for this mirroring process to work. Administrators should"},{"line_number":13,"context_line":"    ensure that there is a [placement] section in the nova.conf file which is"},{"line_number":14,"context_line":"    used by the nova-api service, and that credentials for interacting with"},{"line_number":15,"context_line":"    placement are contained in that section."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_27c2905a","line":13,"range":{"start_line":13,"start_character":27,"end_line":13,"end_character":38},"in_reply_to":"5f7c97a3_78603002","updated":"2018-05-27 11:54:39.000000000","message":"Done","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c83b7a9d3934f5ab443e0cfd118f18e543018081","unresolved":false,"context_lines":[{"line_number":14,"context_line":"    used by the nova-api service, and that credentials for interacting with"},{"line_number":15,"context_line":"    placement are contained in that section."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    If the [placement] section is missing from the nova-api\u0027s nova.conf file,"},{"line_number":18,"context_line":"    nothing will break however there will be some warnings generated in the"},{"line_number":19,"context_line":"    nova-api\u0027s log file when administrators associated a compute host with a"},{"line_number":20,"context_line":"    host aggregate. However, this will become a failure starting in the"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_3856382c","line":17,"range":{"start_line":17,"start_character":11,"end_line":17,"end_character":22},"updated":"2018-05-25 19:22:41.000000000","message":"ditto","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c83b7a9d3934f5ab443e0cfd118f18e543018081","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    If the [placement] section is missing from the nova-api\u0027s nova.conf file,"},{"line_number":18,"context_line":"    nothing will break however there will be some warnings generated in the"},{"line_number":19,"context_line":"    nova-api\u0027s log file when administrators associated a compute host with a"},{"line_number":20,"context_line":"    host aggregate. However, this will become a failure starting in the"},{"line_number":21,"context_line":"    19.0.0 Stein release."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_5853f439","line":19,"range":{"start_line":19,"start_character":44,"end_line":19,"end_character":54},"updated":"2018-05-25 19:22:41.000000000","message":"associate","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fc390e7967b2611e2962078c26fbbb5ace64ff01","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    If the [placement] section is missing from the nova-api\u0027s nova.conf file,"},{"line_number":18,"context_line":"    nothing will break however there will be some warnings generated in the"},{"line_number":19,"context_line":"    nova-api\u0027s log file when administrators associated a compute host with a"},{"line_number":20,"context_line":"    host aggregate. However, this will become a failure starting in the"},{"line_number":21,"context_line":"    19.0.0 Stein release."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_c7b2bc06","line":19,"range":{"start_line":19,"start_character":44,"end_line":19,"end_character":54},"in_reply_to":"5f7c97a3_5853f439","updated":"2018-05-27 11:54:39.000000000","message":"Done","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fca34c2a6780010feeff6db18566d5df77abfae3","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    If the [placement] section is missing from the nova-api\u0027s nova.conf file,"},{"line_number":18,"context_line":"    nothing will break however there will be some warnings generated in the"},{"line_number":19,"context_line":"    nova-api\u0027s log file when administrators associated a compute host with a"},{"line_number":20,"context_line":"    host aggregate. However, this will become a failure starting in the"},{"line_number":21,"context_line":"    19.0.0 Stein release."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_551403a0","line":21,"range":{"start_line":20,"start_character":20,"end_line":21,"end_character":25},"updated":"2018-05-29 13:30:43.000000000","message":"Did you mean to lose this?  Looks like you may have had PS10 locally...","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6f5cce78d87a13dbe67b78c1ec8d30b359c3dd2f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    If the [placement] section is missing from the nova-api\u0027s nova.conf file,"},{"line_number":18,"context_line":"    nothing will break however there will be some warnings generated in the"},{"line_number":19,"context_line":"    nova-api\u0027s log file when administrators associated a compute host with a"},{"line_number":20,"context_line":"    host aggregate. However, this will become a failure starting in the"},{"line_number":21,"context_line":"    19.0.0 Stein release."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_687e02e5","line":21,"range":{"start_line":20,"start_character":20,"end_line":21,"end_character":25},"in_reply_to":"5f7c97a3_551403a0","updated":"2018-05-29 14:00:41.000000000","message":"Matt had pushed a revision that I had forgotten to pull. I\u0027ll add it back.","commit_id":"72192912f9ddf464a9942ab41e36b28b1cda9f79"}]}
