)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"bdece9de19b902973692c1009f618fa919e8bede","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     bno1 \u003calex@privacysystems.eu\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-07-06 18:21:26 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Retry creatingg iptables managers and adding metering rules"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change makes the metering agent retry creating the iptables"},{"line_number":10,"context_line":"managers for each router and applying the metering rules."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_9e9b0371","line":7,"range":{"start_line":7,"start_character":6,"end_line":7,"end_character":15},"updated":"2019-07-08 07:56:36.000000000","message":"nitty nit: creating","commit_id":"4cf109ddc59e05f92d1b62313eb3e9e58df3a3d6"}],"neutron/services/metering/drivers/iptables/iptables_driver.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"bdece9de19b902973692c1009f618fa919e8bede","unresolved":false,"context_lines":[{"line_number":434,"context_line":"            # create the managers for them. When a new manager is created, the"},{"line_number":435,"context_line":"            # metering rules have to be added to it."},{"line_number":436,"context_line":"            if rm.create_iptables_managers():"},{"line_number":437,"context_line":"                self._process_associate_metering_label(router)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"            for label_id in rm.metering_labels:"},{"line_number":440,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_7ec5e73b","line":437,"updated":"2019-07-08 07:56:36.000000000","message":"I don\u0027t know metering agent\u0027s code but is get_traffic_counters() called periodically? Or only on demand? If this second option than Your comment here is wrong.\nAlso I\u0027m not sure if such mixing different things in one method is good thing. Method get_\u003csomething\u003e shouldn\u0027t IMO be responsible for creation of iptables managers and process it.","commit_id":"4cf109ddc59e05f92d1b62313eb3e9e58df3a3d6"},{"author":{"_account_id":28655,"name":"Alexandru Sorodoc","email":"alex@privacysystems.eu","username":"bno1"},"change_message_id":"323adae9675458386efd5370cbc3bef28fd6db73","unresolved":false,"context_lines":[{"line_number":434,"context_line":"            # create the managers for them. When a new manager is created, the"},{"line_number":435,"context_line":"            # metering rules have to be added to it."},{"line_number":436,"context_line":"            if rm.create_iptables_managers():"},{"line_number":437,"context_line":"                self._process_associate_metering_label(router)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"            for label_id in rm.metering_labels:"},{"line_number":440,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_a31490a1","line":437,"in_reply_to":"7faddb67_7ec5e73b","updated":"2019-07-09 08:38:21.000000000","message":"It is called periodically, see the code of the metering agent [1]. I agree that this isn\u0027t the best placement for this. Maybe I should create a separate method in the driver for it and call in in the metering loop before `_add_metering_infos`? Would `sync_router_namespaces` be a good name for it?\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/services/metering/agents/metering_agent.py#L134-L160","commit_id":"4cf109ddc59e05f92d1b62313eb3e9e58df3a3d6"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"625dd535f763386de325e8add532e1217b5e4f0f","unresolved":false,"context_lines":[{"line_number":434,"context_line":"            # create the managers for them. When a new manager is created, the"},{"line_number":435,"context_line":"            # metering rules have to be added to it."},{"line_number":436,"context_line":"            if rm.create_iptables_managers():"},{"line_number":437,"context_line":"                self._process_associate_metering_label(router)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"            for label_id in rm.metering_labels:"},{"line_number":440,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_f576bf06","line":437,"in_reply_to":"7faddb67_a31490a1","updated":"2019-07-09 09:31:29.000000000","message":"yes, IMO it would be more readable in the future to add separate method with proper name and call it in _metering_loop() function.\nsync_router_namespaces or sync_routers should be IMO good name for this new method.","commit_id":"4cf109ddc59e05f92d1b62313eb3e9e58df3a3d6"}]}
