)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"40aa67864ab3793ade54ae34280471b896166dd5","unresolved":false,"context_lines":[{"line_number":10,"context_line":"not crash ironic-inspector process in this case. Also due to"},{"line_number":11,"context_line":"bug 1748893 the port listing API can sometimes return HTTP 400."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This change retries port listing 3 times with 1 second break"},{"line_number":14,"context_line":"before aborting the periodic task and thus the process."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change introduces a dependency on the retrying library,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa0c359_08ddc8de","line":13,"updated":"2018-02-13 21:11:17.000000000","message":"s/3/5/ (we should change this or people might get confused)","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3e79c40c1d6ba0e43b4098f0dbe1fc0954dcfe31","unresolved":false,"context_lines":[{"line_number":10,"context_line":"not crash ironic-inspector process in this case. Also due to"},{"line_number":11,"context_line":"bug 1748893 the port listing API can sometimes return HTTP 400."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This change retries port listing 3 times with 1 second break"},{"line_number":14,"context_line":"before aborting the periodic task and thus the process."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change introduces a dependency on the retrying library,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa0c359_502a837e","line":13,"in_reply_to":"3fa0c359_08ddc8de","updated":"2018-02-14 14:09:26.000000000","message":"Done","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f343d5145a12b31876c5b1c202aad23eff26c4a7","unresolved":false,"context_lines":[{"line_number":11,"context_line":"bug 1748893 the port listing API can sometimes return HTTP 400."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This change retries port listing 3 times with 1 second break"},{"line_number":14,"context_line":"before aborting the periodic task and thus the process."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change introduces a dependency on the retrying library,"},{"line_number":17,"context_line":"which is already widely used in OpenStack (including ironic)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa0c359_43dad177","line":14,"updated":"2018-02-13 21:11:54.000000000","message":"I guess I don\u0027t see where the aborting happens.","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3e79c40c1d6ba0e43b4098f0dbe1fc0954dcfe31","unresolved":false,"context_lines":[{"line_number":11,"context_line":"bug 1748893 the port listing API can sometimes return HTTP 400."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This change retries port listing 3 times with 1 second break"},{"line_number":14,"context_line":"before aborting the periodic task and thus the process."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change introduces a dependency on the retrying library,"},{"line_number":17,"context_line":"which is already widely used in OpenStack (including ironic)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa0c359_1055dbf9","line":14,"in_reply_to":"3fa0c359_43dad177","updated":"2018-02-14 14:09:26.000000000","message":"It\u0027s quite tricky: https://github.com/openstack/ironic-inspector/blob/master/ironic_inspector/wsgi_service.py#L124-L167 this code aborts ironic-inspector if any periodic task raises an unhandled exception. And here is how it looks in practice: http://logs.openstack.org/14/542214/3/check/ironic-inspector-tempest-dsvm-discovery/11a64ab/logs/screen-ironic-inspector.txt.gz#_Feb_09_15_03_34_776249","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"}],"ironic_inspector/common/ironic.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"40aa67864ab3793ade54ae34280471b896166dd5","unresolved":false,"context_lines":[{"line_number":171,"context_line":"def call_with_retries(func, *args, **kwargs):"},{"line_number":172,"context_line":"    \"\"\"Call an ironic client function retrying all errors."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    Retries any ironic client exception five times with 1 second break."},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":"    return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_480c3093","line":174,"updated":"2018-02-13 21:11:17.000000000","message":"you mean\nIf an ironic client exception is raised, try calling the func again, at most 5 times, waiting 1 sec between each call.","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3e79c40c1d6ba0e43b4098f0dbe1fc0954dcfe31","unresolved":false,"context_lines":[{"line_number":171,"context_line":"def call_with_retries(func, *args, **kwargs):"},{"line_number":172,"context_line":"    \"\"\"Call an ironic client function retrying all errors."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    Retries any ironic client exception five times with 1 second break."},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":"    return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_b043c73e","line":174,"in_reply_to":"3fa0c359_480c3093","updated":"2018-02-14 14:09:26.000000000","message":"Done","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"40aa67864ab3793ade54ae34280471b896166dd5","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    Retries any ironic client exception five times with 1 second break."},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":"    return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_433e51b8","line":176,"updated":"2018-02-13 21:11:17.000000000","message":"what happens if func is called 5 times, and the last time, an ironic client exception is raised? won\u0027t that exception get raised? And if so, how does the code now handle it? (Isn\u0027t that what happened before, func raised an exception and it wasn\u0027t handled so it caused the crash?)","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3e79c40c1d6ba0e43b4098f0dbe1fc0954dcfe31","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    Retries any ironic client exception five times with 1 second break."},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":"    return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_70a0dff4","line":176,"in_reply_to":"3fa0c359_433e51b8","updated":"2018-02-14 14:09:26.000000000","message":"Well, if it is broken completely, we give up. The point here is to avoid networking glitches and races like bug 1748893","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"b39a9999abfad9bba94af582196292ebf3ddba0c","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    Retries any ironic client exception five times with 1 second break."},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":"    return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_321d6d0f","line":176,"in_reply_to":"3fa0c359_70a0dff4","updated":"2018-02-14 22:26:07.000000000","message":"The client library already masks a lot and automatically retries under the hood, so we really shouldn\u0027t have to worry about transient errors too much in the grand scheme of things.","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"b39a9999abfad9bba94af582196292ebf3ddba0c","unresolved":false,"context_lines":[{"line_number":171,"context_line":"def call_with_retries(func, *args, **kwargs):"},{"line_number":172,"context_line":"    \"\"\"Call an ironic client function retrying all errors."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    If an ironic client exception is raised, try calling the func again,"},{"line_number":175,"context_line":"    at most 5 times, waiting 1 sec between each call. If on the 5th attempt"},{"line_number":176,"context_line":"    the func raises again, the exception is propagated to the caller."},{"line_number":177,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa0c359_b2317da5","line":174,"range":{"start_line":174,"start_character":61,"end_line":174,"end_character":65},"updated":"2018-02-14 22:26:07.000000000","message":"nit: function ;)","commit_id":"3237511cc630c0f1da4cb89a71ab2d945080bc7c"}],"ironic_inspector/test/unit/test_common_ironic.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"40aa67864ab3793ade54ae34280471b896166dd5","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        result \u003d ir_utils.call_with_retries(self.call, \u0027meow\u0027, answer\u003d42)"},{"line_number":174,"context_line":"        self.assertEqual(result, mock.sentinel.result)"},{"line_number":175,"context_line":"        self.call.assert_called_with(\u0027meow\u0027, answer\u003d42)"},{"line_number":176,"context_line":"        self.assertEqual(4, self.call.call_count)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_43ac11ec","line":176,"updated":"2018-02-13 21:11:17.000000000","message":"Maybe add a test with a function that fails -- always raises an exception.","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3e79c40c1d6ba0e43b4098f0dbe1fc0954dcfe31","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        result \u003d ir_utils.call_with_retries(self.call, \u0027meow\u0027, answer\u003d42)"},{"line_number":174,"context_line":"        self.assertEqual(result, mock.sentinel.result)"},{"line_number":175,"context_line":"        self.call.assert_called_with(\u0027meow\u0027, answer\u003d42)"},{"line_number":176,"context_line":"        self.assertEqual(4, self.call.call_count)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_50860368","line":176,"in_reply_to":"3fa0c359_43ac11ec","updated":"2018-02-14 14:09:26.000000000","message":"Done","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"}],"releasenotes/notes/port-list-retry-745d1cf41780e961.yaml":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"b0435cfe7f143fc1a8444683369770b10e1ae376","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    the ironic-inspector service stopping."},{"line_number":8,"context_line":"upgrade:"},{"line_number":9,"context_line":"  - |"},{"line_number":10,"context_line":"    Adds dependency on the ``retrying`` library."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3fa0c359_3c580d86","line":10,"updated":"2018-02-13 16:39:09.000000000","message":"nit: we should explicitly state it is a python library","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3e79c40c1d6ba0e43b4098f0dbe1fc0954dcfe31","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    the ironic-inspector service stopping."},{"line_number":8,"context_line":"upgrade:"},{"line_number":9,"context_line":"  - |"},{"line_number":10,"context_line":"    Adds dependency on the ``retrying`` library."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3fa0c359_908fab73","line":10,"in_reply_to":"3fa0c359_3c580d86","updated":"2018-02-14 14:09:26.000000000","message":"Done","commit_id":"02f367c520d2113b463aa7dad29c03c2f1e76110"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"99422344d475ed7a50e921c6ee5fb498266d290e","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The periodic PXE filter update task now retries fetching port list from"},{"line_number":5,"context_line":"    the Bare Metal service 5 times (with 1 second delay) before giving up."},{"line_number":6,"context_line":"    This ensures that a temporary networking glitch will not result in"},{"line_number":7,"context_line":"    the ironic-inspector service stopping."},{"line_number":8,"context_line":"upgrade:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3fa0c359_0ba37001","line":5,"updated":"2018-02-14 14:48:08.000000000","message":"the \u0027before giving up\u0027 was what threw me. I think you mean \u0027before giving up and stopping the ironic-inspector service\u0027.\n\nIf I read the next sentence carefully, it implies that \u0027giving up\u0027 means that the networking glitch was not temporary and that\u0027s why the service was stopped.\n\nAnyway, maybe it is just me cuz I don\u0027t know much about the inspector :)","commit_id":"3237511cc630c0f1da4cb89a71ab2d945080bc7c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"b39a9999abfad9bba94af582196292ebf3ddba0c","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The periodic PXE filter update task now retries fetching port list from"},{"line_number":5,"context_line":"    the Bare Metal service 5 times (with 1 second delay) before giving up."},{"line_number":6,"context_line":"    This ensures that a temporary networking glitch will not result in"},{"line_number":7,"context_line":"    the ironic-inspector service stopping."},{"line_number":8,"context_line":"upgrade:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3fa0c359_d200c9ae","line":5,"in_reply_to":"3fa0c359_0ba37001","updated":"2018-02-14 22:26:07.000000000","message":"I think giving up kind of implies crashing. I feel like we should state that it crashes... but *shrugs*","commit_id":"3237511cc630c0f1da4cb89a71ab2d945080bc7c"}]}
