)]}'
{"octavia/api/v2/controllers/pool.py":[{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"ed2d37f0137148e8fc099787c1fe87fa06af6e75","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            # pool object returned contains the listener id, which is supposed"},{"line_number":254,"context_line":"            # to be obtained from the listener table that gets updated on the"},{"line_number":255,"context_line":"            # method. This ensure the provider received this information"},{"line_number":256,"context_line":"            if listener_id:"},{"line_number":257,"context_line":"                provider_pool.listener_id \u003d listener_id"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"            # Dispatch to the driver"},{"line_number":260,"context_line":"            LOG.info(\"Sending create Pool %s to provider %s\","}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_270680cf","line":257,"range":{"start_line":256,"start_character":0,"end_line":257,"end_character":55},"updated":"2018-09-25 02:05:28.000000000","message":"Sorry, I ask a question here, is that the issue hits in default_pool association case? If so, then the pool_dict will contain the listener_id in default_pool association, then we get the listener_id from pool_dict, and call _validate_create_pool with listener_id, which is not None, then it will create success and there must be a listener_id in provider_pool obj. Also based on your storyboard, please help us to know when it doesn\u0027t contain the listener_id. It\u0027s so hard to understand what case can hit your problem. Thanks, ;-)","commit_id":"ce133c83a5c04067a550f33239b3ee80441c2d26"},{"author":{"_account_id":21041,"name":"Yossi Boaron","email":"yossi.boaron.dev@gmail.com","username":"yboaron"},"change_message_id":"ad25c8cad975042fe6cfc12d5a141cfd50ffaa2a","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            # pool object returned contains the listener id, which is supposed"},{"line_number":254,"context_line":"            # to be obtained from the listener table that gets updated on the"},{"line_number":255,"context_line":"            # method. This ensure the provider received this information"},{"line_number":256,"context_line":"            if listener_id:"},{"line_number":257,"context_line":"                provider_pool.listener_id \u003d listener_id"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"            # Dispatch to the driver"},{"line_number":260,"context_line":"            LOG.info(\"Sending create Pool %s to provider %s\","}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_b43f4021","line":257,"range":{"start_line":256,"start_character":0,"end_line":257,"end_character":55},"in_reply_to":"3f79a3b5_270680cf","updated":"2018-10-04 15:13:47.000000000","message":"Hi ZhaoBo,\n\nAssuming that by \u0027default_pool\u0027 you meant to [1] the optional default_pool id that specified in listener creation, so this is not our case.\n\nWe are trying to create LB with provider set to OVN. Our case is as follows:\n1. creating LB\n2. create Listener (attached to LB)\n3. create pool (pointing to the listener from step#2)\n4. create members\nThe use case is detailed described at [2]\n\nAfter investigating the case, it seems that the root cause for that was that \u0027provider_pool.listener_id\u0027 was not always set, and ovn-provider code [3] is not able to associate the pool to the right listener.\n\nI hope this made things a bit more clear.\n\n\nI hope that this helps\n[1] https://developer.openstack.org/api-ref/load-balancer/v2/#create-listener\n\n[2]https://bugs.launchpad.net/networking-ovn/+bug/1792317\n\n[3] https://github.com/openstack/networking-ovn/blob/master/networking_ovn/octavia/ovn_driver.py","commit_id":"ce133c83a5c04067a550f33239b3ee80441c2d26"},{"author":{"_account_id":21041,"name":"Yossi Boaron","email":"yossi.boaron.dev@gmail.com","username":"yboaron"},"change_message_id":"385c52626996809119d4945254795dca2698e80a","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            # pool object returned contains the listener id, which is supposed"},{"line_number":254,"context_line":"            # to be obtained from the listener table that gets updated on the"},{"line_number":255,"context_line":"            # method. This ensure the provider received this information"},{"line_number":256,"context_line":"            if listener_id:"},{"line_number":257,"context_line":"                provider_pool.listener_id \u003d listener_id"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"            # Dispatch to the driver"},{"line_number":260,"context_line":"            LOG.info(\"Sending create Pool %s to provider %s\","}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_da6a9aea","line":257,"range":{"start_line":256,"start_character":0,"end_line":257,"end_character":55},"in_reply_to":"3f79a3b5_270680cf","updated":"2018-10-11 11:55:36.000000000","message":"I\u0027d manage to reproduce it using CLI script in Devstack environment.\nThis is how I reproduced it in my Devstack env:\n\n1. I first add LOG to print pool.listener_id at:\n\nhttps://github.com/openstack/octavia/blob/master/octavia/api/drivers/amphora_driver/driver.py#L115\nAnd restart o-api service\n\n2. I run the following bash script in Devstack environment:\n\n#!/usr/bin/env bash\n\nfor i in ‘seq 1 10’;\ndo\n    openstack loadbalancer create --name test1_lb  --vip-subnet-id  private-subnet\n    sleep 120\n    openstack loadbalancer listener create --protocol TCP   --protocol-port 80 --name test1_listener  test1_lb\n    sleep 5\n   openstack loadbalancer pool create --name test1_pool --protocol TCP   --lb-algorithm ROUND_ROBIN --listener     test1_listener\n   sleep 5\n   openstack loadbalancer delete --cascade  test1_lb\n   sleep 20\ndone\n\n\nI’d noticed that sometimes pool.listener_id  is not specified, although it was provided in the pool create command.\n\nZhaoBo, I will highly appreciate if u can check this steps on your environment.\n\nThanks in advance\nYossi","commit_id":"ce133c83a5c04067a550f33239b3ee80441c2d26"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"abe29eb697dc111f65fbe393710b108e840cfe2a","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            # pool object returned contains the listener id, which is supposed"},{"line_number":254,"context_line":"            # to be obtained from the listener table that gets updated on the"},{"line_number":255,"context_line":"            # method. This ensure the provider received this information"},{"line_number":256,"context_line":"            if listener_id:"},{"line_number":257,"context_line":"                provider_pool.listener_id \u003d listener_id"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"            # Dispatch to the driver"},{"line_number":260,"context_line":"            LOG.info(\"Sending create Pool %s to provider %s\","}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_ff848c5f","line":257,"range":{"start_line":256,"start_character":0,"end_line":257,"end_character":55},"in_reply_to":"3f79a3b5_270680cf","updated":"2018-09-25 06:21:38.000000000","message":"I\u0027m not sure what extra information I can add, as I don\u0027t have a clear understanding of why this is (sometimes) happening. What I can assure you is that the next call contains the listener_id:\n           db_pool \u003d self._validate_create_pool(\n                lock_session, pool_dict, listener_id)\n\nBut the returned object does not include it. What\u0027s more, I narrowed it down to this:\nhttps://github.com/openstack/octavia/blob/master/octavia/db/repositories.py#L222-L225\n\nThere, even though lines 222-224 get executed (therefore setting the default_pool_id, the subsequent call in line 225 does not retrieve that information when obtaining the pool object from the database","commit_id":"ce133c83a5c04067a550f33239b3ee80441c2d26"}]}
