)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b81b4b227feb3a4a57159577aee80cce8e64f422","unresolved":false,"context_lines":[{"line_number":14,"context_line":"(router_id and l3_agent_id)."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ia541e023b757b2e77c4eec9bb1670632c7a271fa"},{"line_number":17,"context_line":"Closes-Bug: #1230323"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"AAAAW3%2F%2Fnqw%3D","line":17,"updated":"2014-04-11 17:11:05.000000000","message":"The bug reports two cases:  In the first, the router is scheduled twice to the same agent.  This patch fixes that problem.\n\nThe bug also reports that this race condition can cause the router to mistakenly be scheduled to two agents.\n\nI\u0027m not sure that we can say this closes that bug when it only fixes one of two cases.","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"ba538d2ba6e8f758385443d1ead04725b413e5fb","unresolved":false,"context_lines":[{"line_number":14,"context_line":"(router_id and l3_agent_id)."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ia541e023b757b2e77c4eec9bb1670632c7a271fa"},{"line_number":17,"context_line":"Closes-Bug: #1230323"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"AAAAW3%2F%2Fk1I%3D","line":17,"in_reply_to":"AAAAW3%2F%2Fm40%3D","updated":"2014-04-12 05:27:32.000000000","message":"Hi, in my test environment, I added haproxy to load balancing the two neutron-servers. I cannot reproduce the second problem.\n\nCould you provide any details about the second case? How did you set up the environment? What\u0027s the exact procedure to make it work?\n\nthanks a lot","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"},{"author":{"_account_id":5209,"name":"Ed Bak","email":"ed.bak2@hpe.com","username":"ed-bak2"},"change_message_id":"6d0583994214c20081389212ea481a202bcc061f","unresolved":false,"context_lines":[{"line_number":14,"context_line":"(router_id and l3_agent_id)."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ia541e023b757b2e77c4eec9bb1670632c7a271fa"},{"line_number":17,"context_line":"Closes-Bug: #1230323"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"AAAAW3%2F%2Fm40%3D","line":17,"in_reply_to":"AAAAW3%2F%2Fnqw%3D","updated":"2014-04-11 19:29:12.000000000","message":"I concur with Carl.  When I opened the bug, I did create both cases in my test environment.  If this only fixes one of the cases, then it is a step in the right direction but it doesn\u0027t fully address the original bug.","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"ba538d2ba6e8f758385443d1ead04725b413e5fb","unresolved":false,"context_lines":[{"line_number":14,"context_line":"(router_id and l3_agent_id)."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ia541e023b757b2e77c4eec9bb1670632c7a271fa"},{"line_number":17,"context_line":"Closes-Bug: #1230323"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"AAAAW3%2F%2Fk1Q%3D","line":17,"in_reply_to":"AAAAW3%2F%2Fnqw%3D","updated":"2014-04-12 05:27:32.000000000","message":"Wow, sorry for ignoring the second case. I just focused on the first case.\n\nAfter some researching, I think they are two different cases. The first one I fixed here is the related with database schema.\n\nAnd the second one, maybe it is the lock problem? Two neutron-servers processes the same request and finally schedulers on the two neutron-servers find different agents to host.","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a543bea88fdf6cd4e18ba804a7ff27dec32f8d7b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"cfg.CONF.register_opts(L3_AGENTS_SCHEDULER_OPTS)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class RouterL3AgentBinding(model_base.BASEV2):"},{"line_number":45,"context_line":"    \"\"\"Represents binding between neutron routers and L3 agents.\"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    router_id \u003d sa.Column(sa.String(36),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BY9c%3D","line":44,"updated":"2014-02-21 13:36:56.000000000","message":"it changes the data model which implies to create a migration script","commit_id":"19deb30895284ec621abbb9b7a168677a4739e0d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a543bea88fdf6cd4e18ba804a7ff27dec32f8d7b","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":48,"context_line":"                          sa.ForeignKey(\"routers.id\", ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":49,"context_line":"                          primary_key\u003dTrue)"},{"line_number":50,"context_line":"    l3_agent \u003d orm.relation(agents_db.Agent)"},{"line_number":51,"context_line":"    l3_agent_id \u003d sa.Column(sa.String(36),"},{"line_number":52,"context_line":"                            sa.ForeignKey(\"agents.id\","}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BY3k%3D","line":49,"updated":"2014-02-21 13:36:56.000000000","message":"The primary key is composed of router_id and l3_agent_id which implies the same router_id can be multiple times in RouterL3AgentBinding with different l3_agent_ids.\n\nA unique constraint on router_id column will ensure each router_id to be at most one time in RouterL3AgentBinding ?","commit_id":"19deb30895284ec621abbb9b7a168677a4739e0d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"705c31da9e9616b8236329ed716c994481c945ab","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                            sa.ForeignKey(\"agents.id\","},{"line_number":53,"context_line":"                                          ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":54,"context_line":"    sa.UniqueConstraint(\u0027router_id\u0027, name\u003d\u0027router_bind_uc\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class L3AgentSchedulerDbMixin(l3agentscheduler.L3AgentSchedulerPluginBase,"},{"line_number":58,"context_line":"                              AgentSchedulerDbMixin):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F9qE%3D","line":55,"updated":"2014-02-23 12:54:03.000000000","message":"it changes the data model which implies to create an alembic migration script.","commit_id":"ae29986c0a84f88cf3ad9239cf4420aa2c8040ba"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"daa37ad387e9af38b85fea0b3bc9d5c7b6c4f6ca","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    __table_args__ \u003d (sa.UniqueConstraint(\u0027router_id\u0027,"},{"line_number":49,"context_line":"                                          name\u003d\u0027uniq_\u0027"},{"line_number":50,"context_line":"                                          \u0027routerl3agentbindings0router_id\u0027),)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":53,"context_line":"                          sa.ForeignKey(\"routers.id\", ondelete\u003d\u0027CASCADE\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2Fqrg%3D","line":50,"updated":"2014-03-14 16:08:45.000000000","message":"I personally like more this indentation: https://github.com/openstack/neutron/blob/master/neutron/db/agents_db.py#L46","commit_id":"119d5ecab7859d3003dcf88be3645407571b6403"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"14bf531999dfcf834f78d344a2e7d721e6d85316","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":48,"context_line":"                          sa.ForeignKey(\"routers.id\", ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":49,"context_line":"                          primary_key\u003dTrue)"},{"line_number":50,"context_line":"    l3_agent \u003d orm.relation(agents_db.Agent)"},{"line_number":51,"context_line":"    l3_agent_id \u003d sa.Column(sa.String(36),"},{"line_number":52,"context_line":"                            sa.ForeignKey(\"agents.id\", ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2FLaY%3D","line":49,"updated":"2014-03-19 17:35:29.000000000","message":"if the primary_key is composed of router_id and l3_agent_id, it ensures that we can not bind multiple times a router to the same l3_agent but i does not ensure that a router is binded to at most one l3_agent ?","commit_id":"ba8636da5588caefc18aa4d88fdcf40bfbddb464"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"fc0784c3c86c70dba938e7cb90747a64c99c2958","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":48,"context_line":"                          sa.ForeignKey(\"routers.id\", ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":49,"context_line":"                          primary_key\u003dTrue)"},{"line_number":50,"context_line":"    l3_agent \u003d orm.relation(agents_db.Agent)"},{"line_number":51,"context_line":"    l3_agent_id \u003d sa.Column(sa.String(36),"},{"line_number":52,"context_line":"                            sa.ForeignKey(\"agents.id\", ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2FJ%2BU%3D","line":49,"in_reply_to":"AAAAWH%2F%2FLaY%3D","updated":"2014-03-19 21:04:06.000000000","message":"Cedric, there are some work to be able to bind a router to several agents for HA purpose, you can have a look here https://review.openstack.org/#/c/64553/ and https://review.openstack.org/#/c/66347/.","commit_id":"ba8636da5588caefc18aa4d88fdcf40bfbddb464"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"1df9c4f66e1542de13e8615463e21f3057e77460","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":48,"context_line":"                          sa.ForeignKey(\"routers.id\", ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":49,"context_line":"                          primary_key\u003dTrue)"},{"line_number":50,"context_line":"    l3_agent \u003d orm.relation(agents_db.Agent)"},{"line_number":51,"context_line":"    l3_agent_id \u003d sa.Column(sa.String(36),"},{"line_number":52,"context_line":"                            sa.ForeignKey(\"agents.id\", ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2B2bw%3D","line":49,"in_reply_to":"AAAAWH%2F%2FLaY%3D","updated":"2014-03-24 03:41:52.000000000","message":"Done","commit_id":"ba8636da5588caefc18aa4d88fdcf40bfbddb464"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"a23f23590569060b8379a4acb056ce4c9ecbed4e","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":48,"context_line":"                          sa.ForeignKey(\"routers.id\", ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":49,"context_line":"                          primary_key\u003dTrue)"},{"line_number":50,"context_line":"    l3_agent \u003d orm.relation(agents_db.Agent)"},{"line_number":51,"context_line":"    l3_agent_id \u003d sa.Column(sa.String(36),"},{"line_number":52,"context_line":"                            sa.ForeignKey(\"agents.id\", ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2FHE4%3D","line":49,"in_reply_to":"AAAAWH%2F%2FLaY%3D","updated":"2014-03-20 06:50:51.000000000","message":"Yes, it doesn\u0027t ensure a router is binded to at most one l3-agent because there\u0027s a bp l3-high-availability which enable multiple l3 agents to serve one router at the mean time using VRRP.\n\nI try to deal with the conflicts with it.","commit_id":"ba8636da5588caefc18aa4d88fdcf40bfbddb464"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"88b1bc1fb4c889426d47df4ff4deb32ffda31d6a","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":46,"context_line":"                          sa.ForeignKey(\"routers.id\", ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":47,"context_line":"                          primary_key\u003dTrue)"},{"line_number":48,"context_line":"    l3_agent \u003d orm.relation(agents_db.Agent)"},{"line_number":49,"context_line":"    l3_agent_id \u003d sa.Column(sa.String(36),"},{"line_number":50,"context_line":"                            sa.ForeignKey(\"agents.id\", ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"3ae8d1ca_0c73f515","line":47,"updated":"2014-05-28 21:57:56.000000000","message":"the bug report seems to imply that a router should be bound only to an L3 agent at any given time (or None). If this is correct, the right model for this should be to have the l3 agent as an attribute of Router, and getting rid of the binding table altogether. This fits perfectly with the centralized router case, whereas I believe that the \u0027distributed\u0027 case does not leverage the agent extension.","commit_id":"015840aff36781ee776098983dda4b93aa0caa0c"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d947ee4cd7002f8fad4bae837923d32b007ac076","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":46,"context_line":"                          sa.ForeignKey(\"routers.id\", ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":47,"context_line":"                          primary_key\u003dTrue)"},{"line_number":48,"context_line":"    l3_agent \u003d orm.relation(agents_db.Agent)"},{"line_number":49,"context_line":"    l3_agent_id \u003d sa.Column(sa.String(36),"},{"line_number":50,"context_line":"                            sa.ForeignKey(\"agents.id\", ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"3ae8d1ca_6fb1cbe0","line":47,"in_reply_to":"3ae8d1ca_0c73f515","updated":"2014-05-28 22:24:57.000000000","message":"there\u0027s a bp to implement L3 HA, which allows a router schedules to different agents.","commit_id":"015840aff36781ee776098983dda4b93aa0caa0c"}],"neutron/db/migration/alembic_migrations/versions/31d7f831a591_add_constraint_for_router_id.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"daa37ad387e9af38b85fea0b3bc9d5c7b6c4f6ca","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \u0027neutron.plugins.nec.nec_plugin.NECPluginV2\u0027,"},{"line_number":39,"context_line":"    \u0027neutron.plugins.vmware.plugin.NsxPlugin\u0027,"},{"line_number":40,"context_line":"    \u0027neutron.plugins.vmware.plugin.NsxServicePlugin\u0027,"},{"line_number":41,"context_line":"    \u0027neutron.plugins.oneconvergence.plugin.OneConvergencePluginV2\u0027,"},{"line_number":42,"context_line":"]"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"from alembic import op"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2Fqow%3D","line":41,"updated":"2014-03-14 16:08:45.000000000","message":"Shouldn\u0027t be \u0027neutron.plugins.mlnx.mlnx_plugin.MellanoxEswitchPlugin\u0027 included here as well? See https://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/versions/40b0aff0302e_mlnx_initial.py#L151","commit_id":"119d5ecab7859d3003dcf88be3645407571b6403"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"79e41a8a915dd8f0b19194a9c786871feb337733","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.nicira.NeutronPlugin.NvpPluginV2\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2Fmpw%3D","line":33,"updated":"2014-03-15 08:11:46.000000000","message":"ibm, oneconvergence, plugins are missing from this list","commit_id":"84a10f49d9e35fd44300e1442d387523cb50a15f"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"bf722c6fb7959a26da0cbb870e9d9b442457c6b5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.nicira.NeutronPlugin.NvpPluginV2\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2FlPA%3D","line":33,"in_reply_to":"AAAAWH%2F%2FlSk%3D","updated":"2014-03-16 08:05:33.000000000","message":"IBM, plumgrid, ryu, ML2... claim L3_CAPABLE and are not included in agent_scheduler migration.\nAs @enikanorov said before, IBM should be included. However, I have no idea about how to verify IBM plugins.\nAFAIK, ML2 plugin should be there. So, I issued another review case for it.\nhttps://review.openstack.org/80821\nBesides, I\u0027ll update this migration code here to include ML2 plugin.\nFor other vendor-based plugins, I cannot identify which plugin should be included or not. I just follow the agent-scheduler migration script to make sure the code is consistent.\n\n@enikanorov, @Itzik Brown, what do you think?","commit_id":"84a10f49d9e35fd44300e1442d387523cb50a15f"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"5b2a949dc3be3b7576109ee10493db7ce028d042","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.nicira.NeutronPlugin.NvpPluginV2\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2FlSk%3D","line":33,"in_reply_to":"AAAAWH%2F%2FmmA%3D","updated":"2014-03-16 07:02:10.000000000","message":"Should IBM Plugin be added to 4692d074d587_agent_scheduler ? They appears as  L3_CAPABLE in folsom_initial.","commit_id":"84a10f49d9e35fd44300e1442d387523cb50a15f"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"3ac67b7539e8ac1913b0a1ddf47de6c446602bac","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.nicira.NeutronPlugin.NvpPluginV2\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2FmmA%3D","line":33,"in_reply_to":"AAAAWH%2F%2Fmpw%3D","updated":"2014-03-15 08:46:08.000000000","message":"I grep all the migration scripts for this table. There\u0027s no IBM plugin involved. BTW, oneconvergence is at the second line from the bottom.","commit_id":"84a10f49d9e35fd44300e1442d387523cb50a15f"}],"neutron/db/migration/alembic_migrations/versions/31d7f831a591_add_constraint_for_routerid.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6053438fdd12c2403664abcddec67da154cd8423","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":57,"context_line":"        return"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    op.drop_column(TABLE_NAME, \u0027id\u0027)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    op.create_primary_key("},{"line_number":62,"context_line":"        name\u003dPK_NAME,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAWH%2F%2Bgnc%3D","line":59,"updated":"2014-03-26 09:55:26.000000000","message":"Question: Dropping this column, and then recreating, it\u0027s not going to create a problem for existing installations/bindings?.\n\nThe -1 is for this but I\u0027m unsure, I\u0027ll remove it as I get a reply.\n\nMay be we need to get all the id\u0027s, and then reuse them as router_id ?","commit_id":"b95a4804bdcf4a74721f9afa721fe58a336b40c9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5fc9338364f3ea05f64ea2bd41cd4363a609f45a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":57,"context_line":"        return"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    op.drop_column(TABLE_NAME, \u0027id\u0027)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    op.create_primary_key("},{"line_number":62,"context_line":"        name\u003dPK_NAME,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAWH%2F%2Bgjw%3D","line":59,"in_reply_to":"AAAAWH%2F%2Bgnc%3D","updated":"2014-03-26 10:00:08.000000000","message":"Ahh!, Ignore me.. removing the -1\n\nThe .id is totally useless in this table, as it\u0027s the relation table itself, nobody should be using this .id","commit_id":"b95a4804bdcf4a74721f9afa721fe58a336b40c9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"46776a75a2af85eea27e861fa535548f0ff074c6","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \u0027neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin\u0027,"},{"line_number":38,"context_line":"    \u0027neutron.plugins.nec.nec_plugin.NECPluginV2\u0027,"},{"line_number":39,"context_line":"    \u0027neutron.plugins.vmware.plugin.NsxPlugin\u0027,"},{"line_number":40,"context_line":"    \u0027neutron.plugins.vmware.plugin.NsxServicePlugin\u0027,"},{"line_number":41,"context_line":"    \u0027neutron.plugins.oneconvergence.plugin.OneConvergencePluginV2\u0027,"},{"line_number":42,"context_line":"    \u0027neutron.plugins.mlnx.mlnx_plugin.MellanoxEswitchPlugin\u0027,"},{"line_number":43,"context_line":"    \u0027neutron.plugins.ml2.plugin.Ml2Plugin\u0027,"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9xow%3D","line":40,"updated":"2014-04-02 08:34:13.000000000","message":"I don\u0027t think Nsx plugin is using the l3 agent.\nWhat is the reason for applying this migration to it?","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"13f7ef73d3dbcfb4fd56ceb5a8b4a444c3eb7211","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \u0027neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin\u0027,"},{"line_number":38,"context_line":"    \u0027neutron.plugins.nec.nec_plugin.NECPluginV2\u0027,"},{"line_number":39,"context_line":"    \u0027neutron.plugins.vmware.plugin.NsxPlugin\u0027,"},{"line_number":40,"context_line":"    \u0027neutron.plugins.vmware.plugin.NsxServicePlugin\u0027,"},{"line_number":41,"context_line":"    \u0027neutron.plugins.oneconvergence.plugin.OneConvergencePluginV2\u0027,"},{"line_number":42,"context_line":"    \u0027neutron.plugins.mlnx.mlnx_plugin.MellanoxEswitchPlugin\u0027,"},{"line_number":43,"context_line":"    \u0027neutron.plugins.ml2.plugin.Ml2Plugin\u0027,"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9pd0%3D","line":40,"in_reply_to":"AAAAWH%2F9xow%3D","updated":"2014-04-03 04:27:00.000000000","message":"Pls check the db migration revision: 4692d074d587\nI followed that migration to make sure everything is consistent.","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"551b390d7b2e09848755c6b325d7c195bcb78c98","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        type_\u003d\u0027primary\u0027"},{"line_number":76,"context_line":"    )"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    op.add_column("},{"line_number":79,"context_line":"        table_name\u003dTABLE_NAME,"},{"line_number":80,"context_line":"        column\u003dsa.Column(\u0027id\u0027,"},{"line_number":81,"context_line":"                         sa.String(36),"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9uaQ%3D","line":78,"updated":"2014-04-02 15:04:36.000000000","message":"Could you check downgrade? \nI think we will get error if table will be not empty: column \"id\" contains null values\nBecause you don\u0027t use the server_default.\nYou have to create a simple \u0027id\u0027 column, generate uuid for all rows and after mark the column as primary.","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"13f7ef73d3dbcfb4fd56ceb5a8b4a444c3eb7211","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        type_\u003d\u0027primary\u0027"},{"line_number":76,"context_line":"    )"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    op.add_column("},{"line_number":79,"context_line":"        table_name\u003dTABLE_NAME,"},{"line_number":80,"context_line":"        column\u003dsa.Column(\u0027id\u0027,"},{"line_number":81,"context_line":"                         sa.String(36),"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9pdM%3D","line":78,"in_reply_to":"AAAAWH%2F9uaQ%3D","updated":"2014-04-03 04:27:00.000000000","message":"thanks for reminding. i\u0027ll make it work.","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"be81ba1c0d2eace3a49f4f72a4cc87205ce94a71","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    )"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":71,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":72,"context_line":"        return"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAW3%2F%2Fkrk%3D","line":70,"updated":"2014-04-12 06:13:28.000000000","message":"i wonder if it\u0027s even necessary to have non-empty downgrade.\nWas id field ever used?","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"237aac326aedc2d8ec4d961ada15a2b680df1233","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    )"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":71,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":72,"context_line":"        return"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAW3%2F%2FkSg%3D","line":70,"in_reply_to":"AAAAW3%2F%2Fkrk%3D","updated":"2014-04-12 13:26:07.000000000","message":"actually, \"id\" is never used. is it possible not to provide downgrade? The downgrade of this patch doesn\u0027t make sense.","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"be81ba1c0d2eace3a49f4f72a4cc87205ce94a71","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        return"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    c \u003d get_context()"},{"line_number":75,"context_line":"    insp \u003d Inspector.from_engine(c.connection.engine)"},{"line_number":76,"context_line":"    for constraint in insp.get_foreign_keys(TABLE_NAME):"},{"line_number":77,"context_line":"        op.drop_constraint("},{"line_number":78,"context_line":"            name\u003dconstraint[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAW3%2F%2Fksg%3D","line":75,"updated":"2014-04-12 06:13:28.000000000","message":"this will not work for offline migrations, e.g. those which don\u0027t have db connection.","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"be81ba1c0d2eace3a49f4f72a4cc87205ce94a71","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        table_name\u003dTABLE_NAME,"},{"line_number":98,"context_line":"        column\u003dsa.Column(\u0027id\u0027,"},{"line_number":99,"context_line":"                         sa.String(36),"},{"line_number":100,"context_line":"                         default\u003duuidutils.generate_uuid)"},{"line_number":101,"context_line":"    )"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    metadata \u003d sa.MetaData()"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAW3%2F%2FksY%3D","line":100,"updated":"2014-04-12 06:13:28.000000000","message":"server_default should be used, not \u0027default\u0027, also, python expression/method can\u0027t be used here; it should be either a constant or sql function","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"be81ba1c0d2eace3a49f4f72a4cc87205ce94a71","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    target \u003d metadata.tables[TABLE_NAME]"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    op.execute("},{"line_number":108,"context_line":"        target.update().values({\u0027id\u0027: uuidutils.generate_uuid})"},{"line_number":109,"context_line":"    )"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    op.create_primary_key("}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAW3%2F%2Fkrw%3D","line":108,"updated":"2014-04-12 06:13:28.000000000","message":"this also will not work offline.\nneed to create constant sql query.\nI suggest something like \n UPDATE ..bindings set id \u003d UUID()\nthe problem is that this is only supported for mysql","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"944f68fdf5d843cf49d317b22a69e525d617861e","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"}],"source_content_type":"text/x-python","patch_set":30,"id":"3ae8d1ca_923be1ea","line":32,"updated":"2014-05-27 11:01:42.000000000","message":"There is a motion to make all Neutron migrations unconditional so this should probably be \u0027*\u0027 to run the migration for all plugins. Please see https://etherpad.openstack.org/p/neutron-db-migrations for details","commit_id":"ae69ea3d95eaac158233cd1fa9ba2aa23a69a49b"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"8175436462592ceb2fc58b22d07019d4497ad745","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"}],"source_content_type":"text/x-python","patch_set":30,"id":"3ae8d1ca_11124fb1","line":32,"in_reply_to":"3ae8d1ca_923be1ea","updated":"2014-05-28 04:36:10.000000000","message":"Please check the script 4692d074d587_agent_scheduler. I followed it to make sure the consistency. This is why I didn\u0027t use \u0027*\u0027.","commit_id":"ae69ea3d95eaac158233cd1fa9ba2aa23a69a49b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"88b1bc1fb4c889426d47df4ff4deb32ffda31d6a","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    op.create_primary_key("},{"line_number":61,"context_line":"        name\u003dPK_NAME,"},{"line_number":62,"context_line":"        table_name\u003dTABLE_NAME,"},{"line_number":63,"context_line":"        cols\u003d[\u0027router_id\u0027, \u0027l3_agent_id\u0027]"},{"line_number":64,"context_line":"    )"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"3ae8d1ca_6cac79a1","line":63,"updated":"2014-05-28 21:57:56.000000000","message":"what about if the table contains data that does not satisfies the PK constraints (for instances for race conditions that went undetected)? Do we expect the operator to sanitize the data beforehand? This migration sounds a bit risky to me.","commit_id":"015840aff36781ee776098983dda4b93aa0caa0c"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"21ca50a3ee612a97251bdd4ea499c6fbd43839b2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    op.create_primary_key("},{"line_number":61,"context_line":"        name\u003dPK_NAME,"},{"line_number":62,"context_line":"        table_name\u003dTABLE_NAME,"},{"line_number":63,"context_line":"        cols\u003d[\u0027router_id\u0027, \u0027l3_agent_id\u0027]"},{"line_number":64,"context_line":"    )"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"1ae5cdf2_af3013e9","line":63,"in_reply_to":"3ae8d1ca_6cac79a1","updated":"2014-06-03 05:09:44.000000000","message":"This is composite PK. Only duplicate entries will violate this constraint. AFAIK, it is not that risky.","commit_id":"015840aff36781ee776098983dda4b93aa0caa0c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"744fc8998e4770b02d4533ff1c798493f46e35ea","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    # Remove all the duplicate entries"},{"line_number":59,"context_line":"    context \u003d op.get_context()"},{"line_number":60,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027postgresql\u0027:"},{"line_number":61,"context_line":"        op.execute(\u0027DELETE FROM %(table)s WHERE id in (\u0027"},{"line_number":62,"context_line":"                   \u0027SELECT %(table)s.id FROM %(table)s LEFT OUTER JOIN \u0027"},{"line_number":63,"context_line":"                   \u0027(SELECT MIN(id) as id, router_id, l3_agent_id \u0027"},{"line_number":64,"context_line":"                   \u0027FROM %(table)s GROUP BY router_id, l3_agent_id) AS temp \u0027"}],"source_content_type":"text/x-python","patch_set":40,"id":"1ae5cdf2_75fe9a06","line":61,"updated":"2014-06-27 03:59:58.000000000","message":"There has been a lot of churn on these sql statements since I last reviewed this patch.  I can\u0027t say that I\u0027m totally comfortable with them in the current state.  How do I know they\u0027ve settled?  Could you add comments to the previous patch sets about what was wrong with those queries, how you discovered the error and why the next iteration is an improvement.\n\nAlso, can I suggest that you use some indentation to show the structure.  These are somewhat complex queries and they\u0027re difficult to parse in their current form.","commit_id":"889cd6bd84f7b6de8912e0a0a3b6475a8d886ea2"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"596b93975d896661a82869992f5c99f69b2ed30a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    # Remove all the duplicate entries"},{"line_number":59,"context_line":"    context \u003d op.get_context()"},{"line_number":60,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027postgresql\u0027:"},{"line_number":61,"context_line":"        op.execute(\u0027DELETE FROM %(table)s WHERE id in (\u0027"},{"line_number":62,"context_line":"                   \u0027SELECT %(table)s.id FROM %(table)s LEFT OUTER JOIN \u0027"},{"line_number":63,"context_line":"                   \u0027(SELECT MIN(id) as id, router_id, l3_agent_id \u0027"},{"line_number":64,"context_line":"                   \u0027FROM %(table)s GROUP BY router_id, l3_agent_id) AS temp \u0027"}],"source_content_type":"text/x-python","patch_set":40,"id":"1ae5cdf2_55127efd","line":61,"in_reply_to":"1ae5cdf2_75fe9a06","updated":"2014-06-27 04:16:04.000000000","message":"In Patch #33, someone suggest to sanitize the data beforehand when some data in db has already violated the PK constraints.\n\nThis sql statement is to search and remove all the duplicate records before migration to new schema. Due to the nature of postgresql and mysql, I have to write different statements.\n\nI\u0027ll try to make it comfortable.\n\nThanks for your comments.","commit_id":"889cd6bd84f7b6de8912e0a0a3b6475a8d886ea2"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"0ee9fae5d1bb3bf5693a6e3e54e8d6afb7d1ca8c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.nicira.NeutronPlugin.NvpPluginV2\u0027,"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_40095730","line":33,"updated":"2014-07-01 15:18:43.000000000","message":"is it not a full core plugin list?","commit_id":"fac471d08888dd1c96b3d5486b33c0a8393727ce"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"8f85ccd71f1fb374db2e17c267e4123865b5c4c3","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.nicira.NeutronPlugin.NvpPluginV2\u0027,"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_b6811ac5","line":33,"in_reply_to":"baada198_40095730","updated":"2014-07-04 12:14:34.000000000","message":"I just follow 4692d074d587_agent_scheduler.py. If it is not full, the above script needs to be fixed too. How can I verify if the full core plugin list is present?","commit_id":"fac471d08888dd1c96b3d5486b33c0a8393727ce"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"3e1091c42b395d8b9ef25fbd2653632c5e896bd1","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.nicira.NeutronPlugin.NvpPluginV2\u0027,"},{"line_number":37,"context_line":"    \u0027neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin\u0027,"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_86f9c8ca","line":34,"updated":"2014-07-01 15:19:52.000000000","message":"ibm plugin seems to be missing","commit_id":"fac471d08888dd1c96b3d5486b33c0a8393727ce"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"b47bd4cf389ca1774a8fec025ee1c615ac9a0889","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"}],"source_content_type":"text/x-python","patch_set":44,"id":"baada198_83818bfd","line":32,"updated":"2014-07-17 14:05:46.000000000","message":"Since we moved to non-conditional migrations, this is not needed anymore. You can also remove L55","commit_id":"2ca905aa832fa44e646e20140cefb75670c31af0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0f865dd809c2f99405faebfe3db3815cba930422","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":66,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_9b26b614","line":66,"updated":"2014-07-22 07:19:00.000000000","message":"Empty downgrade will break upgrade-downgrade-upgrade flow. Not sure if we should support such cases. I\u0027d like to know other reviewer\u0027s opinions on this","commit_id":"9faa4b29f8e351254948a0a5eb289f6fdf501866"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"118604103adfbdddf8aa015b190207ce9acfe6dc","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":66,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_eed60053","line":66,"in_reply_to":"baada198_18a45a4a","updated":"2014-07-22 12:15:03.000000000","message":"Wow, didn\u0027t notice that. I\u0027ll fix that soon. Thanks.","commit_id":"9faa4b29f8e351254948a0a5eb289f6fdf501866"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"1d9673f6edffb09219d50abb51fb2143d1c78dd3","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":66,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_f84a46ac","line":66,"in_reply_to":"baada198_9b26b614","updated":"2014-07-22 11:44:46.000000000","message":"Hi Oleg, thanks for your reviewing. You can first check b65aa907aec_set_length_of_protocol_field.py and 33c3db036fe4_set_length_of_description_field_metering.py. I found some cases that doesn\u0027t support downgrade action. If this is really not allowed, I think these cases also need fix.","commit_id":"9faa4b29f8e351254948a0a5eb289f6fdf501866"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"a97a24cc1194dffeb74fc64502ff447680d34f76","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":66,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_18a45a4a","line":66,"in_reply_to":"baada198_f84a46ac","updated":"2014-07-22 11:51:45.000000000","message":"In this migrations set_length_of_description_field_metering and set_length_of_protocol_field is used \u0027alter_column\u0027 which will not arise any errors. Here is errors that will be after running upgrade-downgrade-upgrade http://paste.openstack.org/show/87553/","commit_id":"9faa4b29f8e351254948a0a5eb289f6fdf501866"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7c3d3268461176dcba25349711903576de0ac48a","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    op.drop_constraint("},{"line_number":72,"context_line":"        name\u003d\u0027routerl3agentbindings_ibfk_1\u0027,"},{"line_number":73,"context_line":"        table_name\u003dTABLE_NAME,"},{"line_number":74,"context_line":"        type_\u003d\u0027foreignkey\u0027"},{"line_number":75,"context_line":"    )"},{"line_number":76,"context_line":"    op.drop_constraint("},{"line_number":77,"context_line":"        name\u003d\u0027routerl3agentbindings_ibfk_2\u0027,"}],"source_content_type":"text/x-python","patch_set":49,"id":"baada198_7eaf659d","line":74,"updated":"2014-07-25 11:25:07.000000000","message":"Downgrade failed for PostgreSQL. http://paste.openstack.org/show/88137/","commit_id":"ea40a289e6c94490f7453fc08565b4a6f73c092b"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"c4659b3f8c783a7c2b7ec5d8b24279b490f54cad","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    op.drop_constraint("},{"line_number":72,"context_line":"        name\u003d\u0027routerl3agentbindings_ibfk_1\u0027,"},{"line_number":73,"context_line":"        table_name\u003dTABLE_NAME,"},{"line_number":74,"context_line":"        type_\u003d\u0027foreignkey\u0027"},{"line_number":75,"context_line":"    )"},{"line_number":76,"context_line":"    op.drop_constraint("},{"line_number":77,"context_line":"        name\u003d\u0027routerl3agentbindings_ibfk_2\u0027,"}],"source_content_type":"text/x-python","patch_set":49,"id":"baada198_2eedbc25","line":74,"in_reply_to":"baada198_7eaf659d","updated":"2014-07-25 12:44:14.000000000","message":"Thanks. The constraint name is different for PostgreSQL.","commit_id":"ea40a289e6c94490f7453fc08565b4a6f73c092b"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"7c3d3268461176dcba25349711903576de0ac48a","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        TABLE_NAME,"},{"line_number":90,"context_line":"        sa.Column(\u0027id\u0027,"},{"line_number":91,"context_line":"                  sa.String(32),"},{"line_number":92,"context_line":"                  default\u003duuidutils.generate_uuid)"},{"line_number":93,"context_line":"    )"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    op.create_foreign_key("}],"source_content_type":"text/x-python","patch_set":49,"id":"baada198_5367fa24","line":92,"updated":"2014-07-25 11:25:07.000000000","message":"There is no use to add \u0027default\u0027 there. It does not mean anything in migration.","commit_id":"ea40a289e6c94490f7453fc08565b4a6f73c092b"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"c4659b3f8c783a7c2b7ec5d8b24279b490f54cad","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        TABLE_NAME,"},{"line_number":90,"context_line":"        sa.Column(\u0027id\u0027,"},{"line_number":91,"context_line":"                  sa.String(32),"},{"line_number":92,"context_line":"                  default\u003duuidutils.generate_uuid)"},{"line_number":93,"context_line":"    )"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    op.create_foreign_key("}],"source_content_type":"text/x-python","patch_set":49,"id":"baada198_aeaaaccf","line":92,"in_reply_to":"baada198_5367fa24","updated":"2014-07-25 12:44:14.000000000","message":"Done","commit_id":"ea40a289e6c94490f7453fc08565b4a6f73c092b"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"8e4bb4fa9d68aac040cb86dd8870a01f79f06697","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            name\u003d\u0027routerl3agentbindings_ibfk_2\u0027,"},{"line_number":91,"context_line":"            table_name\u003dTABLE_NAME,"},{"line_number":92,"context_line":"            type_\u003d\u0027foreignkey\u0027"},{"line_number":93,"context_line":"        )"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    op.drop_constraint("},{"line_number":96,"context_line":"        name\u003dPK_NAME,"}],"source_content_type":"text/x-python","patch_set":50,"id":"baada198_95c24f84","line":93,"updated":"2014-07-25 14:51:25.000000000","message":"I suggest to do some refactor:\n\nfk_names \u003d {\u0027mysql\u0027: [\u0027routerl3agentbindings_ibfk_1\u0027, \u0027routerl3agentbindings_ibfk_2\u0027],\n            \u0027posrgresql\u0027: [...]}\n\n    def _drop_consratints(dialect, names):\n         for fk in names[dialect]:\n              op.drop_constarint(name\u003dfk, table_name\u003dTABLE_NAME,             \n                                 type_\u003d\u0027foreignkey\u0027)\n\nthen use it in downgrade _drop_consraints(context.bind.dialect.name, fk_names)\n\nAnd the same for creating foreign keys.","commit_id":"1bb3ee74b7d387c3dafed1d53ac95288e2fa464f"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d444caf26c3ef8fee18531f9de805cc170043f03","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            name\u003d\u0027routerl3agentbindings_ibfk_2\u0027,"},{"line_number":91,"context_line":"            table_name\u003dTABLE_NAME,"},{"line_number":92,"context_line":"            type_\u003d\u0027foreignkey\u0027"},{"line_number":93,"context_line":"        )"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    op.drop_constraint("},{"line_number":96,"context_line":"        name\u003dPK_NAME,"}],"source_content_type":"text/x-python","patch_set":50,"id":"baada198_d62cbc4c","line":93,"in_reply_to":"baada198_95c24f84","updated":"2014-07-26 00:11:38.000000000","message":"Thanks for your suggestion. However, I wonder if it is necessary.\n\nFor drop fk constraints, it seems easy to understand. But for create foreign keys, the names have its order to apply to different column. You cannot specify a certain loop as what you suggested above. Instead, you need to define a sophisticated dict to store all the parameters, like\n\n\u0027mysql\u0027: {\u0027name\u0027: routerl3agentbindings_ibfk_1,\n          \u0027source\u0027: TABLE_NAME,\n          \u0027referent\u0027: routers,\n          ...}\n\n\u0027postgresql\u0027: {...}\n\nAs this solution is not general for other migration scripts, I think the current implementation seems clearer. It only has two foreign keys and will not have more.\n\nWhat do you think?","commit_id":"1bb3ee74b7d387c3dafed1d53ac95288e2fa464f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"c1c92a031b8b19f9b03ff031d6b55fb361c4a9e9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"PK_NAME \u003d \u0027pk_routerl3agentbindings\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"fk_names \u003d {\u0027postgresql\u0027: {\u0027router_id\u0027: \u0027routerl3agentbindings_router_id_fkey\u0027,"},{"line_number":37,"context_line":"                           \u0027l3_agent_id\u0027: \u0027routerl3agentbindings_l3_agent_id_fkey\u0027},"},{"line_number":38,"context_line":"            \u0027mysql\u0027: {\u0027router_id\u0027: \u0027routerl3agentbindings_ibfk_2\u0027,"},{"line_number":39,"context_line":"                      \u0027l3_agent_id\u0027: \u0027routerl3agentbindings_ibfk_1\u0027}}"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"baada198_bc77179e","line":37,"updated":"2014-07-28 06:04:13.000000000","message":"The line is too long.","commit_id":"dc090fd3aa8a27078a68290748d2753a97d876ba"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"2a3eddfc8215589127d8d20f2a1e29dd9ee45436","unresolved":false,"context_lines":[{"line_number":34,"context_line":"PK_NAME \u003d \u0027pk_routerl3agentbindings\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"fk_names \u003d {\u0027postgresql\u0027: {\u0027router_id\u0027: \u0027routerl3agentbindings_router_id_fkey\u0027,"},{"line_number":37,"context_line":"                           \u0027l3_agent_id\u0027: \u0027routerl3agentbindings_l3_agent_id_fkey\u0027},"},{"line_number":38,"context_line":"            \u0027mysql\u0027: {\u0027router_id\u0027: \u0027routerl3agentbindings_ibfk_2\u0027,"},{"line_number":39,"context_line":"                      \u0027l3_agent_id\u0027: \u0027routerl3agentbindings_ibfk_1\u0027}}"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"baada198_5c8fdbcc","line":37,"in_reply_to":"baada198_bc77179e","updated":"2014-07-28 06:31:18.000000000","message":"Done","commit_id":"dc090fd3aa8a27078a68290748d2753a97d876ba"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"090d178d5303d8e23fb72aa79d4fbf596dc29370","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":54,"id":"baada198_49771cd4","line":1,"updated":"2014-07-28 08:11:33.000000000","message":"no vim comment please.","commit_id":"4031de43c7d34e83fb38f0df942025e6039037f0"}],"neutron/scheduler/l3_agent_scheduler.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a543bea88fdf6cd4e18ba804a7ff27dec32f8d7b","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"                context.session.flush()"},{"line_number":158,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":159,"context_line":"                # The current router has been scheduled."},{"line_number":160,"context_line":"                # Nothing to be done here."},{"line_number":161,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BY2o%3D","line":158,"updated":"2014-02-21 13:36:56.000000000","message":"Only append if a router is allocated multiple times to the same l3_agent","commit_id":"19deb30895284ec621abbb9b7a168677a4739e0d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"705c31da9e9616b8236329ed716c994481c945ab","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"                context.session.flush()"},{"line_number":158,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":159,"context_line":"                # The current router has been scheduled."},{"line_number":160,"context_line":"                # Nothing to be done here."},{"line_number":161,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F9n0%3D","line":158,"updated":"2014-02-23 12:54:03.000000000","message":"you would prefer to log when DuplicateEntry appends","commit_id":"ae29986c0a84f88cf3ad9239cf4420aa2c8040ba"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"705c31da9e9616b8236329ed716c994481c945ab","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":159,"context_line":"                # The current router has been scheduled."},{"line_number":160,"context_line":"                # Nothing to be done here."},{"line_number":161,"context_line":"                pass"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"            LOG.debug(_(\u0027Router %(router_id)s is scheduled to \u0027"},{"line_number":164,"context_line":"                        \u0027L3 agent %(agent_id)s\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F9nw%3D","line":161,"updated":"2014-02-23 12:54:03.000000000","message":"pass is the correct behavior (just asking)","commit_id":"ae29986c0a84f88cf3ad9239cf4420aa2c8040ba"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"705c31da9e9616b8236329ed716c994481c945ab","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                # Nothing to be done here."},{"line_number":161,"context_line":"                pass"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"            LOG.debug(_(\u0027Router %(router_id)s is scheduled to \u0027"},{"line_number":164,"context_line":"                        \u0027L3 agent %(agent_id)s\u0027),"},{"line_number":165,"context_line":"                      {\u0027router_id\u0027: router_id,"},{"line_number":166,"context_line":"                       \u0027agent_id\u0027: chosen_agent.id})"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F9qA%3D","line":163,"updated":"2014-02-23 12:54:03.000000000","message":"this log must be inside the try block","commit_id":"ae29986c0a84f88cf3ad9239cf4420aa2c8040ba"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"dd5c3031724f37c8690a70404ddbc7e3621a789e","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                binding \u003d l3_agentschedulers_db.RouterL3AgentBinding()"},{"line_number":154,"context_line":"                binding.l3_agent \u003d chosen_agent"},{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"                context.session.flush()"},{"line_number":158,"context_line":"                LOG.debug(_(\u0027Router %(router_id)s is scheduled to L3 agent\u0027"},{"line_number":159,"context_line":"                            \u0027 %(agent_id)s\u0027), {\u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2Fw%2FM%3D","line":156,"updated":"2014-02-28 12:48:17.000000000","message":"Please consider using session.merge() to add-or-create a binding. In that case catching DBDuplicateEntry may be unnecessary","commit_id":"e2ebf5084d7de92bbb5cb99c52a8b4d2e67b7c9c"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"9f1527c41c6875686cedcecb1bc76117c292573a","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            context.session.merge(binding)"},{"line_number":155,"context_line":"            context.session.flush()"},{"line_number":156,"context_line":"            LOG.debug(_(\u0027Router %(router_id)s is scheduled to L3 agent\u0027"},{"line_number":157,"context_line":"                        \u0027 %(agent_id)s\u0027), {\u0027router_id\u0027: router_id,"},{"line_number":158,"context_line":"                                           \u0027agent_id\u0027: chosen_agent.id})"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVX%2F%2Fwzo%3D","line":157,"updated":"2014-02-28 13:21:34.000000000","message":"sorry for picking on really minor nit: could you please move the space to the end of previous line? Usually spaces go at the and so new line doesn\u0027t start with it.","commit_id":"58099e9850f8a7fc767ec47a9778e62f59ff6830"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e6093ed7c75b6617b34a330414ab3ee9a94c5b9b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            binding.l3_agent \u003d chosen_agent"},{"line_number":153,"context_line":"            binding.router_id \u003d router_id"},{"line_number":154,"context_line":"            context.session.merge(binding)"},{"line_number":155,"context_line":"            context.session.flush()"},{"line_number":156,"context_line":"            LOG.debug(_(\u0027Router %(router_id)s is scheduled to L3 agent \u0027"},{"line_number":157,"context_line":"                        \u0027%(agent_id)s\u0027), {\u0027router_id\u0027: router_id,"},{"line_number":158,"context_line":"                                          \u0027agent_id\u0027: chosen_agent.id})"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAVn%2F%2FNWY%3D","line":155,"updated":"2014-03-07 16:22:17.000000000","message":"Is there specific reason for calling flush() explicitly? Note that it\u0027s called before commit() when exiting context.","commit_id":"1f245408ce984f0e0c38f085f3a2a1e92f2d432a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"daa37ad387e9af38b85fea0b3bc9d5c7b6c4f6ca","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.merge(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.warn(_(\u0027Agent %s already present\u0027), chosen_agent)"},{"line_number":159,"context_line":"            return"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        LOG.debug(_(\u0027Router %(router_id)s is scheduled to L3 agent \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2Fqjo%3D","line":158,"updated":"2014-03-14 16:08:45.000000000","message":"Isn\u0027t this misleading? If I understand correctly this happens when router with given id is already in database. If scheduler chooses different agent, you get false information on what agent is already chosen for given router. Or am I missing something?","commit_id":"119d5ecab7859d3003dcf88be3645407571b6403"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"79e41a8a915dd8f0b19194a9c786871feb337733","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                binding.l3_agent \u003d chosen_agent"},{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.merge(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.warn(_(\u0027Router %s has been already scheduled.\u0027), router_id)"},{"line_number":159,"context_line":"            return"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2FmpM%3D","line":157,"updated":"2014-03-15 08:11:46.000000000","message":"that exception will not be raised by merge (and that\u0027s the point of using merge)","commit_id":"84a10f49d9e35fd44300e1442d387523cb50a15f"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"3ac67b7539e8ac1913b0a1ddf47de6c446602bac","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                binding.l3_agent \u003d chosen_agent"},{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.merge(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.warn(_(\u0027Router %s has been already scheduled.\u0027), router_id)"},{"line_number":159,"context_line":"            return"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2FmmI%3D","line":157,"in_reply_to":"AAAAWH%2F%2FmpM%3D","updated":"2014-03-15 08:46:08.000000000","message":"really? I commented out this try-except and run the unittest and it will raise this exception.\n\nTraceback (most recent call last):\n  File \"neutron/neutron/tests/unit/test_l3_schedulers.py\", line 160, in test_bind_existing_router\n    self._test_schedule_bind_router(self.agent1, router)\n...\nraise exception.DBDuplicateEntry(columns, integrity_error)","commit_id":"84a10f49d9e35fd44300e1442d387523cb50a15f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"46776a75a2af85eea27e861fa535548f0ff074c6","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                binding \u003d l3_agentschedulers_db.RouterL3AgentBinding()"},{"line_number":154,"context_line":"                binding.l3_agent \u003d chosen_agent"},{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.merge(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.warn(_(\u0027Router %s has been already scheduled.\u0027), router_id)"},{"line_number":159,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9xkI%3D","line":156,"updated":"2014-04-02 08:34:13.000000000","message":"as binding is not a persistent object before the commit I don\u0027t think there\u0027s any difference between add and merge, is it?","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"13f7ef73d3dbcfb4fd56ceb5a8b4a444c3eb7211","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                binding \u003d l3_agentschedulers_db.RouterL3AgentBinding()"},{"line_number":154,"context_line":"                binding.l3_agent \u003d chosen_agent"},{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.merge(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.warn(_(\u0027Router %s has been already scheduled.\u0027), router_id)"},{"line_number":159,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9pc4%3D","line":156,"in_reply_to":"AAAAWH%2F9xkI%3D","updated":"2014-04-03 04:27:00.000000000","message":"yes.","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"46776a75a2af85eea27e861fa535548f0ff074c6","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.merge(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.warn(_(\u0027Router %s has been already scheduled.\u0027), router_id)"},{"line_number":159,"context_line":"            return"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        LOG.debug(_(\u0027Router %(router_id)s is scheduled to L3 agent \u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9xms%3D","line":158,"updated":"2014-04-02 08:34:13.000000000","message":"probably this is better logged with INFO","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"13f7ef73d3dbcfb4fd56ceb5a8b4a444c3eb7211","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.merge(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.warn(_(\u0027Router %s has been already scheduled.\u0027), router_id)"},{"line_number":159,"context_line":"            return"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        LOG.debug(_(\u0027Router %(router_id)s is scheduled to L3 agent \u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9pc0%3D","line":158,"in_reply_to":"AAAAWH%2F9xms%3D","updated":"2014-04-03 04:27:00.000000000","message":"ok","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"be81ba1c0d2eace3a49f4f72a4cc87205ce94a71","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                binding \u003d l3_agentschedulers_db.RouterL3AgentBinding()"},{"line_number":154,"context_line":"                binding.l3_agent \u003d chosen_agent"},{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.info(_(\u0027Router %s has been already scheduled.\u0027), router_id)"},{"line_number":159,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAW3%2F%2Fkrg%3D","line":156,"updated":"2014-04-12 06:13:28.000000000","message":"I suggest using merge() method instead of add. It should help to avoid DBDuplicateEntry","commit_id":"fb0812942912afaf901816cbcd5849eaa3726fd9"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"944f68fdf5d843cf49d317b22a69e525d617861e","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.info(_(\u0027Router %s has been already scheduled.\u0027), router_id)"},{"line_number":159,"context_line":"            return"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        LOG.debug(_(\u0027Router %(router_id)s is scheduled to L3 agent \u0027"}],"source_content_type":"text/x-python","patch_set":30,"id":"3ae8d1ca_cd122e58","line":158,"updated":"2014-05-27 11:01:42.000000000","message":"Better to add also agent_id to the message","commit_id":"ae69ea3d95eaac158233cd1fa9ba2aa23a69a49b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b87e230f0a1256ca1d4065b163abe08145caff7","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.info(_(\u0027Failed to schedule to L3 agent %(agent_id)s as \u0027"},{"line_number":159,"context_line":"                       \u0027router %(router_id)s has been already scheduled.\u0027),"},{"line_number":160,"context_line":"                     {\u0027agent_id\u0027: chosen_agent.id,"},{"line_number":161,"context_line":"                      \u0027router_id\u0027: router_id})"}],"source_content_type":"text/x-python","patch_set":32,"id":"3ae8d1ca_6189feea","line":158,"updated":"2014-05-28 09:05:14.000000000","message":"Consider \u0027Router %(router_id)s has already been scheduled to L3 agent %(agent_id)s\u0027 to make it more clear","commit_id":"2990fdbca2385984225dbb4fbd57e721eaadd530"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"860faccc4ede61009296ad5a6faa00db6da8ed2c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.info(_(\u0027Failed to schedule to L3 agent %(agent_id)s as \u0027"},{"line_number":159,"context_line":"                       \u0027router %(router_id)s has been already scheduled.\u0027),"},{"line_number":160,"context_line":"                     {\u0027agent_id\u0027: chosen_agent.id,"},{"line_number":161,"context_line":"                      \u0027router_id\u0027: router_id})"}],"source_content_type":"text/x-python","patch_set":32,"id":"3ae8d1ca_2cc0cd4f","line":158,"in_reply_to":"3ae8d1ca_6189feea","updated":"2014-05-28 09:18:15.000000000","message":"Done","commit_id":"2990fdbca2385984225dbb4fbd57e721eaadd530"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"60a15cf3edddbc06b21bcd4c10872db30cda70db","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.info(_(\u0027Router %(router_id)s has been already scheduled \u0027"},{"line_number":159,"context_line":"                       \u0027to L3 agent %(agent_id)s.\u0027),"},{"line_number":160,"context_line":"                     {\u0027agent_id\u0027: chosen_agent.id,"},{"line_number":161,"context_line":"                      \u0027router_id\u0027: router_id})"}],"source_content_type":"text/x-python","patch_set":34,"id":"1ae5cdf2_27c36358","line":158,"updated":"2014-06-10 10:42:23.000000000","message":"Nit: I\u0027d use debug level here. The information is not so useful for an operator","commit_id":"44739a47befba65125ddef472a6c0025d222ecf8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7a4503cc9fa68187fdead0833645ffd8716e8114","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.info(_(\u0027Router %(router_id)s has been already scheduled \u0027"},{"line_number":159,"context_line":"                       \u0027to L3 agent %(agent_id)s.\u0027),"},{"line_number":160,"context_line":"                     {\u0027agent_id\u0027: chosen_agent.id,"},{"line_number":161,"context_line":"                      \u0027router_id\u0027: router_id})"}],"source_content_type":"text/x-python","patch_set":34,"id":"1ae5cdf2_2ef6b78f","line":158,"in_reply_to":"1ae5cdf2_27c36358","updated":"2014-06-11 04:33:16.000000000","message":"+1","commit_id":"44739a47befba65125ddef472a6c0025d222ecf8"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"355ab6ed673e2e94b04fa295a6e6c63a2125827f","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.info(_(\u0027Router %(router_id)s has been already scheduled \u0027"},{"line_number":159,"context_line":"                       \u0027to L3 agent %(agent_id)s.\u0027),"},{"line_number":160,"context_line":"                     {\u0027agent_id\u0027: chosen_agent.id,"},{"line_number":161,"context_line":"                      \u0027router_id\u0027: router_id})"}],"source_content_type":"text/x-python","patch_set":34,"id":"1ae5cdf2_581b7772","line":158,"in_reply_to":"1ae5cdf2_2ef6b78f","updated":"2014-06-13 03:42:17.000000000","message":"Done","commit_id":"44739a47befba65125ddef472a6c0025d222ecf8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a4bba4e7df0cfa1efe394bf1e1141e8dc2cb8939","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                binding.router_id \u003d router_id"},{"line_number":156,"context_line":"                context.session.add(binding)"},{"line_number":157,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":158,"context_line":"            LOG.debug(_(\u0027Router %(router_id)s has been already scheduled \u0027"},{"line_number":159,"context_line":"                        \u0027to L3 agent %(agent_id)s.\u0027),"},{"line_number":160,"context_line":"                      {\u0027agent_id\u0027: chosen_agent.id,"},{"line_number":161,"context_line":"                       \u0027router_id\u0027: router_id})"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_7be02d26","line":158,"updated":"2014-06-13 04:27:13.000000000","message":"Debug statements shouldn\u0027t be translated.\n\nCan you change \"has been already\" to \"has already been\"?","commit_id":"97a49ca599c1e9f1315f81fe69a28772c29057d4"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e942c6818dc5a2c31b3dffba20d5a3a5a246bf1f","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                      \u0027to L3 agent %(agent_id)s.\u0027,"},{"line_number":158,"context_line":"                      {\u0027agent_id\u0027: chosen_agent.id,"},{"line_number":159,"context_line":"                       \u0027router_id\u0027: router_id})"},{"line_number":160,"context_line":"            return"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        LOG.debug(\u0027Router %(router_id)s is scheduled to L3 agent \u0027"},{"line_number":163,"context_line":"                  \u0027%(agent_id)s\u0027, {\u0027router_id\u0027: router_id,"}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_ca5be584","line":160,"updated":"2014-07-29 12:04:01.000000000","message":"Here could be \u0027else\u0027 clause instead but this is ok too.","commit_id":"fbc6b991a79a147bf1411b643f5c304062e5956a"}],"neutron/tests/unit/test_l3_schedulers.py":[{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"8a21b02bdfcb1e222a0080414a65f2d156d2a71f","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        router \u003d self._make_router(self.fmt,"},{"line_number":150,"context_line":"                                   tenant_id\u003dstr(uuid.uuid4()),"},{"line_number":151,"context_line":"                                   name\u003d\u0027r1\u0027)"},{"line_number":152,"context_line":"        self._test_schedule_bind_router(self.agent1, router)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def test_bind_existing_router(self):"},{"line_number":155,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAWH%2F%2BhPA%3D","line":152,"updated":"2014-03-26 08:22:26.000000000","message":"In this position we cannot to understand that a binding router is unique. I think you have to check \"self.assertEqual(0, flog.call_count)\"","commit_id":"c0dd69c1b12909a1e552e347af759740f396e507"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"68490a785834c43ba62794e5731daf138e4004e3","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def _test_schedule_bind_router(self, agent, router):"},{"line_number":134,"context_line":"        # disable one agent to force the scheduling to the only one."},{"line_number":135,"context_line":"        self._set_l3_agent_admin_state(self.adminContext,"},{"line_number":136,"context_line":"                                       self.agent_id2, False)"},{"line_number":137,"context_line":"        ctx \u003d self.adminContext"},{"line_number":138,"context_line":"        session \u003d ctx.session"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAWH%2F%2BD44%3D","line":135,"updated":"2014-03-31 08:07:32.000000000","message":"why is \u0027agent\u0027 parameter needed if then disabling self.agent2 explicitly? - seems \u0027agent\u0027 will always be agent1.","commit_id":"507d0aa6c394b72a997699042fe1a8518bf4fd35"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"46776a75a2af85eea27e861fa535548f0ff074c6","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        super(L3SchedulerTestCase, self).setUp(plugin\u003dDB_PLUGIN_KLASS,"},{"line_number":84,"context_line":"                                               ext_mgr\u003dext_mgr)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        db.configure_db()"},{"line_number":87,"context_line":"        self.adminContext \u003d q_context.get_admin_context()"},{"line_number":88,"context_line":"        self.addCleanup(db.clear_db)"},{"line_number":89,"context_line":"        self.plugin \u003d manager.NeutronManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9xho%3D","line":86,"updated":"2014-04-02 08:34:13.000000000","message":"why did this call become necessary?","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"13f7ef73d3dbcfb4fd56ceb5a8b4a444c3eb7211","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        super(L3SchedulerTestCase, self).setUp(plugin\u003dDB_PLUGIN_KLASS,"},{"line_number":84,"context_line":"                                               ext_mgr\u003dext_mgr)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        db.configure_db()"},{"line_number":87,"context_line":"        self.adminContext \u003d q_context.get_admin_context()"},{"line_number":88,"context_line":"        self.addCleanup(db.clear_db)"},{"line_number":89,"context_line":"        self.plugin \u003d manager.NeutronManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAWH%2F9pdU%3D","line":86,"in_reply_to":"AAAAWH%2F9xho%3D","updated":"2014-04-03 04:27:00.000000000","message":"wow, I followed test_dhcp_scheduler.py to build this tests.\nI\u0027ll check and clean up unnecessary codes.","commit_id":"66912b23e518b5b0da5c795bd170698ba2844ad1"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"944f68fdf5d843cf49d317b22a69e525d617861e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                               ext_mgr\u003dext_mgr)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        self.adminContext \u003d q_context.get_admin_context()"},{"line_number":87,"context_line":"        self.addCleanup(db.clear_db)"},{"line_number":88,"context_line":"        self.plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":89,"context_line":"        self._register_l3_agents()"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"3ae8d1ca_4d745e9c","line":87,"updated":"2014-05-27 11:01:42.000000000","message":"db.clear_db() is already in test_db_plugin.NeutronDbPluginV2TestCase.tearDown()","commit_id":"ae69ea3d95eaac158233cd1fa9ba2aa23a69a49b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"944f68fdf5d843cf49d317b22a69e525d617861e","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        agent_db \u003d self.plugin.get_agents_db(self.adminContext,"},{"line_number":105,"context_line":"                                             filters\u003d{\u0027host\u0027: [HOST]})"},{"line_number":106,"context_line":"        self.agent_id2 \u003d agent_db[0].id"},{"line_number":107,"context_line":"        self.agent2 \u003d agent_db[0]"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _set_l3_agent_admin_state(self, context, agent_id, state\u003dTrue):"},{"line_number":110,"context_line":"        update \u003d {\u0027agent\u0027: {\u0027admin_state_up\u0027: state}}"}],"source_content_type":"text/x-python","patch_set":30,"id":"3ae8d1ca_adf882e6","line":107,"updated":"2014-05-27 11:01:42.000000000","message":"where is it used?","commit_id":"ae69ea3d95eaac158233cd1fa9ba2aa23a69a49b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"944f68fdf5d843cf49d317b22a69e525d617861e","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        rid \u003d router[\u0027router\u0027][\u0027id\u0027]"},{"line_number":139,"context_line":"        scheduler.bind_router(ctx, rid, agent)"},{"line_number":140,"context_line":"        results \u003d (session.query(db).filter_by(router_id\u003drid).all())"},{"line_number":141,"context_line":"        self.assertEqual(len(results), 1)"},{"line_number":142,"context_line":"        self.assertEqual(agent.id, results[0].l3_agent_id)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def test_bind_new_router(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"3ae8d1ca_2dbb920f","line":141,"updated":"2014-05-27 11:01:42.000000000","message":"technically a router might be scheduled to different agents so this assertion seems not logically correct","commit_id":"ae69ea3d95eaac158233cd1fa9ba2aa23a69a49b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b87e230f0a1256ca1d4065b163abe08145caff7","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        scheduler.bind_router(ctx, rid, agent)"},{"line_number":137,"context_line":"        results \u003d (session.query(db).filter_by(router_id\u003drid).all())"},{"line_number":138,"context_line":"        self.assertTrue(len(results) \u003e 0)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def test_bind_new_router(self):"},{"line_number":141,"context_line":"        router \u003d self._make_router(self.fmt,"},{"line_number":142,"context_line":"                                   tenant_id\u003dstr(uuid.uuid4()),"}],"source_content_type":"text/x-python","patch_set":32,"id":"3ae8d1ca_c1065220","line":139,"updated":"2014-05-28 09:05:14.000000000","message":"consider adding \n self.assertIn(agent.id, [bind.l3_agent_id for bind in results])","commit_id":"2990fdbca2385984225dbb4fbd57e721eaadd530"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"860faccc4ede61009296ad5a6faa00db6da8ed2c","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        scheduler.bind_router(ctx, rid, agent)"},{"line_number":137,"context_line":"        results \u003d (session.query(db).filter_by(router_id\u003drid).all())"},{"line_number":138,"context_line":"        self.assertTrue(len(results) \u003e 0)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def test_bind_new_router(self):"},{"line_number":141,"context_line":"        router \u003d self._make_router(self.fmt,"},{"line_number":142,"context_line":"                                   tenant_id\u003dstr(uuid.uuid4()),"}],"source_content_type":"text/x-python","patch_set":32,"id":"3ae8d1ca_ac921d55","line":139,"in_reply_to":"3ae8d1ca_c1065220","updated":"2014-05-28 09:18:15.000000000","message":"Done","commit_id":"2990fdbca2385984225dbb4fbd57e721eaadd530"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"60a15cf3edddbc06b21bcd4c10872db30cda70db","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                                   name\u003d\u0027r1\u0027)"},{"line_number":145,"context_line":"        with mock.patch.object(l3_agent_scheduler.LOG, \u0027info\u0027) as flog:"},{"line_number":146,"context_line":"            self._test_schedule_bind_router(self.agent1, router)"},{"line_number":147,"context_line":"            self.assertEqual(0, flog.call_count)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_bind_existing_router(self):"},{"line_number":150,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":34,"id":"1ae5cdf2_a738533e","line":147,"updated":"2014-06-10 10:42:23.000000000","message":"I don\u0027t think it\u0027s very useful to check that the log is called. It doesn\u0027t imply that the method is working.","commit_id":"44739a47befba65125ddef472a6c0025d222ecf8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7a4503cc9fa68187fdead0833645ffd8716e8114","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                                   name\u003d\u0027r1\u0027)"},{"line_number":145,"context_line":"        with mock.patch.object(l3_agent_scheduler.LOG, \u0027info\u0027) as flog:"},{"line_number":146,"context_line":"            self._test_schedule_bind_router(self.agent1, router)"},{"line_number":147,"context_line":"            self.assertEqual(0, flog.call_count)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_bind_existing_router(self):"},{"line_number":150,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":34,"id":"1ae5cdf2_ce3e338b","line":147,"in_reply_to":"1ae5cdf2_79c5fe3b","updated":"2014-06-11 04:33:16.000000000","message":"To expound a bit...  These tests depend on the distinction between debug and info log levels which is a bit obscure.  Technically, in the current form, it does confirm that the correct code path was taken.  However, given Rossella\u0027s suggestion to change the level to debug -- which I agree with -- this test method cannot be used.  Herein lies the problem.\n\nI\u0027m not sure what to suggest.  You could maybe capture what string log is called with and look for \"already scheduled\".  Just a thought.","commit_id":"44739a47befba65125ddef472a6c0025d222ecf8"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"ff7aaa917885b957e9d73944e6a6b0ccc26acf7e","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                                   name\u003d\u0027r1\u0027)"},{"line_number":145,"context_line":"        with mock.patch.object(l3_agent_scheduler.LOG, \u0027info\u0027) as flog:"},{"line_number":146,"context_line":"            self._test_schedule_bind_router(self.agent1, router)"},{"line_number":147,"context_line":"            self.assertEqual(0, flog.call_count)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_bind_existing_router(self):"},{"line_number":150,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":34,"id":"1ae5cdf2_79c5fe3b","line":147,"in_reply_to":"1ae5cdf2_a738533e","updated":"2014-06-10 16:42:20.000000000","message":"I agree with Rossella.","commit_id":"44739a47befba65125ddef472a6c0025d222ecf8"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"355ab6ed673e2e94b04fa295a6e6c63a2125827f","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                                   name\u003d\u0027r1\u0027)"},{"line_number":145,"context_line":"        with mock.patch.object(l3_agent_scheduler.LOG, \u0027info\u0027) as flog:"},{"line_number":146,"context_line":"            self._test_schedule_bind_router(self.agent1, router)"},{"line_number":147,"context_line":"            self.assertEqual(0, flog.call_count)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_bind_existing_router(self):"},{"line_number":150,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":34,"id":"1ae5cdf2_f8ac43a1","line":147,"in_reply_to":"1ae5cdf2_ce3e338b","updated":"2014-06-13 03:42:17.000000000","message":"Still not sure how to catch the code path correctly right now. I\u0027ll figure it out.","commit_id":"44739a47befba65125ddef472a6c0025d222ecf8"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"60a15cf3edddbc06b21bcd4c10872db30cda70db","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        self._test_schedule_bind_router(self.agent1, router)"},{"line_number":154,"context_line":"        with mock.patch.object(l3_agent_scheduler.LOG, \u0027info\u0027) as flog:"},{"line_number":155,"context_line":"            self._test_schedule_bind_router(self.agent1, router)"},{"line_number":156,"context_line":"            self.assertEqual(1, flog.call_count)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"class L3AgentChanceSchedulerTestCase(L3SchedulerTestCase):"}],"source_content_type":"text/x-python","patch_set":34,"id":"1ae5cdf2_27728311","line":156,"updated":"2014-06-10 10:42:23.000000000","message":"Same here.","commit_id":"44739a47befba65125ddef472a6c0025d222ecf8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a4bba4e7df0cfa1efe394bf1e1141e8dc2cb8939","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        rid \u003d router[\u0027router\u0027][\u0027id\u0027]"},{"line_number":136,"context_line":"        scheduler.bind_router(ctx, rid, agent)"},{"line_number":137,"context_line":"        results \u003d (session.query(db).filter_by(router_id\u003drid).all())"},{"line_number":138,"context_line":"        self.assertTrue(len(results) \u003e 0)"},{"line_number":139,"context_line":"        self.assertIn(agent.id, [bind.l3_agent_id for bind in results])"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def test_bind_new_router(self):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_fbcb5da1","line":138,"updated":"2014-06-13 04:27:13.000000000","message":"self.assertTrue(results)","commit_id":"97a49ca599c1e9f1315f81fe69a28772c29057d4"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a4bba4e7df0cfa1efe394bf1e1141e8dc2cb8939","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            self._test_schedule_bind_router(self.agent1, router)"},{"line_number":147,"context_line":"            self.assertEqual(1, flog.call_count)"},{"line_number":148,"context_line":"            args, kwargs \u003d flog.call_args"},{"line_number":149,"context_line":"            self.assertTrue(\u0027is scheduled\u0027 in args[0])"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def test_bind_existing_router(self):"},{"line_number":152,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_db56a1cd","line":149,"updated":"2014-06-13 04:27:13.000000000","message":"The following will give a slightly more useful error message if it fails.\n\nself.assertIn(\u0027is scheduled\u0027, args[0])","commit_id":"97a49ca599c1e9f1315f81fe69a28772c29057d4"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a4bba4e7df0cfa1efe394bf1e1141e8dc2cb8939","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            self._test_schedule_bind_router(self.agent1, router)"},{"line_number":158,"context_line":"            self.assertEqual(1, flog.call_count)"},{"line_number":159,"context_line":"            args, kwargs \u003d flog.call_args"},{"line_number":160,"context_line":"            self.assertTrue(\u0027has been already scheduled\u0027 in args[0])"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"class L3AgentChanceSchedulerTestCase(L3SchedulerTestCase):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_9b07b9c9","line":160,"updated":"2014-06-13 04:27:13.000000000","message":"self.assertIn(\u0027has been already scheduled\u0027, args[0])","commit_id":"97a49ca599c1e9f1315f81fe69a28772c29057d4"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"0ee9fae5d1bb3bf5693a6e3e54e8d6afb7d1ca8c","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        rid \u003d router[\u0027router\u0027][\u0027id\u0027]"},{"line_number":136,"context_line":"        scheduler.bind_router(ctx, rid, agent)"},{"line_number":137,"context_line":"        results \u003d (session.query(db).filter_by(router_id\u003drid).all())"},{"line_number":138,"context_line":"        self.assertTrue(len(results) \u003e 0)"},{"line_number":139,"context_line":"        self.assertIn(agent.id, [bind.l3_agent_id for bind in results])"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def test_bind_new_router(self):"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_e648c45d","line":138,"updated":"2014-07-01 15:18:43.000000000","message":"nit: assertTrue(results)","commit_id":"fac471d08888dd1c96b3d5486b33c0a8393727ce"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e942c6818dc5a2c31b3dffba20d5a3a5a246bf1f","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        rid \u003d router[\u0027router\u0027][\u0027id\u0027]"},{"line_number":136,"context_line":"        scheduler.bind_router(ctx, rid, agent)"},{"line_number":137,"context_line":"        results \u003d (session.query(db).filter_by(router_id\u003drid).all())"},{"line_number":138,"context_line":"        self.assertTrue(len(results) \u003e 0)"},{"line_number":139,"context_line":"        self.assertIn(agent.id, [bind.l3_agent_id for bind in results])"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def test_bind_new_router(self):"}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_2aa62155","line":138,"updated":"2014-07-29 12:04:01.000000000","message":"self.assertTrue(results)","commit_id":"fbc6b991a79a147bf1411b643f5c304062e5956a"}]}
