)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"cf30285dc9879163cb12f7d3c8814704673e3c13","unresolved":false,"context_lines":[{"line_number":9,"context_line":"A mis-match between the networkdhcpbindings table and the agents table"},{"line_number":10,"context_line":"as described in [1] can lead to get_dhcp_agents_hosting_networks"},{"line_number":11,"context_line":"trying to find the heartbeat of a non-existing dhcp-agent.  This is"},{"line_number":12,"context_line":"fatal and stops all dhcp-agents working."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change proposes checking the validity of the dhcp-agent found for"},{"line_number":15,"context_line":"a network before looking for it\u0027s heartbeat."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_8a3cdee2","line":12,"updated":"2014-12-03 12:06:15.000000000","message":"not sure how this stops dhcp agents","commit_id":"6b41de4f9e40d40f21633208f6acb4f20524e3ac"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"2e9da41b5710999923d75c981074c49db20db32a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"A mis-match between the networkdhcpbindings table and the agents table"},{"line_number":10,"context_line":"as described in [1] can lead to get_dhcp_agents_hosting_networks"},{"line_number":11,"context_line":"trying to find the heartbeat of a non-existing dhcp-agent.  This is"},{"line_number":12,"context_line":"fatal and stops all dhcp-agents working."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change proposes checking the validity of the dhcp-agent found for"},{"line_number":15,"context_line":"a network before looking for it\u0027s heartbeat."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_1e949435","line":12,"in_reply_to":"5a890539_8a3cdee2","updated":"2014-12-03 21:31:05.000000000","message":"---\n2014-12-02 20:53:21.139 17097 INFO neutron.agent.dhcp_agent [-] Synchronizing state\n2014-12-02 20:53:21.487 17097 ERROR neutron.agent.dhcp_agent [-] Unable to sync network state.\n---\n\nSo it doesn\u0027t synchronize and start up all the dnsmasq\u0027s on the remote end","commit_id":"6b41de4f9e40d40f21633208f6acb4f20524e3ac"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"61cf8c6f6254164a5fc6aa77e7957a11f9c0d2e7","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change proposes checking the validity of the dhcp-agent found for"},{"line_number":15,"context_line":"a network before looking for it\u0027s heartbeat."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"[1] https://bugzilla.redhat.com/show_bug.cgi?id\u003d1170017"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I071c26e76b01c719bb4eed9159465565513ce9cf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_76796292","line":17,"updated":"2014-12-03 10:49:35.000000000","message":"Should be a bug filed in neutron.","commit_id":"6b41de4f9e40d40f21633208f6acb4f20524e3ac"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"2e9da41b5710999923d75c981074c49db20db32a","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change proposes checking the validity of the dhcp-agent found for"},{"line_number":15,"context_line":"a network before looking for it\u0027s heartbeat."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"[1] https://bugzilla.redhat.com/show_bug.cgi?id\u003d1170017"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I071c26e76b01c719bb4eed9159465565513ce9cf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_beaaa06e","line":17,"in_reply_to":"5a890539_4af3d672","updated":"2014-12-03 21:31:05.000000000","message":"Done","commit_id":"6b41de4f9e40d40f21633208f6acb4f20524e3ac"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"cf30285dc9879163cb12f7d3c8814704673e3c13","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change proposes checking the validity of the dhcp-agent found for"},{"line_number":15,"context_line":"a network before looking for it\u0027s heartbeat."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"[1] https://bugzilla.redhat.com/show_bug.cgi?id\u003d1170017"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I071c26e76b01c719bb4eed9159465565513ce9cf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_4af3d672","line":17,"in_reply_to":"5a890539_76796292","updated":"2014-12-03 12:06:15.000000000","message":"+1","commit_id":"6b41de4f9e40d40f21633208f6acb4f20524e3ac"}],"neutron/db/agentschedulers_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"cf30285dc9879163cb12f7d3c8814704673e3c13","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        if active is not None:"},{"line_number":120,"context_line":"            query \u003d (query.filter(agents_db.Agent.admin_state_up \u003d\u003d active))"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # bindings have been seen to get out of sync, hence the check"},{"line_number":123,"context_line":"        # for binding.dhcp_agent existence."},{"line_number":124,"context_line":"        return [binding.dhcp_agent"},{"line_number":125,"context_line":"                for binding in query"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_cd0fe02c","line":122,"updated":"2014-12-03 12:06:15.000000000","message":"how can it happen given ondelete\u003d\u0027CASCADE\u0027 for dhcp_agent_id in NetworkDhcpAgentBinding?","commit_id":"6b41de4f9e40d40f21633208f6acb4f20524e3ac"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"717fe247fa862a3916e42fed1940e81e05befd5a","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        # bindings have been seen to get out of sync, hence the check"},{"line_number":123,"context_line":"        # for binding.dhcp_agent existence."},{"line_number":124,"context_line":"        return [binding.dhcp_agent"},{"line_number":125,"context_line":"                for binding in query"},{"line_number":126,"context_line":"                if binding.dhcp_agent and"},{"line_number":127,"context_line":"                AgentSchedulerDbMixin.is_eligible_agent(active,"},{"line_number":128,"context_line":"                                                        binding.dhcp_agent)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_85d81f1f","line":125,"updated":"2014-12-04 07:07:09.000000000","message":"something stinks here. \n\nThe \u0027joinedload\u0027 option should protect us here by getting all of the joined records from the DB at once so there shouldn\u0027t be a race (between grabbing the bindings, an agent delete, and the read of binding.dhcp_agent) here.\n\nSo the real issue seems to be that your DB stopped enforcing foreign-key constraints. That DB model hasn\u0027t changed since 2013[1] so I don\u0027t think you should be impacted by any migrations changing constraints on these agents.\n\nWe need to get to the reason why your SQL server didn\u0027t enforce the cascade deletion on the foreign relationship. Otherwise this fix is just sort of sweeping some bigger problem under the rug that could show up anywhere else we depend on cascading deletions.\n\nCan you list the table relationships on your dhcp binding table?\n\n1. https://github.com/openstack/neutron/blame/master/neutron/db/agentschedulers_db.py#L47","commit_id":"bc58f11f1c13b72c99069c8d765f5791b4380b54"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"511069821152a453dec9a19397721a6d0f587979","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        # bindings have been seen to get out of sync, hence the check"},{"line_number":123,"context_line":"        # for binding.dhcp_agent existence."},{"line_number":124,"context_line":"        return [binding.dhcp_agent"},{"line_number":125,"context_line":"                for binding in query"},{"line_number":126,"context_line":"                if binding.dhcp_agent and"},{"line_number":127,"context_line":"                AgentSchedulerDbMixin.is_eligible_agent(active,"},{"line_number":128,"context_line":"                                                        binding.dhcp_agent)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_1b5ab91d","line":125,"in_reply_to":"5a890539_85d81f1f","updated":"2014-12-04 19:35:46.000000000","message":"Ian, I agree with Kevin. This change hides a potentially important issue. I assume you can\u0027t reproduce the bug, failing that, I don\u0027t think we should introduce this change unless we understand what is the underlying cause.","commit_id":"bc58f11f1c13b72c99069c8d765f5791b4380b54"}]}
