)]}'
{"neutron/tests/fullstack/resources/config.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"195d30781b17a8f6579d78b645ef0e96a76f8d18","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            })"},{"line_number":125,"context_line":"        if env_desc.use_mock_dhcp_scheduler:"},{"line_number":126,"context_line":"            self.config[\u0027DEFAULT\u0027][\u0027dhcp_agents_per_network\u0027] \u003d \u00271\u0027"},{"line_number":127,"context_line":"            self.config[\u0027DEFAULT\u0027][\u0027network_scheduler_driver\u0027] \u003d\\"},{"line_number":128,"context_line":"                \u0027neutron.tests.fullstack.test_dhcp_agent.\u0027 \\"},{"line_number":129,"context_line":"                \u0027AlwaysTheOtherAgentScheduler\u0027"},{"line_number":130,"context_line":"            self.config[\u0027DEFAULT\u0027][\u0027api_workers\u0027] \u003d \u00273\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_8d4614c0","line":127,"range":{"start_line":127,"start_character":63,"end_line":127,"end_character":65},"updated":"2019-09-24 22:09:14.000000000","message":"Can you change this to use parens?  Here could be \"\u003d (\" and then close at end of L129","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c877e8823e9bdef420dbb4bce5d2dba89cb30b37","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            })"},{"line_number":125,"context_line":"        if env_desc.use_mock_dhcp_scheduler:"},{"line_number":126,"context_line":"            self.config[\u0027DEFAULT\u0027][\u0027dhcp_agents_per_network\u0027] \u003d \u00271\u0027"},{"line_number":127,"context_line":"            self.config[\u0027DEFAULT\u0027][\u0027network_scheduler_driver\u0027] \u003d\\"},{"line_number":128,"context_line":"                \u0027neutron.tests.fullstack.test_dhcp_agent.\u0027 \\"},{"line_number":129,"context_line":"                \u0027AlwaysTheOtherAgentScheduler\u0027"},{"line_number":130,"context_line":"            self.config[\u0027DEFAULT\u0027][\u0027api_workers\u0027] \u003d \u00273\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_3248422b","line":127,"range":{"start_line":127,"start_character":63,"end_line":127,"end_character":65},"in_reply_to":"3fa7e38b_8d4614c0","updated":"2019-09-30 14:07:44.000000000","message":"Done","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e97da417824996bc6bc8013993d5519991b39b19","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            })"},{"line_number":125,"context_line":"        if env_desc.use_mock_dhcp_scheduler:"},{"line_number":126,"context_line":"            self.config[\u0027DEFAULT\u0027][\u0027dhcp_agents_per_network\u0027] \u003d \u00271\u0027"},{"line_number":127,"context_line":"            self.config[\u0027DEFAULT\u0027][\u0027network_scheduler_driver\u0027] \u003d\\"},{"line_number":128,"context_line":"                \u0027neutron.tests.fullstack.test_dhcp_agent.\u0027 \\"},{"line_number":129,"context_line":"                \u0027AlwaysTheOtherAgentScheduler\u0027"},{"line_number":130,"context_line":"            self.config[\u0027DEFAULT\u0027][\u0027api_workers\u0027] \u003d \u00273\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_b106a9cd","line":127,"range":{"start_line":127,"start_character":63,"end_line":127,"end_character":65},"in_reply_to":"3fa7e38b_8d4614c0","updated":"2019-09-26 08:26:07.000000000","message":"haha, I knew You will ask for it :P","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"}],"neutron/tests/fullstack/schedulers/dhcp.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6b1b55e216e2f60838df7aba9b184e054eb3e807","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                continue"},{"line_number":43,"context_line":"            else:"},{"line_number":44,"context_line":"                possible_agents.append(agent)"},{"line_number":45,"context_line":"        self.last_selected_agent_ids \u003d ("},{"line_number":46,"context_line":"            [ag.id for ag in possible_agents[0:num_agents_needed]])"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Note(lajoskatona): To make the race window big enough let\u0027s delay"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_c067fb23","line":45,"range":{"start_line":45,"start_character":39,"end_line":45,"end_character":40},"updated":"2019-11-18 10:05:39.000000000","message":"nitty nit (please don\u0027t respin because of that): this bracket is not needed. It would be enough to place \"[\" here.","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"2aa59e649a83015b288cbf551c3e1978ee150171","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                continue"},{"line_number":43,"context_line":"            else:"},{"line_number":44,"context_line":"                possible_agents.append(agent)"},{"line_number":45,"context_line":"        self.last_selected_agent_ids \u003d ("},{"line_number":46,"context_line":"            [ag.id for ag in possible_agents[0:num_agents_needed]])"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Note(lajoskatona): To make the race window big enough let\u0027s delay"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_2c94c9e7","line":45,"range":{"start_line":45,"start_character":39,"end_line":45,"end_character":40},"in_reply_to":"3fa7e38b_c067fb23","updated":"2019-11-18 13:27:31.000000000","message":"Done","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6b1b55e216e2f60838df7aba9b184e054eb3e807","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            else:"},{"line_number":44,"context_line":"                possible_agents.append(agent)"},{"line_number":45,"context_line":"        self.last_selected_agent_ids \u003d ("},{"line_number":46,"context_line":"            [ag.id for ag in possible_agents[0:num_agents_needed]])"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Note(lajoskatona): To make the race window big enough let\u0027s delay"},{"line_number":49,"context_line":"        # the actual scheduling."}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_20504f32","line":46,"range":{"start_line":46,"start_character":47,"end_line":46,"end_character":64},"updated":"2019-11-18 10:05:39.000000000","message":"are You always sure that num_agents_needed \u003e\u003d len(possible_agents)? IMO You should do something like:\n\n    num_agents \u003d min(len(possible_agents), num_agents_needed)\n\nand use num_agents later.","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"2aa59e649a83015b288cbf551c3e1978ee150171","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            else:"},{"line_number":44,"context_line":"                possible_agents.append(agent)"},{"line_number":45,"context_line":"        self.last_selected_agent_ids \u003d ("},{"line_number":46,"context_line":"            [ag.id for ag in possible_agents[0:num_agents_needed]])"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Note(lajoskatona): To make the race window big enough let\u0027s delay"},{"line_number":49,"context_line":"        # the actual scheduling."}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_4c99051d","line":46,"range":{"start_line":46,"start_character":47,"end_line":46,"end_character":64},"in_reply_to":"3fa7e38b_20504f32","updated":"2019-11-18 13:27:31.000000000","message":"Done","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"}],"neutron/tests/fullstack/test_dhcp_agent.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"195d30781b17a8f6579d78b645ef0e96a76f8d18","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        (constants.AGENT_TYPE_LINUXBRIDGE,"},{"line_number":42,"context_line":"         {\u0027l2_agent_type\u0027: constants.AGENT_TYPE_LINUXBRIDGE})"},{"line_number":43,"context_line":"    ]"},{"line_number":44,"context_line":"    ADD_VM \u003d True"},{"line_number":45,"context_line":"    use_mock_dhcp_scheduler \u003d False"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_cd408ca8","line":44,"range":{"start_line":44,"start_character":4,"end_line":44,"end_character":10},"updated":"2019-09-24 22:09:14.000000000","message":"Why is this one all caps?  Let\u0027s make it consistent with the others.","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e97da417824996bc6bc8013993d5519991b39b19","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        (constants.AGENT_TYPE_LINUXBRIDGE,"},{"line_number":42,"context_line":"         {\u0027l2_agent_type\u0027: constants.AGENT_TYPE_LINUXBRIDGE})"},{"line_number":43,"context_line":"    ]"},{"line_number":44,"context_line":"    ADD_VM \u003d True"},{"line_number":45,"context_line":"    use_mock_dhcp_scheduler \u003d False"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_11ebfddb","line":44,"range":{"start_line":44,"start_character":4,"end_line":44,"end_character":10},"in_reply_to":"3fa7e38b_cd408ca8","updated":"2019-09-26 08:26:07.000000000","message":"+1","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c877e8823e9bdef420dbb4bce5d2dba89cb30b37","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        (constants.AGENT_TYPE_LINUXBRIDGE,"},{"line_number":42,"context_line":"         {\u0027l2_agent_type\u0027: constants.AGENT_TYPE_LINUXBRIDGE})"},{"line_number":43,"context_line":"    ]"},{"line_number":44,"context_line":"    ADD_VM \u003d True"},{"line_number":45,"context_line":"    use_mock_dhcp_scheduler \u003d False"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_12766671","line":44,"range":{"start_line":44,"start_character":4,"end_line":44,"end_character":10},"in_reply_to":"3fa7e38b_cd408ca8","updated":"2019-09-30 14:07:44.000000000","message":"Done","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e97da417824996bc6bc8013993d5519991b39b19","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class AlwaysTheOtherAgentScheduler(base_scheduler.BaseChanceScheduler,"},{"line_number":209,"context_line":"                                  dhcp_agent_scheduler.AutoScheduler):"},{"line_number":210,"context_line":"    \"\"\"Chose always different agent that the ones selected previously"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    This dhcp agent scheduler intended use is only in fullstack test,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_d1c24559","line":209,"range":{"start_line":209,"start_character":34,"end_line":209,"end_character":54},"updated":"2019-09-26 08:26:07.000000000","message":"nit: please align it with line above","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c877e8823e9bdef420dbb4bce5d2dba89cb30b37","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class AlwaysTheOtherAgentScheduler(base_scheduler.BaseChanceScheduler,"},{"line_number":209,"context_line":"                                  dhcp_agent_scheduler.AutoScheduler):"},{"line_number":210,"context_line":"    \"\"\"Chose always different agent that the ones selected previously"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    This dhcp agent scheduler intended use is only in fullstack test,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_f2662abb","line":209,"range":{"start_line":209,"start_character":34,"end_line":209,"end_character":54},"in_reply_to":"3fa7e38b_d1c24559","updated":"2019-09-30 14:07:44.000000000","message":"I moved this class to fullstack/schedulers/dhcp.py, but aligned :-)","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"working for Ericsson, UTC+1 (+DST)"},"change_message_id":"4b588cc3d05ec318cc36bf3a048a0e1ca4cf32cb","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class AlwaysTheOtherAgentScheduler(base_scheduler.BaseChanceScheduler,"},{"line_number":209,"context_line":"                                  dhcp_agent_scheduler.AutoScheduler):"},{"line_number":210,"context_line":"    \"\"\"Chose always different agent that the ones selected previously"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    This dhcp agent scheduler intended use is only in fullstack test,"},{"line_number":213,"context_line":"    do not use elsewhere!"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_0a2a147e","line":210,"range":{"start_line":210,"start_character":7,"end_line":210,"end_character":12},"updated":"2019-09-24 13:18:06.000000000","message":"nit: Choose\n\nIt would be nice to describe what this scheduler is good for like:\n\nThis scheduler is a test tool to ensure concurrently running schedulings select different agents so the (previously possible, but buggy) over-scheduling becomes visible in the number of agents scheduled.","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c877e8823e9bdef420dbb4bce5d2dba89cb30b37","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"class AlwaysTheOtherAgentScheduler(base_scheduler.BaseChanceScheduler,"},{"line_number":209,"context_line":"                                  dhcp_agent_scheduler.AutoScheduler):"},{"line_number":210,"context_line":"    \"\"\"Chose always different agent that the ones selected previously"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    This dhcp agent scheduler intended use is only in fullstack test,"},{"line_number":213,"context_line":"    do not use elsewhere!"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_9207b6ca","line":210,"range":{"start_line":210,"start_character":7,"end_line":210,"end_character":12},"in_reply_to":"3fa7e38b_0a2a147e","updated":"2019-09-30 14:07:44.000000000","message":"I moved this class to fullstack/schedulers/dhcp.py, please check.","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e97da417824996bc6bc8013993d5519991b39b19","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    This dhcp agent scheduler intended use is only in fullstack test,"},{"line_number":213,"context_line":"    do not use elsewhere!"},{"line_number":214,"context_line":"    To use this scheduler initialize your EnvironmentDescription with"},{"line_number":215,"context_line":"    use_mock_dhcp_scheduler\u003dTrue"},{"line_number":216,"context_line":"    \"\"\""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_7196f140","line":215,"range":{"start_line":215,"start_character":4,"end_line":215,"end_character":27},"updated":"2019-09-26 08:26:07.000000000","message":"can we just pass scheduler class to env description? Instead of proposing some flag?","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e97da417824996bc6bc8013993d5519991b39b19","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    This dhcp agent scheduler intended use is only in fullstack test,"},{"line_number":213,"context_line":"    do not use elsewhere!"},{"line_number":214,"context_line":"    To use this scheduler initialize your EnvironmentDescription with"},{"line_number":215,"context_line":"    use_mock_dhcp_scheduler\u003dTrue"},{"line_number":216,"context_line":"    \"\"\""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_91860d13","line":215,"updated":"2019-09-26 08:26:07.000000000","message":"this class is not test class, but rather some \"mock\" used by neutron during the tests so maybe You could move it to some new module in https://github.com/openstack/neutron/tree/master/neutron/tests/fullstack, something like e.g. \"neutron.tests.fullstack.schedulers.dhcp\" or something like that.","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c877e8823e9bdef420dbb4bce5d2dba89cb30b37","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    This dhcp agent scheduler intended use is only in fullstack test,"},{"line_number":213,"context_line":"    do not use elsewhere!"},{"line_number":214,"context_line":"    To use this scheduler initialize your EnvironmentDescription with"},{"line_number":215,"context_line":"    use_mock_dhcp_scheduler\u003dTrue"},{"line_number":216,"context_line":"    \"\"\""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_9291f649","line":215,"range":{"start_line":215,"start_character":4,"end_line":215,"end_character":27},"in_reply_to":"3fa7e38b_7196f140","updated":"2019-09-30 14:07:44.000000000","message":"I changed to dhcp_scheduler_class, which can be None or path to scheduler (see: https://review.opendev.org/#/c/683987/4/neutron/tests/fullstack/resources/config.py","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c877e8823e9bdef420dbb4bce5d2dba89cb30b37","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    This dhcp agent scheduler intended use is only in fullstack test,"},{"line_number":213,"context_line":"    do not use elsewhere!"},{"line_number":214,"context_line":"    To use this scheduler initialize your EnvironmentDescription with"},{"line_number":215,"context_line":"    use_mock_dhcp_scheduler\u003dTrue"},{"line_number":216,"context_line":"    \"\"\""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_b20af2ce","line":215,"in_reply_to":"3fa7e38b_91860d13","updated":"2019-09-30 14:07:44.000000000","message":"Done","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e97da417824996bc6bc8013993d5519991b39b19","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        self.last_selected_agent_ids \u003d \\"},{"line_number":232,"context_line":"            [ag.id for ag in possible_agents[0:num_agents_needed]]"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        time.sleep(5)"},{"line_number":235,"context_line":"        return possible_agents[0:num_agents_needed]"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_11a77da9","line":234,"updated":"2019-09-26 08:26:07.000000000","message":"why this sleep is needed?","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"working for Ericsson, UTC+1 (+DST)"},"change_message_id":"74d2c529d05852a1ae39e0a5a8755ca068bf5dec","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        self.last_selected_agent_ids \u003d \\"},{"line_number":232,"context_line":"            [ag.id for ag in possible_agents[0:num_agents_needed]]"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        time.sleep(5)"},{"line_number":235,"context_line":"        return possible_agents[0:num_agents_needed]"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_189ea0b8","line":234,"in_reply_to":"3fa7e38b_11a77da9","updated":"2019-09-27 15:00:01.000000000","message":"Let me answer this in place of Lajos: To make the race window big enough for the over-scheduling to become deterministic. As exaplained here: https://bugs.launchpad.net/neutron/+bug/1535554/comments/7\n\nLikely a comment summarizing this here would be a good idea.","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"b5849a1b317ab9ba9f9db8c1b2b51673340d03ec","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        self.last_selected_agent_ids \u003d \\"},{"line_number":232,"context_line":"            [ag.id for ag in possible_agents[0:num_agents_needed]]"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        time.sleep(5)"},{"line_number":235,"context_line":"        return possible_agents[0:num_agents_needed]"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_55a36800","line":234,"in_reply_to":"3fa7e38b_189ea0b8","updated":"2019-09-30 14:14:37.000000000","message":"thanks,\nI added a note to the scheduler class in tests/fullstack/schedulers/dhcp.py","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"working for Ericsson, UTC+1 (+DST)"},"change_message_id":"4b588cc3d05ec318cc36bf3a048a0e1ca4cf32cb","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        super(TestDhcpAgentHARaceCondition, self).setUp()"},{"line_number":247,"context_line":"        self._create_network_with_multiple_subnet()"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def _concurrent_subnet_create(self, calls, args):"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        class SimpleThread(threading.Thread):"},{"line_number":252,"context_line":"            def __init__(self, q):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_ca25dc5d","line":249,"range":{"start_line":249,"start_character":40,"end_line":249,"end_character":51},"updated":"2019-09-24 13:18:06.000000000","message":"This is a strange way to group function references and their arguments. It works of course. Just wondering why not:\n\n[func1, arg1_1, arg1_2, ...], [func2, arg2_1, arg2_2, ...], ...","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c877e8823e9bdef420dbb4bce5d2dba89cb30b37","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        super(TestDhcpAgentHARaceCondition, self).setUp()"},{"line_number":247,"context_line":"        self._create_network_with_multiple_subnet()"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def _concurrent_subnet_create(self, calls, args):"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        class SimpleThread(threading.Thread):"},{"line_number":252,"context_line":"            def __init__(self, q):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_9297b6ec","line":249,"range":{"start_line":249,"start_character":40,"end_line":249,"end_character":51},"in_reply_to":"3fa7e38b_6d32b861","updated":"2019-09-30 14:07:44.000000000","message":"Exactly.\nAs suggested I moved to neutron/tests/base.py.","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"195d30781b17a8f6579d78b645ef0e96a76f8d18","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        super(TestDhcpAgentHARaceCondition, self).setUp()"},{"line_number":247,"context_line":"        self._create_network_with_multiple_subnet()"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def _concurrent_subnet_create(self, calls, args):"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        class SimpleThread(threading.Thread):"},{"line_number":252,"context_line":"            def __init__(self, q):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_6d32b861","line":249,"range":{"start_line":249,"start_character":40,"end_line":249,"end_character":51},"in_reply_to":"3fa7e38b_ca25dc5d","updated":"2019-09-24 22:09:14.000000000","message":"Looks like this method was copied from _simulate_concurrent_requests_process_and_raise().  In order to not have duplication, and since that is a functional test, we should find a location for it in a base file to use it in both.","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"working for Ericsson, UTC+1 (+DST)"},"change_message_id":"4b588cc3d05ec318cc36bf3a048a0e1ca4cf32cb","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                    while not self.q.empty():"},{"line_number":260,"context_line":"                        item \u003d None"},{"line_number":261,"context_line":"                        try:"},{"line_number":262,"context_line":"                            item \u003d self.q.get(False)"},{"line_number":263,"context_line":"                            func, func_args \u003d item[0], item[1]"},{"line_number":264,"context_line":"                            func(*func_args)"},{"line_number":265,"context_line":"                        except queue.Empty:"},{"line_number":266,"context_line":"                            pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_2af030fe","line":263,"range":{"start_line":262,"start_character":28,"end_line":263,"end_character":62},"updated":"2019-09-24 13:18:06.000000000","message":"nit: could be written:\n\nfunc, func_args \u003d self.q.get(False)","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c877e8823e9bdef420dbb4bce5d2dba89cb30b37","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                    while not self.q.empty():"},{"line_number":260,"context_line":"                        item \u003d None"},{"line_number":261,"context_line":"                        try:"},{"line_number":262,"context_line":"                            item \u003d self.q.get(False)"},{"line_number":263,"context_line":"                            func, func_args \u003d item[0], item[1]"},{"line_number":264,"context_line":"                            func(*func_args)"},{"line_number":265,"context_line":"                        except queue.Empty:"},{"line_number":266,"context_line":"                            pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_f26f0a25","line":263,"range":{"start_line":262,"start_character":28,"end_line":263,"end_character":62},"in_reply_to":"3fa7e38b_2af030fe","updated":"2019-09-30 14:07:44.000000000","message":"Sounds good, and I tried it, and it is not working.\nActually the whole thing just never finished, and I got fixture timeout...\nI don\u0027t understand to tell the truth.","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"working for Ericsson, UTC+1 (+DST)"},"change_message_id":"4b588cc3d05ec318cc36bf3a048a0e1ca4cf32cb","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                            func(*func_args)"},{"line_number":265,"context_line":"                        except queue.Empty:"},{"line_number":266,"context_line":"                            pass"},{"line_number":267,"context_line":"                        finally:"},{"line_number":268,"context_line":"                            if item:"},{"line_number":269,"context_line":"                                self.q.task_done()"},{"line_number":270,"context_line":"                except Exception as e:"},{"line_number":271,"context_line":"                    self.exception \u003d e"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_2ad9107e","line":269,"range":{"start_line":267,"start_character":0,"end_line":269,"end_character":50},"updated":"2019-09-24 13:18:06.000000000","message":"Isn\u0027t this simpler in the last line of the try block?","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e97da417824996bc6bc8013993d5519991b39b19","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                            func(*func_args)"},{"line_number":265,"context_line":"                        except queue.Empty:"},{"line_number":266,"context_line":"                            pass"},{"line_number":267,"context_line":"                        finally:"},{"line_number":268,"context_line":"                            if item:"},{"line_number":269,"context_line":"                                self.q.task_done()"},{"line_number":270,"context_line":"                except Exception as e:"},{"line_number":271,"context_line":"                    self.exception \u003d e"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_71e4b1e0","line":269,"range":{"start_line":267,"start_character":0,"end_line":269,"end_character":50},"in_reply_to":"3fa7e38b_2ad9107e","updated":"2019-09-26 08:26:07.000000000","message":"but then it will be not done in case when exception will be raised before. Finally block is executed always","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"working for Ericsson, UTC+1 (+DST)"},"change_message_id":"74d2c529d05852a1ae39e0a5a8755ca068bf5dec","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                            func(*func_args)"},{"line_number":265,"context_line":"                        except queue.Empty:"},{"line_number":266,"context_line":"                            pass"},{"line_number":267,"context_line":"                        finally:"},{"line_number":268,"context_line":"                            if item:"},{"line_number":269,"context_line":"                                self.q.task_done()"},{"line_number":270,"context_line":"                except Exception as e:"},{"line_number":271,"context_line":"                    self.exception \u003d e"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_38efdc1e","line":269,"range":{"start_line":267,"start_character":0,"end_line":269,"end_character":50},"in_reply_to":"3fa7e38b_71e4b1e0","updated":"2019-09-27 15:00:01.000000000","message":"Yeah, but do we need to call q.task_done() when the queue was empty to begin with? Plus we have the \u0027if item\u0027 condition proving that q.get() did not raise.","commit_id":"f494a1a217292a8377aa6fb1ae0c882c85eca80d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6b1b55e216e2f60838df7aba9b184e054eb3e807","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        super(TestDhcpAgentHARaceCondition, self).setUp()"},{"line_number":213,"context_line":"        self._create_network_with_multiple_subnet()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _create_network_with_multiple_subnet(self):"},{"line_number":216,"context_line":"        self.network \u003d self.safe_client.create_network(self.project_id)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        funcs \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_0030b306","line":215,"range":{"start_line":215,"start_character":38,"end_line":215,"end_character":44},"updated":"2019-11-18 10:05:39.000000000","message":"nit: s/subnet/subnets","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"2aa59e649a83015b288cbf551c3e1978ee150171","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        super(TestDhcpAgentHARaceCondition, self).setUp()"},{"line_number":213,"context_line":"        self._create_network_with_multiple_subnet()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _create_network_with_multiple_subnet(self):"},{"line_number":216,"context_line":"        self.network \u003d self.safe_client.create_network(self.project_id)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        funcs \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_0c9f8d02","line":215,"range":{"start_line":215,"start_character":38,"end_line":215,"end_character":44},"in_reply_to":"3fa7e38b_0030b306","updated":"2019-11-18 13:27:31.000000000","message":"Done","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6b1b55e216e2f60838df7aba9b184e054eb3e807","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        self._simulate_concurrent_requests_process_and_raise(funcs, args)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def test_dhcp_agent_ha_with_race_condition(self):"},{"line_number":229,"context_line":"        network_dhcp_agents \u003d self.client.list_dhcp_agent_hosting_networks("},{"line_number":230,"context_line":"            self.network[\u0027id\u0027])[\u0027agents\u0027]"},{"line_number":231,"context_line":"        self.assertEqual(1, len(network_dhcp_agents))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_800ca342","line":229,"updated":"2019-11-18 10:05:39.000000000","message":"is it possible that when this call will be done to neutron server, scheduler will still be in one of the last \"time.sleep(5)\" calls? So You will than assert on not fully configured environment?","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b2fcf1f0908ff471bcc06cc49c0e1c001823b198","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        self._simulate_concurrent_requests_process_and_raise(funcs, args)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def test_dhcp_agent_ha_with_race_condition(self):"},{"line_number":229,"context_line":"        network_dhcp_agents \u003d self.client.list_dhcp_agent_hosting_networks("},{"line_number":230,"context_line":"            self.network[\u0027id\u0027])[\u0027agents\u0027]"},{"line_number":231,"context_line":"        self.assertEqual(1, len(network_dhcp_agents))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_868cb180","line":229,"in_reply_to":"3fa7e38b_2c628917","updated":"2019-11-18 22:30:16.000000000","message":"right. There is join() called in this method so all threads will be first finished before it will go to next steps. Sorry for noise :)","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"working for Ericsson, UTC+1 (+DST)"},"change_message_id":"2a558d478e6fdd394d0a46ff312aef98f1e73edd","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        self._simulate_concurrent_requests_process_and_raise(funcs, args)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def test_dhcp_agent_ha_with_race_condition(self):"},{"line_number":229,"context_line":"        network_dhcp_agents \u003d self.client.list_dhcp_agent_hosting_networks("},{"line_number":230,"context_line":"            self.network[\u0027id\u0027])[\u0027agents\u0027]"},{"line_number":231,"context_line":"        self.assertEqual(1, len(network_dhcp_agents))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_eca551b5","line":229,"in_reply_to":"3fa7e38b_800ca342","updated":"2019-11-18 12:59:12.000000000","message":"I think that should not happen since:\n\n* setUp() calls _create_network_with_multiple_subnet(),\n* _create_network_with_multiple_subnet() calls _simulate_concurrent_requests_process_and_raise(),\n* _simulate_concurrent_requests_process_and_raise() calls join() and by that waits on all items put in the queue,\n* all items are put in the queue before any threads (other than main) are started.","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"2aa59e649a83015b288cbf551c3e1978ee150171","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        self._simulate_concurrent_requests_process_and_raise(funcs, args)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def test_dhcp_agent_ha_with_race_condition(self):"},{"line_number":229,"context_line":"        network_dhcp_agents \u003d self.client.list_dhcp_agent_hosting_networks("},{"line_number":230,"context_line":"            self.network[\u0027id\u0027])[\u0027agents\u0027]"},{"line_number":231,"context_line":"        self.assertEqual(1, len(network_dhcp_agents))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_2c628917","line":229,"in_reply_to":"3fa7e38b_eca551b5","updated":"2019-11-18 13:27:31.000000000","message":"my understanding is the same, _simulate_concurrent_requests_process_and_raise guarantees that here we have a correct answer.","commit_id":"d04af22378d09c9e975a1448349677cdbb179cb0"}]}
