[openstack-dev] [nova][searchlight] When do instances get removed from Searchlight?

McLellan, Steven steve.mclellan at hpe.com
Mon Mar 6 15:44:48 UTC 2017


Storing the data isn't a problem, but one issue we've had with situations like this where there should be a default filter (soft_deleted==false) that can be overridden is that it's quite hard within the context of the query parser to do it, because it involves examining an incoming query to see whether that term appears at all which can become difficult when looking at, for instance, query_string queries.

It probably would not be too difficult, however, to enforce that if a term ("soft_deleted") appears as the term in a structured query we remove such a default filter - so under the 'normal' case, nova would filter out soft_deleted instances as well as other instances invisible due to RBAC rules, but if {soft_deleted: false} is present as a query term we'd allow them through.

Steve




On 3/6/17, 8:56 AM, "Balazs Gibizer" <balazs.gibizer at ericsson.com> wrote:

>
>
>On Mon, Mar 6, 2017 at 3:06 PM, Lei Zhang <lei12zhang12 at gmail.com> 
>wrote:
>> 
>> 
>> On Mon, Mar 6, 2017 at 1:21 AM, Matt Riedemann <mriedemos at gmail.com> 
>> wrote:
>>> 
>>> So I'm wondering at what point instances stored in searchlight will 
>>> be removed. Maybe there is already an answer to this and the 
>>> searchlight team can just inform me. Otherwise we might need to 
>>> think about data retention policies and how long a deleted instances 
>>> will be stored in searchlight before it's removed. Again, I'm not 
>>> sure if nova would control this or if it's something searchlight 
>>> supports already.
>>> 
>> 
>> Hi,
>> 
>> Currently Searchlight doesn't capture soft delete notifications and 
>> simply remove instance from ES if real delete notification comes. If 
>> these two kind of notifications can be distinguished we could fix 
>> this issue by marking the document in the ES instead of removing it. 
>> And we also need to capture some extra notifications like 
>> restore(suppose it exists) .
>
>Yes, there is instance.restore notification [1] to match 
>instance.soft_delete.
>
>Cheers,
>gibi
>
>[1] https://review.openstack.org/#/c/331972/
>> 
>> About data retention policies, I'm not sure if something like ttl to 
>> define how long a deleted instance should be stored in searchlight is 
>> enough. I know Nova has cli to purge the database about deleted 
>> instances, if there are no notification emitted for these operations, 
>> it's impossible for searchlight to know when these delete instances 
>> are removed.
>
>
>__________________________________________________________________________
>OpenStack Development Mailing List (not for usage questions)
>Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


More information about the OpenStack-dev mailing list