)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5eb1f98bf1a949287a76700281e3c91b6c6cd324","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix issue where server fails to reboot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The iDRAC will return a SYS021 error if the server is powered off and a"},{"line_number":10,"context_line":"reboot is requested.  In this situation, convert the requested reboot"},{"line_number":11,"context_line":"into a power on to avoid this error."},{"line_number":12,"context_line":"To minimize the chance of a race condition, it is critical to do this"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"df33271e_728681bb","line":9,"updated":"2020-04-01 12:30:34.000000000","message":"Cannot we catch this error and just proceed with powering on? That would eliminate the race condition.","commit_id":"af16720a005a9fd06f3a4bfd6edd62eb3171ee7a"},{"author":{"_account_id":10250,"name":"Christopher Dearborn","email":"Christopher.Dearborn@dell.com","username":"cdearbor"},"change_message_id":"75478c9e1575b2617976741dfe21754a7f149a5d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix issue where server fails to reboot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The iDRAC will return a SYS021 error if the server is powered off and a"},{"line_number":10,"context_line":"reboot is requested.  In this situation, convert the requested reboot"},{"line_number":11,"context_line":"into a power on to avoid this error."},{"line_number":12,"context_line":"To minimize the chance of a race condition, it is critical to do this"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"df33271e_e6a3e6fe","line":9,"in_reply_to":"df33271e_728681bb","updated":"2020-04-01 20:05:48.000000000","message":"Well, according to the docs [1], a SYS021 indicates \"The command failed to set %s\".  The docs don\u0027t specify what failures can cause this to happen though.  We know that this error is thrown in the following cases:\n- node is off and we send a power off\n- node is on and we send a power on\n- node is off and we send a reboot\n\nIt may occur in other cases though, such as a general failure, and we may not want to power on in those cases.\n\n[1] https://downloads.dell.com/solutions/general-solution-resources/White%20Papers/Dell_BaseServerandPhysicalAsset_Profile-1.1.pdf","commit_id":"af16720a005a9fd06f3a4bfd6edd62eb3171ee7a"}],"ironic/drivers/modules/drac/power.py":[{"author":{"_account_id":10379,"name":"Rajini Karthik","email":"rrajini@gmail.com","username":"rajinir"},"change_message_id":"c26705e6717560591e4020db390d61846cd08630","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                        \"timeout\u003d%(timeout)s\","},{"line_number":214,"context_line":"                        {\u0027timeout\u0027: timeout})"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        _set_power_state(task.node, states.REBOOT)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"class DracPower(DracWSManPower):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_1af176ce","line":216,"updated":"2020-03-26 17:45:58.000000000","message":"Shouldn\u0027t this be _set_power_state(task.node, target_power_state)?","commit_id":"079d26a656cddd1e29d27a51f8657dad4cef9680"},{"author":{"_account_id":10250,"name":"Christopher Dearborn","email":"Christopher.Dearborn@dell.com","username":"cdearbor"},"change_message_id":"c8dc9b3096e6fcf51f845c84855d8a6f0974ffa0","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                        \"timeout\u003d%(timeout)s\","},{"line_number":214,"context_line":"                        {\u0027timeout\u0027: timeout})"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        _set_power_state(task.node, states.REBOOT)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"class DracPower(DracWSManPower):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_f5ee65b2","line":216,"in_reply_to":"df33271e_1af176ce","updated":"2020-03-27 12:43:54.000000000","message":"Nope.  We\u0027re in the reboot method here so we know the requested state is REBOOT.  The code that sets target_power_state has been relocated to the other change block.","commit_id":"079d26a656cddd1e29d27a51f8657dad4cef9680"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"cfd9e4953d20ae57851a6649a0c24a2c4ab6272e","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        current_power_state \u003d _get_power_state(node)"},{"line_number":114,"context_line":"        # If the server is not on, then power it on instead of rebooting"},{"line_number":115,"context_line":"        if current_power_state !\u003d states.POWER_ON:"},{"line_number":116,"context_line":"            power_state \u003d states.POWER_ON"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    target_power_state \u003d REVERSE_POWER_STATES[power_state]"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_ca11a55f","line":116,"updated":"2020-03-31 19:11:10.000000000","message":"I feel like we need a unit test for this. The call being for a reboot, but the outcome is power on, at least for _set_power_state","commit_id":"af16720a005a9fd06f3a4bfd6edd62eb3171ee7a"},{"author":{"_account_id":10250,"name":"Christopher Dearborn","email":"Christopher.Dearborn@dell.com","username":"cdearbor"},"change_message_id":"75478c9e1575b2617976741dfe21754a7f149a5d","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        current_power_state \u003d _get_power_state(node)"},{"line_number":114,"context_line":"        # If the server is not on, then power it on instead of rebooting"},{"line_number":115,"context_line":"        if current_power_state !\u003d states.POWER_ON:"},{"line_number":116,"context_line":"            power_state \u003d states.POWER_ON"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    target_power_state \u003d REVERSE_POWER_STATES[power_state]"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_46ea92d7","line":116,"in_reply_to":"df33271e_ca11a55f","updated":"2020-04-01 20:05:48.000000000","message":"I took a look at adding a test case for this, and happily, we have one already! :-)\n\nSee:\nhttps://github.com/openstack/ironic/blob/master/ironic/tests/unit/drivers/modules/drac/test_power.py#L137","commit_id":"af16720a005a9fd06f3a4bfd6edd62eb3171ee7a"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"e69eb163dbe590171c5ae0ddc2a310aab35576e1","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            client.set_power_state(target_power_state)"},{"line_number":134,"context_line":"            break"},{"line_number":135,"context_line":"        except drac_exceptions.BaseClientException as exc:"},{"line_number":136,"context_line":"            if (power_state \u003d\u003d states.REBOOT and"},{"line_number":137,"context_line":"                    POWER_STATE_CHANGE_FAIL in str(exc)"},{"line_number":138,"context_line":"                    and tries \u003e 0):"},{"line_number":139,"context_line":"                LOG.warning(\u0027DRAC driver failed to set power state for node \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_f7190dd7","line":136,"updated":"2020-04-09 22:41:36.000000000","message":"pep8: W504 line break after binary operator","commit_id":"a96a6cd77e616cb46a44ceb4866278f20004711f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bf89f5cc7eeab3d30fd24403c00e107fa44f7b2f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"DRAC power interface"},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from ironic_lib import metrics_utils"},{"line_number":21,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4c43b2_bec5d55d","line":18,"updated":"2020-04-17 00:02:26.000000000","message":"rutro... the dreaded time module :(","commit_id":"95a3e1bdfd12b8b579c0dd6ff8e12d80d4214117"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bf89f5cc7eeab3d30fd24403c00e107fa44f7b2f","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    # Cases have been seen where the iDRAC returns a SYS021 error even when"},{"line_number":113,"context_line":"    # the server is in the right power state and a valid power state change"},{"line_number":114,"context_line":"    # is attempted. Retry in this case."},{"line_number":115,"context_line":"    while tries \u003e 0:"},{"line_number":116,"context_line":"        # The iDRAC will return a SYS021 error if the server is powered off"},{"line_number":117,"context_line":"        # and a reboot is requested.  In this situation, convert the requested"},{"line_number":118,"context_line":"        # reboot into a power on to avoid this error. To minimize the chance"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4c43b2_7e906d4f","line":115,"updated":"2020-04-17 00:02:26.000000000","message":"For some reason while makes me slightly uncomfortable. :\\","commit_id":"95a3e1bdfd12b8b579c0dd6ff8e12d80d4214117"}]}
