)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c6fce321f123176c9e87b9c44938d8cffa97a583","unresolved":true,"context_lines":[{"line_number":13,"context_line":"disable automatic scheduling of new BGP speakers on DrAgents,"},{"line_number":14,"context_line":"and  rescheduling in case of DrAgent failure, so the speaker"},{"line_number":15,"context_line":"is bound to the same DrAgent, even if the the agent is down."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I5364749e7a4009230a8b8174ad599cf40a24f415"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"67b4d879_8409c643","line":16,"updated":"2021-10-25 10:14:25.000000000","message":"Is there any LP bug opened for that? If so, please add it here as a reference. If not, please maybe open one and add it here too :)","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"0750bbc35fdf081ce0ff2682aa56aceebd341533","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9bffd00a_e596d3dc","updated":"2021-10-16 06:51:44.000000000","message":"After looking at this a bit more, I\u0027m wondering whether it would be better to create a new scheduler, maybe called StaticScheduler, that schedules speakers to agents only based on what it is being told via the API. That would require some work to refactor a couple of things, but in the end I think it could even become the default scheduler and we could possibly deprecate the others.\n\nIs there any use case for setting one of the two new variables but not the other?","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"514dd6ba92364fd08ca2dcfd62838da694db68aa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"f92a6156_973ffb1c","updated":"2021-10-25 09:34:02.000000000","message":"The more I look the more broken this whole automatic scheduling seems to me. So I\u0027ll go ahead with doing a static option and possibly even deprecating the other ones unless someone explains their use case to me.","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c04db50e58b44338fdd936401ec0c89ae1edd294","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"fda7a7cc_dd1cc1ba","updated":"2021-11-19 14:26:33.000000000","message":"https://review.opendev.org/c/openstack/neutron-dynamic-routing/+/815265 for StaticScheduler is merged now, could you please check if that covers your usecase?","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"053fa2cf49070926292da5f34d50db7e526b7ea1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4ec58a65_47cbc4ce","updated":"2021-10-25 15:26:11.000000000","message":"https://review.opendev.org/c/openstack/neutron-dynamic-routing/+/815265 is my alternative approach, which I think is both easier and cleaner","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"},{"author":{"_account_id":33249,"name":"Renat Nurgaliyev","email":"renat@rnu.one","username":"rnurgaliyev"},"change_message_id":"10aa4f45583d2c46957d59f8a1d404061de65775","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"5349f0be_fe8e9b15","in_reply_to":"4ec58a65_47cbc4ce","updated":"2021-11-01 09:19:29.000000000","message":"I believe that StaticScheduler is a very nice and clean approach, and I would abandon my change in favor of it.","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"},{"author":{"_account_id":33249,"name":"Renat Nurgaliyev","email":"renat@rnu.one","username":"rnurgaliyev"},"change_message_id":"7d1bfc6a3793cfb3a73d7f6987d8a58072bcedec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"fc168842_d5040bcc","in_reply_to":"fda7a7cc_dd1cc1ba","updated":"2021-12-02 17:21:59.000000000","message":"I have tested StaticScheduler, it works perfectly for me. Thanks!","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"}],"neutron_dynamic_routing/db/bgp_dragentscheduler_db.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c6fce321f123176c9e87b9c44938d8cffa97a583","unresolved":true,"context_lines":[{"line_number":42,"context_line":"                \u0027.bgp_dragent_scheduler.ChanceScheduler\u0027,"},{"line_number":43,"context_line":"        help\u003d_(\u0027Driver used for scheduling BGP speakers to BGP DrAgent\u0027)),"},{"line_number":44,"context_line":"    cfg.BoolOpt("},{"line_number":45,"context_line":"        \u0027allow_automatic_dragent_failover\u0027,"},{"line_number":46,"context_line":"        default\u003dTrue,"},{"line_number":47,"context_line":"        help\u003d_(\u0027Automatically remove BGP speakers from offline DrAgents.\u0027)),"},{"line_number":48,"context_line":"    cfg.BoolOpt("}],"source_content_type":"text/x-python","patch_set":3,"id":"a4779ada_d9c806ac","line":45,"updated":"2021-10-25 10:14:25.000000000","message":"this is inline with e.g. similar options for L3 agent https://github.com/openstack/neutron/blob/6d8e830859cd4ac9708701b8e344fdc68cbcaebb/neutron/conf/db/l3_agentschedulers_db.py#L27 which is good IMO","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c6fce321f123176c9e87b9c44938d8cffa97a583","unresolved":true,"context_lines":[{"line_number":46,"context_line":"        default\u003dTrue,"},{"line_number":47,"context_line":"        help\u003d_(\u0027Automatically remove BGP speakers from offline DrAgents.\u0027)),"},{"line_number":48,"context_line":"    cfg.BoolOpt("},{"line_number":49,"context_line":"        \u0027allow_automatic_bgp_speaker_scheduling\u0027,"},{"line_number":50,"context_line":"        default\u003dTrue,"},{"line_number":51,"context_line":"        help\u003d_(\u0027Automatically schedule new BGP speakers on DrAgents.\u0027))"},{"line_number":52,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"d95503b7_eb5e20f3","line":49,"updated":"2021-10-25 10:14:25.000000000","message":"maybe You could name this one like \"bgp_speaker_auto_schedule\" to also make it inline with L3 agent\u0027s config option https://github.com/openstack/neutron/blob/6d8e830859cd4ac9708701b8e344fdc68cbcaebb/neutron/conf/db/l3_agentschedulers_db.py#L25 ?","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"514dd6ba92364fd08ca2dcfd62838da694db68aa","unresolved":true,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def reschedule_bgp_speaker(self, context, bgp_speaker_id):"},{"line_number":169,"context_line":"        dragent \u003d self.get_dragents_hosting_bgp_speakers("},{"line_number":170,"context_line":"            context, [bgp_speaker_id])[0]"},{"line_number":171,"context_line":"        bgp_speaker \u003d self.get_bgp_speaker(context, bgp_speaker_id)"},{"line_number":172,"context_line":"        dragent_id \u003d dragent.id"},{"line_number":173,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":3,"id":"61bbe180_d7906727","line":170,"range":{"start_line":170,"start_character":38,"end_line":170,"end_character":41},"updated":"2021-10-25 09:34:02.000000000","message":"This is one of the reasons for the observed bug. reschedule_resources_from_down_agents() finds an agent that is down, but doesn\u0027t pass the ID of the down agent into this function. Instead, it removes the BGP speaker from the first agent that it discovers, which is simply wrong in case e.g. the second agent goes down.","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"514dd6ba92364fd08ca2dcfd62838da694db68aa","unresolved":true,"context_lines":[{"line_number":176,"context_line":"            self.schedule_bgp_speaker(context, bgp_speaker)"},{"line_number":177,"context_line":"        new_dragents \u003d self.get_dragents_hosting_bgp_speakers("},{"line_number":178,"context_line":"            context, [bgp_speaker_id])"},{"line_number":179,"context_line":"        if new_dragents \u003d\u003d [] or new_dragents[0].id \u003d\u003d dragent.id:"},{"line_number":180,"context_line":"            raise bgp_dras_ext.BgpSpeakerRescheduleError("},{"line_number":181,"context_line":"                bgp_speaker_id\u003dbgp_speaker_id,"},{"line_number":182,"context_line":"                failure_reason\u003d\"no eligible dr agent found\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"8fdd0a55_016e78a8","line":179,"range":{"start_line":179,"start_character":33,"end_line":179,"end_character":65},"updated":"2021-10-25 09:34:02.000000000","message":"This check then prevents the speaker from being scheduled to the agent that it was just removed from, leaving it only scheduled to the down agent (unless there are more than two agents).","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"}],"neutron_dynamic_routing/services/bgp/bgp_plugin.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c6fce321f123176c9e87b9c44938d8cffa97a583","unresolved":true,"context_lines":[{"line_number":58,"context_line":"        if cfg.CONF.allow_automatic_dragent_failover:"},{"line_number":59,"context_line":"            self.add_periodic_dragent_status_check()"},{"line_number":60,"context_line":"        else:"},{"line_number":61,"context_line":"            LOG.info(\"Skipping periodic DrAgent status check because \""},{"line_number":62,"context_line":"                     \"automatic rescheduling is disabled.\")"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def get_plugin_type(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"2cff1fa2_f2084ba8","line":61,"range":{"start_line":61,"start_character":16,"end_line":61,"end_character":20},"updated":"2021-10-25 10:14:25.000000000","message":"IMO debug level would be enough here.","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"}],"neutron_dynamic_routing/services/bgp/scheduler/bgp_dragent_scheduler.py":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"514dd6ba92364fd08ca2dcfd62838da694db68aa","unresolved":true,"context_lines":[{"line_number":35,"context_line":"from neutron_dynamic_routing.services.bgp.common import constants as bgp_consts"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":38,"context_line":"BGP_SPEAKER_PER_DRAGENT \u003d 1"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class BgpDrAgentFilter(base_resource_filter.BaseResourceFilter):"}],"source_content_type":"text/x-python","patch_set":3,"id":"135b0bdf_e621fd04","line":38,"updated":"2021-10-25 09:34:02.000000000","message":"The second part of the bug likely could also fixed by making this configurable to something \u003e1.","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c6fce321f123176c9e87b9c44938d8cffa97a583","unresolved":true,"context_lines":[{"line_number":133,"context_line":"        if cfg.CONF.allow_automatic_bgp_speaker_scheduling:"},{"line_number":134,"context_line":"            registry.subscribe(self.schedule_bgp_speaker_callback,"},{"line_number":135,"context_line":"                            dr_resources.BGP_SPEAKER,"},{"line_number":136,"context_line":"                            events.AFTER_CREATE)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def schedule_all_unscheduled_bgp_speakers(self, context):"},{"line_number":139,"context_line":"        \"\"\"Call schedule_unscheduled_bgp_speakers for all hosts."}],"source_content_type":"text/x-python","patch_set":3,"id":"750e376b_31600c5d","line":136,"updated":"2021-10-25 10:14:25.000000000","message":"nit: please align L135 and 136 to the L134","commit_id":"0eb0178263b80e1ee86ddff134a87ce1c5662d7d"}]}
