)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59f48f50b9a536f8cb6097a3deccb1c06fa7567e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"List instances using Searchlight (spec)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To support efficiently listing instances across multiple cells Nova plans to"},{"line_number":10,"context_line":"integrate support for using `Searchlight`_. This will be an optional feature"},{"line_number":11,"context_line":"but recommended for large deployments with multiple cells since using"},{"line_number":12,"context_line":"Searchlight will be perform better than the compute API getting instances"},{"line_number":13,"context_line":"across multiple cells and then merge sorting them in Python."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba2be162_3c8529ad","line":10,"updated":"2017-03-06 17:49:07.000000000","message":"not that it really matters, but we\u0027re not RST here.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"980189fc0a271b2b396c7af97e3ac9d656959173","unresolved":false,"context_lines":[{"line_number":7,"context_line":"List instances using Searchlight (spec)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To support efficiently listing instances across multiple cells Nova plans to"},{"line_number":10,"context_line":"integrate support for using `Searchlight`_. This will be an optional feature"},{"line_number":11,"context_line":"but recommended for large deployments with multiple cells since using"},{"line_number":12,"context_line":"Searchlight will be perform better than the compute API getting instances"},{"line_number":13,"context_line":"across multiple cells and then merge sorting them in Python."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba2be162_02139e0e","line":10,"in_reply_to":"ba2be162_3c8529ad","updated":"2017-03-06 17:58:59.000000000","message":"oops copy/paste from the spec","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59f48f50b9a536f8cb6097a3deccb1c06fa7567e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"To support efficiently listing instances across multiple cells Nova plans to"},{"line_number":10,"context_line":"integrate support for using `Searchlight`_. This will be an optional feature"},{"line_number":11,"context_line":"but recommended for large deployments with multiple cells since using"},{"line_number":12,"context_line":"Searchlight will be perform better than the compute API getting instances"},{"line_number":13,"context_line":"across multiple cells and then merge sorting them in Python."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Spec for blueprint list-instances-using-searchlight"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba2be162_3cac4935","line":12,"updated":"2017-03-06 17:49:07.000000000","message":"s/be//","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"980189fc0a271b2b396c7af97e3ac9d656959173","unresolved":false,"context_lines":[{"line_number":9,"context_line":"To support efficiently listing instances across multiple cells Nova plans to"},{"line_number":10,"context_line":"integrate support for using `Searchlight`_. This will be an optional feature"},{"line_number":11,"context_line":"but recommended for large deployments with multiple cells since using"},{"line_number":12,"context_line":"Searchlight will be perform better than the compute API getting instances"},{"line_number":13,"context_line":"across multiple cells and then merge sorting them in Python."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Spec for blueprint list-instances-using-searchlight"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba2be162_42f596c9","line":12,"in_reply_to":"ba2be162_3cac4935","updated":"2017-03-06 17:58:59.000000000","message":"Done","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"}],"specs/pike/approved/list-instances-using-searchlight.rst":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59f48f50b9a536f8cb6097a3deccb1c06fa7567e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"To support efficiently listing instances across multiple cells Nova plans to"},{"line_number":14,"context_line":"integrate support for using `Searchlight`_. This will be an optional feature"},{"line_number":15,"context_line":"but recommended for large deployments with multiple cells since using"},{"line_number":16,"context_line":"Searchlight will be perform better than the compute API getting instances"},{"line_number":17,"context_line":"across multiple cells and then merge sorting them in Python."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":".. _Searchlight: https://docs.openstack.org/developer/searchlight/"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_f7cd6ab8","line":16,"updated":"2017-03-06 17:49:07.000000000","message":"s/be//","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"980189fc0a271b2b396c7af97e3ac9d656959173","unresolved":false,"context_lines":[{"line_number":13,"context_line":"To support efficiently listing instances across multiple cells Nova plans to"},{"line_number":14,"context_line":"integrate support for using `Searchlight`_. This will be an optional feature"},{"line_number":15,"context_line":"but recommended for large deployments with multiple cells since using"},{"line_number":16,"context_line":"Searchlight will be perform better than the compute API getting instances"},{"line_number":17,"context_line":"across multiple cells and then merge sorting them in Python."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":".. _Searchlight: https://docs.openstack.org/developer/searchlight/"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_a22ad22d","line":16,"in_reply_to":"ba2be162_f7cd6ab8","updated":"2017-03-06 17:58:59.000000000","message":"Done","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"019e146e0b709ab6a6e1f293bdb4e9480b2aaa72","unresolved":false,"context_lines":[{"line_number":47,"context_line":"emit versioned notifications or using Searchlight, so initially there would be"},{"line_number":48,"context_line":"no data to give back in the response. By default this path will be disabled."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Error conditions"},{"line_number":51,"context_line":"----------------"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"* If configured to use Searchlight but it is not available in the service"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_03766b3d","line":50,"updated":"2017-03-05 17:16:51.000000000","message":"An open question I have is how/when do things get removed from searchlight? We\u0027ll be sending instance.destroy notifications but you can still list (soft) deleting instances in the compute API, so we still need the deleted instances in searchlight, at least until they are archived or purged in the nova cell database. So how do we reconcile that with searchlight?","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8422a28d4e890725a1e80feb2da72210e2d29a97","unresolved":false,"context_lines":[{"line_number":47,"context_line":"emit versioned notifications or using Searchlight, so initially there would be"},{"line_number":48,"context_line":"no data to give back in the response. By default this path will be disabled."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Error conditions"},{"line_number":51,"context_line":"----------------"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"* If configured to use Searchlight but it is not available in the service"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_2537f0ff","line":50,"in_reply_to":"ba2be162_03766b3d","updated":"2017-03-06 02:16:15.000000000","message":"I think the current implementation of notification handler for instance.delete actually delete the record in SL, we can make it changing data in SL to have the `deleted` tag in SL so it can be searched as Nova. As for when to delete it, can we send out notifications in Nova when purged database? SL can have another notification handler to do the job.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aee14ada4afb687ab19967facdaaa986706f4cb2","unresolved":false,"context_lines":[{"line_number":47,"context_line":"emit versioned notifications or using Searchlight, so initially there would be"},{"line_number":48,"context_line":"no data to give back in the response. By default this path will be disabled."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Error conditions"},{"line_number":51,"context_line":"----------------"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"* If configured to use Searchlight but it is not available in the service"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_c3cd3367","line":50,"in_reply_to":"ba2be162_03766b3d","updated":"2017-03-05 17:22:18.000000000","message":"http://lists.openstack.org/pipermail/openstack-dev/2017-March/113344.html","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7406bf1fdca79caf267c993767393dbd9029cab6","unresolved":false,"context_lines":[{"line_number":47,"context_line":"emit versioned notifications or using Searchlight, so initially there would be"},{"line_number":48,"context_line":"no data to give back in the response. By default this path will be disabled."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Error conditions"},{"line_number":51,"context_line":"----------------"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"* If configured to use Searchlight but it is not available in the service"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_a82e4ca2","line":50,"in_reply_to":"ba2be162_2537f0ff","updated":"2017-03-06 10:33:20.000000000","message":"Nova emits soft_delete notification so in theory SL could differentiate between real delete and soft delete.\n\nHowever we need to merge the versioned transformation of soft_delete [1] first then continue the work on the unscheduled instance delete notifications [2] to include soft_delete there as well. \n\n[1] https://review.openstack.org/#/c/383970/\n[2] https://review.openstack.org/#/c/410297","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"980189fc0a271b2b396c7af97e3ac9d656959173","unresolved":false,"context_lines":[{"line_number":47,"context_line":"emit versioned notifications or using Searchlight, so initially there would be"},{"line_number":48,"context_line":"no data to give back in the response. By default this path will be disabled."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Error conditions"},{"line_number":51,"context_line":"----------------"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"* If configured to use Searchlight but it is not available in the service"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_42911652","line":50,"in_reply_to":"ba2be162_a82e4ca2","updated":"2017-03-06 17:58:59.000000000","message":"gibi, soft delete in this case is not the same as the actual SOFT_DELETE status in the API. As noted here:\n\nhttps://developer.openstack.org/api-guide/compute/server_concepts.html\n\nThe soft_delete/restore actions are based on the reclaim_instance_interval config option. If that\u0027s 0, then the instance is deleted immediately. Otherwise it\u0027s marked as soft deleted and you can restore it before the reclaim_instance_interval timer is up, at which point the compute (which has a periodic task running on it) will delete the instance. However, deleting the instance in the database isn\u0027t really deleting it as in removing the record, it changes the instances.deleted column to a non-0 value. That\u0027s what I mean by \"soft delete\" in this case - the DB API context, not the API context (the term is derived from the usage of the SoftDeleteMixin from oslo.db).","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d57c91872b40565b56fcde6a20d21fc29f51a917","unresolved":false,"context_lines":[{"line_number":87,"context_line":"--------------------"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"None. While this solution depends on using versioned notifications in Nova,"},{"line_number":90,"context_line":"there are no changes proposed for notifications themselves."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"Other end user impact"},{"line_number":93,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_113a20e7","line":90,"updated":"2017-03-06 11:31:38.000000000","message":"I would mention bp additional-notification-fields-searchlight as a notification impact here.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f1dcf9d4965fe3381f3eb7805e07d20746535a8","unresolved":false,"context_lines":[{"line_number":87,"context_line":"--------------------"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"None. While this solution depends on using versioned notifications in Nova,"},{"line_number":90,"context_line":"there are no changes proposed for notifications themselves."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"Other end user impact"},{"line_number":93,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_f21e555e","line":90,"in_reply_to":"ba2be162_113a20e7","updated":"2017-03-07 23:12:32.000000000","message":"That blueprint is listed as a dependency.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d57c91872b40565b56fcde6a20d21fc29f51a917","unresolved":false,"context_lines":[{"line_number":107,"context_line":"* Configure Nova to emit versioned notifications."},{"line_number":108,"context_line":"* Setup Searchlight including any service user and endpoint required for the"},{"line_number":109,"context_line":"  service catalog along with the backing data store, e.g. ElasticSearch."},{"line_number":110,"context_line":"* Existing deployments would need a certain amount of time to feed existing"},{"line_number":111,"context_line":"  instance data into Searchlight before switching the compute API over to using"},{"line_number":112,"context_line":"  it."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Developer impact"},{"line_number":115,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_74ad0ae8","line":112,"range":{"start_line":110,"start_character":2,"end_line":112,"end_character":5},"updated":"2017-03-06 11:31:38.000000000","message":"There is a periodic instance-exits notification emitted by nova [1]. This could be used to build up the information in SL about already existing instances. However the versioned notification transformation of this notification is still pending [2]\n\n[1]https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L6082\n[2]https://review.openstack.org/#/c/403660/","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f1dcf9d4965fe3381f3eb7805e07d20746535a8","unresolved":false,"context_lines":[{"line_number":107,"context_line":"* Configure Nova to emit versioned notifications."},{"line_number":108,"context_line":"* Setup Searchlight including any service user and endpoint required for the"},{"line_number":109,"context_line":"  service catalog along with the backing data store, e.g. ElasticSearch."},{"line_number":110,"context_line":"* Existing deployments would need a certain amount of time to feed existing"},{"line_number":111,"context_line":"  instance data into Searchlight before switching the compute API over to using"},{"line_number":112,"context_line":"  it."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Developer impact"},{"line_number":115,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_e51e915e","line":112,"range":{"start_line":110,"start_character":2,"end_line":112,"end_character":5},"in_reply_to":"ba2be162_74ad0ae8","updated":"2017-03-07 23:12:32.000000000","message":"I\u0027ll make a note of this in the spec.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59f48f50b9a536f8cb6097a3deccb1c06fa7567e","unresolved":false,"context_lines":[{"line_number":114,"context_line":"Developer impact"},{"line_number":115,"context_line":"----------------"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"Developers will have to ensure that any changes to the compute REST API which"},{"line_number":118,"context_line":"require returning new fields in a response will have those new fields also in"},{"line_number":119,"context_line":"versioned notifications sent to Searchlight."},{"line_number":120,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_f7700adf","line":117,"updated":"2017-03-06 17:49:07.000000000","message":"This section helps to answer a question I had above, that might be best clarified up there somewhere. That question was: \"Is searchlight return a list of compute node identifiers which are then used to construct the api response from database queries, or is it returning all the data that will be used to structure the response?\"\n\nIt\u0027s the latter and that\u0027s good but the impact noted here is a pretty big deal. Testing ought to be fun: we\u0027ll need functional and/or integration tests, some of which are searchlight and some which are not, getting the same stuff.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f1dcf9d4965fe3381f3eb7805e07d20746535a8","unresolved":false,"context_lines":[{"line_number":114,"context_line":"Developer impact"},{"line_number":115,"context_line":"----------------"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"Developers will have to ensure that any changes to the compute REST API which"},{"line_number":118,"context_line":"require returning new fields in a response will have those new fields also in"},{"line_number":119,"context_line":"versioned notifications sent to Searchlight."},{"line_number":120,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_d285d159","line":117,"in_reply_to":"ba2be162_f7700adf","updated":"2017-03-07 23:12:32.000000000","message":"This:\n\n\u003e returning all the data that will be used to structure the response\n\nThis is just for the instances, not compute nodes or other tables.\n\nI can make a note that with this change we do no go back to the nova database to get any additional information.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d57c91872b40565b56fcde6a20d21fc29f51a917","unresolved":false,"context_lines":[{"line_number":115,"context_line":"----------------"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"Developers will have to ensure that any changes to the compute REST API which"},{"line_number":118,"context_line":"require returning new fields in a response will have those new fields also in"},{"line_number":119,"context_line":"versioned notifications sent to Searchlight."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_34cc72ba","line":119,"range":{"start_line":118,"start_character":70,"end_line":119,"end_character":23},"updated":"2017-03-06 11:31:38.000000000","message":"This basically means that we need to keep the InstancePayload [1] in sync with the API sever response changes.\n\n[1] https://github.com/openstack/nova/blob/master/nova/notifications/objects/instance.py#L19","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f1dcf9d4965fe3381f3eb7805e07d20746535a8","unresolved":false,"context_lines":[{"line_number":115,"context_line":"----------------"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"Developers will have to ensure that any changes to the compute REST API which"},{"line_number":118,"context_line":"require returning new fields in a response will have those new fields also in"},{"line_number":119,"context_line":"versioned notifications sent to Searchlight."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_32246dc5","line":119,"range":{"start_line":118,"start_character":70,"end_line":119,"end_character":23},"in_reply_to":"ba2be162_34cc72ba","updated":"2017-03-07 23:12:32.000000000","message":"Yes, except, notifications are a different animal in that we are pushing those out rather than getting requests at a specific version. For example, say we drop some field \u0027foo\u0027 from the server response REST API in microversion 2.53. Requests for microversion 2.1 will still get \u0027foo\u0027 in the response for \"GET /servers\". But if the InstancePayload drops the \u0027foo\u0027 field and that\u0027s the only version that\u0027s ever sent out, then nova can\u0027t use searchlight to satisfy any REST API response with microversion \u003c 2.53.\n\nWhat this means I\u0027m not entirely sure, except I think it means we can\u0027t ever drop anything from the InstancePayload since we need it to service old requests in the REST API.\n\nTheoretically we can only drop things from the InstancePayload in a major version bump of that object anyway, but that still doesn\u0027t really help us here unless we raise the minimum required microversion in the REST API too.\n\nI\u0027ll make a note of this in the proposed change section above.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a14e69c07a304ffed08a9d8d554300cdd54eae6","unresolved":false,"context_lines":[{"line_number":129,"context_line":"  Zhenyu (Kevin) Zheng \u003czhengzhenyu@huawei.com\u003e"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"Other contributors:"},{"line_number":132,"context_line":"  Matt Riedemann \u003cmriedem@us.ibm.com\u003e"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"Work Items"},{"line_number":135,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_bc769d03","line":132,"range":{"start_line":132,"start_character":18,"end_line":132,"end_character":36},"updated":"2017-03-05 22:20:29.000000000","message":"I need to update this.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d57c91872b40565b56fcde6a20d21fc29f51a917","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"* When we have a multi-cell CI job setup then we will probably also make the"},{"line_number":170,"context_line":"  same changes to that job for efficient instance listing operations."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"Documentation Impact"},{"line_number":174,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_14aa0e85","line":171,"updated":"2017-03-06 11:31:38.000000000","message":"Do we need to have some kind of test that ensures the healing of the instance list in SL? One major use case of this healing is upgrading from Ocata (without SL) to Pike (with SL).","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f1dcf9d4965fe3381f3eb7805e07d20746535a8","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"* When we have a multi-cell CI job setup then we will probably also make the"},{"line_number":170,"context_line":"  same changes to that job for efficient instance listing operations."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"Documentation Impact"},{"line_number":174,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba2be162_05b805e5","line":171,"in_reply_to":"ba2be162_14aa0e85","updated":"2017-03-07 23:12:32.000000000","message":"I\u0027m not really sure. I\u0027ll add something to the proposed change about data migrations and then we can hash this out a bit more.","commit_id":"76254bb4c08ea8488483fd8346594854f529d499"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e78dda3fed3c00d93fbc7438a40ad67740713b9a","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  catalog or Nova does not have access to it, we will fallback to the default"},{"line_number":60,"context_line":"  path which means iterating the cells to list instances and merge sort the"},{"line_number":61,"context_line":"  results. An error would be logged in this case but the API request should not"},{"line_number":62,"context_line":"  fail with a 500."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Known issues"},{"line_number":65,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_3ec3568c","line":62,"updated":"2017-03-06 20:54:59.000000000","message":"Do you envision making this configuration check each time a list instances operation is done? Or only on nova-api startup (or optionally when a SIGHUP is received)?","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff24d987fccd1da5784afa951693eade34942358","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  catalog or Nova does not have access to it, we will fallback to the default"},{"line_number":60,"context_line":"  path which means iterating the cells to list instances and merge sort the"},{"line_number":61,"context_line":"  results. An error would be logged in this case but the API request should not"},{"line_number":62,"context_line":"  fail with a 500."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Known issues"},{"line_number":65,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_be20ff9c","line":62,"in_reply_to":"9a30ddce_7b605936","updated":"2017-03-07 18:47:59.000000000","message":"Then I think we handle it like we originally handled this in the scheduler report client for placement; that is, if it\u0027s available and we\u0027re told to use it, use it, otherwise we probably set a flag in memory that we don\u0027t use it if it\u0027s not available until a restart.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2dde6e3ed04f565e9a7cc90530a3a431658720dd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  catalog or Nova does not have access to it, we will fallback to the default"},{"line_number":60,"context_line":"  path which means iterating the cells to list instances and merge sort the"},{"line_number":61,"context_line":"  results. An error would be logged in this case but the API request should not"},{"line_number":62,"context_line":"  fail with a 500."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Known issues"},{"line_number":65,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_7b605936","line":62,"in_reply_to":"9a30ddce_9b0c3244","updated":"2017-03-07 18:43:29.000000000","message":"Sure, but above you\u0027re not suggesting checking \"just a boolean\" :) You\u0027re checking whether Searchlight \"is available\" and whether Nova \"has access to it\". In other words, it\u0027s a connectivity check, not a configuration check.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad007358d90db3970527cdeeaf4c54786641c0d9","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  catalog or Nova does not have access to it, we will fallback to the default"},{"line_number":60,"context_line":"  path which means iterating the cells to list instances and merge sort the"},{"line_number":61,"context_line":"  results. An error would be logged in this case but the API request should not"},{"line_number":62,"context_line":"  fail with a 500."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Known issues"},{"line_number":65,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_9b0c3244","line":62,"in_reply_to":"ba2be162_3ec3568c","updated":"2017-03-07 18:41:33.000000000","message":"I didn\u0027t really think about it, but figured each time since it\u0027s just a boolean. We check for stuff like that all the time on every operation, like if CONF.use_neutron.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e78dda3fed3c00d93fbc7438a40ad67740713b9a","unresolved":false,"context_lines":[{"line_number":80,"context_line":"     scripts for operators to use for purging the database."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"  The issue this presents with using Searchlight is that currently Searchlight"},{"line_number":83,"context_line":"  will delete an index once it processes the ``compute.instance.delete.end``"},{"line_number":84,"context_line":"  notification. This effectively means that with the existing behavior, if"},{"line_number":85,"context_line":"  using Searchlight you will not be able to list deleted instances since they"},{"line_number":86,"context_line":"  will not be stored in Searchlight."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_7e54eec9","line":83,"updated":"2017-03-06 20:54:59.000000000","message":"s/index/index entry for the instance/","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"68fcaabbf5a026678b0b007029456848d6b6422a","unresolved":false,"context_lines":[{"line_number":80,"context_line":"     scripts for operators to use for purging the database."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"  The issue this presents with using Searchlight is that currently Searchlight"},{"line_number":83,"context_line":"  will delete an index once it processes the ``compute.instance.delete.end``"},{"line_number":84,"context_line":"  notification. This effectively means that with the existing behavior, if"},{"line_number":85,"context_line":"  using Searchlight you will not be able to list deleted instances since they"},{"line_number":86,"context_line":"  will not be stored in Searchlight."}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_52260fbb","line":83,"in_reply_to":"ba2be162_7e54eec9","updated":"2017-03-07 23:12:11.000000000","message":"Done","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"9c105138073e16b55aff4359689c69842b04b18e","unresolved":false,"context_lines":[{"line_number":95,"context_line":"  We will have to sort this limitation out with the Searchlight team. It might"},{"line_number":96,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"},{"line_number":97,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":98,"context_line":"  finally removed."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":101,"context_line":"  have to also mirror those changes in the versioned notification"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_1e869213","line":98,"updated":"2017-03-06 20:46:46.000000000","message":"Have we ever had a use case where operators needed these records after the reclaim_instance_interval has expired? I wouldn\u0027t want to muck up the Searchlight stuff for a bad design in the Nova DB.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e78dda3fed3c00d93fbc7438a40ad67740713b9a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"  We will have to sort this limitation out with the Searchlight team. It might"},{"line_number":96,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"},{"line_number":97,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":98,"context_line":"  finally removed."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":101,"context_line":"  have to also mirror those changes in the versioned notification"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_9e9b6272","line":98,"updated":"2017-03-06 20:54:59.000000000","message":"not entirely sure how Searchlight does its thing, but it might be possible to just set a TTL on the instance index record for the instance when receiving an instance.delete event instead of actually deleting the instance.\n\nhttps://www.elastic.co/guide/en/elasticsearch/reference/2.0/mapping-ttl-field.html","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"68fcaabbf5a026678b0b007029456848d6b6422a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"  We will have to sort this limitation out with the Searchlight team. It might"},{"line_number":96,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"},{"line_number":97,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":98,"context_line":"  finally removed."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":101,"context_line":"  have to also mirror those changes in the versioned notification"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_32e51b37","line":98,"in_reply_to":"9a30ddce_36635db3","updated":"2017-03-07 23:12:11.000000000","message":"Also, it looks like _ttl was removed in ElasticSearch 5.0 so we can\u0027t rely on that anymore.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6287b16d43d800921e128149cf1e92d189eb9541","unresolved":false,"context_lines":[{"line_number":95,"context_line":"  We will have to sort this limitation out with the Searchlight team. It might"},{"line_number":96,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"},{"line_number":97,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":98,"context_line":"  finally removed."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":101,"context_line":"  have to also mirror those changes in the versioned notification"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_cd78cbfb","line":98,"in_reply_to":"9a30ddce_aa7d4fe9","updated":"2017-03-07 09:42:51.000000000","message":"Unfortunately we don\u0027t have notification about moving instance rows from the normal table to the shadow table. I\u0027ve quickly looked at the archiving db code. I can imagine to create a simple instance.archive notification which just contains the instance_uuid and emitted from that db code. However I\u0027m not sure about having an initialized rpc layer when we call that db code from nova-manage. Also if the deployer has a custom script to purge the instance rows then notifications in the nova code is not an option.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad007358d90db3970527cdeeaf4c54786641c0d9","unresolved":false,"context_lines":[{"line_number":95,"context_line":"  We will have to sort this limitation out with the Searchlight team. It might"},{"line_number":96,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"},{"line_number":97,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":98,"context_line":"  finally removed."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":101,"context_line":"  have to also mirror those changes in the versioned notification"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_36635db3","line":98,"in_reply_to":"9a30ddce_cd78cbfb","updated":"2017-03-07 18:41:33.000000000","message":"gibi: I don\u0027t think that sending notifications during a nova-manage call is the right thing to do.\n\nEd/Steve: sorry if I\u0027ve caused some confusion here, but the reclaim_instance_interval thing is totally optional and is a wrinkle in the nova API. An instance that\u0027s in SOFT_DELETED state (reclaim_instance_interval\u003e0) can be listed by non-admins via nova-api because it\u0027s not really deleted yet (instances.deleted \u003d\u003d 0 in the database). What I\u0027m talking about is an instance that\u0027s deleted in the API sense (instances.deleted !\u003d 0 in the nova db) and non-admins can\u0027t list those instances by default.\n\nI\u0027m sure that listing deleted instances is something that admins rely on, but what I don\u0027t know is what their archive/purge/retention policies are, which is why I was suggesting a TTL style config for this.\n\nI\u0027ll try to get some operators to review this spec and provide input.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"6d279d9a248ed3551e2f9aecf245f17529f83a42","unresolved":false,"context_lines":[{"line_number":95,"context_line":"  We will have to sort this limitation out with the Searchlight team. It might"},{"line_number":96,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"},{"line_number":97,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":98,"context_line":"  finally removed."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":101,"context_line":"  have to also mirror those changes in the versioned notification"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_aa7d4fe9","line":98,"in_reply_to":"ba2be162_9e9b6272","updated":"2017-03-06 22:12:33.000000000","message":"We could set a TTL, but we\u0027d also need to add a default \u0027is not deleted\u0027 filter to nova results in SL, and add functionality to override that filter. That isn\u0027t technically very difficult; we\u0027d avoided meddling with incoming queries too much thus far but it wouldn\u0027t be hard to add (and has come up before for glance IIRC).\n\nAs Ed says, if it\u0027s not commonly used, maybe we wouldn\u0027t add it at all. We should support the \u0027instance.resurrect\u0027 event (or whatever it\u0027s called).","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"6d279d9a248ed3551e2f9aecf245f17529f83a42","unresolved":false,"context_lines":[{"line_number":103,"context_line":"  REST API and the versions on the InstancePayload object. Microversions in the"},{"line_number":104,"context_line":"  REST API are opt-in by the client and Nova will continue to honor older"},{"line_number":105,"context_line":"  microversions. However, the versioned notifications are pushed out at the"},{"line_number":106,"context_line":"  latest available version."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"  As an example, say we remove a field \u0027foo\u0027 from the server response in"},{"line_number":109,"context_line":"  microversion 2.53. The compute API will still return the \u0027foo\u0027 field in"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_4afcd33e","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":26},"updated":"2017-03-06 22:12:33.000000000","message":"It would not be trivial to add multiple versions of things to Searchlight (i.e. support different microversioned copies of things) so we would like to avoid that if possible.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad007358d90db3970527cdeeaf4c54786641c0d9","unresolved":false,"context_lines":[{"line_number":103,"context_line":"  REST API and the versions on the InstancePayload object. Microversions in the"},{"line_number":104,"context_line":"  REST API are opt-in by the client and Nova will continue to honor older"},{"line_number":105,"context_line":"  microversions. However, the versioned notifications are pushed out at the"},{"line_number":106,"context_line":"  latest available version."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"  As an example, say we remove a field \u0027foo\u0027 from the server response in"},{"line_number":109,"context_line":"  microversion 2.53. The compute API will still return the \u0027foo\u0027 field in"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_36c19de5","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":26},"in_reply_to":"9a30ddce_4afcd33e","updated":"2017-03-07 18:41:33.000000000","message":"Yeah this isn\u0027t about searchlight supporting multiple versions, it\u0027s more a note that nova can\u0027t drop things from the notification payloads because we\u0027ll need all of that information in searchlight to serve all of the microversions in the compute REST API.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0532296c4c0fe3245ec2d53990689600d948f410","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  cannot drop fields from the InstancePayload for versioned notifications"},{"line_number":116,"context_line":"  unless we have also raised the minimum required microversion in the compute"},{"line_number":117,"context_line":"  REST API to the point that we are also dropping fields from the server"},{"line_number":118,"context_line":"  response."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":".. _InstancePayload: https://github.com/openstack/nova/blob/15.0.0/nova/notifications/objects/instance.py#L19"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_3e951688","line":118,"updated":"2017-03-06 20:40:32.000000000","message":"How very exciting.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad007358d90db3970527cdeeaf4c54786641c0d9","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  cannot drop fields from the InstancePayload for versioned notifications"},{"line_number":116,"context_line":"  unless we have also raised the minimum required microversion in the compute"},{"line_number":117,"context_line":"  REST API to the point that we are also dropping fields from the server"},{"line_number":118,"context_line":"  response."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":".. _InstancePayload: https://github.com/openstack/nova/blob/15.0.0/nova/notifications/objects/instance.py#L19"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_f15f0f0c","line":118,"in_reply_to":"9a30ddce_80cf63af","updated":"2017-03-07 18:41:33.000000000","message":"Travis: the SL \u003c\u003e nova data model shim referenced in work items is something I expected to just have within Nova. I don\u0027t think we need anything like that in Searchlight.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"6075f0eeeb443cbc349f40e9d81ecc23f4bad39f","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  cannot drop fields from the InstancePayload for versioned notifications"},{"line_number":116,"context_line":"  unless we have also raised the minimum required microversion in the compute"},{"line_number":117,"context_line":"  REST API to the point that we are also dropping fields from the server"},{"line_number":118,"context_line":"  response."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":".. _InstancePayload: https://github.com/openstack/nova/blob/15.0.0/nova/notifications/objects/instance.py#L19"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_80cf63af","line":118,"in_reply_to":"9a30ddce_8d817392","updated":"2017-03-07 16:48:52.000000000","message":"Yes, this seems like it would be needed unless this version aware transform utility can be a shared library which is used in the searchlight nova plugin. I see this is called out in the work items already.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad007358d90db3970527cdeeaf4c54786641c0d9","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  cannot drop fields from the InstancePayload for versioned notifications"},{"line_number":116,"context_line":"  unless we have also raised the minimum required microversion in the compute"},{"line_number":117,"context_line":"  REST API to the point that we are also dropping fields from the server"},{"line_number":118,"context_line":"  response."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":".. _InstancePayload: https://github.com/openstack/nova/blob/15.0.0/nova/notifications/objects/instance.py#L19"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_f603850d","line":118,"in_reply_to":"9a30ddce_8d817392","updated":"2017-03-07 18:41:33.000000000","message":"gibi: yes, as noted earlier in the spec, the REST API won\u0027t change, it will still get an InstanceList object from the nova.compute.api.API code, but what\u0027s generating that InstanceList object depends on if we get it from the nova database (via nova.objects.InstanceList directly) or from a Searchlight response and then hydrate that into the InstanceList object to return to the REST API handlers.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6287b16d43d800921e128149cf1e92d189eb9541","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  cannot drop fields from the InstancePayload for versioned notifications"},{"line_number":116,"context_line":"  unless we have also raised the minimum required microversion in the compute"},{"line_number":117,"context_line":"  REST API to the point that we are also dropping fields from the server"},{"line_number":118,"context_line":"  response."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":".. _InstancePayload: https://github.com/openstack/nova/blob/15.0.0/nova/notifications/objects/instance.py#L19"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_8d817392","line":118,"in_reply_to":"ba2be162_3e951688","updated":"2017-03-07 09:42:51.000000000","message":"+1 this looks like a lot of fun :)\n\nI think this means that nova needs to post process the result from SL to adapt the GET response to the microversion. If we ensure that the InstancePayload contains every information that is needed (i.e. not to remove anything from the payload) then this post processing can be done on nova side. I guess today the GET server response is populated from an Instance ovo. I think that Instance ovo can be hydrated from the original InstancePayload returned from SL and then the microversion aware response generation code can be reused.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad007358d90db3970527cdeeaf4c54786641c0d9","unresolved":false,"context_lines":[{"line_number":115,"context_line":"  cannot drop fields from the InstancePayload for versioned notifications"},{"line_number":116,"context_line":"  unless we have also raised the minimum required microversion in the compute"},{"line_number":117,"context_line":"  REST API to the point that we are also dropping fields from the server"},{"line_number":118,"context_line":"  response."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":".. _InstancePayload: https://github.com/openstack/nova/blob/15.0.0/nova/notifications/objects/instance.py#L19"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_b6ad8d33","line":118,"in_reply_to":"ba2be162_3e951688","updated":"2017-03-07 18:41:33.000000000","message":"@Chris, like the excitement that makes you vomit on yourself? Then I agree. :)","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e78dda3fed3c00d93fbc7438a40ad67740713b9a","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_9ea9a27e","line":138,"updated":"2017-03-06 20:54:59.000000000","message":"Alternately, we could write something into nova-manage that would essentially take the active instance data set in each cell and send a instance.create.end event simulating the end of the instance\u0027s creation?","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"6fcb450b969310fe02483a1e8bc09af358b846dd","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_8c41623c","line":138,"in_reply_to":"9a30ddce_45574f02","updated":"2017-03-07 15:46:33.000000000","message":"The sync process in searchlight is going to be much more efficient than issuing notifications for every instance, but as pointed out elsewhere it would require being able to list nova instances without it referring back to searchlight. Since that functionality needs to exist anyway for when SL isn\u0027t deployed, a flag forcing nova to use it seems reasonable.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"21202ca029530a6f9b8a738d5549e06c29a6962f","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_bf69fd8d","line":138,"in_reply_to":"9a30ddce_79232506","updated":"2017-03-07 08:20:29.000000000","message":"Searchlight support to sync the existing instances through `searchlight-manage index sync` by querying the data from nova api.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"716e75c2708733583ed1da23871ae2fbe90175cb","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_88e7a13f","line":138,"in_reply_to":"9a30ddce_79232506","updated":"2017-03-07 09:41:30.000000000","message":"Yes, there is a command searchlight to initialize Elasticsearch indices, but it doesn\u0027t work here because that sync command internally uses nova list api to sync instances, the query goes to searchlight for results.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"2b447f6615e1febd34275294491c74ef669bebbe","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_e893bd4d","line":138,"in_reply_to":"9a30ddce_88e7a13f","updated":"2017-03-07 09:50:12.000000000","message":"Of course we could instruct users to set es configuration after sl sync is done. In this way searchlight could use nova native list api and no additional notification sync is needed.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"213553c591c3891a5065a0f29b62d46cd9800dd1","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_e51af16d","line":138,"in_reply_to":"9a30ddce_8c41623c","updated":"2017-03-07 16:25:06.000000000","message":"Cool, sounds like searchlight-manage index sync is exactly the way to go, thanks all! :)","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6287b16d43d800921e128149cf1e92d189eb9541","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_881de168","line":138,"in_reply_to":"9a30ddce_bf69fd8d","updated":"2017-03-07 09:42:51.000000000","message":"@Jay: does nova-manage initialize rpc? Without that we cannot send notification. I also suggest not to reuse the instance.create.end notification as that could potentially confuse others consuming the nova notifications.\n\nI feel the already existing sync mechanism in SL is a cleaner solution.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad007358d90db3970527cdeeaf4c54786641c0d9","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_fb4b6929","line":138,"in_reply_to":"9a30ddce_c5fc0d41","updated":"2017-03-07 18:41:33.000000000","message":"Thanks everyone, I\u0027ll update this part of the spec. I think it\u0027s perfectly fine to say that before you configure nova-api to use searchlight you must first have run:\n\nsearchlight-manage index sync --type OS::Nova::Server","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"6075f0eeeb443cbc349f40e9d81ecc23f4bad39f","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_c5fc0d41","line":138,"in_reply_to":"9a30ddce_e51af16d","updated":"2017-03-07 16:48:52.000000000","message":"For reference: https://docs.openstack.org/developer/searchlight/indexingservice.html#indexing-model","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ea06ea3586980c502b1e6729f3b722c1a9b71def","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_45574f02","line":138,"in_reply_to":"9a30ddce_e893bd4d","updated":"2017-03-07 11:08:04.000000000","message":"yea, agree with Lei, the \u0027sync\u0027 is part of process of deploy searchlight. Then the deployer configure the nova to use searchlight.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9dbfeef5eec3b6a29dcd6ed5c280e29e3995f3aa","unresolved":false,"context_lines":[{"line_number":135,"context_line":"``compute.instance.exists`` notification. However, Searchlight does not"},{"line_number":136,"context_line":"currently consume this notification today (it was originally added to Nova"},{"line_number":137,"context_line":"for usage in Ceilometer). If this would be our data migration strategy then"},{"line_number":138,"context_line":"we have to add support to Searchlight to listen for that notification."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Alternatives"},{"line_number":141,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_79232506","line":138,"in_reply_to":"ba2be162_9ea9a27e","updated":"2017-03-07 07:20:10.000000000","message":"I heard from Zheng Lei(Searchlight Core), Searchlight light have a command to sync the existed instance.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0532296c4c0fe3245ec2d53990689600d948f410","unresolved":false,"context_lines":[{"line_number":151,"context_line":"---------------"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"While this will change how ``/servers`` and ``/servers/detail`` responses are"},{"line_number":154,"context_line":"generated on the backend, there should be no user-visiable changes to the"},{"line_number":155,"context_line":"contract on those APIs. This will be enforced via Tempest testing."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_7ee6ae45","line":154,"updated":"2017-03-06 20:40:32.000000000","message":"visible","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad007358d90db3970527cdeeaf4c54786641c0d9","unresolved":false,"context_lines":[{"line_number":151,"context_line":"---------------"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"While this will change how ``/servers`` and ``/servers/detail`` responses are"},{"line_number":154,"context_line":"generated on the backend, there should be no user-visiable changes to the"},{"line_number":155,"context_line":"contract on those APIs. This will be enforced via Tempest testing."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_5b5395e1","line":154,"in_reply_to":"ba2be162_7ee6ae45","updated":"2017-03-07 18:41:33.000000000","message":"Done","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e78dda3fed3c00d93fbc7438a40ad67740713b9a","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"While this will change how ``/servers`` and ``/servers/detail`` responses are"},{"line_number":154,"context_line":"generated on the backend, there should be no user-visiable changes to the"},{"line_number":155,"context_line":"contract on those APIs. This will be enforced via Tempest testing."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"Security impact"},{"line_number":158,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_feae1e80","line":155,"updated":"2017-03-06 20:54:59.000000000","message":"++","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"716e75c2708733583ed1da23871ae2fbe90175cb","unresolved":false,"context_lines":[{"line_number":198,"context_line":"Developers will have to ensure that any changes to the compute REST API which"},{"line_number":199,"context_line":"require returning new fields in a response will have those new fields also in"},{"line_number":200,"context_line":"versioned notifications sent to Searchlight."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Implementation"},{"line_number":204,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_08a57103","line":201,"updated":"2017-03-07 09:41:30.000000000","message":"And changes adding new fields also require modifying searchlight\u0027s index mapping, as these data schema are tightly coupled.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a1e9e4ff1594a105e7a5230967836d122ae9b63c","unresolved":false,"context_lines":[{"line_number":198,"context_line":"Developers will have to ensure that any changes to the compute REST API which"},{"line_number":199,"context_line":"require returning new fields in a response will have those new fields also in"},{"line_number":200,"context_line":"versioned notifications sent to Searchlight."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Implementation"},{"line_number":204,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_e8649d4a","line":201,"in_reply_to":"9a30ddce_08a57103","updated":"2017-03-07 09:55:11.000000000","message":"True. To detect such change you can monitor the version of the InstancePayload. We have an additional feature in the queue to provide the schema of the notification payloads as jsonschema (bp json-schema-for-versioned-notifications). However that bp progressing slowly due to resource issues so if you would like to use that then we appreciated any help with that bp.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad007358d90db3970527cdeeaf4c54786641c0d9","unresolved":false,"context_lines":[{"line_number":198,"context_line":"Developers will have to ensure that any changes to the compute REST API which"},{"line_number":199,"context_line":"require returning new fields in a response will have those new fields also in"},{"line_number":200,"context_line":"versioned notifications sent to Searchlight."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Implementation"},{"line_number":204,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_fbd1a9fc","line":201,"in_reply_to":"9a30ddce_c5625fd8","updated":"2017-03-07 18:41:33.000000000","message":"@Zhang, are you specifically talking about this?\n\nhttps://github.com/openstack/searchlight/blob/2.0.0/searchlight/elasticsearch/plugins/nova/servers.py#L38","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7b451000697b1672d1addc5fbecad8977293c4b6","unresolved":false,"context_lines":[{"line_number":198,"context_line":"Developers will have to ensure that any changes to the compute REST API which"},{"line_number":199,"context_line":"require returning new fields in a response will have those new fields also in"},{"line_number":200,"context_line":"versioned notifications sent to Searchlight."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Implementation"},{"line_number":204,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_c5625fd8","line":201,"in_reply_to":"9a30ddce_e8649d4a","updated":"2017-03-07 11:09:43.000000000","message":"For any API change in Nova side, then required a patch in searchlight side....that sounds...bad...","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"842b6e7dc4bbb7ea583f2f32d837225f3e9affb0","unresolved":false,"context_lines":[{"line_number":198,"context_line":"Developers will have to ensure that any changes to the compute REST API which"},{"line_number":199,"context_line":"require returning new fields in a response will have those new fields also in"},{"line_number":200,"context_line":"versioned notifications sent to Searchlight."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Implementation"},{"line_number":204,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a30ddce_9ebfa9fa","line":201,"in_reply_to":"9a30ddce_fbd1a9fc","updated":"2017-03-08 02:47:53.000000000","message":"Yeah, this is what we used to define nova server fields stored in elasticsearch.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e78dda3fed3c00d93fbc7438a40ad67740713b9a","unresolved":false,"context_lines":[{"line_number":248,"context_line":"  parity with the API responses."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"* When we have a multi-cell CI job setup then we will probably also make the"},{"line_number":251,"context_line":"  same changes to that job for efficient instance listing operations."},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"Documentation Impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba2be162_de2ebaf9","line":251,"updated":"2017-03-06 20:54:59.000000000","message":"++. the more functional testing the better.","commit_id":"6daf88993e438d271b7432ca9a436dc125530e4c"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"a121e323c160e6b8469b667b84a3ec1262a9e295","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To support efficiently listing instances across multiple cells Nova plans to"},{"line_number":14,"context_line":"integrate support for using `Searchlight`_. This will be an optional feature"},{"line_number":15,"context_line":"but recommended for large deployments with multiple cells since using"},{"line_number":16,"context_line":"Searchlight will perform better than the compute API getting instances"},{"line_number":17,"context_line":"across multiple cells and then merge sorting them in Python."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":".. _Searchlight: https://docs.openstack.org/developer/searchlight/"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_5aab701c","line":17,"range":{"start_line":15,"start_character":0,"end_line":17,"end_character":60},"updated":"2017-03-31 18:31:38.000000000","message":"I honestly think we should just say optional feature as we prove out the effectiveness of this approach.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"24b56bcac816e54718c6fe2f74858128893f872b","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"To support efficiently listing instances across multiple cells Nova plans to"},{"line_number":14,"context_line":"integrate support for using `Searchlight`_. This will be an optional feature"},{"line_number":15,"context_line":"but recommended for large deployments with multiple cells since using"},{"line_number":16,"context_line":"Searchlight will perform better than the compute API getting instances"},{"line_number":17,"context_line":"across multiple cells and then merge sorting them in Python."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":".. _Searchlight: https://docs.openstack.org/developer/searchlight/"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_aa4b0f57","line":17,"range":{"start_line":15,"start_character":0,"end_line":17,"end_character":60},"in_reply_to":"dfeb2761_5aab701c","updated":"2017-04-03 18:56:51.000000000","message":"Done","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"eecbd7576dbfbacc8384fb07f2db098643514acc","unresolved":false,"context_lines":[{"line_number":32,"context_line":"---------"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"As an admin, I want to list instances for all tenants in my multi-cell"},{"line_number":35,"context_line":"deployment and apply sorts and filters on the results."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_955f8b40","line":35,"updated":"2017-03-31 19:21:56.000000000","message":"As an user in an OpenStack multiple cell environment it\u0027s important that I can quickly get a view of all my servers. I want to be able to filter and sort them on the server, and have a predictable sort order when new servers are created in multiple cells.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"24b56bcac816e54718c6fe2f74858128893f872b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"---------"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"As an admin, I want to list instances for all tenants in my multi-cell"},{"line_number":35,"context_line":"deployment and apply sorts and filters on the results."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_eaafd7e0","line":35,"in_reply_to":"dfeb2761_955f8b40","updated":"2017-04-03 18:56:51.000000000","message":"Done","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"ecb45f38cd6eda0c3f85a914bc92904dbe8efbac","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Add a configuration option to Nova which will toggle whether or not the compute"},{"line_number":42,"context_line":"API will iterate the cells to list instances and then merge sort the results,"},{"line_number":43,"context_line":"or query Searchlight and translate those results for a proper compute API"},{"line_number":44,"context_line":"response."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_5521944c","line":41,"updated":"2017-03-08 01:03:22.000000000","message":"So if the data in searchlight is somehow dirty, and before re-sync we have to turn this config off and restart nova and re-sync and turn it on and restart nova again, it seams too expensive, could we also add a dynamic param so that re-sync can be done without nova down?","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c8c92a6b67cb2c039c82e2c017db028d67d2d6cf","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Add a configuration option to Nova which will toggle whether or not the compute"},{"line_number":42,"context_line":"API will iterate the cells to list instances and then merge sort the results,"},{"line_number":43,"context_line":"or query Searchlight and translate those results for a proper compute API"},{"line_number":44,"context_line":"response."}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_8cdad614","line":41,"in_reply_to":"1a1ced50_6454d120","updated":"2017-03-25 00:47:07.000000000","message":"What John said. The primary motivator for using Searchlight isn\u0027t because of sorting and filtering, it\u0027s for supporting efficiently pulling instances from multiple cell databases. Without a global external service (Searchlight), we have to pull all of the instances from all of the cells and then merge sort them in the compute API code. That\u0027s not impossible, but it likely won\u0027t perform well with thousands of instances across multiple cells.\n\nAnd the idea is before you configure nova-api to use Searchlight, you have to sync the data from nova to searchlight using the searchlight-manage command mentioned in the \"Data migrations\" section below.\n\nSince the searchlight-manage sync uses nova-api, we can\u0027t stop nova-api to avoid incoming requests that dirty the data while we\u0027re doing the sync, but incoming requests should be generating notifications that searchlight is picking up, like instance.create.start.\n\nI had mentioned in a previous iteration of this spec that we could have searchlight listen for the \u0027compute.instance.exists\u0027 notifications generated in a periodic task from the nova-compute services. So if you were really paranoid, you would:\n\n1. Enable instance_usage_audit on the computes so they start sending that information.\n2. Sync the data from nova to searchlight.\n3. Let that run for awhile (hours? days?).\n4. Then stop nova-api, configure it to use searchlight, and bring it back up.\n\nYou might hit some fallout during step 4, but hopefully it\u0027s minimal. I don\u0027t think we\u0027re going to have a 100% guaranteed non-lossy data migration here. Maybe rather than thinking about ways to avoid that, we can think about ways to improve the online data migration if we can determine we have dirty data and automatically trigger a sync? Nova can\u0027t tell searchlight to sync, but it could trigger a notification which it assumes searchlight is listening for and rely on that to update the data. That still seems error-prone to me and not really worth it.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"159e20acc45d3120caff7f619dd3d4711c611283","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Add a configuration option to Nova which will toggle whether or not the compute"},{"line_number":42,"context_line":"API will iterate the cells to list instances and then merge sort the results,"},{"line_number":43,"context_line":"or query Searchlight and translate those results for a proper compute API"},{"line_number":44,"context_line":"response."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_5e21b14c","line":41,"in_reply_to":"9a30ddce_430d5e36","updated":"2017-03-08 02:48:12.000000000","message":"This option sounds reasonable.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"ae91e20153e483f7eceeaa45374749685b50905b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Add a configuration option to Nova which will toggle whether or not the compute"},{"line_number":42,"context_line":"API will iterate the cells to list instances and then merge sort the results,"},{"line_number":43,"context_line":"or query Searchlight and translate those results for a proper compute API"},{"line_number":44,"context_line":"response."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_63fa62bf","line":41,"in_reply_to":"9a30ddce_430d5e36","updated":"2017-03-08 02:19:13.000000000","message":"Yeah, I understand, and I was providing the use case and ask for ideas :), we should have a way to get trusty data with lowest cost, right?","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"37c41f4764e14047d426e58ae7c21c48fe8cebf2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Add a configuration option to Nova which will toggle whether or not the compute"},{"line_number":42,"context_line":"API will iterate the cells to list instances and then merge sort the results,"},{"line_number":43,"context_line":"or query Searchlight and translate those results for a proper compute API"},{"line_number":44,"context_line":"response."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_430d5e36","line":41,"in_reply_to":"9a30ddce_5521944c","updated":"2017-03-08 01:58:23.000000000","message":"I don\u0027t think a dynamic parameter is right way. Actaully the response of \u0027GET /servers\u0027 without any filter and sort needn\u0027t fetch from SL, it can be from the nova db?\n\nSince we use SL is for improve the performance of filter and sort","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"14c5e1bac5a7f087c84185db5b52da8b763b5b88","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Add a configuration option to Nova which will toggle whether or not the compute"},{"line_number":42,"context_line":"API will iterate the cells to list instances and then merge sort the results,"},{"line_number":43,"context_line":"or query Searchlight and translate those results for a proper compute API"},{"line_number":44,"context_line":"response."}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_6454d120","line":41,"in_reply_to":"9a30ddce_5e21b14c","updated":"2017-03-21 16:55:56.000000000","message":"The assumption, I thought, was searchlight users will first re-sync everything, and start consuming Nova\u0027s update notifications before they make Nova use searchlight?","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"88989ed243cf518abf4c4f8586b66219066cd368","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Add a configuration option to Nova which will toggle whether or not the compute"},{"line_number":42,"context_line":"API will iterate the cells to list instances and then merge sort the results,"},{"line_number":43,"context_line":"or query Searchlight and translate those results for a proper compute API"},{"line_number":44,"context_line":"response."}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_b0ea4b72","line":41,"in_reply_to":"ffe62b97_8cdad614","updated":"2017-03-27 19:45:42.000000000","message":"Yeah, I agree with Matt and John here. Let\u0027s focus on a clear migration process (as outlined with the searchlight-manage actions below) and keep it as simple as possible.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"eecbd7576dbfbacc8384fb07f2db098643514acc","unresolved":false,"context_lines":[{"line_number":43,"context_line":"or query Searchlight and translate those results for a proper compute API"},{"line_number":44,"context_line":"response."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"This will be configurable because an existing deployment may not be setup to"},{"line_number":47,"context_line":"emit versioned notifications or using Searchlight, so initially there would be"},{"line_number":48,"context_line":"no data to give back in the response. By default this path will be disabled."},{"line_number":49,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_7521a7b4","line":46,"range":{"start_line":46,"start_character":13,"end_line":46,"end_character":25},"updated":"2017-03-31 19:21:56.000000000","message":"and off by default","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"24b56bcac816e54718c6fe2f74858128893f872b","unresolved":false,"context_lines":[{"line_number":43,"context_line":"or query Searchlight and translate those results for a proper compute API"},{"line_number":44,"context_line":"response."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"This will be configurable because an existing deployment may not be setup to"},{"line_number":47,"context_line":"emit versioned notifications or using Searchlight, so initially there would be"},{"line_number":48,"context_line":"no data to give back in the response. By default this path will be disabled."},{"line_number":49,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_ea98f7c0","line":46,"range":{"start_line":46,"start_character":13,"end_line":46,"end_character":25},"in_reply_to":"dfeb2761_7521a7b4","updated":"2017-04-03 18:56:51.000000000","message":"Done","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"14c5e1bac5a7f087c84185db5b52da8b763b5b88","unresolved":false,"context_lines":[{"line_number":44,"context_line":"response."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"This will be configurable because an existing deployment may not be setup to"},{"line_number":47,"context_line":"emit versioned notifications or using Searchlight, so initially there would be"},{"line_number":48,"context_line":"no data to give back in the response. By default this path will be disabled."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":".. note:: When using Searchlight to service a ``GET /servers/detail`` request"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_e43e01d9","line":47,"range":{"start_line":47,"start_character":32,"end_line":47,"end_character":37},"updated":"2017-03-21 16:55:56.000000000","message":"Nit: use?","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c8c92a6b67cb2c039c82e2c017db028d67d2d6cf","unresolved":false,"context_lines":[{"line_number":44,"context_line":"response."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"This will be configurable because an existing deployment may not be setup to"},{"line_number":47,"context_line":"emit versioned notifications or using Searchlight, so initially there would be"},{"line_number":48,"context_line":"no data to give back in the response. By default this path will be disabled."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":".. note:: When using Searchlight to service a ``GET /servers/detail`` request"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_6c731217","line":47,"range":{"start_line":47,"start_character":32,"end_line":47,"end_character":37},"in_reply_to":"1a1ced50_e43e01d9","updated":"2017-03-25 00:47:07.000000000","message":"No, I meant \u0027using\u0027, as in my deployment is not already using Searchlight, so I don\u0027t have any instance data in there already. If I don\u0027t want to \u0027use\u0027 Searchlight, then I\u0027m stuck with either a single cell, or knowing I may have poor performance when it comes to listing instances across multiple cells.\n\nNote that I think if this eventually all works and we\u0027re gating on it, we will deprecate the non-searchlight path and drop any code to list instances across cells within nova.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"88989ed243cf518abf4c4f8586b66219066cd368","unresolved":false,"context_lines":[{"line_number":50,"context_line":".. note:: When using Searchlight to service a ``GET /servers/detail`` request"},{"line_number":51,"context_line":"   we will get all of the necessary information from Searchlight. There will"},{"line_number":52,"context_line":"   not be any additional calls to the nova database, otherwise that would"},{"line_number":53,"context_line":"   defeat the purpose of this change."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Error conditions"},{"line_number":56,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_f09573e5","line":53,"updated":"2017-03-27 19:45:42.000000000","message":"++","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"24b56bcac816e54718c6fe2f74858128893f872b","unresolved":false,"context_lines":[{"line_number":50,"context_line":".. note:: When using Searchlight to service a ``GET /servers/detail`` request"},{"line_number":51,"context_line":"   we will get all of the necessary information from Searchlight. There will"},{"line_number":52,"context_line":"   not be any additional calls to the nova database, otherwise that would"},{"line_number":53,"context_line":"   defeat the purpose of this change."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Error conditions"},{"line_number":56,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_8ae28b2e","line":53,"in_reply_to":"dfeb2761_503591d9","updated":"2017-04-03 18:56:51.000000000","message":"It\u0027s only GET /servers and GET /servers/detail because we have to iterate cells for those. When we have a specific server ID we can look up which cell it\u0027s in using the InstanceMapping in the API database. We also don\u0027t have to worry about filtering and sorting and paging with GET /servers/{server_id}.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"eecbd7576dbfbacc8384fb07f2db098643514acc","unresolved":false,"context_lines":[{"line_number":50,"context_line":".. note:: When using Searchlight to service a ``GET /servers/detail`` request"},{"line_number":51,"context_line":"   we will get all of the necessary information from Searchlight. There will"},{"line_number":52,"context_line":"   not be any additional calls to the nova database, otherwise that would"},{"line_number":53,"context_line":"   defeat the purpose of this change."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Error conditions"},{"line_number":56,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_503591d9","line":53,"in_reply_to":"ffe62b97_f09573e5","updated":"2017-03-31 19:21:56.000000000","message":"Will it only be GET /servers/detail? What about GET /servers/{id}? We\u0027ve had an implicit coupling between these in the past and I think it will be confusing for people if these are different.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"14c5e1bac5a7f087c84185db5b52da8b763b5b88","unresolved":false,"context_lines":[{"line_number":56,"context_line":"----------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* If configured to use Searchlight but it is not available in the service"},{"line_number":59,"context_line":"  catalog or Nova does not have access to it, we will fallback to the default"},{"line_number":60,"context_line":"  path which means iterating the cells to list instances and merge sort the"},{"line_number":61,"context_line":"  results. An error would be logged in this case but the API request should not"},{"line_number":62,"context_line":"  fail with a 500. We will log a warning and set a flag so that we do not"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_6747734b","line":59,"range":{"start_line":59,"start_character":10,"end_line":59,"end_character":44},"updated":"2017-03-21 16:55:56.000000000","message":"I actually think 500 is correct if there is a configuration error for this kind of thing.\n\nAgreed transient errors shouldn\u0027t cause a 500, like can\u0027t reach searchlight now, even though I used to.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c8c92a6b67cb2c039c82e2c017db028d67d2d6cf","unresolved":false,"context_lines":[{"line_number":56,"context_line":"----------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* If configured to use Searchlight but it is not available in the service"},{"line_number":59,"context_line":"  catalog or Nova does not have access to it, we will fallback to the default"},{"line_number":60,"context_line":"  path which means iterating the cells to list instances and merge sort the"},{"line_number":61,"context_line":"  results. An error would be logged in this case but the API request should not"},{"line_number":62,"context_line":"  fail with a 500. We will log a warning and set a flag so that we do not"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_8c4f76bc","line":59,"range":{"start_line":59,"start_character":10,"end_line":59,"end_character":44},"in_reply_to":"1a1ced50_6747734b","updated":"2017-03-25 00:47:07.000000000","message":"I think it depends on the type of error. If you tell nova to use searchlight but there is no searchlight endpoint in the service catalog, sure that\u0027s possibly a 500. I was really approaching this like how we did for placement in newton where placement was optional and if it wasn\u0027t there we logged a warning but didn\u0027t fail. Once placement became required in ocata, computes won\u0027t start if there is a misconfiguration. Similarly, in Pike you\u0027ll get a NoValidHost if the filter scheduler can\u0027t talk to placement properly.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"24b56bcac816e54718c6fe2f74858128893f872b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"----------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* If configured to use Searchlight but it is not available in the service"},{"line_number":59,"context_line":"  catalog or Nova does not have access to it, we will fallback to the default"},{"line_number":60,"context_line":"  path which means iterating the cells to list instances and merge sort the"},{"line_number":61,"context_line":"  results. An error would be logged in this case but the API request should not"},{"line_number":62,"context_line":"  fail with a 500. We will log a warning and set a flag so that we do not"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_4a6483b9","line":59,"range":{"start_line":59,"start_character":10,"end_line":59,"end_character":44},"in_reply_to":"dfeb2761_baa39c4f","updated":"2017-04-03 18:56:51.000000000","message":"I\u0027m not really following the 203 comment, so I\u0027m going to just leave this as it\u0027s worded.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"a121e323c160e6b8469b667b84a3ec1262a9e295","unresolved":false,"context_lines":[{"line_number":56,"context_line":"----------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* If configured to use Searchlight but it is not available in the service"},{"line_number":59,"context_line":"  catalog or Nova does not have access to it, we will fallback to the default"},{"line_number":60,"context_line":"  path which means iterating the cells to list instances and merge sort the"},{"line_number":61,"context_line":"  results. An error would be logged in this case but the API request should not"},{"line_number":62,"context_line":"  fail with a 500. We will log a warning and set a flag so that we do not"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_baa39c4f","line":59,"range":{"start_line":59,"start_character":10,"end_line":59,"end_character":44},"in_reply_to":"ffe62b97_50ad3f2f","updated":"2017-03-31 18:31:38.000000000","message":"Transient errors maybe end up being a 203 (Non authoritative) success, depending on what was there.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"88989ed243cf518abf4c4f8586b66219066cd368","unresolved":false,"context_lines":[{"line_number":56,"context_line":"----------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* If configured to use Searchlight but it is not available in the service"},{"line_number":59,"context_line":"  catalog or Nova does not have access to it, we will fallback to the default"},{"line_number":60,"context_line":"  path which means iterating the cells to list instances and merge sort the"},{"line_number":61,"context_line":"  results. An error would be logged in this case but the API request should not"},{"line_number":62,"context_line":"  fail with a 500. We will log a warning and set a flag so that we do not"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_50ad3f2f","line":59,"range":{"start_line":59,"start_character":10,"end_line":59,"end_character":44},"in_reply_to":"ffe62b97_8c4f76bc","updated":"2017-03-27 19:45:42.000000000","message":"I was thinking the same as Matt. Make it fall back to the original merge-sort behaviour if Searchlight cannot be contacted/found in Pike and return an error in R and beyond.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"eecbd7576dbfbacc8384fb07f2db098643514acc","unresolved":false,"context_lines":[{"line_number":86,"context_line":"  will delete an index entry for the instance once it processes the"},{"line_number":87,"context_line":"  ``compute.instance.delete.end`` notification. This effectively means that"},{"line_number":88,"context_line":"  with the existing behavior, if using Searchlight you will not be able to list"},{"line_number":89,"context_line":"  deleted instances since they will not be stored in Searchlight."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  Having noted this, we should mention that there is no guarantee today that"},{"line_number":92,"context_line":"  you can list deleted instances from the compute REST API based on the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_1084a95d","line":89,"updated":"2017-03-31 19:21:56.000000000","message":"This mostly becomes an issue with changes-since, which also explicitly returns deleted instances. This has been the recommend polling interface for people to get the changes since the last time they hit the service (including deletes). \n\nI think we\u0027re going to need to consider the implications here before this is on by default, as loosing changes-since would be a substantial loss in the API.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":128,"name":"David Medberry","email":"openstack@medberry.net","username":"med"},"change_message_id":"e70e725ab7d1adb1e54b670b87373c5bf879a4c6","unresolved":false,"context_lines":[{"line_number":87,"context_line":"  ``compute.instance.delete.end`` notification. This effectively means that"},{"line_number":88,"context_line":"  with the existing behavior, if using Searchlight you will not be able to list"},{"line_number":89,"context_line":"  deleted instances since they will not be stored in Searchlight."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  Having noted this, we should mention that there is no guarantee today that"},{"line_number":92,"context_line":"  you can list deleted instances from the compute REST API based on the"},{"line_number":93,"context_line":"  data retention/archive/purge policy in the given cloud provider. For example,"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_ed8367cb","line":90,"updated":"2017-03-27 15:47:34.000000000","message":"MRiedemann, TubaGuy, Is there a way to bypass the searchlight functionality (via a flag) to hit the \"old way\" similar to the caveat above wherein if Nova doesn\u0027t have access to searchlight it fails back to the old way. If so, I think that fully mitigates the concern here (also, most ops can read the db directly if necessary I think. I never use nova list --deleted but do use the db directly, as an example.) -med","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"88989ed243cf518abf4c4f8586b66219066cd368","unresolved":false,"context_lines":[{"line_number":87,"context_line":"  ``compute.instance.delete.end`` notification. This effectively means that"},{"line_number":88,"context_line":"  with the existing behavior, if using Searchlight you will not be able to list"},{"line_number":89,"context_line":"  deleted instances since they will not be stored in Searchlight."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  Having noted this, we should mention that there is no guarantee today that"},{"line_number":92,"context_line":"  you can list deleted instances from the compute REST API based on the"},{"line_number":93,"context_line":"  data retention/archive/purge policy in the given cloud provider. For example,"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_f277b89f","line":90,"in_reply_to":"ffe62b97_ed8367cb","updated":"2017-03-27 19:45:42.000000000","message":"David, I don\u0027t think I\u0027d support an implementation-specific flag in the public API -- ala \"?no_searchlight\u003dtrue\" or similar. We try our best to keep implementation specifics out of the public REST API as much as possible.\n\nThat said, Gibi\u0027s suggestion below of just switching on the --deleted existing flag in the public REST API to use the merge-sort behaviour sounds like it would work?","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1680b04736a4dba9a9a3417a002e713fef7ae29b","unresolved":false,"context_lines":[{"line_number":87,"context_line":"  ``compute.instance.delete.end`` notification. This effectively means that"},{"line_number":88,"context_line":"  with the existing behavior, if using Searchlight you will not be able to list"},{"line_number":89,"context_line":"  deleted instances since they will not be stored in Searchlight."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  Having noted this, we should mention that there is no guarantee today that"},{"line_number":92,"context_line":"  you can list deleted instances from the compute REST API based on the"},{"line_number":93,"context_line":"  data retention/archive/purge policy in the given cloud provider. For example,"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_17861fba","line":90,"in_reply_to":"ffe62b97_f277b89f","updated":"2017-03-29 20:18:08.000000000","message":"I assume David is asking about a config option, and as noted in the spec (L41), yes we propose a config option, at least in the initial implementation. We need the config option to migrate data over from nova to searchlight before you can turn things on by switching the config option and restarting nova-api.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"63c93e46868cfb5ea6344091c1258f47b7278b1b","unresolved":false,"context_lines":[{"line_number":99,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"},{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_c373e07e","line":102,"updated":"2017-03-09 03:23:15.000000000","message":"another option is the admin should call \"sync\" command in SL after they called ``nova-manage db archive_deleted_rows``.\n\nOtherwise, it is strange, the nova db needs to be cleanup manually by \u0027archive_deleted_rows\u0027, but in the searchlight side, SL have another automatically way to cleanup index.\n\nFinally the db and SL index isn\u0027t consistent.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c8c92a6b67cb2c039c82e2c017db028d67d2d6cf","unresolved":false,"context_lines":[{"line_number":99,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"},{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_acaeba2b","line":102,"in_reply_to":"1a1ced50_a765ebb5","updated":"2017-03-25 00:47:07.000000000","message":"\u003e I am tempted to just not allow listing deleted instances when using searchlight.\n\nI\u0027m not sure that\u0027s going to fly. Maybe this needs to be a forum session topic to talk about the nasty cases that come up as a result of this change.\n\n\u003e Could we just fallback to a direct nova query to get any delete instances for all the cells\n\nWe could I guess...but then we have to maintain two code paths for listing instances across the deployment, and as noted earlier, I think eventually if nova-api is working smoothly with searchlight in the backend we\u0027ll want to drop the in-tree listing path.\n\n\u003e Maybe we also ship with default policy of not allowing anyone to list deleted instances?\n\nBut then they just change the policy and we still have to support it. Unless that\u0027s part of a long-term deprecation plan for not supporting listing deleting instances, I don\u0027t think it helps.\n\n\u003e The fact the instance_uuid mapping is not soft delete, does that mean we broke the direct fetch of a deleted instance already?\n\nThat\u0027s a good question. :) From a quick look in the compute API code, I don\u0027t see that we ever delete instance mappings even though the InstanceMapping object has a destroy() method on it.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"14c5e1bac5a7f087c84185db5b52da8b763b5b88","unresolved":false,"context_lines":[{"line_number":99,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"},{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_a765ebb5","line":102,"in_reply_to":"9a30ddce_c373e07e","updated":"2017-03-21 16:55:56.000000000","message":"The bigger question is do people really need this feature.\n\nI am tempted to just not allow listing deleted instances when using searchlight. The problem is where billing system want to access all the things deleted today.\n\nCould we just fallback to a direct nova query to get any delete instances for all the cells, and add that into the data we get back from searchlight for the non-deleted instances?\n\nMaybe we also ship with default policy of not allowing anyone to list deleted instances?\n\nThe fact the instance_uuid mapping is not soft delete, does that mean we broke the direct fetch of a deleted instance already? I hope I am missing something there.\n\nWe should state what our current stop gap solution is here.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"aa5a14491461be210a122af2d4e53e1ea845dead","unresolved":false,"context_lines":[{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"},{"line_number":106,"context_line":"  `InstancePayload`_. This also poses an issue between microversions in the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_676d0098","line":103,"updated":"2017-03-08 10:53:26.000000000","message":"We could handle this special case in nova in the first iteration then later improve searchlight to handle deleted instance.\nSo if deleted instance are requested then nova-api can automatically fall back to querying the cells instead of asking it for searchlight.\n\nThis way we can limit the scope of the first step of the integration.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d5e9029e09e503331a31b38c530e72e4337c2f0a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"},{"line_number":106,"context_line":"  `InstancePayload`_. This also poses an issue between microversions in the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_5aa678ae","line":103,"in_reply_to":"9a30ddce_23b67c3d","updated":"2017-03-13 10:38:25.000000000","message":"I mean today when the user queries the list of instances then by default she gets the list of not deleted instances. If she wants to get the list of deleted instances then she has to ask for it explicitly by adding deleted:true to the GET request. So nova-api could distinguish between the two request types. If deleted is not set then nova can ask searchlight. If delete is set to true then nova-api could ask the db.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c8c92a6b67cb2c039c82e2c017db028d67d2d6cf","unresolved":false,"context_lines":[{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"},{"line_number":106,"context_line":"  `InstancePayload`_. This also poses an issue between microversions in the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_ac735ae7","line":103,"in_reply_to":"9a30ddce_5aa678ae","updated":"2017-03-25 00:47:07.000000000","message":"I agree with gibi, I was thinking of it the same way. If we can\u0027t get deleted instances from searchlight, then we\u0027d have to fallback to listing them across all cells and we\u0027d do that based on the deleted filter in the GET request.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"63c93e46868cfb5ea6344091c1258f47b7278b1b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"},{"line_number":106,"context_line":"  `InstancePayload`_. This also poses an issue between microversions in the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_23b67c3d","line":103,"in_reply_to":"9a30ddce_676d0098","updated":"2017-03-09 03:23:15.000000000","message":"how do you know the requested instance is deleted without query cells or SL first?","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"88989ed243cf518abf4c4f8586b66219066cd368","unresolved":false,"context_lines":[{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"},{"line_number":106,"context_line":"  `InstancePayload`_. This also poses an issue between microversions in the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_92df4c39","line":103,"in_reply_to":"ffe62b97_7e6fff91","updated":"2017-03-27 19:45:42.000000000","message":"But Steve, we were under the impression that Searchlight sees the instance.delete notification and removes the instance from ElasticSearch. Is that not correct?","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1680b04736a4dba9a9a3417a002e713fef7ae29b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"},{"line_number":106,"context_line":"  `InstancePayload`_. This also poses an issue between microversions in the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_b733f313","line":103,"in_reply_to":"ffe62b97_92df4c39","updated":"2017-03-29 20:18:08.000000000","message":"Right, it\u0027s a chicken and egg issue.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3d7ee5c782906b3f358862861329670f50a7a261","unresolved":false,"context_lines":[{"line_number":100,"context_line":"  control how long an index can be stored for a deleted instance before it is"},{"line_number":101,"context_line":"  finally removed. It is worth noting that ElasticSearch used to have a concept"},{"line_number":102,"context_line":"  of a ``_ttl`` field but that was `removed in 5.0`_."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"* When making changes to the compute REST API server response, developers will"},{"line_number":105,"context_line":"  have to also mirror those changes in the versioned notification"},{"line_number":106,"context_line":"  `InstancePayload`_. This also poses an issue between microversions in the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_7e6fff91","line":103,"in_reply_to":"ffe62b97_ac735ae7","updated":"2017-03-27 16:29:01.000000000","message":"We can probably add this to searchlight. We\u0027d need a default filter so that ordinarily users wouldn\u0027t see deleted instances, and the ability to bypass that filter. That requires some work on our side though and it\u0027ll depend on availability to work on it.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"aa5a14491461be210a122af2d4e53e1ea845dead","unresolved":false,"context_lines":[{"line_number":119,"context_line":"  cannot drop fields from the InstancePayload for versioned notifications"},{"line_number":120,"context_line":"  unless we have also raised the minimum required microversion in the compute"},{"line_number":121,"context_line":"  REST API to the point that we are also dropping fields from the server"},{"line_number":122,"context_line":"  response."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":".. _removed in 5.0: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_mapping_changes.html#_literal__timestamp_literal_and_literal__ttl_literal"},{"line_number":125,"context_line":".. _InstancePayload: https://github.com/openstack/nova/blob/15.0.0/nova/notifications/objects/instance.py#L19"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_87c4b45f","line":122,"updated":"2017-03-08 10:53:26.000000000","message":"+1","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"eecbd7576dbfbacc8384fb07f2db098643514acc","unresolved":false,"context_lines":[{"line_number":119,"context_line":"  cannot drop fields from the InstancePayload for versioned notifications"},{"line_number":120,"context_line":"  unless we have also raised the minimum required microversion in the compute"},{"line_number":121,"context_line":"  REST API to the point that we are also dropping fields from the server"},{"line_number":122,"context_line":"  response."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":".. _removed in 5.0: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_mapping_changes.html#_literal__timestamp_literal_and_literal__ttl_literal"},{"line_number":125,"context_line":".. _InstancePayload: https://github.com/openstack/nova/blob/15.0.0/nova/notifications/objects/instance.py#L19"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_70d9b581","line":122,"in_reply_to":"1a1ced50_fdb13048","updated":"2017-03-31 19:21:56.000000000","message":"yeh, that gets a little messy, but sure. We\u0027re going to be playing a transform game somewhere.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"14c5e1bac5a7f087c84185db5b52da8b763b5b88","unresolved":false,"context_lines":[{"line_number":119,"context_line":"  cannot drop fields from the InstancePayload for versioned notifications"},{"line_number":120,"context_line":"  unless we have also raised the minimum required microversion in the compute"},{"line_number":121,"context_line":"  REST API to the point that we are also dropping fields from the server"},{"line_number":122,"context_line":"  response."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":".. _removed in 5.0: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_mapping_changes.html#_literal__timestamp_literal_and_literal__ttl_literal"},{"line_number":125,"context_line":".. _InstancePayload: https://github.com/openstack/nova/blob/15.0.0/nova/notifications/objects/instance.py#L19"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_fdb13048","line":122,"in_reply_to":"9a30ddce_87c4b45f","updated":"2017-03-21 16:55:56.000000000","message":"+1 I think this is fine.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"63c93e46868cfb5ea6344091c1258f47b7278b1b","unresolved":false,"context_lines":[{"line_number":144,"context_line":"That will tell Searchlight to call the compute REST API to list existing"},{"line_number":145,"context_line":"instances and populate the server indexes using the results. See the"},{"line_number":146,"context_line":"Searchlight documentation for more details on `bulk indexing`_."},{"line_number":147,"context_line":""},{"line_number":148,"context_line":".. _bulk indexing: https://docs.openstack.org/developer/searchlight/indexingservice.html#bulk-indexing"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_c3e840e5","line":147,"updated":"2017-03-09 03:23:15.000000000","message":"So should we consider the case which Kevin said, the data may become dirty?","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c8c92a6b67cb2c039c82e2c017db028d67d2d6cf","unresolved":false,"context_lines":[{"line_number":144,"context_line":"That will tell Searchlight to call the compute REST API to list existing"},{"line_number":145,"context_line":"instances and populate the server indexes using the results. See the"},{"line_number":146,"context_line":"Searchlight documentation for more details on `bulk indexing`_."},{"line_number":147,"context_line":""},{"line_number":148,"context_line":".. _bulk indexing: https://docs.openstack.org/developer/searchlight/indexingservice.html#bulk-indexing"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_6c2b1294","line":147,"in_reply_to":"1a1ced50_dde0f4fc","updated":"2017-03-25 00:47:07.000000000","message":"Sorry I\u0027m not sure what you\u0027re asking. The entire purpose of this section is to point out the need for the sync to load up searchlight with data before using this in nova. It\u0027s also reiterated in the \"Other deployer impact\" section.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"14c5e1bac5a7f087c84185db5b52da8b763b5b88","unresolved":false,"context_lines":[{"line_number":144,"context_line":"That will tell Searchlight to call the compute REST API to list existing"},{"line_number":145,"context_line":"instances and populate the server indexes using the results. See the"},{"line_number":146,"context_line":"Searchlight documentation for more details on `bulk indexing`_."},{"line_number":147,"context_line":""},{"line_number":148,"context_line":".. _bulk indexing: https://docs.openstack.org/developer/searchlight/indexingservice.html#bulk-indexing"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_dde0f4fc","line":147,"in_reply_to":"9a30ddce_c3e840e5","updated":"2017-03-21 16:55:56.000000000","message":"Maybe thats how we deal with that worry, we just make a note here about searchlight that previously didn\u0027t get enough information from the version notifications, it will need a large sync before it can be used by nova.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f012b77a0cbd57a8620c35e40d98c1c20d34db03","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"None."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"REST API impact"},{"line_number":161,"context_line":"---------------"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"While this will change how ``/servers`` and ``/servers/detail`` responses are"},{"line_number":164,"context_line":"generated on the backend, there should be no user-visible changes to the"},{"line_number":165,"context_line":"contract on those APIs. This will be enforced via Tempest testing."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Security impact"},{"line_number":168,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_47e94718","line":165,"range":{"start_line":160,"start_character":0,"end_line":165,"end_character":66},"updated":"2017-03-25 00:57:49.000000000","message":"Something I just thought about here, is how are we going to do paging with Searchlight? How do you page in elasticsearch other than by timestamp?\n\nThanks Google, I guess this is already possible:\n\nhttps://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"24b56bcac816e54718c6fe2f74858128893f872b","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"None."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"REST API impact"},{"line_number":161,"context_line":"---------------"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"While this will change how ``/servers`` and ``/servers/detail`` responses are"},{"line_number":164,"context_line":"generated on the backend, there should be no user-visible changes to the"},{"line_number":165,"context_line":"contract on those APIs. This will be enforced via Tempest testing."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Security impact"},{"line_number":168,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_4a0a438a","line":165,"range":{"start_line":160,"start_character":0,"end_line":165,"end_character":66},"in_reply_to":"ffe62b97_3ee29730","updated":"2017-04-03 18:56:51.000000000","message":"I\u0027ll add a note about this in here, thanks.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3d7ee5c782906b3f358862861329670f50a7a261","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"None."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"REST API impact"},{"line_number":161,"context_line":"---------------"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"While this will change how ``/servers`` and ``/servers/detail`` responses are"},{"line_number":164,"context_line":"generated on the backend, there should be no user-visible changes to the"},{"line_number":165,"context_line":"contract on those APIs. This will be enforced via Tempest testing."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Security impact"},{"line_number":168,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_3ee29730","line":165,"range":{"start_line":160,"start_character":0,"end_line":165,"end_character":66},"in_reply_to":"ffe62b97_47e94718","updated":"2017-03-27 16:29:01.000000000","message":"Searchlight largely is compatible with Elasticsearch, so we support paging by page/size. You could also do it with the openstack \u0027marker\u0027 method by ordering on id.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"14c5e1bac5a7f087c84185db5b52da8b763b5b88","unresolved":false,"context_lines":[{"line_number":215,"context_line":"the `json-schema-for-versioned-notifications blueprint`_. If we can not or do"},{"line_number":216,"context_line":"not end up using versioned notification schema in Searchlight then that would"},{"line_number":217,"context_line":"create an install/upgrade order dependency such that Searchlight must be"},{"line_number":218,"context_line":"installed/upgraded before nova-api."},{"line_number":219,"context_line":""},{"line_number":220,"context_line":".. _json-schema-for-versioned-notifications blueprint: https://blueprints.launchpad.net/nova/+spec/json-schema-for-versioned-notifications"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_bda97892","line":218,"updated":"2017-03-21 16:55:56.000000000","message":"Seems like we should clear up what our initial approach is here. What is the API contract between searchlight and Nova here?\n\nOn the Nova side, are we populating oslo.versioned objects, and then passing them to the regular nova API code?","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c8c92a6b67cb2c039c82e2c017db028d67d2d6cf","unresolved":false,"context_lines":[{"line_number":215,"context_line":"the `json-schema-for-versioned-notifications blueprint`_. If we can not or do"},{"line_number":216,"context_line":"not end up using versioned notification schema in Searchlight then that would"},{"line_number":217,"context_line":"create an install/upgrade order dependency such that Searchlight must be"},{"line_number":218,"context_line":"installed/upgraded before nova-api."},{"line_number":219,"context_line":""},{"line_number":220,"context_line":".. _json-schema-for-versioned-notifications blueprint: https://blueprints.launchpad.net/nova/+spec/json-schema-for-versioned-notifications"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_e7261bb8","line":218,"in_reply_to":"1a1ced50_bda97892","updated":"2017-03-25 00:47:07.000000000","message":"What you\u0027re asking about is different from what this paragraph is talking about. This section is talking about when I\u0027m adding a new field in the compute REST API response, I also need to put that in the versioned notification payload so searchlight gets it. The point about the schema was if the notification also sends the schema, then searchlight can use that schema dynamically, otherwise you have to update searchlight statically to know about the new field.\n\nSo taking the static case, if I\u0027m adding a new field \u0027bar\u0027 to the server response in the compute API, and let\u0027s assume it\u0027s not in the instances table (it\u0027s a new column in the DB), then the steps are:\n\n1. Add column to DB.\n2. Add field to Instance object.\n3. Add field to InstancePayload object.\n4. Add schema change to Searchlight for the new field.\n5. Add the new field to the compute REST API response via microversion.\n\nThis of course means that you have to upgrade searchlight before you upgrade nova-api, which I think was implied given nova-api depends on searchlight if you\u0027re using it.\n\nDo you want me to add that example and those steps in this section for clarity?\n\n--\n\nAs far as how we translate a searchlight response to the compute REST API code, see the 2nd bullet in the \u0027work items\u0027 section below. In other words, yes, we\u0027ll need some translation code to take the searchlight response and convert it to an InstanceList versioned object (in nova.compute.api.API) and pass that back up to the REST API handler code (which uses the views to build the response body).","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"eecbd7576dbfbacc8384fb07f2db098643514acc","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"Work Items"},{"line_number":236,"context_line":"----------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"* Add the conditional path to the compute API ``get_all`` flow where we query"},{"line_number":239,"context_line":"  Searchlight for data if Nova is configured to do so."},{"line_number":240,"context_line":"* There will likely need to be some kind of translation utility code in place"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_50bfd1fa","line":237,"updated":"2017-03-31 19:21:56.000000000","message":"* Get a working development environment where searchlight is regularly running with Nova and consuming notifications.","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"24b56bcac816e54718c6fe2f74858128893f872b","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"Work Items"},{"line_number":236,"context_line":"----------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"* Add the conditional path to the compute API ``get_all`` flow where we query"},{"line_number":239,"context_line":"  Searchlight for data if Nova is configured to do so."},{"line_number":240,"context_line":"* There will likely need to be some kind of translation utility code in place"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_aa778f02","line":237,"in_reply_to":"dfeb2761_50bfd1fa","updated":"2017-04-03 18:56:51.000000000","message":"Done","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"753054e17e38d12f70f1a8591186067e720e70a9","unresolved":false,"context_lines":[{"line_number":242,"context_line":"  object which will be returned to the REST API handler."},{"line_number":243,"context_line":"* Integrate Searchlight and configure Nova to emit versioned notifications in"},{"line_number":244,"context_line":"  the ``gate-tempest-dsvm-neutron-nova-next-full-ubuntu-xenial-nv`` job for"},{"line_number":245,"context_line":"  testing."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_3018cd1b","line":245,"updated":"2017-03-31 19:26:19.000000000","message":"* Install guide changes to explain the setup of Searchlight with Nova","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"24b56bcac816e54718c6fe2f74858128893f872b","unresolved":false,"context_lines":[{"line_number":242,"context_line":"  object which will be returned to the REST API handler."},{"line_number":243,"context_line":"* Integrate Searchlight and configure Nova to emit versioned notifications in"},{"line_number":244,"context_line":"  the ``gate-tempest-dsvm-neutron-nova-next-full-ubuntu-xenial-nv`` job for"},{"line_number":245,"context_line":"  testing."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dfeb2761_8a728b10","line":245,"in_reply_to":"dfeb2761_3018cd1b","updated":"2017-04-03 18:56:51.000000000","message":"Done","commit_id":"b165e27f188cbaac8499085bccb1bbf86340b07f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d132cf78e9c3cbf0c7afbf451f66ba4528c5456","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   database, otherwise that would defeat the purpose of this change. We will"},{"line_number":54,"context_line":"   not use Searchlight for ``GET /servers/{server_id}`` because when we have a"},{"line_number":55,"context_line":"   specific server ID we can look up which cell it\u0027s in using the"},{"line_number":56,"context_line":"   InstanceMapping record in the Nova API database."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Error conditions"},{"line_number":59,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_8042503d","line":56,"updated":"2017-04-04 14:04:10.000000000","message":"Just a note here, we *can* do efficient lists of instances by certain properties because they come from the API database. We just can\u0027t put them in the right spot. So from a cache coherency point of view, we could attempt to list all the instances we know about from our db, and from searchlight, and then patch up any that we don\u0027t get back from searchlight in certain cases.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"84e65df67e0581cf7269bd9bb0d677d1f9d2adb5","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   database, otherwise that would defeat the purpose of this change. We will"},{"line_number":54,"context_line":"   not use Searchlight for ``GET /servers/{server_id}`` because when we have a"},{"line_number":55,"context_line":"   specific server ID we can look up which cell it\u0027s in using the"},{"line_number":56,"context_line":"   InstanceMapping record in the Nova API database."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Error conditions"},{"line_number":59,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_c606301d","line":56,"in_reply_to":"dfeb2761_0bc9c124","updated":"2017-04-04 14:33:06.000000000","message":"Yeah, I was in the Austin discussion. If you return sorted results from multiple databases you can merge sort them in constant time with constant memory overhead: it\u0027s essentially free in python. The issue is with pagination because you need to do it for every request, but that\u0027s no different to the case with a single db.\n\nSo I agree that we want to do Searchlight, I just think it\u0027s orthogonal to cells. We can already do what we do today.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"6eaa3a886dce0c29dd0ce8883f4f6bfb2de96492","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   database, otherwise that would defeat the purpose of this change. We will"},{"line_number":54,"context_line":"   not use Searchlight for ``GET /servers/{server_id}`` because when we have a"},{"line_number":55,"context_line":"   specific server ID we can look up which cell it\u0027s in using the"},{"line_number":56,"context_line":"   InstanceMapping record in the Nova API database."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Error conditions"},{"line_number":59,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_ebbe9db2","line":56,"in_reply_to":"dfeb2761_20df04d7","updated":"2017-04-04 14:21:15.000000000","message":"Note that we can actually do efficient lists of instances from multiple cells. I already wrote a patch to do it here:\n\nhttps://review.openstack.org/#/c/445141/\n\nThe number of queries is n_cells + 1, which compared to some of the things we do to the db today is a breeze, and the load is distributed across multiple dbs, which is even better. And the approach can be extended to do constant memory sorting by using a merge sort. The only functional issue with this approach is that pagination is really hard, but it\u0027s already hard for a single db.\n\nI think we need the Searchlight approach for the Horizon use case, but personally I\u0027d like to preserve both and keep them separate in the api.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4e1917e15363053e898b461255cf5df06d86eaf0","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   database, otherwise that would defeat the purpose of this change. We will"},{"line_number":54,"context_line":"   not use Searchlight for ``GET /servers/{server_id}`` because when we have a"},{"line_number":55,"context_line":"   specific server ID we can look up which cell it\u0027s in using the"},{"line_number":56,"context_line":"   InstanceMapping record in the Nova API database."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Error conditions"},{"line_number":59,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_2b3005e8","line":56,"in_reply_to":"dfeb2761_20df04d7","updated":"2017-04-04 14:14:26.000000000","message":"We can list instance uuids by project and user in the API efficiently because they\u0027re all in one place (the API database). That means we can detect things that searchlight doesn\u0027t know about and do something about it if we want to. Meaning, if the searchlight-is-30-seconds-behind-nova coherency problem becomes an issue, we can detect and patch it up before we return the searchlight result to the user if we need to.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"411c63da4fd4ac967c2943b70eb946b3ea5ee4c6","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   database, otherwise that would defeat the purpose of this change. We will"},{"line_number":54,"context_line":"   not use Searchlight for ``GET /servers/{server_id}`` because when we have a"},{"line_number":55,"context_line":"   specific server ID we can look up which cell it\u0027s in using the"},{"line_number":56,"context_line":"   InstanceMapping record in the Nova API database."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Error conditions"},{"line_number":59,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_2b680585","line":56,"in_reply_to":"dfeb2761_2b3005e8","updated":"2017-04-04 14:16:28.000000000","message":"Ah OK, so if we know we have 500 instances because the instance_mappings table tells us so, and searchlight gave us 450, then we take the subset of instance uuids from the instance_mappings table and use those to query the cell databases, something like that? I think I understand now.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"181b7dd2a60442e774064a466515fb7f2127b673","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   database, otherwise that would defeat the purpose of this change. We will"},{"line_number":54,"context_line":"   not use Searchlight for ``GET /servers/{server_id}`` because when we have a"},{"line_number":55,"context_line":"   specific server ID we can look up which cell it\u0027s in using the"},{"line_number":56,"context_line":"   InstanceMapping record in the Nova API database."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Error conditions"},{"line_number":59,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_2b72454a","line":56,"in_reply_to":"dfeb2761_2b680585","updated":"2017-04-04 14:20:31.000000000","message":"That, or change our return result from 200 to 20x Partial Result or something like that, but yeah.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4fbe8f31b53635a105bd280a91fc944ff46d148b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   database, otherwise that would defeat the purpose of this change. We will"},{"line_number":54,"context_line":"   not use Searchlight for ``GET /servers/{server_id}`` because when we have a"},{"line_number":55,"context_line":"   specific server ID we can look up which cell it\u0027s in using the"},{"line_number":56,"context_line":"   InstanceMapping record in the Nova API database."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Error conditions"},{"line_number":59,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_20df04d7","line":56,"in_reply_to":"dfeb2761_8042503d","updated":"2017-04-04 14:10:28.000000000","message":"\u003e Just a note here, we *can* do efficient lists of instances by certain properties because they come from the API database. We just can\u0027t put them in the right spot.\n\nI don\u0027t know what that means, the \"because they come from the API database\" part. They \u003d\u003d instances? They are not in the API database so I don\u0027t follow.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3bbadfda8f5a4672b462cc51ae783ee8a38fb453","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   database, otherwise that would defeat the purpose of this change. We will"},{"line_number":54,"context_line":"   not use Searchlight for ``GET /servers/{server_id}`` because when we have a"},{"line_number":55,"context_line":"   specific server ID we can look up which cell it\u0027s in using the"},{"line_number":56,"context_line":"   InstanceMapping record in the Nova API database."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Error conditions"},{"line_number":59,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_0bc9c124","line":56,"in_reply_to":"dfeb2761_ebbe9db2","updated":"2017-04-04 14:25:45.000000000","message":"Were you in the discussion we had about this in austin? We bashed against this for quite some time.\n\nThe sorting is doable, although it will be very slow in python compared to the way it\u0027s currently done in the DB layer today.\n\nPagination is pretty easy today, I\u0027m not sure why you say it\u0027s hard with one database. But a sorted/paginated result across multiple databases requires us to pull the entire set from each database every single time we construct a page (or cache that result somewhere).","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d132cf78e9c3cbf0c7afbf451f66ba4528c5456","unresolved":false,"context_lines":[{"line_number":98,"context_line":"  data retention/archive/purge policy in the given cloud provider. For example,"},{"line_number":99,"context_line":"  if the cloud provider has a policy to archive or purge all deleted instances"},{"line_number":100,"context_line":"  after 30 days, then they already cannot list instances that were deleted more"},{"line_number":101,"context_line":"  than 30 days ago."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"  We will have to sort this limitation out with the Searchlight team. It might"},{"line_number":104,"context_line":"  be possible, for example, to add a configuration option to Searchlight to"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_00ebe012","line":101,"updated":"2017-04-04 14:04:10.000000000","message":"And by the same token, I could run my archiver when the delete notification comes to immediately archive/purge the instance such that for all intents and purposes, listing deleted instances can never happen in my cloud.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"7ba14adbbddfa8788e7b0e4c31223830a5961260","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"   searchlight-manage index sync --type OS::Nova::Server"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"That will tell Searchlight to call the compute REST API to list existing"},{"line_number":157,"context_line":"instances and populate the server indexes using the results. See the"},{"line_number":158,"context_line":"Searchlight documentation for more details on `bulk indexing`_."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":".. _bulk indexing: https://docs.openstack.org/developer/searchlight/indexingservice.html#bulk-indexing"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_85982bc0","line":157,"range":{"start_line":156,"start_character":1,"end_line":157,"end_character":60},"updated":"2017-04-04 11:27:56.000000000","message":"This requires maintaining the \u0027direct\u0027 code path in perpetuity. It also requires either a second api for searchlight to use which always avoids searchlight, or a new flag to the existing api which tells it not to use searchlight.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d132cf78e9c3cbf0c7afbf451f66ba4528c5456","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"   searchlight-manage index sync --type OS::Nova::Server"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"That will tell Searchlight to call the compute REST API to list existing"},{"line_number":157,"context_line":"instances and populate the server indexes using the results. See the"},{"line_number":158,"context_line":"Searchlight documentation for more details on `bulk indexing`_."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":".. _bulk indexing: https://docs.openstack.org/developer/searchlight/indexingservice.html#bulk-indexing"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_60f86c7a","line":157,"range":{"start_line":156,"start_character":1,"end_line":157,"end_character":60},"in_reply_to":"dfeb2761_25c4b65e","updated":"2017-04-04 14:04:10.000000000","message":"Maybe I\u0027m misunderstanding something, but I don\u0027t think that removing the direct list path from nova is even on the horizon. Maybe someday when we determine that basically nobody ever deploys without searchlight, we could consider it. However, for up to about 200 compute nodes, most people won\u0027t need searchlight, and probably below 50-100 it\u0027s not really needed for most cases.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4fbe8f31b53635a105bd280a91fc944ff46d148b","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"   searchlight-manage index sync --type OS::Nova::Server"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"That will tell Searchlight to call the compute REST API to list existing"},{"line_number":157,"context_line":"instances and populate the server indexes using the results. See the"},{"line_number":158,"context_line":"Searchlight documentation for more details on `bulk indexing`_."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":".. _bulk indexing: https://docs.openstack.org/developer/searchlight/indexingservice.html#bulk-indexing"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_c043b86b","line":157,"range":{"start_line":156,"start_character":1,"end_line":157,"end_character":60},"in_reply_to":"dfeb2761_60f86c7a","updated":"2017-04-04 14:10:28.000000000","message":"True, I jumped the gun a bit. First, this is all theory at this point, like Sean said. We first have to see if this even works at all. We\u0027ll need a CI job that has multiple cells and we can use Searchlight with that to see how it works, since using Searchlight to list instances across multiple cells is the idea. The single-node dsvm jobs could continue to not use searchlight and just hit the direct path. I suppose this means I need to adjust the wording around L113. I guess I was thinking about this like placement where it was optional for awhile and then it wasn\u0027t. I\u0027m not crazy about supporting optional things forever so that\u0027s where I was thinking this is eventually required, but that\u0027s way way down the road. We have to crawl first.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f00662042fdfd2dbcf4c2173eb5db77baac9b302","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"   searchlight-manage index sync --type OS::Nova::Server"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"That will tell Searchlight to call the compute REST API to list existing"},{"line_number":157,"context_line":"instances and populate the server indexes using the results. See the"},{"line_number":158,"context_line":"Searchlight documentation for more details on `bulk indexing`_."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":".. _bulk indexing: https://docs.openstack.org/developer/searchlight/indexingservice.html#bulk-indexing"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_25c4b65e","line":157,"range":{"start_line":156,"start_character":1,"end_line":157,"end_character":60},"in_reply_to":"dfeb2761_85982bc0","updated":"2017-04-04 13:44:56.000000000","message":"Well this is only for upgrades of existing deployments and we give them a couple of releases to get caught up so searchlight has the same data that nova does because when a new instance is created, it emits a notification that is consumed by searchlight so it shows up in the API. Then at some point we just drop the old direct path (except for maybe deleted or changes-since query parameters if we haven\u0027t found a better solution to that yet).","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e8d17c229e2fe9d50a14c8013e13503985cd2da6","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"   searchlight-manage index sync --type OS::Nova::Server"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"That will tell Searchlight to call the compute REST API to list existing"},{"line_number":157,"context_line":"instances and populate the server indexes using the results. See the"},{"line_number":158,"context_line":"Searchlight documentation for more details on `bulk indexing`_."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":".. _bulk indexing: https://docs.openstack.org/developer/searchlight/indexingservice.html#bulk-indexing"}],"source_content_type":"text/x-rst","patch_set":5,"id":"dfeb2761_45757a31","line":157,"range":{"start_line":156,"start_character":1,"end_line":157,"end_character":60},"in_reply_to":"dfeb2761_85982bc0","updated":"2017-04-04 13:44:10.000000000","message":"Yeah, we\u0027ll always have the direct path in nova. To your second point, L150 says \"before configuring nova to point to searchlight\" you\u0027d do that bulk index. After that, you\u0027d throw the switch.","commit_id":"e7bb678f4cfdbaef37dc9ed9447f1c2fe9b54bfe"}]}
