Monday, 2015-09-28

*** david-lyle has joined #openstack-searchlight01:03
openstackgerritTravis Tripp proposed openstack/searchlight: More efficient result filtering  https://review.openstack.org/20768205:43
*** lakshmiS has joined #openstack-searchlight09:43
*** sballe has joined #openstack-searchlight10:45
*** sigmavirus24_awa is now known as sigmavirus2413:41
sjmc7TratT_ - for the plugin session patch, try 'username' instead of 'user_name'. there's a confusing deprecation warning from the keystone session config parser about it preferring 'user-name' but neither a dash nor underscore work14:26
*** lakshmiS has quit IRC14:53
*** lakshmiS has joined #openstack-searchlight14:57
openstackgerritSteve McLellan proposed openstack/searchlight: Refactor clients handling to use Sessions.  https://review.openstack.org/21927115:59
*** TravT_ is now known as TravT16:22
openstackgerritLakshmi N Sampath proposed openstack/searchlight: Fix for Property mapping for Metadef properties fails  https://review.openstack.org/22853116:28
openstackgerritTravis Tripp proposed openstack/searchlight: Add --force when doing initial index sync  https://review.openstack.org/22853516:50
TravTsmc7: sessions patch now connects properly to glance, nova, designate.  just checking through a few other things on it.17:00
sjmc7ok. the glance connection's not using sessions, so it's still using the reauthorization decorator. in mitaka we'll be able to neaten it up further17:01
sjmc7lakshmiS - you there?17:03
sjmc7i'm looking at https://review.openstack.org/#/c/228531. you've changed 'name' to 'property' in _serialize_property, but the API for properties returns keys 'description', 'name', 'title', 'type'17:05
lakshmiSyes17:05
sjmc7after your patch the elasticsearch data remaps 'name' -> 'property'17:05
lakshmiSyeah it does return name but we mapped it as property17:06
sjmc7we have property_mapping which has name,type,title,description17:07
lakshmiSeven that might have been modified in some previous patch. let me check. its probably working right now due to dynamic mapping17:08
sjmc7right - we end up with 'property' as a dynamically mapped field17:09
sjmc7yeah, it's definitely likely i blundered when i converted this from the raw database access, and your patch does fix the problem, but it may be incomplete17:10
sjmc7it also creates an API difference with glance client17:10
lakshmiSproperty  is a dictionary key in glance server API but glance client modified it as name17:13
sjmc7ok. and we definitely want to map it as property?17:14
sjmc7in which case, we should change the defined mapping to remove 'name'17:14
lakshmiSi think we used the key as "property" to make it easier to understand since there were so many "name" fields. I dont have any preference either way17:14
sjmc7although... my data now has both17:15
sjmc7'name' and 'property'17:15
lakshmiSeither we keep it as "property" or change everything including listener to use "name"17:15
lakshmiSwhich data?17:15
sjmc7{"property": "os_version", "type": "string", "description": "Operating system version as specified by the distributor. (for example, '11.10')", "name": "os_version", "title": "OS Version"}17:15
lakshmiScan you try deleting the index and sync it again17:15
sjmc7yeah, i did17:16
sjmc7one sec, doing it again17:16
sjmc7still getting both17:17
lakshmiSdo you see that for all property objects?17:17
sjmc7no, doesn't look like it17:18
lakshmiShmm, i will checkout the code again17:19
sjmc7without the patch everything just has name17:21
sjmc7with it.. some stuff seems to have 'property' as well, but not all17:21
lakshmiSok i will see whats going on17:21
sjmc7ta17:21
lakshmiS;)17:21
TravTlakshmiS: are the functional tests running in zuul yet?17:24
lakshmiSno its skipping. checked with ceilometer and they are not running it either17:25
TravTok, i was just running 'em locally to be sure.17:26
TravTRan 125 tests in 0.250s17:26
TravTPASSED (id=0, skips=28)17:26
lakshmiSbut their tests are not really running es.17:26
TravT^ sessions patch17:26
TravTi think that one looks okay17:26
TravTnot seeing any reason to hold it up at this point.17:26
lakshmiSany functional tests use fake client17:31
openstackgerritLakshmi N Sampath proposed openstack/searchlight: Fix for Property mapping for Metadef properties fails  https://review.openstack.org/22853117:44
lakshmiSsjmc7: seems like there could be a bug with glanceclient.  metadef get property in a namespace shouldn't return 'name' field but i think whenever a property is updated from glanceclient command line it is adding 'name' fields for those properties17:45
lakshmiSadded another patch. let me know if that works for you17:46
sjmc7ok, that looks like it'll work17:48
TravTlakshmiS: i'm not following this totally, but will what you are doing ensure that the data still looks like what we get out of native API (even if there are extra fields)?17:50
lakshmiSthe extra fields "name" doesnt exist when data is loaded into glance but during updates from glance client command line they are getting added17:52
lakshmiSdata from glance should look like this17:53
lakshmiS "properties": {17:53
lakshmiS            "hw_watchdog_action": {17:53
lakshmiS                "enum": [17:53
lakshmiS                    "disabled",17:53
lakshmiS                    "reset",17:53
lakshmiS                    "poweroff",17:53
lakshmiS                    "pause",17:53
lakshmiS                    "none"17:53
lakshmiS                ],17:53
lakshmiS                "type": "string",17:53
lakshmiS                "description": "For the libvirt driver, you can enable and set the behavior of a virtual hardware watchdog device for each flavor. Watchdog devices keep an eye on the guest server, and carry out the configured action, if the server hangs. The watchdog uses the i6300esb device (emulating a PCI Intel 6300ESB). If hw_watchdog_action is not specified, the watchdog is disabled. Watchdog behavior set using a specific image's prope17:53
lakshmiSrties will override behavior set using flavors.",17:53
lakshmiS                "title": "Watchdog Action"17:53
lakshmiS            }17:53
lakshmiS        }17:53
sjmc7right.. the difference is that we have to flatten that into a list of objects17:53
sjmc7so it's whether 'hw_watchdog_action' becomes 'name' or a 'property17:54
lakshmiSwhich it does during initial load but i think there might be a bug in glance client which is adding this17:54
lakshmiS "properties": {17:54
lakshmiS            "hw_watchdog_action": {17:54
lakshmiS                "name": "hw_watchdog_action",17:54
lakshmiS                "enum": [17:54
lakshmiS                    "disabled",17:54
lakshmiS                    "reset",17:54
lakshmiS                    "poweroff",17:54
lakshmiS                    "pause",17:54
lakshmiS                    "none"17:54
lakshmiS                ],17:54
lakshmiS                "type": "string",17:54
lakshmiS                "description": "For the libvirt driver, you can enable and set the behavior of a virtual hardware watchdog device for each flavor. Watchdog devices keep an eye on the guest server, and carry out the configured action, if the server hangs. The watchdog uses the i6300esb device (emulating a PCI Intel 6300ESB). If hw_watchdog_action is not specified, the watchdog is disabled. Watchdog behavior set using a specific image's prope17:54
lakshmiSrties will override behavior set using flavors.",17:54
lakshmiS                "title": "Watchdog Action"17:54
lakshmiS            }17:54
lakshmiS        }17:54
lakshmiSthere is an extra "name" field which shouldn't be there17:54
TravTokay gimme just a second to read this.  also interacting with somebody on the search panel and a magic search widget bug.17:55
lakshmiSwell if this looks complex to you guys then the other way to do fix this is to keep the "name" field and fix the listener. either way the bug on glance client doesnt go away but since we use same names its not a problem17:58
TravTlakshmiS: looking through code now.17:59
TravTlakshmiS:18:06
lakshmiSyes18:06
TravTi'm leaning towards saying we should go to name, since that is what comes out of glance client...18:06
TravTi mean no matter how we slice it this creates a data structure different than actual API, right?18:07
TravTbecause the properties objects got flattened (for search reasons, i believe)18:07
TravTwhat do you think?18:08
lakshmiSyeah i think glance client didnt flatten it the right way we wanted, so we ended with "name" field18:08
TravTwell, should we fix glance client?18:08
lakshmiSi would like to do that but not sure how long that will take18:09
lakshmiSwe might as well change ours :)18:09
TravTi'm trying to think if we'll run into issues with "name"18:09
lakshmiSi dont know if you still recollect the reason behind using "property" as the key instead of "name" but if i still remember it was done to make it more readable i guess18:10
TravTwe use "title" for display_name to align with json schema...18:10
TravTby above, do you mean that18:11
TravT    "properties": {18:11
TravT        "cpu_sockets": {18:11
TravT            "title": "vCPU Sockets",18:11
TravT            "description": "Preferred number of sockets to expose to the guest.",18:11
TravT            "type": "integer"18:11
TravT        },18:11
TravTcpu_sockets18:11
lakshmiSyes that was before flattening18:11
TravTi mean we did the metadefs structure internally to match json schema as much as possible.18:11
lakshmiSright18:12
TravTi don't even remember this flattening thing18:12
lakshmiSi think we initially did this in elasticsearch18:12
lakshmiS"properties": [18:12
lakshmiS                  {18:12
lakshmiS                     "property": "architecture",....}18:12
lakshmiSinstead of "properties": [18:12
lakshmiS                  {18:12
lakshmiS                     "name": "architecture",18:12
TravTyeah, i believe that was because then you can do a search like:      perties.name = "architecture"18:13
TravTotherwise when doing dynamic mapping, we'd end up with a field for every incoming property18:13
lakshmiSso i dont know which is better anymore. do you also think its better to have "name"?18:14
TravTcpu_sockets above would end up as its own mapped object18:14
TravTyou could then search properties.cpu_sockets.title = 'vCPU', but i'm not sure what the value is18:14
TravTi don't know why you'd ever search for that.18:15
lakshmiSno i think you are talking about having dynamic property name as field which is not what we want18:15
TravTthe property mapping as is appears to be missing some of the other fields like enum, min value, etc18:16
lakshmiSit whether we should have properties.property = "architecture" or properties.name ="architecture"18:16
TravTso, i don't understand glance client?18:16
TravTit is adding a name property?18:16
lakshmiSyeah i think thats a bug18:16
TravTmaybe wayne added that at some point18:17
lakshmiSuntil now it went undetected since we were using the same field name18:17
lakshmiSi will checkout the history18:17
lakshmiSkeeping it same as glance client is one way to look at it but more importantly how users use elasticsearch query is also important so lets decide which looks good18:18
lakshmiSproperties.property = "architecture" or properties.name ="architecture"?18:18
TravTso, objects gets the same thing18:19
lakshmiSyes18:19
TravTso, objects.name make sense18:20
lakshmiSright18:20
TravTprobably easier if properties.name18:20
TravTmore symetrical18:20
lakshmiSok lets go with it then.18:21
sjmc7sorry, my grilled cheese caught fire18:21
TravTi do think the way they both are being indexed needs the same the same treatment on the name field that is a problem for the other resource types name field.18:21
sjmc7yeah, the flattening is so you can search; the API format doesn't lend itself well to discovery18:21
TravThttps://review.openstack.org/#/c/226378/2/searchlight/elasticsearch/plugins/designate/recordsets.py18:22
lakshmiSonce we have a release, these changes will have impact on horizon18:23
TravTyes, they will.18:23
sjmc7renaming fields will, yeah18:23
TravTright now, i'm actually filtering out metadefs in the search18:23
TravTbecause there is some other problem... i'll dig into that today.18:23
lakshmiSok so vote is to keep the field as "name". will update the patch18:24
sjmc7ok. i'll test it when you're done18:24
sjmc7the fix looked good other than that confusion18:24
TravTyeah. i think so.18:24
lakshmiSyeah it uncovered a bug too18:24
TravTsjmc7: i wonder if name should be same treatment as name in other places or should stay not_analyzed.18:25
TravTit will never contain a space...18:25
TravTit actually is more like an id18:25
sjmc7it'll still get tokenized18:25
sjmc7if it's an id, it should be not_analyzed i think18:25
TravTyeah,  probably we need to do this on properties.title18:26
TravTand objects.display_name18:26
lakshmiSyeah name shouldn't be tokenized18:26
TravTso, in that case18:26
TravTis it really id?18:26
lakshmiSyes in metadef space18:26
sjmc7but... even if the field's not analyzed, some searches still won't work as you expect18:26
sjmc7we maybe need to look at this later18:27
sjmc7and come up with some advice because it is confusing. i think in general, id type fields should be non_analyzed18:28
TravTi think so as well.18:28
sjmc7even with e.g. nova servers, the 'name' field is problematic; you want to be able to do partial searches but you might also want to search for exact matches18:29
TravTthere is a part of me that wants to pull metadefs from being indexed for now.18:29
TravTi'm just not sure if there is a huge value to indexing them.  but let's at least fix the name field and i'll think a bit more on it.18:35
TravTsjmc7: lakshmiS: i have an eye doctor apt in 20 mins.  so, i'll be away for a short while.18:38
lakshmiSok18:39
TravTlakshmiS: this should be an easy review for you: https://review.openstack.org/#/c/228535/18:39
TravTi know you need to get to bed.18:39
sjmc7i feel like i need to get to bed :)18:39
lakshmiSwill check it out after my patch18:39
TravTok18:39
TravTbbiab  will try to check in on irc.18:40
openstackgerritLakshmi N Sampath proposed openstack/searchlight: Fix for Property mapping for Metadef properties fails  https://review.openstack.org/22853119:12
sjmc7lakshmiS - you want me to give that a quick go?19:14
lakshmiSforgot something to revert. one last patch19:14
sjmc7ok. let me know. i have an hour's worth of meetings in 15 minutes19:15
openstackgerritLakshmi N Sampath proposed openstack/searchlight: Fix for Property mapping for Metadef properties fails  https://review.openstack.org/22853119:15
lakshmiSok try with latest patch19:15
sjmc7will do19:15
openstackgerritMerged openstack/searchlight: Add --force when doing initial index sync  https://review.openstack.org/22853519:16
sjmc7looks good19:16
lakshmiSok19:17
sjmc7you can go to bed now :)19:18
lakshmiSttyl19:26
*** lakshmiS has quit IRC19:26
openstackgerritSteve McLellan proposed openstack/searchlight: Add additional facet fields  https://review.openstack.org/22806319:28
*** david-lyle has quit IRC20:14
openstackgerritMerged openstack/searchlight: More efficient result filtering  https://review.openstack.org/20768220:21
openstackgerritMerged openstack/searchlight: Fix for Property mapping for Metadef properties fails  https://review.openstack.org/22853120:31
openstackgerritTravis Tripp proposed openstack/searchlight: Add additional facet fields  https://review.openstack.org/22806320:40
sjmc7TravT - i was trying to reproduce 1499805 earlier without any luck. i was missing the magic step20:55
TravThey, just a sec.20:55
sjmc7i can put a patch up for that shortly, although i think a 500 if there's no mapping is actually pretty reasonable20:56
TravTon a hangout debugging magic search20:56
sjmc7good luck!20:56
TravTit would be nice if we can somehow20:56
TravTstill return some facets.20:56
TravThere's the way i got 500 to reproduce20:56
sjmc7yep. but no terms20:56
TravTbasically not have a valid mapping for a requested aggregate20:57
sjmc7yeah, i'll see what we get back20:58
*** david-lyle has joined #openstack-searchlight21:09
TravTsjmc7: did you see the other fields i mentioned on the additional facets patch?21:14
TravThttps://review.openstack.org/#/c/228063/2/searchlight/elasticsearch/plugins/nova/servers.py21:14
sjmc7yeah. sorry, i did reply but forgot the stupid review button21:14
sjmc7i can keep adding more and more but at some point i'm not sure how useful it is21:15
TravTwell, those are the last few i spotted.21:15
sjmc7ok, i can add them21:15
*** sigmavirus24 is now known as sigmavirus24_awa21:23
*** sigmavirus24_awa is now known as sigmavirus2421:23
openstackgerritSteve McLellan proposed openstack/searchlight: Correct facet error when no mapping defined  https://review.openstack.org/22863921:55
openstackgerritSteve McLellan proposed openstack/searchlight: Rename GLANCE_TEST_SOCKET_FD_STR  https://review.openstack.org/22864222:01
sjmc7you still around, TravT?22:22
TravTsjmc7: hey22:28
sjmc7busy afternoon! looking at those extra fields - i agree with the network ones, not so much with the others, but if you think there's a practical use for them i can add them22:28
sjmc7the cardinality on hostID is potentially quite large22:29
sjmc7since it's a function of host + tenant22:29
sjmc7the disk config ones i don't really know what they are, nor whether anyone would ever want to filter by them22:29
TravTthat's right... i keep forgetting about that.22:29
sjmc7i don't feel that strongly aobut it, but i don't want to add stuff for the sake of it22:30
TravTjust a sec, looking again at facet returned22:31
TravTwill vm_state always map to status?22:32
sjmc7i think so - status must be derived from it somehow22:32
sjmc7the extensions are a bit dodgy, not everyone has them22:32
TravTwell right now, i am getting a few fields back that i have no idea what to enter in the UI22:33
TravTwhich i don't think should be coming back.22:33
TravThmmm22:33
*** sigmavirus24 is now known as sigmavirus24_awa22:33
TravTno never mind on that22:33
sjmc7we can also exclude some :)  ultimately i think we may want to make these configuration driven22:33
TravTok.  let's not do the "other" ones i mentioned22:34
TravTbut go with the network ones22:34
TravTat least version22:34
sjmc7yep, i've added those. ok, got to update the tests, will push it up in a few minute22:34
TravTmaybe the IPS type isn't so interesting?22:34
sjmc7probably not22:34
sjmc7maybe you want to find any servers with floating ips tho22:35
TravTwell, i'm already getting  Networks.OS-EXT-IPS:type:22:35
TravTin the retruned facets, but no options22:35
sjmc7yep22:35
TravTthat's why i suggested providing options for it22:35
sjmc7short of providing options for everything, or excluding much more, that'll always happen22:36
TravTlet me switch from admin to demo22:36
TravTI'm thinking IPS type might be admin only as well.22:37
TravTright now it isn't22:37
sjmc7it's not just fixed/floating?22:37
TravTwell what is that giving back?  i was thinking it might be talking about the diff between fixed, vxlan, vlan, etc22:38
TravToh wait, was confusing fixed and flat22:38
sjmc7hmm..22:39
sjmc7pretty sure it's fixed v floating22:39
TravTyeah, it is22:39
TravTi suppose that is still a pretty nice query to have22:40
TravTbe able to find all servers that are using a floating ip22:40
sjmc7can't hurt22:40
TravTi'm going crazy right now... one of my monitors is flashing on and off every 5 seconds.  got to figure that out...22:41
sjmc7:D22:42
openstackgerritSteve McLellan proposed openstack/searchlight: Add additional facet fields  https://review.openstack.org/22806322:56
openstackgerritTravis Tripp proposed openstack/searchlight: Improve documentation info for devstack config  https://review.openstack.org/22866423:42

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