)]}'
{"etc/ironic/ironic.conf.sample":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0770d3f5125cb699b5114f0e48c623031fd35c14","unresolved":false,"context_lines":[{"line_number":1878,"context_line":"# From ironic"},{"line_number":1879,"context_line":"#"},{"line_number":1880,"context_line":""},{"line_number":1881,"context_line":"# Maximum time in seconds to retry, retryable IPMI operations."},{"line_number":1882,"context_line":"# For example if the requested action fails because the BMC is"},{"line_number":1883,"context_line":"# busy. There is a tradeoff when setting this value. Setting"},{"line_number":1884,"context_line":"# this too low may cause older BMCs to crash and require a"}],"source_content_type":"application/octet-stream","patch_set":15,"id":"5f201791_fac39c36","line":1881,"updated":"2017-06-28 09:15:39.000000000","message":"nit: is comma really needed after \"retry\"?","commit_id":"ee5d4942a1c33736ffe05ec01619142be400c2f4"}],"ironic/conductor/utils.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"160d47a1b890396555be4f1d27514536b1b5f4a4","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                    \"doesn\u0027t support \u0027timeout\u0027 parameter.\","},{"line_number":194,"context_line":"                    {\u0027driver_name\u0027: node.driver})"},{"line_number":195,"context_line":"                task.driver.power.set_power_state(task, new_state)"},{"line_number":196,"context_line":"                node_wait_for_power_state(task, new_state)"},{"line_number":197,"context_line":"        else:"},{"line_number":198,"context_line":"            if (\u0027timeout\u0027 in reflection.get_signature("},{"line_number":199,"context_line":"                    task.driver.power.reboot).parameters):"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_fb0a92cf","line":196,"updated":"2017-05-24 16:44:26.000000000","message":"having this logic only in this function means that all the code that needs to change power state should trigger node_power_action from here, not set_power_state or reboot. I don\u0027t know if we should document it somehow.","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"743b41203faecc00f9c4cbf2235d7a71c30b200c","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                    \"doesn\u0027t support \u0027timeout\u0027 parameter.\","},{"line_number":194,"context_line":"                    {\u0027driver_name\u0027: node.driver})"},{"line_number":195,"context_line":"                task.driver.power.set_power_state(task, new_state)"},{"line_number":196,"context_line":"                node_wait_for_power_state(task, new_state)"},{"line_number":197,"context_line":"        else:"},{"line_number":198,"context_line":"            if (\u0027timeout\u0027 in reflection.get_signature("},{"line_number":199,"context_line":"                    task.driver.power.reboot).parameters):"}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_92c56991","line":196,"in_reply_to":"ff0f0b1f_fb0a92cf","updated":"2017-05-30 12:22:05.000000000","message":"everywhere in the code does this already, but I agree we need to document it somewhere if it isn\u0027t already","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e70dd62790f0baa2edb157c9f0a31e25407fe4c4","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                LOG.warning(\"The reboot method of %(driver_name)s \""},{"line_number":203,"context_line":"                            \"doesn\u0027t support \u0027timeout\u0027 parameter.\","},{"line_number":204,"context_line":"                            {\u0027driver_name\u0027: node.driver})"},{"line_number":205,"context_line":"                task.driver.power.reboot(task)"},{"line_number":206,"context_line":"    except Exception as e:"},{"line_number":207,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":208,"context_line":"            node[\u0027target_power_state\u0027] \u003d states.NOSTATE"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_e00c1d95","line":205,"updated":"2017-05-24 16:20:42.000000000","message":"we need to wait here as well","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"743b41203faecc00f9c4cbf2235d7a71c30b200c","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                LOG.warning(\"The reboot method of %(driver_name)s \""},{"line_number":203,"context_line":"                            \"doesn\u0027t support \u0027timeout\u0027 parameter.\","},{"line_number":204,"context_line":"                            {\u0027driver_name\u0027: node.driver})"},{"line_number":205,"context_line":"                task.driver.power.reboot(task)"},{"line_number":206,"context_line":"    except Exception as e:"},{"line_number":207,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":208,"context_line":"            node[\u0027target_power_state\u0027] \u003d states.NOSTATE"}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_f2d6e54f","line":205,"in_reply_to":"ff0f0b1f_e00c1d95","updated":"2017-05-30 12:22:05.000000000","message":"Done","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"033180d20fc8fc121d1a10997bf9c3046328d27f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        status \u003d task.driver.power.get_power_state(task)"},{"line_number":81,"context_line":"        if status \u003d\u003d new_state:"},{"line_number":82,"context_line":"            raise loopingcall.LoopingCallDone(retvalue\u003dstatus)"},{"line_number":83,"context_line":"        return False"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    try:"},{"line_number":86,"context_line":"        timer \u003d loopingcall.BackOffLoopingCall(_wait)"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_5d7ef4e3","line":83,"updated":"2017-06-06 15:05:00.000000000","message":"not needed?","commit_id":"940ad71ef9cc386aec974b1538f5dfd346528f77"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"033180d20fc8fc121d1a10997bf9c3046328d27f","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    # take power action"},{"line_number":181,"context_line":"    try:"},{"line_number":182,"context_line":"        if new_state !\u003d states.REBOOT:"},{"line_number":183,"context_line":"            task.driver.power.set_power_state(task, new_state)"},{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            if (\u0027timeout\u0027 in reflection.get_signature("},{"line_number":186,"context_line":"                    task.driver.power.reboot).parameters):"}],"source_content_type":"text/x-python","patch_set":13,"id":"df140735_3d8100c4","line":183,"updated":"2017-06-06 15:05:00.000000000","message":"I\u0027d prefer the change to drop \"timeout\" check to be separate","commit_id":"940ad71ef9cc386aec974b1538f5dfd346528f77"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"2bdf1a67bd21492e48d8b08563f856343f1e4bed","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        timer \u003d loopingcall.BackOffLoopingCall(_wait)"},{"line_number":90,"context_line":"        return timer.start(initial_delay\u003d1, timeout\u003dretry_timeout).wait()"},{"line_number":91,"context_line":"    except loopingcall.LoopingCallTimeOut:"},{"line_number":92,"context_line":"        LOG.error(\u0027Timed out waiting for power %(state)s on node \u0027"},{"line_number":93,"context_line":"                  \u0027%(node_id)s.\u0027,"},{"line_number":94,"context_line":"                  {\u0027state\u0027: new_state, \u0027node_id\u0027: task.node.uuid})"},{"line_number":95,"context_line":"        raise exception.PowerStateFailure(pstate\u003dnew_state)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_dd8b711c","line":92,"range":{"start_line":92,"start_character":19,"end_line":92,"end_character":37},"updated":"2017-06-27 04:43:51.000000000","message":"nit: Since timeout value can come from different config params. It would be useful if we could print the timeout value being used.\n\u0027Timed out after %(retry_timeout) secs waiting for power ...\u0027","commit_id":"e34b626dc2f8792d846c52a932667e075c470a32"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"044bc9ffb4687ad6b9212fb20f38eff3632102c2","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        timer \u003d loopingcall.BackOffLoopingCall(_wait)"},{"line_number":90,"context_line":"        return timer.start(initial_delay\u003d1, timeout\u003dretry_timeout).wait()"},{"line_number":91,"context_line":"    except loopingcall.LoopingCallTimeOut:"},{"line_number":92,"context_line":"        LOG.error(\u0027Timed out waiting for power %(state)s on node \u0027"},{"line_number":93,"context_line":"                  \u0027%(node_id)s.\u0027,"},{"line_number":94,"context_line":"                  {\u0027state\u0027: new_state, \u0027node_id\u0027: task.node.uuid})"},{"line_number":95,"context_line":"        raise exception.PowerStateFailure(pstate\u003dnew_state)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_54ce13b4","line":92,"range":{"start_line":92,"start_character":19,"end_line":92,"end_character":37},"in_reply_to":"5f201791_dd8b711c","updated":"2017-06-27 11:13:59.000000000","message":"Done","commit_id":"e34b626dc2f8792d846c52a932667e075c470a32"}],"ironic/conf/conductor.py":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b558efc87332a09b86f2b7193a1a61d59931376d","unresolved":false,"context_lines":[{"line_number":145,"context_line":"               min\u003d1,"},{"line_number":146,"context_line":"               help\u003d_(\u0027Timeout (in seconds) of soft reboot and soft power \u0027"},{"line_number":147,"context_line":"                      \u0027off operation. This value always has to be positive.\u0027)),"},{"line_number":148,"context_line":"    cfg.IntOpt(\u0027power_retry_timeout\u0027,"},{"line_number":149,"context_line":"               min\u003d2, default\u003d30,"},{"line_number":150,"context_line":"               help\u003d_(\u0027Number of seconds to wait for power operations to \u0027"},{"line_number":151,"context_line":"                      \u0027finish before timing out\u0027)),"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_6c6f09fc","line":148,"updated":"2017-06-27 07:54:33.000000000","message":"Please add mention about new config option in release note and regenerate sample of ironic.conf.","commit_id":"e34b626dc2f8792d846c52a932667e075c470a32"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"044bc9ffb4687ad6b9212fb20f38eff3632102c2","unresolved":false,"context_lines":[{"line_number":145,"context_line":"               min\u003d1,"},{"line_number":146,"context_line":"               help\u003d_(\u0027Timeout (in seconds) of soft reboot and soft power \u0027"},{"line_number":147,"context_line":"                      \u0027off operation. This value always has to be positive.\u0027)),"},{"line_number":148,"context_line":"    cfg.IntOpt(\u0027power_retry_timeout\u0027,"},{"line_number":149,"context_line":"               min\u003d2, default\u003d30,"},{"line_number":150,"context_line":"               help\u003d_(\u0027Number of seconds to wait for power operations to \u0027"},{"line_number":151,"context_line":"                      \u0027finish before timing out\u0027)),"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_b438c79f","line":148,"in_reply_to":"5f201791_6c6f09fc","updated":"2017-06-27 11:13:59.000000000","message":"Done","commit_id":"e34b626dc2f8792d846c52a932667e075c470a32"}],"ironic/drivers/modules/ipmitool.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"37d6eb022f6dec4a7bd3407c56295ecf59b8cfe5","unresolved":false,"context_lines":[{"line_number":508,"context_line":"        try:"},{"line_number":509,"context_line":"            # Only issue power change command until it works (or there\u0027s"},{"line_number":510,"context_line":"            # a timeout)."},{"line_number":511,"context_line":"            if not mutable[\u0027change_successful\u0027]:"},{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffe62b97_85ca8b17","line":511,"updated":"2017-03-27 07:52:56.000000000","message":"This code is not corresponding to bug description. It adds unpredictable behavior, because power on and status command retries use the same timeout. For example power on executed successfully near timeout end, there is no time for status check. And (this is my personal opinion) better to check status even after error because BMC can produce error after power operation.","commit_id":"2847fb04b2508a6333abf063f95f3ecd03ddc564"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"fc0b62a270445c556bbff0a645f9056c59e0cd84","unresolved":false,"context_lines":[{"line_number":508,"context_line":"        try:"},{"line_number":509,"context_line":"            # Only issue power change command until it works (or there\u0027s"},{"line_number":510,"context_line":"            # a timeout)."},{"line_number":511,"context_line":"            if not mutable[\u0027change_successful\u0027]:"},{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffe62b97_1c85b108","line":511,"in_reply_to":"ffe62b97_36c2d4ea","updated":"2017-03-27 10:33:55.000000000","message":"\u003eHowever I don\u0027t understand why you\u0027d want to check the status if it\u0027s not been successful even after retries?\nBecause buggy BMC firmware is not rare case, but I don\u0027t have strong opinion about this.","commit_id":"2847fb04b2508a6333abf063f95f3ecd03ddc564"},{"author":{"_account_id":15750,"name":"Julian Edwards","email":"bigjools@gmail.com","username":"bigjools"},"change_message_id":"5efa452a043c341e42662005664d879ff5c41e20","unresolved":false,"context_lines":[{"line_number":508,"context_line":"        try:"},{"line_number":509,"context_line":"            # Only issue power change command until it works (or there\u0027s"},{"line_number":510,"context_line":"            # a timeout)."},{"line_number":511,"context_line":"            if not mutable[\u0027change_successful\u0027]:"},{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffe62b97_36c2d4ea","line":511,"in_reply_to":"ffe62b97_85ca8b17","updated":"2017-03-27 10:00:08.000000000","message":"OK that\u0027s a good first point, I\u0027ll reset the timeout when the action succeeds to allow sufficient time for a status check.\n\nHowever I don\u0027t understand why you\u0027d want to check the status if it\u0027s not been successful even after retries?","commit_id":"2847fb04b2508a6333abf063f95f3ecd03ddc564"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"cb09b2a9123340e4ea78536d06bf01ae9f312350","unresolved":false,"context_lines":[{"line_number":508,"context_line":"        try:"},{"line_number":509,"context_line":"            # Only issue power change command until it works (or there\u0027s"},{"line_number":510,"context_line":"            # a timeout)."},{"line_number":511,"context_line":"            if not mutable[\u0027change_successful\u0027]:"},{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_fd75c033","line":511,"range":{"start_line":511,"start_character":28,"end_line":511,"end_character":45},"updated":"2017-03-30 13:29:50.000000000","message":"Nit: I would prefer \u0027request_successful\u0027 because the \u0027change\u0027 isn\u0027t successful until after we prove its happened with the power status calls.","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":15750,"name":"Julian Edwards","email":"bigjools@gmail.com","username":"bigjools"},"change_message_id":"5f5e35a5c145c36d5df9842f15d634807c4205ee","unresolved":false,"context_lines":[{"line_number":508,"context_line":"        try:"},{"line_number":509,"context_line":"            # Only issue power change command until it works (or there\u0027s"},{"line_number":510,"context_line":"            # a timeout)."},{"line_number":511,"context_line":"            if not mutable[\u0027change_successful\u0027]:"},{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_545ec5e6","line":511,"range":{"start_line":511,"start_character":28,"end_line":511,"end_character":45},"in_reply_to":"ffe62b97_fd75c033","updated":"2017-03-31 01:10:30.000000000","message":"Done","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"1771d742a2f3ccd4dfff32c4645c9fd3d5654438","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_2edbec7d","line":515,"updated":"2017-03-30 13:51:03.000000000","message":"This solution causes help for timeout options misinforms. \u0027retry_timeout\u0027: \u0027Maximum time in seconds to retry IPMI operations... etc. But we can retry here up to 2*retry_timeout. I don\u0027t think that we should change defaults, maybe exit at error on l512 immediately.","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":12640,"name":"Arun S A G","email":"sagarun@gmail.com","username":"sagarun"},"change_message_id":"eb5f152d945f04093410093caab11b2353f54dfc","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_dcf3bb09","line":515,"in_reply_to":"7ffa3b31_6bc1822e","updated":"2017-04-19 08:29:58.000000000","message":"The retries in _wait method is mostly for _power_status call.\nIf you look closely the _exec_ipmitool method it returns immediately on success https://github.com/openstack/ironic/blob/31d889a7c45c63664969c89878e88652697b7949/ironic/drivers/modules/ipmitool.py#L435 , but we want to keep checking power status until it power status changes to target power state or retry_timeout occurs. This happens in outer loop.","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":15750,"name":"Julian Edwards","email":"bigjools@gmail.com","username":"bigjools"},"change_message_id":"b3a27416fae6fb03e6907f51caed9a4a13d0da34","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_6bc1822e","line":515,"in_reply_to":"7ffa3b31_703171ec","updated":"2017-04-19 04:36:55.000000000","message":"The fact that _set_and_wait() is doing retries blinded me to the fact that _exec_ipmitool() is also doing retries. Which brings me to ask - why are they both doing retries? Surely it should be one or the other?  Is LoopingCall presenting any side effects that are being relied upon?\n\nIt seems like the whole _set_and_wait() can be vastly simplified by letting _exec_ipmitool() do the retries, and it can just catch exceptions and do a status check.\n\nThoughts?","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":15750,"name":"Julian Edwards","email":"bigjools@gmail.com","username":"bigjools"},"change_message_id":"b3a27416fae6fb03e6907f51caed9a4a13d0da34","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_2be13ad1","line":515,"in_reply_to":"7ffa3b31_b00ed92f","updated":"2017-04-19 04:36:55.000000000","message":"I agree, it should stay inside try/except.","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":15750,"name":"Julian Edwards","email":"bigjools@gmail.com","username":"bigjools"},"change_message_id":"2e13a9aa5066de091e80bceb2cf7238a8cf99833","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_fe703d42","line":515,"in_reply_to":"bff0334d_4d2ae5da","updated":"2017-04-12 10:41:33.000000000","message":"OK so this is in direct conflict to the earlier request I had to change the code so that there\u0027s time to make the state check after the action.\n\nCan you please be more specific/definitive on which solution you will approve?\n\nThanks.","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":12640,"name":"Arun S A G","email":"sagarun@gmail.com","username":"sagarun"},"change_message_id":"ffbd065a26d9a499d47f594dd1f3d7cd483b069e","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_b00ed92f","line":515,"in_reply_to":"bff0334d_590cd992","updated":"2017-04-19 03:12:15.000000000","message":"If we move it out side try..except, if there is an exception during power operation (i.e power on), won\u0027t it create a backtrace? who will catch it?","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"afc2ca6b1fb4af41bcbaaae0acdf450e5f417e74","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_590cd992","line":515,"in_reply_to":"bff0334d_fe703d42","updated":"2017-04-12 15:05:27.000000000","message":"So we already do retries in _exec_ipmitool [0], and if _exec_ipmitool raise exception we shouldn\u0027t catch it here, just move L512 outside of try: .. except to L507\n\n[0] https://github.com/openstack/ironic/blob/31d889a7c45c63664969c89878e88652697b7949/ironic/drivers/modules/ipmitool.py#L400","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":12640,"name":"Arun S A G","email":"sagarun@gmail.com","username":"sagarun"},"change_message_id":"ffbd065a26d9a499d47f594dd1f3d7cd483b069e","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_703171ec","line":515,"in_reply_to":"bff0334d_fe703d42","updated":"2017-04-19 03:12:15.000000000","message":"When _exec_ipmitool fails normally it wait until \u0027retry_timeout\u0027. So when \u0027power on\u0027 fails, we shouldn\u0027t be trying to do another \u0027power on\u0027. \n\nIf \u0027power on\u0027 is successful (returns without error). We need to then run power_status as usual?\n\nDoes this makes sense? At least this is what i want.","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"495ae3ff95f2bda3c53ef90e71da41cd585b4725","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_4d2ae5da","line":515,"in_reply_to":"dfeb2761_f4e5d939","updated":"2017-04-12 09:29:21.000000000","message":"The timeout value is defined is an amount of time we should wait for power action to be completed. If it is exceeded we should fail, no matter where it was failed when trying to power on node, or when getting status.\nSo I\u0027m +1 to Yuriy concern here.","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":15750,"name":"Julian Edwards","email":"bigjools@gmail.com","username":"bigjools"},"change_message_id":"987affb8462e9b5c4439acc292a513aee5e496e9","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":513,"context_line":"                mutable[\u0027change_successful\u0027] \u003d True"},{"line_number":514,"context_line":"                # Reset the timeout for status checking."},{"line_number":515,"context_line":"                mutable[\u0027total_time\u0027] \u003d 0"},{"line_number":516,"context_line":"                # Reset the backoff for retries."},{"line_number":517,"context_line":"                mutable[\u0027iter\u0027] \u003d -1"},{"line_number":518,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_f4e5d939","line":515,"in_reply_to":"ffe62b97_2edbec7d","updated":"2017-03-31 01:07:09.000000000","message":"It needs to reset the effective timeout, otherwise we have the scenario described in another patchset comment where the action could succeed right at the end of the timeout window and then it has no time to do the status check.\n\nThis function is already doing far too much and really needs rewriting into two separate LoopingCalls, which I am loath to do as it will probably require a ton of test changes and is beyond the scope of this bug fix.\n\nNotice that the total time is never reported anywhere in a log or a message, it\u0027s ONLY used for timeout checking in the loop.","commit_id":"f293792ab04bb43c6e0f17ecee698a5bf1d7b4a4"},{"author":{"_account_id":12640,"name":"Arun S A G","email":"sagarun@gmail.com","username":"sagarun"},"change_message_id":"ab73fdb805b414668c9dfb304755a51f775adfab","unresolved":false,"context_lines":[{"line_number":507,"context_line":"    # NOTE(sambetts): Retries for ipmi power action failure will be handled by"},{"line_number":508,"context_line":"    # the _exec_ipmitool function, so no need to wrap this call in a try except"},{"line_number":509,"context_line":"    # or its own retries."},{"line_number":510,"context_line":"    _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"    def _wait(mutable):"},{"line_number":513,"context_line":"        # NOTE(sambetts): Retries for ipmi status call failure will be handled"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_8e9f874f","line":510,"updated":"2017-05-15 16:29:46.000000000","message":"_exec_ipmitool function has a \u0027save_and_reraise\u0027 on failure. So the exception will raised on an ipmi failure from that method and We are not handling it here.","commit_id":"9873ea24c4d89a117506f9f77a9f7db667fabd6f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"8624eeb750678e7d5a184d8d2be661715b18b48a","unresolved":false,"context_lines":[{"line_number":507,"context_line":"    # NOTE(sambetts): Retries for ipmi power action failure will be handled by"},{"line_number":508,"context_line":"    # the _exec_ipmitool function, so no need to wrap this call in a try except"},{"line_number":509,"context_line":"    # or its own retries."},{"line_number":510,"context_line":"    _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"    def _wait(mutable):"},{"line_number":513,"context_line":"        # NOTE(sambetts): Retries for ipmi status call failure will be handled"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_b4cbb251","line":510,"in_reply_to":"1f013ff3_6e4f9bbd","updated":"2017-05-15 17:51:09.000000000","message":"Yeah, power state is driver specific thing, so drivers can raise whatever they want, and deploy interface (or whatever needs to handle it) should catch all exceptions. So it should be fine.","commit_id":"9873ea24c4d89a117506f9f77a9f7db667fabd6f"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"4a8968eddca1fa2309a27b98fef5d48732618388","unresolved":false,"context_lines":[{"line_number":507,"context_line":"    # NOTE(sambetts): Retries for ipmi power action failure will be handled by"},{"line_number":508,"context_line":"    # the _exec_ipmitool function, so no need to wrap this call in a try except"},{"line_number":509,"context_line":"    # or its own retries."},{"line_number":510,"context_line":"    _exec_ipmitool(driver_info, \"power %s\" % cmd_name)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"    def _wait(mutable):"},{"line_number":513,"context_line":"        # NOTE(sambetts): Retries for ipmi status call failure will be handled"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_6e4f9bbd","line":510,"in_reply_to":"1f013ff3_8e9f874f","updated":"2017-05-15 17:31:04.000000000","message":"No need to handle it here, _exec_ipmitool handles failures from calling ipmitool and will retry if its a retryable error, if not it\u0027ll be raised and bubble up from here which is the expected behaviour.","commit_id":"9873ea24c4d89a117506f9f77a9f7db667fabd6f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"571fdccd241196ad895d6d718e65c29e5e5885e9","unresolved":false,"context_lines":[{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    # Use mutable objects so the looped method can change them."},{"line_number":537,"context_line":"    # Start \u0027iter\u0027 from -1 so that the first two checks are one second apart."},{"line_number":538,"context_line":"    status \u003d {\u0027power\u0027: None, \u0027iter\u0027: -1, \u0027total_time\u0027: 0}"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    timer \u003d loopingcall.DynamicLoopingCall(_wait, status)"},{"line_number":541,"context_line":"    timer.start().wait()"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_ae6923bf","line":538,"range":{"start_line":538,"start_character":37,"end_line":538,"end_character":39},"updated":"2017-05-15 16:17:43.000000000","message":"We can now set 0 here and avoid changing a couple of unittests you had to change.","commit_id":"9873ea24c4d89a117506f9f77a9f7db667fabd6f"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"4a8968eddca1fa2309a27b98fef5d48732618388","unresolved":false,"context_lines":[{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    # Use mutable objects so the looped method can change them."},{"line_number":537,"context_line":"    # Start \u0027iter\u0027 from -1 so that the first two checks are one second apart."},{"line_number":538,"context_line":"    status \u003d {\u0027power\u0027: None, \u0027iter\u0027: -1, \u0027total_time\u0027: 0}"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    timer \u003d loopingcall.DynamicLoopingCall(_wait, status)"},{"line_number":541,"context_line":"    timer.start().wait()"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_4e4cdfc6","line":538,"range":{"start_line":538,"start_character":37,"end_line":538,"end_character":39},"in_reply_to":"1f013ff3_ae6923bf","updated":"2017-05-15 17:31:04.000000000","message":"Oh good shout!","commit_id":"9873ea24c4d89a117506f9f77a9f7db667fabd6f"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"35aeea17cada73b74aafa1c19aba96769f6c47a7","unresolved":false,"context_lines":[{"line_number":486,"context_line":"    :param power_action: the action Ironic will perform when changing the"},{"line_number":487,"context_line":"      power state of the node."},{"line_number":488,"context_line":"    :param timeout: timeout (in seconds) positive integer (\u003e 0) for any"},{"line_number":489,"context_line":"      power state. ``None`` indicates to use default timeout."},{"line_number":490,"context_line":"    :param driver_info: the ipmitool parameters for accessing a node."},{"line_number":491,"context_line":"    :returns: one of ironic.common.states"},{"line_number":492,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_d7599bfe","line":489,"updated":"2017-05-15 22:11:16.000000000","message":"sigh. so the behaviour has been changed. this is not right, but to be honest, it wasn\u0027t right in the initial code either.\n\nIt looks like this is the timeout used for waiting, after a power action is initiated, for the BMC to get to the desired power state.","commit_id":"047e2dedb5ea66e54bd47977872be372c65e95ca"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"35aeea17cada73b74aafa1c19aba96769f6c47a7","unresolved":false,"context_lines":[{"line_number":502,"context_line":"    elif power_action \u003d\u003d states.SOFT_POWER_OFF:"},{"line_number":503,"context_line":"        cmd_name \u003d \"soft\""},{"line_number":504,"context_line":"        target_state \u003d states.POWER_OFF"},{"line_number":505,"context_line":"        retry_timeout \u003d timeout or CONF.conductor.soft_power_off_timeout"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    # NOTE(sambetts): Retries for ipmi power action failure will be handled by"},{"line_number":508,"context_line":"    # the _exec_ipmitool function, so no need to wrap this call in a try except"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_d7cbdba2","line":505,"updated":"2017-05-15 22:11:16.000000000","message":"hmm, outside the scope of this patch, but i wonder if we should be sending this value as a parameter to _exec_ipmitool...","commit_id":"047e2dedb5ea66e54bd47977872be372c65e95ca"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"35aeea17cada73b74aafa1c19aba96769f6c47a7","unresolved":false,"context_lines":[{"line_number":534,"context_line":"            return sleep_time"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    # Use mutable objects so the looped method can change them."},{"line_number":537,"context_line":"    status \u003d {\u0027power\u0027: None, \u0027iter\u0027: 0, \u0027total_time\u0027: 0}"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    timer \u003d loopingcall.DynamicLoopingCall(_wait, status)"},{"line_number":540,"context_line":"    timer.start().wait()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f013ff3_dc6c200a","line":537,"updated":"2017-05-15 22:11:16.000000000","message":"I wonder whether it might be better to leave it as -1. I don\u0027t know how long it takes for the power action to take effect but if it is really fast, with the new change, the user won\u0027t have to wait 1 sec. However, if it isn\u0027t that fast (eg 1.5 secs), with the new change, the user may have to wait 5 secs instead of 2ish seconds.\n\nSo we\u0027ve improved it in one scenario but made it worse in another. If we leave it as -1, the wait will still be exponential, but a slower exponential so as not to penalize the behaviour from before.\n\nEg: old way: power-action, wait 1 sec, power-status, wait 1 sec, power-status.\nwith change: power-action, power-status, wait 1 sec, power-status, wait 4 secs, power-status, ...","commit_id":"047e2dedb5ea66e54bd47977872be372c65e95ca"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ed69814b3340b49b8d1028e206ca2aef575c42ab","unresolved":false,"context_lines":[{"line_number":499,"context_line":"            processutils.ProcessExecutionError) as e:"},{"line_number":500,"context_line":"        LOG.warning(\"IPMI power action failed for node %(node_id)s with \""},{"line_number":501,"context_line":"                    \"error: %(error)s.\","},{"line_number":502,"context_line":"                    {\u0027node_id\u0027: driver_info[\u0027uuid\u0027], \u0027error\u0027: e})"},{"line_number":503,"context_line":"        raise exception.IPMIFailure(cmd\u003dcmd)"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    # TODO(sambetts) Change mutable to a positional argument when bug with"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f013ff3_d531770d","line":502,"updated":"2017-05-16 18:27:14.000000000","message":"does the error string include the power action/cmd? Otherwise, maybe we should log it.","commit_id":"a6a0213241c6fa150236decaa91b2d0d69890ebf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ed69814b3340b49b8d1028e206ca2aef575c42ab","unresolved":false,"context_lines":[{"line_number":502,"context_line":"                    {\u0027node_id\u0027: driver_info[\u0027uuid\u0027], \u0027error\u0027: e})"},{"line_number":503,"context_line":"        raise exception.IPMIFailure(cmd\u003dcmd)"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    # TODO(sambetts) Change mutable to a positional argument when bug with"},{"line_number":506,"context_line":"    # BackOffLoopingCall is fixed."},{"line_number":507,"context_line":"    def _wait():"},{"line_number":508,"context_line":"        # NOTE(sambetts): Retries for ipmi status call failure will be handled"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f013ff3_35ff7b35","line":505,"updated":"2017-05-16 18:27:14.000000000","message":"what bug is this? do you have a link?\nAnd what \u0027mutable\u0027 are you referring to?","commit_id":"a6a0213241c6fa150236decaa91b2d0d69890ebf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d649fbc56ac33a31e4a802ab289489c2defce584","unresolved":false,"context_lines":[{"line_number":502,"context_line":"                    {\u0027node_id\u0027: driver_info[\u0027uuid\u0027], \u0027cmd\u0027: cmd, \u0027error\u0027: e})"},{"line_number":503,"context_line":"        raise exception.IPMIFailure(cmd\u003dcmd)"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _wait():"},{"line_number":506,"context_line":"        # NOTE(sambetts): Retries for ipmi status call failure will be handled"},{"line_number":507,"context_line":"        # by the _exec_ipmitool function and the exceptions handled by"},{"line_number":508,"context_line":"        # _power_status, so no need for try except here because if this raises"},{"line_number":509,"context_line":"        # its already been through several retries so we want it to stop."},{"line_number":510,"context_line":"        status \u003d _power_status(driver_info)"},{"line_number":511,"context_line":"        if status \u003d\u003d target_state:"},{"line_number":512,"context_line":"            raise loopingcall.LoopingCallDone(retvalue\u003dstatus)"},{"line_number":513,"context_line":"        return False"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    try:"},{"line_number":516,"context_line":"        timer \u003d loopingcall.BackOffLoopingCall(_wait)"},{"line_number":517,"context_line":"        return timer.start(initial_delay\u003d1, timeout\u003dretry_timeout).wait()"},{"line_number":518,"context_line":"    except loopingcall.LoopingCallTimeOut:"},{"line_number":519,"context_line":"        LOG.error(\u0027IPMI power %(state)s timed out on node %(node_id)s.\u0027,"},{"line_number":520,"context_line":"                  {\u0027state\u0027: cmd_name, \u0027node_id\u0027: driver_info[\u0027uuid\u0027]})"},{"line_number":521,"context_line":"        return states.ERROR"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"def _power_on(driver_info, timeout\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_c3124e62","line":521,"range":{"start_line":505,"start_character":0,"end_line":521,"end_character":27},"updated":"2017-05-24 11:08:17.000000000","message":"as agreed on IRC, let\u0027s probably move this logic to the conductor or at least to a new utility function (similar to https://review.openstack.org/#/c/467247/3/ironic/conductor/utils.py)","commit_id":"11cd207987494cb95c2bb198519dd4f617fac396"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e70dd62790f0baa2edb157c9f0a31e25407fe4c4","unresolved":false,"context_lines":[{"line_number":456,"context_line":""},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"def _set_and_wait(power_action, driver_info, timeout\u003dNone):"},{"line_number":459,"context_line":"    \"\"\"Helper function for BackOffLoopingCall."},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    This method changes the power state and polls the BMC until the desired"},{"line_number":462,"context_line":"    power state is reached, or CONF.ipmi.retry_timeout would be exceeded by the"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_c00fd985","line":459,"updated":"2017-05-24 16:20:42.000000000","message":"This is no longer correct. And I guess we should rename it to just _power_action","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"743b41203faecc00f9c4cbf2235d7a71c30b200c","unresolved":false,"context_lines":[{"line_number":456,"context_line":""},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"def _set_and_wait(power_action, driver_info, timeout\u003dNone):"},{"line_number":459,"context_line":"    \"\"\"Helper function for BackOffLoopingCall."},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    This method changes the power state and polls the BMC until the desired"},{"line_number":462,"context_line":"    power state is reached, or CONF.ipmi.retry_timeout would be exceeded by the"}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_cd7d806f","line":459,"in_reply_to":"ff0f0b1f_c00fd985","updated":"2017-05-30 12:22:05.000000000","message":"Done","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e70dd62790f0baa2edb157c9f0a31e25407fe4c4","unresolved":false,"context_lines":[{"line_number":471,"context_line":"      power state of the node."},{"line_number":472,"context_line":"    :param timeout: timeout (in seconds) positive integer (\u003e 0) to wait for the"},{"line_number":473,"context_line":"      expected power state. ``None`` indicates to use default timeout"},{"line_number":474,"context_line":"      CONF.ipmi.retry_timeout."},{"line_number":475,"context_line":"    :param driver_info: the ipmitool parameters for accessing a node."},{"line_number":476,"context_line":"    :returns: one of ironic.common.states"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_a02aa5d7","line":474,"updated":"2017-05-24 16:20:42.000000000","message":"this argument is no longer used","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"743b41203faecc00f9c4cbf2235d7a71c30b200c","unresolved":false,"context_lines":[{"line_number":471,"context_line":"      power state of the node."},{"line_number":472,"context_line":"    :param timeout: timeout (in seconds) positive integer (\u003e 0) to wait for the"},{"line_number":473,"context_line":"      expected power state. ``None`` indicates to use default timeout"},{"line_number":474,"context_line":"      CONF.ipmi.retry_timeout."},{"line_number":475,"context_line":"    :param driver_info: the ipmitool parameters for accessing a node."},{"line_number":476,"context_line":"    :returns: one of ironic.common.states"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_8d978891","line":474,"in_reply_to":"ff0f0b1f_a02aa5d7","updated":"2017-05-30 12:22:05.000000000","message":"Done","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"160d47a1b890396555be4f1d27514536b1b5f4a4","unresolved":false,"context_lines":[{"line_number":821,"context_line":"                  \"with invalid power state %s.\") % power_state)"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"        if state !\u003d target_state:"},{"line_number":824,"context_line":"            raise exception.PowerStateFailure(pstate\u003dtarget_state)"},{"line_number":825,"context_line":""},{"line_number":826,"context_line":"    @METRICS.timer(\u0027IPMIPower.reboot\u0027)"},{"line_number":827,"context_line":"    @task_manager.require_exclusive_lock"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_fb3cd293","line":824,"updated":"2017-05-24 16:44:26.000000000","message":"don\u0027t we need to wait here?","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"743b41203faecc00f9c4cbf2235d7a71c30b200c","unresolved":false,"context_lines":[{"line_number":821,"context_line":"                  \"with invalid power state %s.\") % power_state)"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"        if state !\u003d target_state:"},{"line_number":824,"context_line":"            raise exception.PowerStateFailure(pstate\u003dtarget_state)"},{"line_number":825,"context_line":""},{"line_number":826,"context_line":"    @METRICS.timer(\u0027IPMIPower.reboot\u0027)"},{"line_number":827,"context_line":"    @task_manager.require_exclusive_lock"}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_2d8e3c78","line":824,"in_reply_to":"ff0f0b1f_fb3cd293","updated":"2017-05-30 12:22:05.000000000","message":"Removed this its not required any more.","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"160d47a1b890396555be4f1d27514536b1b5f4a4","unresolved":false,"context_lines":[{"line_number":848,"context_line":"        driver_utils.ensure_next_boot_device(task, driver_info)"},{"line_number":849,"context_line":"        _power_on(driver_info, timeout\u003dtimeout)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        utils.node_wait_for_power_state(task, states.POWER_ON,"},{"line_number":852,"context_line":"                                        timeout\u003dtimeout)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def get_supported_power_states(self, task):"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_9bc836a6","line":851,"range":{"start_line":851,"start_character":8,"end_line":851,"end_character":13},"updated":"2017-05-24 16:44:26.000000000","message":"and also it should have been cond_utils","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"743b41203faecc00f9c4cbf2235d7a71c30b200c","unresolved":false,"context_lines":[{"line_number":848,"context_line":"        driver_utils.ensure_next_boot_device(task, driver_info)"},{"line_number":849,"context_line":"        _power_on(driver_info, timeout\u003dtimeout)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        utils.node_wait_for_power_state(task, states.POWER_ON,"},{"line_number":852,"context_line":"                                        timeout\u003dtimeout)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def get_supported_power_states(self, task):"}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_edd72423","line":851,"range":{"start_line":851,"start_character":8,"end_line":851,"end_character":13},"in_reply_to":"ff0f0b1f_9bc836a6","updated":"2017-05-30 12:22:05.000000000","message":"Done","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e70dd62790f0baa2edb157c9f0a31e25407fe4c4","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        _power_on(driver_info, timeout\u003dtimeout)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        utils.node_wait_for_power_state(task, states.POWER_ON,"},{"line_number":852,"context_line":"                                        timeout\u003dtimeout)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def get_supported_power_states(self, task):"},{"line_number":855,"context_line":"        \"\"\"Get a list of the supported power states."}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_8025610b","line":852,"updated":"2017-05-24 16:20:42.000000000","message":"let\u0027s move this final wait to the conductor too maybe (see above)?","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"160d47a1b890396555be4f1d27514536b1b5f4a4","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        _power_on(driver_info, timeout\u003dtimeout)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        utils.node_wait_for_power_state(task, states.POWER_ON,"},{"line_number":852,"context_line":"                                        timeout\u003dtimeout)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def get_supported_power_states(self, task):"},{"line_number":855,"context_line":"        \"\"\"Get a list of the supported power states."}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_bb29ba37","line":852,"in_reply_to":"ff0f0b1f_8025610b","updated":"2017-05-24 16:44:26.000000000","message":"In conductor, it would be just wait for powered on in case of reboot? It might bring some trouble then, if the bmc is slow and will not be touching the actual power state for the first seconds, reporting it as ON.","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"743b41203faecc00f9c4cbf2235d7a71c30b200c","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        _power_on(driver_info, timeout\u003dtimeout)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        utils.node_wait_for_power_state(task, states.POWER_ON,"},{"line_number":852,"context_line":"                                        timeout\u003dtimeout)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def get_supported_power_states(self, task):"},{"line_number":855,"context_line":"        \"\"\"Get a list of the supported power states."}],"source_content_type":"text/x-python","patch_set":12,"id":"df140735_ed64c4bb","line":852,"in_reply_to":"ff0f0b1f_bb29ba37","updated":"2017-05-30 12:22:05.000000000","message":"drivers should wait for intermediate states if required (some drivers don\u0027t need to do this), but the final power back on should be checked in the conductor.","commit_id":"b8dbd3bb3c06e99aa7770019d9da067f1dd09b33"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0770d3f5125cb699b5114f0e48c623031fd35c14","unresolved":false,"context_lines":[{"line_number":396,"context_line":"            args.append(option)"},{"line_number":397,"context_line":"            args.append(driver_info[name])"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    # TODO(sambetts) Remove useage of ipmi.retry_timeout in Queens"},{"line_number":400,"context_line":"    timeout \u003d CONF.ipmi.retry_timeout or CONF.ipmi.command_retry_timeout"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    # specify retry timing more precisely, if supported"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f201791_dabea0ac","line":399,"updated":"2017-06-28 09:15:39.000000000","message":"nit: typo in \"usage\"","commit_id":"ee5d4942a1c33736ffe05ec01619142be400c2f4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0770d3f5125cb699b5114f0e48c623031fd35c14","unresolved":false,"context_lines":[{"line_number":473,"context_line":"    :returns: one of ironic.common.states"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"    \"\"\""},{"line_number":476,"context_line":"    # TODO(sambetts) Remove useage of ipmi.retry_timeout in Queens"},{"line_number":477,"context_line":"    default_timeout \u003d CONF.ipmi.retry_timeout"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    if power_action \u003d\u003d states.POWER_ON:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f201791_badf640b","line":476,"updated":"2017-06-28 09:15:39.000000000","message":"ditto","commit_id":"ee5d4942a1c33736ffe05ec01619142be400c2f4"}],"ironic/tests/unit/drivers/modules/test_ipmitool.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"571fdccd241196ad895d6d718e65c29e5e5885e9","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"    def test___set_and_wait_no_needless_status_polling("},{"line_number":1307,"context_line":"            self, sleep_mock, mock_exec, mock_status, mock_sleep):"},{"line_number":1308,"context_line":"        # Check that if the call to power state change fails, it doesn\u0027t"},{"line_number":1309,"context_line":"        # call power_status()."},{"line_number":1310,"context_line":"        self.config(retry_timeout\u003d2, group\u003d\u0027ipmi\u0027)"},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"        mock_exec.side_effect \u003d exception.IPMIFailure(cmd\u003d\u0027power on\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_6e355bda","line":1309,"updated":"2017-05-15 16:17:43.000000000","message":"Would be nice to also assert mock_status not being called.","commit_id":"9873ea24c4d89a117506f9f77a9f7db667fabd6f"}],"releasenotes/notes/fix-bug-1675529-479357c217819420.yaml":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"35aeea17cada73b74aafa1c19aba96769f6c47a7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Prevent the IPMI driver from needlessly checking status if the power"},{"line_number":5,"context_line":"    change action has already failed. As a bonus, the new code will"},{"line_number":6,"context_line":"    reset the timeout after a successful change so that the subsequent"},{"line_number":7,"context_line":"    status checks can have a chance to succeed if the change action took"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1f013ff3_bce15401","line":4,"updated":"2017-05-15 22:11:16.000000000","message":"nit s/Prevent/Prevents/","commit_id":"047e2dedb5ea66e54bd47977872be372c65e95ca"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"35aeea17cada73b74aafa1c19aba96769f6c47a7","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    change action has already failed. As a bonus, the new code will"},{"line_number":6,"context_line":"    reset the timeout after a successful change so that the subsequent"},{"line_number":7,"context_line":"    status checks can have a chance to succeed if the change action took"},{"line_number":8,"context_line":"    it close to the wire. For more info, see"},{"line_number":9,"context_line":"    https//bugs.launchpad.net/ironic/+bug/1675529"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1f013ff3_7c73cce8","line":8,"updated":"2017-05-15 22:11:16.000000000","message":"I\u0027m not sure what you mean by this \u0027bonus\u0027.\n\nWhat does \u0027close to the wire\u0027 mean?\n\nOh, ok, I looked at the code a bit more closely. I think it might be clearer to say that the initiation of the power action now has its own timeout, and the  wait-for-power-to-be-set has its own timeout.","commit_id":"047e2dedb5ea66e54bd47977872be372c65e95ca"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0770d3f5125cb699b5114f0e48c623031fd35c14","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"deprecations:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Configuration option IPMI.retry_timeout is deprecated in favor of new"},{"line_number":5,"context_line":"    options IPMI.command_retry_timeout, and"},{"line_number":6,"context_line":"    CONDUCTOR.power_state_change_timeout"},{"line_number":7,"context_line":"fixes:"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"5f201791_9ae268d4","line":4,"updated":"2017-06-28 09:15:39.000000000","message":"s/IPMI/ipmi/","commit_id":"ee5d4942a1c33736ffe05ec01619142be400c2f4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0770d3f5125cb699b5114f0e48c623031fd35c14","unresolved":false,"context_lines":[{"line_number":2,"context_line":"deprecations:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Configuration option IPMI.retry_timeout is deprecated in favor of new"},{"line_number":5,"context_line":"    options IPMI.command_retry_timeout, and"},{"line_number":6,"context_line":"    CONDUCTOR.power_state_change_timeout"},{"line_number":7,"context_line":"fixes:"},{"line_number":8,"context_line":"  - |"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"5f201791_7ae54cdb","line":5,"updated":"2017-06-28 09:15:39.000000000","message":"ditto","commit_id":"ee5d4942a1c33736ffe05ec01619142be400c2f4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0770d3f5125cb699b5114f0e48c623031fd35c14","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Configuration option IPMI.retry_timeout is deprecated in favor of new"},{"line_number":5,"context_line":"    options IPMI.command_retry_timeout, and"},{"line_number":6,"context_line":"    CONDUCTOR.power_state_change_timeout"},{"line_number":7,"context_line":"fixes:"},{"line_number":8,"context_line":"  - |"},{"line_number":9,"context_line":"    Prevents the IPMI driver from needlessly checking status if the power"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"5f201791_5ae850b1","line":6,"updated":"2017-06-28 09:15:39.000000000","message":"similar","commit_id":"ee5d4942a1c33736ffe05ec01619142be400c2f4"}]}
