)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0a00991bca0c63706fcc8357c257c0139e3691e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"Co-authored-by: Dan Prince \u003cdprince@redhat.com\u003e"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Change-Id: Ie0e29239592bb64c7a10ecedae299df2c5053359"},{"line_number":32,"context_line":"Closes-bug: #1291991"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F%2BniI%3D","line":32,"updated":"2014-03-25 15:14:12.000000000","message":"Does it close the bug if there are 2 fixes (one for nova, one for ironic)?","commit_id":"8584d0000327e8c54201607587f4983a471e1280"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0b85430800c458d82c7f30c59ab0b88b2448d66","unresolved":false,"context_lines":[{"line_number":29,"context_line":"Co-authored-by: Dan Prince \u003cdprince@redhat.com\u003e"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Change-Id: Ie0e29239592bb64c7a10ecedae299df2c5053359"},{"line_number":32,"context_line":"Closes-bug: #1291991"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F%2Bm%2F4%3D","line":32,"in_reply_to":"AAAAWH%2F%2BnFw%3D","updated":"2014-03-25 15:42:02.000000000","message":"Good to know. Thx!","commit_id":"8584d0000327e8c54201607587f4983a471e1280"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"7d70f0aa60b397b988aefdd15faee948a9fb7481","unresolved":false,"context_lines":[{"line_number":29,"context_line":"Co-authored-by: Dan Prince \u003cdprince@redhat.com\u003e"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Change-Id: Ie0e29239592bb64c7a10ecedae299df2c5053359"},{"line_number":32,"context_line":"Closes-bug: #1291991"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F%2BnFw%3D","line":32,"in_reply_to":"AAAAWH%2F%2BniI%3D","updated":"2014-03-25 15:29:37.000000000","message":"it closes it for the project in which the commit is tagged only.","commit_id":"8584d0000327e8c54201607587f4983a471e1280"}],"ironic/drivers/modules/ipmitool.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0a00991bca0c63706fcc8357c257c0139e3691e","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def _power_on(driver_info):"},{"line_number":155,"context_line":"    \"\"\"Turn the power ON for this node."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    :param driver_info: the ipmitool parameters for accessing a node."},{"line_number":158,"context_line":"    :returns: one of ironic.common.states POWER_ON or ERROR."},{"line_number":159,"context_line":"    :raises: IPMIFailure on an error from ipmitool (from _power_status call)."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BnO0%3D","line":156,"updated":"2014-03-25 15:14:12.000000000","message":"I think it is worth putting a comment somewhere about the assumption that the caller knows what the power state was before calling this, so that we don\u0027t check if the hw is already in that state blah blah","commit_id":"8584d0000327e8c54201607587f4983a471e1280"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"7d70f0aa60b397b988aefdd15faee948a9fb7481","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def _power_on(driver_info):"},{"line_number":155,"context_line":"    \"\"\"Turn the power ON for this node."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    :param driver_info: the ipmitool parameters for accessing a node."},{"line_number":158,"context_line":"    :returns: one of ironic.common.states POWER_ON or ERROR."},{"line_number":159,"context_line":"    :raises: IPMIFailure on an error from ipmitool (from _power_status call)."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BnFg%3D","line":156,"in_reply_to":"AAAAWH%2F%2BnO0%3D","updated":"2014-03-25 15:29:37.000000000","message":"Done","commit_id":"8584d0000327e8c54201607587f4983a471e1280"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0a00991bca0c63706fcc8357c257c0139e3691e","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        sleep_time \u003d _sleep_time(mutable[\u0027iter\u0027])"},{"line_number":185,"context_line":"        if (sleep_time + mutable[\u0027total_time\u0027]) \u003e CONF.ipmi.retry_timeout:"},{"line_number":186,"context_line":"            LOG.error(_(\u0027IPMI power on timed out after %(tries)s retries.\u0027),"},{"line_number":187,"context_line":"                        {\u0027tries\u0027: mutable[\u0027iter\u0027]})"},{"line_number":188,"context_line":"            mutable[\u0027power\u0027] \u003d states.ERROR"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BnRQ%3D","line":185,"updated":"2014-03-25 15:14:12.000000000","message":"Maybe it isn\u0027t worth doing this, but I was wondering about doing the check one-last-time after CONF.ipmi.retry_timeout-mutable[\u0027total_time\u0027]. Since the interval increases after each iteration, it seems to me that the last time will be the longest wait and has a high chance of not being done. It also seems a bit misleading since we didn\u0027t actually wait the full timeout value. eg, i think with the default timeout of 60s, will actually wait about 55 secs.","commit_id":"8584d0000327e8c54201607587f4983a471e1280"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0b85430800c458d82c7f30c59ab0b88b2448d66","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        sleep_time \u003d _sleep_time(mutable[\u0027iter\u0027])"},{"line_number":185,"context_line":"        if (sleep_time + mutable[\u0027total_time\u0027]) \u003e CONF.ipmi.retry_timeout:"},{"line_number":186,"context_line":"            LOG.error(_(\u0027IPMI power on timed out after %(tries)s retries.\u0027),"},{"line_number":187,"context_line":"                        {\u0027tries\u0027: mutable[\u0027iter\u0027]})"},{"line_number":188,"context_line":"            mutable[\u0027power\u0027] \u003d states.ERROR"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2Bm6w%3D","line":185,"in_reply_to":"AAAAWH%2F%2BnCQ%3D","updated":"2014-03-25 15:42:02.000000000","message":"It is that diff that I\u0027m wondering about. If eg retry_timeout\u003d55, it would only wait about 31 secs.","commit_id":"8584d0000327e8c54201607587f4983a471e1280"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"7d70f0aa60b397b988aefdd15faee948a9fb7481","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            raise loopingcall.LoopingCallDone()"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        sleep_time \u003d _sleep_time(mutable[\u0027iter\u0027])"},{"line_number":185,"context_line":"        if (sleep_time + mutable[\u0027total_time\u0027]) \u003e CONF.ipmi.retry_timeout:"},{"line_number":186,"context_line":"            LOG.error(_(\u0027IPMI power on timed out after %(tries)s retries.\u0027),"},{"line_number":187,"context_line":"                        {\u0027tries\u0027: mutable[\u0027iter\u0027]})"},{"line_number":188,"context_line":"            mutable[\u0027power\u0027] \u003d states.ERROR"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BnCQ%3D","line":185,"in_reply_to":"AAAAWH%2F%2BnRQ%3D","updated":"2014-03-25 15:29:37.000000000","message":"So, it does check after the longest sleep. Eg, with default of retry_timeout\u003d60, it will check after the 25-second sleep.\n\nHowever, one difference between my patch and Dan\u0027s is that it is not sleeping for 4 seconds at the end.","commit_id":"8584d0000327e8c54201607587f4983a471e1280"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"333614965597f73666c0a448cebe76b63829f3f2","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    :returns: number of seconds to sleep"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    \"\"\""},{"line_number":149,"context_line":"    if iter \u003c 1:"},{"line_number":150,"context_line":"        return 1"},{"line_number":151,"context_line":"    return iter ** 2"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2Bm%2BE%3D","line":149,"updated":"2014-03-25 15:49:36.000000000","message":"Nit: \u003c\u003d, because 1**2 \u003d\u003d 1","commit_id":"e49fc76eef99cbe47b3f317f686e75e2319d11a9"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"333614965597f73666c0a448cebe76b63829f3f2","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    # use mutable objects so the looped method can change them"},{"line_number":220,"context_line":"    status \u003d {\u0027power\u0027: None, \u0027iter\u0027: -1, \u0027total_time\u0027: 0}"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def _wait_for_power_off(mutable):"},{"line_number":223,"context_line":"        \"\"\"Called at an interval until the node\u0027s power is off.\"\"\""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2Bm7E%3D","line":222,"updated":"2014-03-25 15:49:36.000000000","message":"Both _wait_for_power_{on,off}() is doing pretty much the same stuff, I think we can just have a common code for both of them, e.g:\n\ndef _wait_for_power_state(target_power_state, driver_info, mutable):\n    \"\"\"Called at an interval until the node\u0027s power is on.\n   \n   \u003cEDIT DOC STRING\u003e\n    \"\"\"\n    try:\n        # Only issue \"power on\" once\n        if mutable[\u0027iter\u0027] \u003c 0:\n            _exec_ipmitool(driver_info, \"power on\")\n        else:\n            mutable[\u0027power\u0027] \u003d _power_status(driver_info)\n    except Exception:\n        # Log failures but keep trying\n        LOG.warning(_(\"IPMI power on failed for node %s.\")\n                % driver_info[\u0027uuid\u0027])\n    finally:\n        mutable[\u0027iter\u0027] +\u003d 1\n\n    if mutable[\u0027power\u0027] \u003d\u003d target_power_state:\n        raise loopingcall.LoopingCallDone()\n\n    sleep_time \u003d _sleep_time(mutable[\u0027iter\u0027])\n    if (sleep_time + mutable[\u0027total_time\u0027]) \u003e CONF.ipmi.retry_timeout:\n        # Stop if the next loop would exceed maximum retry_timeout\n        LOG.error(_(\u0027IPMI %(state)s timed out after %(tries)s retries.\u0027),\n                   {\u0027state\u0027: power_state, \u0027tries\u0027: mutable[\u0027iter\u0027]})\n        mutable[\u0027power\u0027] \u003d states.ERROR\n        raise loopingcall.LoopingCallDone()\n    else:\n        mutable[\u0027total_time\u0027] +\u003d sleep_time\n        return sleep_time\n\n\n\nAnd then on the _power_off() or _power_on() methods we would have:\n\n    status \u003d {\u0027power\u0027: None, \u0027iter\u0027: -1, \u0027total_time\u0027: 0}\n    timer \u003d loopingcall.DynamicLoopingCall(_wait_for_power_state,\n                                           states.POWER_ON, driver_info,\n                                           status)\n    timer.start().wait()\n    return status[\u0027power\u0027]","commit_id":"e49fc76eef99cbe47b3f317f686e75e2319d11a9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cc1e6cc85bc66c195b610a61ecef3bc25de91bfc","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    :param target_state: desired power state"},{"line_number":167,"context_line":"    :param driver_info: the ipmitool parameters for accessing a node."},{"line_number":168,"context_line":"    :param mutable: dict of {power, iter, total_time}"},{"line_number":169,"context_line":"    :returns: one of ironic.common.states"},{"line_number":170,"context_line":"    :raises: IPMIFailure on an error from ipmitool (from _power_status call)."},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2Bl4I%3D","line":168,"updated":"2014-03-25 17:31:21.000000000","message":"isn\u0027t that for _wait()?","commit_id":"63f7805888931f5c941210a2700b51a3a42587e0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cc1e6cc85bc66c195b610a61ecef3bc25de91bfc","unresolved":false,"context_lines":[{"line_number":217,"context_line":"    \"\"\"Turn the power ON for this node."},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    :param driver_info: the ipmitool parameters for accessing a node."},{"line_number":220,"context_line":"    :returns: one of ironic.common.states POWER_OFF or ERROR."},{"line_number":221,"context_line":"    :raises: IPMIFailure on an error from ipmitool (from _power_status call)."},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2Bl4Q%3D","line":220,"updated":"2014-03-25 17:31:21.000000000","message":"why is it POWER_OFF instead of POWER_ON?","commit_id":"63f7805888931f5c941210a2700b51a3a42587e0"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"0d13eaf8e4098b5d95e945d9f307dacfc120269d","unresolved":false,"context_lines":[{"line_number":154,"context_line":"def _set_and_wait(target_state, driver_info):"},{"line_number":155,"context_line":"    \"\"\"Helper function for DynamicLoopingCall."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    This method changes the power state and polls the BMCuntil the desired"},{"line_number":158,"context_line":"    power state is reached, or CONF.ipmi.retry_timeout would be exceeded by the"},{"line_number":159,"context_line":"    next iteration."},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2Blts%3D","line":157,"updated":"2014-03-25 17:42:43.000000000","message":"Should be a space between \"BMC\" and \"until\", if you happen to push another patch.","commit_id":"a6146ed69159bef7eec917f5efa71bc6dcbc7f7c"}]}
