Thursday, 2015-09-10

*** sballe has joined #openstack-searchlight01:30
*** TravT has quit IRC02:53
*** sigmavirus24 has quit IRC03:27
*** sigmavirus24 has joined #openstack-searchlight03:29
*** sigmavirus24 is now known as sigmavirus24_awa03:39
*** lakshmiS has joined #openstack-searchlight03:48
*** sballe has quit IRC03:56
*** lakshmiS has quit IRC06:00
*** lakshmiS has joined #openstack-searchlight06:03
*** GB21 has joined #openstack-searchlight06:27
*** lakshmiS has quit IRC08:03
*** lakshmiS has joined #openstack-searchlight08:03
*** GB21 has quit IRC09:30
*** GB21 has joined #openstack-searchlight09:45
*** GB21 has quit IRC10:31
ekarlsosjmc7: u on ?12:43
*** sballe has joined #openstack-searchlight12:43
ekarlsolakshmiS: u around ?13:53
*** TravT has joined #openstack-searchlight13:58
lakshmiShey ekarlso:14:01
*** sigmavirus24_awa is now known as sigmavirus2414:03
openstackgerritEndre Karlson proposed openstack/searchlight: Add Designate plugin.  https://review.openstack.org/19909914:24
ekarlsoTravT: so in the latest PS i'm wonder why the delete_by_query deletes all the recordsets when deleting a domain? seems that the filter for zone_id doesn't have any effect ?14:25
TravTekarlso: let me take a look14:26
TravTok, i'm gonna pull it and try it out.14:30
sjmc7hmm, it's also been deprecated as of v1.5.314:33
TravTit'll be nice when this is in and I don't have to rebuild tox14:34
sjmc7you shouldn't have to rebuild it - .tox/<env>/bin/pip install -e . should get all the dependencies and entrypoints14:35
TravTsjmc7: yep, see that in the docs14:35
TravThttps://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html14:35
sjmc7it looks from the docs that the 'q=' parameter takes a querystring, ekarlso14:37
sjmc7so q='zone_id:%s' % zone_id14:37
sjmc7or you can use body={'query': {'term': {'zone_id': zone_id}}}14:37
TravTyeah, but it looks like we should do the bulk delete14:38
ekarlsoTravT: bulk delete ?14:46
TravT        from elasticsearch import helpers14:47
TravT        actions = []14:47
TravT        for document in documents:14:47
TravT            action = {14:47
TravT                '_id': document.get(self.document_id_field),14:47
TravT            }14:47
TravT            actions.append(action)14:47
TravT        helpers.bulk(14:47
TravT            client=self.engine,14:47
TravT            index=self.index_name,14:47
TravT            doc_type=self.document_type,14:47
TravT            chunk_size=self.chunk_size,14:47
TravT            actions=actions)14:47
TravTbut do a search first using the search_type of scan, I think... looking at python client api for that14:47
sjmc7think you need a 'delete' in the action14:47
TravTyep, somehow missed that14:48
sjmc7if we're expecting thousands of records per zone, a scan is probably worth doing14:48
sjmc7also in helpers14:49
TravT        helpers.bulk(14:50
TravT            action='delete',14:50
TravT            client=self.engine,14:50
TravT            index=self.index_name,14:50
TravT            doc_type=self.document_type,14:50
TravT            chunk_size=self.chunk_size,14:50
TravT            actions=actions)14:50
TravTfudge14:50
TravTjust throwing random code out to ekarlso, probably does more harm than good14:51
ekarlso:P14:51
sjmc7:)  yeah.. i'm wondering whether we should maybe get the base plugin in without the parent-child relationship. if this is the last issue, then let's try and solve it, but we need a cut-off14:51
TravTthat's what i was thinking yesterday... but seemed like everything else is working?14:52
ekarlsowell parent / child stuff works ?14:52
ekarlsojust deleting the recordsets atm that's bork14:52
sjmc7notifications have some issues when i tested yesterday evening14:52
sjmc7yeah, ok. if that's the only hting we can get that done14:52
ekarlsosjmc7: I think that's you having a old version of designate...14:52
sjmc7:)  that might well be, it's a few weeks old14:52
TravTi've got 2 day old devstack, i'll try it all out.14:52
TravTBTW, with designate added to the list of services i'm running, my poor laptop hits a limit.14:53
TravTi'm now having to kill off other services for it to even function14:54
sjmc7how much RAM does your VM have?14:54
TravT914:54
sjmc7whoa14:54
TravTbut i'm running full ubuntu in it14:54
TravTand do dev in it...14:54
sjmc7i run a server OS which saves at least 2 gb14:54
TravTnot just server14:54
sjmc7ah14:54
sjmc7ah right, i forgot your weird setup :)14:55
TravTi like to be able to blow stuff away and screw things up at will14:55
TravTbut it is coming at a price14:55
sjmc7yeah.. i can't imagine running pycharm in a VM14:55
TravTworked fine until recently.14:56
TravTbut i swear the services are eating up more and more14:56
sjmc7all them features! you could turn some off14:56
TravTanwyay, let's see...14:57
TravTdo a scan query by zone_id, i believe14:57
TravTthen do bulk delete14:57
TravTok, thought I almost had it ready to try, but time for our meeting15:00
TravTCourtesy Searchlight meeting reminder in #openstack-meeting-4: lakshmiS, nikhil_k, rosmaita, sigmavirus24, TravT, krykowski, david-lyle, wokuma, kragniz, sjmc7, ekarlso,15:01
sjmc7i filed https://bugs.launchpad.net/searchlight/+bug/1493958 with patch https://review.openstack.org/#/c/221903/ to allow use of parent-child in the designate plugin yesterday. if you're testing designate, please stick a comment on that too (it's a dependency of the designate patch)16:00
openstackLaunchpad bug 1493958 in OpenStack Search (Searchlight) "Patch needed to plugin/base to support parent-child relationships" [Undecided,New] - Assigned to Steve McLellan (sjmc7)16:00
ekarlsou guys got any clues on the last blockers or ?16:45
TravTekarlso, i got pulled into a call, will be out of it shortly16:48
TravTsorry16:48
ekarlso;P16:48
ekarlsoTravT: no worries : p16:48
*** TravT_ has joined #openstack-searchlight17:07
*** TravT has quit IRC17:08
*** lakshmiS has quit IRC17:11
*** nikhil_k_ is now known as nikhil_k-bbiab17:14
*** TravT_ has quit IRC17:14
*** TravT has joined #openstack-searchlight17:16
*** nikhil_k-bbiab is now known as nikhil_k18:17
TravTekarlso, i've been looking at the delete issue19:38
TravTi have code that should work, but sadly throws an error which i think is due to ES bug.19:39
sjmc7:O19:39
TravTsjmc719:40
TravT:19:40
TravT        from elasticsearch import helpers19:40
TravT        query = {19:40
TravT            'fields': '_id',19:40
sjmc7heresy!19:40
TravT            'query': {19:40
TravT                'term': {19:40
TravT                    'zone_id': id_19:40
TravT                }19:40
TravT            }19:40
TravT        }19:40
TravT        from recordsets import RecordSetIndex19:40
TravT        documents = helpers.scan(19:40
TravT            client=self.engine,19:40
TravT            index=self.index_name,19:40
TravT            doc_type="OS::Designate::RecordSet",19:40
TravT            query=query)19:40
TravT        actions = []19:40
TravT        for document in documents:19:40
TravT            action = {19:40
TravT                '_id': document['_id'],19:40
TravT                '_op_type': 'delete',19:41
TravT                '_index': self.index_name,19:41
TravT                '_type': 'OS::Designate::RecordSet'19:41
TravT            }19:41
TravT            actions.append(action)19:41
TravT        if actions:19:41
TravT            helpers.bulk(19:41
TravT                client=self.engine,19:41
TravT                actions=actions)19:41
TravTthat actually deletes the recordsets we want19:41
TravTbut it is trying to re-index at the end it seems19:41
TravTBulkIndexError: ('2 document(s) failed to index.', [{u'delete': {u'status': 404, u'_type': u'OS::Designate::RecordSet', u'_index': u'searchlight', u'_version': 1, u'found': False, u'_id': u'5dd8ce4c-e9bb-4958-9293-f56156e46012'}}, {u'delete': {u'status': 404, u'_type': u'OS::Designate::RecordSet', u'_index': u'searchlight', u'_version': 1, u'found': False, u'_id': u'84335944-7ac1-4966-8136-1bca74b56e56'}}])19:41
TravTand can't find them19:41
david-lylepaste.openstack.org is good too :)19:41
sjmc7:D19:41
TravTi'm too hungry to not be lazy19:41
david-lylefair enough19:42
sjmc7it may just be te bulk syntax but that almost looks like it's trying to index documents that look like {'delete': {some stuff}}19:42
TravTyeah, but it is actually deleting the documents19:43
TravTi've been through the ES test code and the code itself for helpers...19:43
sjmc7maybe just a misleading exceoption name then?19:43
TravTseems right?19:43
TravThttps://github.com/elastic/elasticsearch-py/blob/master/elasticsearch/helpers/__init__.py#L6919:43
sjmc7hmm.. you MAY need the zone_id, because of the way partent-child works19:44
sjmc7the _id alone isn't enough for it to know which shard the document lives on19:44
TravThmm... that's true.19:44
TravTshard wise...19:45
sjmc7i am guessing a bit though19:45
TravTbut again19:45
TravTit is deleting the docs19:45
TravTwhen i go back and query directly, they are gone19:45
sjmc7can you print the 'actions' before running the delete?19:46
sjmc7how many in total are there?19:46
TravT219:46
TravTi've stepped through debugger a couple times on this.19:46
TravTi have to manually re-index each time i create...19:47
TravTthe notification listener piece isn't working with the parent child thing19:47
TravTjust haven't gotten back to that19:47
sjmc7yeah. it looks like the exception is ALWAYS BulkIndexError19:47
sjmc7regardless of operation type19:47
TravTyeah, it is like it is querying back...19:48
TravTnot the status is 40419:48
TravTthe typical status when the doc isn't found19:48
TravTs/not/note19:49
sjmc7yeah... something fishy is definitely up19:49
TravTi think designate might have some other issues19:50
TravTnot the plugin, but designate itself19:50
TravTno, nevermind on that.19:51
TravTjust realized it is rbac.19:51
TravTand horizon doesn't remove the domain entry from the screen without a refresh after you delete...19:53
TravTsjmc7: just stepping into bulk.20:00
TravTno error20:05
TravThmmm...20:06
TravTsjmc7: i'm thinking there is a pycharm debug issue20:12
TravTwhen I run it not through debugger, no errors20:12
sjmc7:(20:12
TravTeverything deleted20:12
TravTbug when pausing at breakpoints to look at the actions, get errors.20:13
TravTmaybe a cache issue.20:13
TravTso, fwiw, what i posted above works.20:13
TravTwith one issue20:13
TravTi hard coded the recordset document type20:13
sjmc7ok, well that's sort of good news20:13
TravThow do i get a handle to the RecordSet instance from within the Domain notification handler?20:14
sjmc7oh, hmm. not easily20:14
TravTi can't statically referrence recordset20:14
sjmc7the plugins don't really know about each other20:14
TravTget_index and get_document_type require self reference.20:15
sjmc7right. umm... we may need to register dependencies20:15
sjmc7when the plugins load?20:15
sjmc7further down the rabbit hole20:15
TravTwell, i think we can live with the doc type string20:16
sjmc7yeah, for now i think20:16
TravTpretty lame that they are deprecating the delete by query20:17
TravTi'll post these comments back for ekarlso...20:17
sjmc7yeah... deleting in e-s is not a good thing20:17
TravTnow to eat lunch and then see what is missing in the notifications for parent mapping.20:18
sjmc7yeah, i've not eaten all day eitehr :(20:18
TravTi did drink an energy drink for breakfast...20:18
sjmc7your five hours are up20:18
* TravT goes to look for sustenance20:18
*** TravT_ has joined #openstack-searchlight20:23
*** TravT has quit IRC20:25
sjmc7TravT_, you back? or did hunger claim you?22:17
TravT_i'm back... just running through designate plugin now22:17
*** TravT_ is now known as TravT22:17
TravTI'm not seeing indexing errors on notifications.22:17
sjmc7ok, endre was right then - older version of designate22:17
TravTand has_parent query seems to work.22:17
sjmc7i will remove my objection22:17
TravTbut22:18
TravT"status": "PENDING",22:18
*** sigmavirus24 is now known as sigmavirus24_awa22:18
sjmc7not sure what changes that22:18
TravTfirst notification has that status22:18
TravTnever get a notification that changes it to ACTIVE22:19
TravTif I re-run index sync22:19
TravTit is  "status": "ACTIVE",22:19
sjmc7aww :(22:19
sjmc7maybe designate just doesn't send one?22:19
TravTso, missing some notification there...22:19
TravTperhaps, I'm leaving that comment now on patch.22:19
TravTwas just about to re-test RBAC22:19
TravTon the bright side, at the end of this i will know more about designate22:20
TravTprimarily that it is made of zones and recordsets22:21
TravTwith strings here and there22:21
TravT:P22:21
sjmc7:D22:22
TravTon the bright side, has_parent query works regardless of notification based indexing or manual index sync22:23
sjmc7that's something!22:24
TravTit is!22:24
TravTso, i think that means I can +2 the parent patch.22:24
sjmc7yeah, it's pretty straightforward22:25
TravTcan we test it?22:25
sjmc7unit tests? yeah. but probably not today22:25
TravTi guess there aren't tests for similar fields.22:25
* TravT poor excuse22:25
sjmc7we need to improve test coverage all round22:26
TravTprobably best to add a functional test22:26
TravTwas looking at bulk helpers22:26
TravTprobably some test code we can borrow from it22:26
TravTfor functional tests22:26
TravTok, now onto RBAC testing.22:27
* TravT crosses fingers22:27
openstackgerritSteve McLellan proposed openstack/searchlight: WIP Add faceting  https://review.openstack.org/22238822:28
sjmc7that patch ^ needs some work but it's close to what we had for the summit prototype22:29
TravTok, cool, thanks!22:29
sjmc7don't spend time reviewing it properly now but if you have a change to glance at it. i'll try and add to the docs to show usage in a little bit22:30
TravTi'll probably try to integrate to it today, since like I mentioned earlier, i need it for horizon plugin22:30
sjmc7ok. i just tested it works, but it'll likely fail pep8 etc22:30
TravTi'm thinking i'll add static facets first in horizon22:31
TravTand then do dynamic...22:31
sjmc7yeah, that's what kelly did for the prototype22:32
TravTwell, admin token in a admin project is seeing demo project zone22:34
sjmc7that's good!22:34
sjmc7i think i did test RBAC yesterday and looked ok22:34
TravTdemo logged into demo project only sees demo zone22:37
sjmc7hurrah22:37
TravTno recordsets...22:37
sjmc7boo22:37
TravTthere's no project_it or tenant_id on any of the recordsets22:39
sjmc7i think i did note that on my review22:40
TravTi'm pretty sure i've noted it before as well.22:40
TravTyou know, i think we need to update the docs or change the is_admin handling on query_params22:43
TravThttps://github.com/openstack/searchlight/blob/b4bd7665d84712f66e684bf8a897c512251a661b/searchlight/api/v1/search.py#L26122:43
TravTperhaps add a check for all_tenants or all_projects there22:44
TravTok, project_id comes through with notifications22:48
sjmc7hmm22:48
TravTbut not index sync22:48
TravTif my mumbling to myself as I walk through it is bothersome, let me know22:49
sjmc7:)22:49
TravTok, i think i have the fix. will add comment to review22:51

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!