)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"a730e65d5d44eaf80eab3b71ec5167789a945996","unresolved":false,"context_lines":[{"line_number":9,"context_line":"AMT interface goes to sleep after a period of time if the host"},{"line_number":10,"context_line":"is off. Add a new method \u0027awake_amt_interface\u0027 for amt driver"},{"line_number":11,"context_line":"to awake nodes\u0027 AMT interface."},{"line_number":12,"context_line":"This method will ping AMT interface to wake up it before send"},{"line_number":13,"context_line":"request to AMT interface. Also set 60s by default as cache time."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I4d81001c01e7908100a6571b366cb296253f2fc1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba8a016a_563919f1","line":12,"updated":"2015-11-18 15:01:37.000000000","message":"s/ to wake up it before send request to AMT interface./ to wake it up before sending request.","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8bde1fb351ca75b6f4f67fb9d00593ba546e991f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"AMT interface goes to sleep after a period of time if the host"},{"line_number":10,"context_line":"is off. Add a new method \u0027awake_amt_interface\u0027 for amt driver"},{"line_number":11,"context_line":"to awake nodes\u0027 AMT interface."},{"line_number":12,"context_line":"This method will ping AMT interface to wake up it before send"},{"line_number":13,"context_line":"request to AMT interface. Also set 60s by default as cache time."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I4d81001c01e7908100a6571b366cb296253f2fc1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba8a016a_9b3d012d","line":12,"in_reply_to":"ba8a016a_563919f1","updated":"2015-11-20 06:23:09.000000000","message":"Done","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"}],"ironic/common/exception.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"6dcd0aaf0772f711357f1cc07972bbbdefe1b2e1","unresolved":false,"context_lines":[{"line_number":341,"context_line":""},{"line_number":342,"context_line":"class AMTConnectFailure(IronicException):"},{"line_number":343,"context_line":"    _msg_fmt \u003d _(\"Failed to connect to AMT service. This could be caused \""},{"line_number":344,"context_line":"                 \"by the wrong amt address or bad network environment \")"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"class AMTFailure(IronicException):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_474b9e2a","line":344,"updated":"2015-11-18 16:37:56.000000000","message":"And extra space at the end.","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"a730e65d5d44eaf80eab3b71ec5167789a945996","unresolved":false,"context_lines":[{"line_number":341,"context_line":""},{"line_number":342,"context_line":"class AMTConnectFailure(IronicException):"},{"line_number":343,"context_line":"    _msg_fmt \u003d _(\"Failed to connect to AMT service. This could be caused \""},{"line_number":344,"context_line":"                 \"by the wrong amt address or bad network environment \")"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"class AMTFailure(IronicException):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_11b2bb4c","line":344,"updated":"2015-11-18 15:01:37.000000000","message":"Missing period at end of message.\n\nShould \u0027amt\u0027 be in upper case here?","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8bde1fb351ca75b6f4f67fb9d00593ba546e991f","unresolved":false,"context_lines":[{"line_number":341,"context_line":""},{"line_number":342,"context_line":"class AMTConnectFailure(IronicException):"},{"line_number":343,"context_line":"    _msg_fmt \u003d _(\"Failed to connect to AMT service. This could be caused \""},{"line_number":344,"context_line":"                 \"by the wrong amt address or bad network environment \")"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"class AMTFailure(IronicException):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_7b429daf","line":344,"in_reply_to":"ba8a016a_474b9e2a","updated":"2015-11-20 06:23:09.000000000","message":"Done","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"}],"ironic/drivers/modules/amt/common.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b53fb48e87de6f7b58eea452efbdd7affc795b43","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    to wake it up."},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    :param node an Ironic node object."},{"line_number":222,"context_line":"    :returns: (stdout, stderr) from executing the command."},{"line_number":223,"context_line":"    \"\"\""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    cmd_args \u003d [\u0027ping\u0027, \u0027-c\u0027, 5, node.driver_info[\u0027amt_address\u0027]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_64993d6e","line":222,"updated":"2015-10-14 11:02:41.000000000","message":"please add :raises:","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"5248c99c57375e62ee946f92672f3a08e4eeeadf","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    to wake it up."},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    :param node an Ironic node object."},{"line_number":222,"context_line":"    :returns: (stdout, stderr) from executing the command."},{"line_number":223,"context_line":"    \"\"\""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    cmd_args \u003d [\u0027ping\u0027, \u0027-c\u0027, 5, node.driver_info[\u0027amt_address\u0027]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_2c6ae781","line":222,"in_reply_to":"5a2ca52d_64993d6e","updated":"2015-10-16 08:32:20.000000000","message":"Done","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d0b7f28552f21993722b9c7f7225e76385aac527","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    :returns: (stdout, stderr) from executing the command."},{"line_number":223,"context_line":"    \"\"\""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    cmd_args \u003d [\u0027ping\u0027, \u0027-c\u0027, 5, node.driver_info[\u0027amt_address\u0027]]"},{"line_number":226,"context_line":"    result \u003d utils.execute(*cmd_args)"},{"line_number":227,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_bf3c4094","line":225,"updated":"2015-10-14 11:22:55.000000000","message":"Default ping interval is 1s. This causes unneeded delay, please set lesser interval or lesser ping packets or both (I do not know that is good for Intel AMT hardware).","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"5248c99c57375e62ee946f92672f3a08e4eeeadf","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    :returns: (stdout, stderr) from executing the command."},{"line_number":223,"context_line":"    \"\"\""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    cmd_args \u003d [\u0027ping\u0027, \u0027-c\u0027, 5, node.driver_info[\u0027amt_address\u0027]]"},{"line_number":226,"context_line":"    result \u003d utils.execute(*cmd_args)"},{"line_number":227,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_8c71bb78","line":225,"in_reply_to":"5a2ca52d_bf3c4094","updated":"2015-10-16 08:32:20.000000000","message":"Three is enough actually, but ping two more times as buffer.","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d0b7f28552f21993722b9c7f7225e76385aac527","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    \"\"\""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    cmd_args \u003d [\u0027ping\u0027, \u0027-c\u0027, 5, node.driver_info[\u0027amt_address\u0027]]"},{"line_number":226,"context_line":"    result \u003d utils.execute(*cmd_args)"},{"line_number":227,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_c4361103","line":226,"updated":"2015-10-14 11:22:55.000000000","message":"Oslo processutils checks 0 exit code by default. If you want to ignore process execution error please add check_exit_code\u003dFalse param. Or if you want to use this exception for validation (IMO ignore is better) convert it to ironic exception.\n\n PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.\n\n --- 1.1.1.1 ping statistics ---\n 5 packets transmitted, 0 received, 100% packet loss, time 2030ms\n\n $ echo $?\n 1","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"5248c99c57375e62ee946f92672f3a08e4eeeadf","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    \"\"\""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    cmd_args \u003d [\u0027ping\u0027, \u0027-c\u0027, 5, node.driver_info[\u0027amt_address\u0027]]"},{"line_number":226,"context_line":"    result \u003d utils.execute(*cmd_args)"},{"line_number":227,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_ac235757","line":226,"in_reply_to":"5a2ca52d_c4361103","updated":"2015-10-16 08:32:20.000000000","message":"Thanks for this.","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b53fb48e87de6f7b58eea452efbdd7affc795b43","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    cmd_args \u003d [\u0027ping\u0027, \u0027-c\u0027, 5, node.driver_info[\u0027amt_address\u0027]]"},{"line_number":226,"context_line":"    result \u003d utils.execute(*cmd_args)"},{"line_number":227,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_849ed954","line":227,"updated":"2015-10-14 11:02:41.000000000","message":"result is not needed actually","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"28e6c0032fd447755b60d1e5b56d37d3fbf90df7","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    \"\"\"Wake up AMT interface."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    AMT interface goes to sleep after a period of time if the host is off."},{"line_number":216,"context_line":"    This method will ping AMT interface to wake up it before following"},{"line_number":217,"context_line":"    actions. Because there is no guarantee that the AMT address in"},{"line_number":218,"context_line":"    driver_info is correct, only ping the IP five times which is enough"},{"line_number":219,"context_line":"    to wake it up."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_5b3f5bd6","line":216,"updated":"2015-10-26 01:27:58.000000000","message":"\"before following actions\" does not require in this function.","commit_id":"ae0f496b28645a2ccea30df9ef6df823db135fcc"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"28e6c0032fd447755b60d1e5b56d37d3fbf90df7","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    try:"},{"line_number":227,"context_line":"        utils.execute(*cmd_args)"},{"line_number":228,"context_line":"    except processutils.ProcessExecutionError as err:"},{"line_number":229,"context_line":"        LOG.error(_LE(\u0027Unable to awake amt interfeace on node %(node_id)s.\u0027"},{"line_number":230,"context_line":"                      \u0027Error: %(error)s\u0027),"},{"line_number":231,"context_line":"                  {\u0027node_id\u0027: node.uuid, \u0027error\u0027: err})"},{"line_number":232,"context_line":"        raise exception.AMTConnectFailure()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_3b3a9fe8","line":229,"updated":"2015-10-26 01:27:58.000000000","message":"s/amt/AMT\n\ns/interfeace/interface\n\nAlso message should indicate that given IP could be incorrect/unreachable.","commit_id":"ae0f496b28645a2ccea30df9ef6df823db135fcc"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e8ce20e8627684c87e89ecfe6a94246aa549a454","unresolved":false,"context_lines":[{"line_number":80,"context_line":"RET_SUCCESS \u003d \u00270\u0027"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"# Last awake command and cache time"},{"line_number":83,"context_line":"LAST_AWAKE \u003d 0"},{"line_number":84,"context_line":"AWAKE_CACHE_TIME \u003d 60"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_1b73e34e","line":83,"updated":"2015-11-05 13:01:40.000000000","message":"Do you have only one AMT node? If no, you should store last awake for each amt_address.","commit_id":"e31d1741cb93790ddcaa61f97d5e35daeb7c77ce"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f78dacd00f668c8ea13a4b65338d23fe8987ecf5","unresolved":false,"context_lines":[{"line_number":80,"context_line":"RET_SUCCESS \u003d \u00270\u0027"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"# Last awake command and cache time"},{"line_number":83,"context_line":"LAST_AWAKE \u003d 0"},{"line_number":84,"context_line":"AWAKE_CACHE_TIME \u003d 60"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_033cd5c6","line":83,"in_reply_to":"fa80f949_1b73e34e","updated":"2015-11-05 14:03:53.000000000","message":"++, it seems like it should be stored in e.g. driver_internal_info.","commit_id":"e31d1741cb93790ddcaa61f97d5e35daeb7c77ce"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e8ce20e8627684c87e89ecfe6a94246aa549a454","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"# Last awake command and cache time"},{"line_number":83,"context_line":"LAST_AWAKE \u003d 0"},{"line_number":84,"context_line":"AWAKE_CACHE_TIME \u003d 60"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"class Client(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_1b5203de","line":84,"updated":"2015-11-05 13:01:40.000000000","message":"Maybe add config option for this?","commit_id":"e31d1741cb93790ddcaa61f97d5e35daeb7c77ce"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f78dacd00f668c8ea13a4b65338d23fe8987ecf5","unresolved":false,"context_lines":[{"line_number":220,"context_line":"    \"\"\"Decorator to wake up AMT interface."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    AMT interface goes to sleep after a period of time if the host is off."},{"line_number":223,"context_line":"    This method will ping AMT interface to wake up it. Because there is"},{"line_number":224,"context_line":"    no guarantee that the AMT address in driver_info is correct, only"},{"line_number":225,"context_line":"    ping the IP five times which is enough to wake it up."},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_8338c5a1","line":223,"updated":"2015-11-05 14:03:53.000000000","message":"nit - wake it up","commit_id":"e31d1741cb93790ddcaa61f97d5e35daeb7c77ce"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e8ce20e8627684c87e89ecfe6a94246aa549a454","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    def wrapper(*args, **kwargs):"},{"line_number":232,"context_line":"        node \u003d args[0]"},{"line_number":233,"context_line":"        if not isinstance(node, node_obj.Node):"},{"line_number":234,"context_line":"            raise exception.InvalidParameterValue(\u0027First parameter of func \u0027"},{"line_number":235,"context_line":"                                                  \u0027should be a node object.\u0027)"},{"line_number":236,"context_line":"        now \u003d time.time()"},{"line_number":237,"context_line":"        global LAST_AWAKE, AWAKE_CACHE_TIME"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_9bcef3b2","line":234,"updated":"2015-11-05 13:01:40.000000000","message":"1) Not sure that here should be InvalidParameterValue, because it\u0027s programmer\u0027s error. 2) Message should be translated.","commit_id":"e31d1741cb93790ddcaa61f97d5e35daeb7c77ce"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f78dacd00f668c8ea13a4b65338d23fe8987ecf5","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            raise exception.InvalidParameterValue(\u0027First parameter of func \u0027"},{"line_number":235,"context_line":"                                                  \u0027should be a node object.\u0027)"},{"line_number":236,"context_line":"        now \u003d time.time()"},{"line_number":237,"context_line":"        global LAST_AWAKE, AWAKE_CACHE_TIME"},{"line_number":238,"context_line":"        if now - LAST_AWAKE \u003e AWAKE_CACHE_TIME:"},{"line_number":239,"context_line":"            LAST_AWAKE \u003d now"},{"line_number":240,"context_line":"            cmd_args \u003d [\u0027ping\u0027, \u0027-i\u0027, 0.2, \u0027-c\u0027, 5,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_f002b90a","line":237,"updated":"2015-11-05 14:03:53.000000000","message":"Also why is cache present in var name, it does not cache anything.","commit_id":"e31d1741cb93790ddcaa61f97d5e35daeb7c77ce"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e8ce20e8627684c87e89ecfe6a94246aa549a454","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                LOG.error(_LE(\u0027Unable to awake AMT interface on node \u0027"},{"line_number":246,"context_line":"                              \u0027%(node_id)s. Error: %(error)s\u0027),"},{"line_number":247,"context_line":"                          {\u0027node_id\u0027: node.uuid, \u0027error\u0027: err})"},{"line_number":248,"context_line":"                raise exception.AMTConnectFailure()"},{"line_number":249,"context_line":"            LOG.info(_LI(\u0027Successfully awake AMT interface on node \u0027"},{"line_number":250,"context_line":"                         \u0027%(node_id)s.\u0027), {\u0027node_id\u0027: node.uuid})"},{"line_number":251,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_bb2df747","line":248,"updated":"2015-11-05 13:01:40.000000000","message":"Will be good add node uuid to exception message.","commit_id":"e31d1741cb93790ddcaa61f97d5e35daeb7c77ce"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"17c4a9166697e0abb40195e7dca55d7ac7590ea5","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                LOG.error(_LE(\u0027Unable to awake AMT interface on node \u0027"},{"line_number":246,"context_line":"                              \u0027%(node_id)s. Error: %(error)s\u0027),"},{"line_number":247,"context_line":"                          {\u0027node_id\u0027: node.uuid, \u0027error\u0027: err})"},{"line_number":248,"context_line":"                raise exception.AMTConnectFailure()"},{"line_number":249,"context_line":"            LOG.info(_LI(\u0027Successfully awake AMT interface on node \u0027"},{"line_number":250,"context_line":"                         \u0027%(node_id)s.\u0027), {\u0027node_id\u0027: node.uuid})"},{"line_number":251,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_edc0a22c","line":248,"in_reply_to":"fa80f949_bb2df747","updated":"2015-11-05 13:30:26.000000000","message":"Yes, it\u0027s ok as is w/o node uuid. But exception message contains \"..or AMT interface is sleeping\". We try to wake up above, and looks like it\u0027s other error.","commit_id":"e31d1741cb93790ddcaa61f97d5e35daeb7c77ce"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e8ce20e8627684c87e89ecfe6a94246aa549a454","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                              \u0027%(node_id)s. Error: %(error)s\u0027),"},{"line_number":247,"context_line":"                          {\u0027node_id\u0027: node.uuid, \u0027error\u0027: err})"},{"line_number":248,"context_line":"                raise exception.AMTConnectFailure()"},{"line_number":249,"context_line":"            LOG.info(_LI(\u0027Successfully awake AMT interface on node \u0027"},{"line_number":250,"context_line":"                         \u0027%(node_id)s.\u0027), {\u0027node_id\u0027: node.uuid})"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_7bdeaf40","line":249,"updated":"2015-11-05 13:01:40.000000000","message":"I\u0027m not sure, but maybe debug level logging here?","commit_id":"e31d1741cb93790ddcaa61f97d5e35daeb7c77ce"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eaa388ba3b5003e4d464eea7d9a17c5d32332a68","unresolved":false,"context_lines":[{"line_number":54,"context_line":"               help\u003d_(\u0027Protocol used for AMT endpoint, \u0027"},{"line_number":55,"context_line":"                      \u0027support http/https\u0027)),"},{"line_number":56,"context_line":"    cfg.IntOpt(\u0027awake_interval\u0027,"},{"line_number":57,"context_line":"               default\u003d60,"},{"line_number":58,"context_line":"               help\u003d_(\u0027Time interval (in seconds) for successive awake call \u0027"},{"line_number":59,"context_line":"                      \u0027to AMT interface.\u0027)),"},{"line_number":60,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_028fbd75","line":57,"updated":"2015-11-11 10:09:20.000000000","message":"min\u003d0?","commit_id":"93316c023b7b7956e191be761c2275522edbb650"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eaa388ba3b5003e4d464eea7d9a17c5d32332a68","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        node \u003d args[0]"},{"line_number":231,"context_line":"        if not isinstance(node, node_obj.Node):"},{"line_number":232,"context_line":"            msg \u003d _(\u0027First parameter of func must be be a node object.\u0027)"},{"line_number":233,"context_line":"            raise ValueError(msg)"},{"line_number":234,"context_line":"        now \u003d time.time()"},{"line_number":235,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":236,"context_line":"        last_awake \u003d driver_internal_info.get(\u0027amt_last_awake_call\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_c2d2155c","line":233,"updated":"2015-11-11 10:09:20.000000000","message":"It raises ValueError now, so some docstrings should be changed. And should it be raised? I\u0027m not sure about this. It is not in list of expected exceptions on conductor side.","commit_id":"93316c023b7b7956e191be761c2275522edbb650"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"72d3c35bb947f919f89d2e35886b711140d514b0","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        node \u003d args[0]"},{"line_number":231,"context_line":"        if not isinstance(node, node_obj.Node):"},{"line_number":232,"context_line":"            msg \u003d _(\u0027First parameter of func must be be a node object.\u0027)"},{"line_number":233,"context_line":"            raise ValueError(msg)"},{"line_number":234,"context_line":"        now \u003d time.time()"},{"line_number":235,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":236,"context_line":"        last_awake \u003d driver_internal_info.get(\u0027amt_last_awake_call\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_332f42f8","line":233,"updated":"2015-11-13 05:36:49.000000000","message":"This isn\u0027t a great way to write a decorator. You shouldn\u0027t crash at runtime (raising an uncaught exception) because this function (decorator) received a parameter that is not the correct type. The typical way to express this is to use a consistent name for the required parameter, eg. \"node\".\n\nThat being said, I don\u0027t see any benefit to defining this as a decorator.\n\nIf you simply defined it as a function that took (node) as the only parameter, you could call it once from within each of the methods that you\u0027re currently decorating.\n\nThe total # of lines changed would be the same. Well, slightly less, since you wouldn\u0027t need the decorator-centric bits right here.","commit_id":"93316c023b7b7956e191be761c2275522edbb650"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"2ecfb718f115e1acce3c3c4c32b5f4964ebab569","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        node \u003d args[0]"},{"line_number":231,"context_line":"        if not isinstance(node, node_obj.Node):"},{"line_number":232,"context_line":"            msg \u003d _(\u0027First parameter of func must be be a node object.\u0027)"},{"line_number":233,"context_line":"            raise ValueError(msg)"},{"line_number":234,"context_line":"        now \u003d time.time()"},{"line_number":235,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":236,"context_line":"        last_awake \u003d driver_internal_info.get(\u0027amt_last_awake_call\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_54aefc98","line":233,"in_reply_to":"da85f559_332f42f8","updated":"2015-11-18 11:28:44.000000000","message":"Make sense， Thanks","commit_id":"93316c023b7b7956e191be761c2275522edbb650"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"7a606acdaf0fb022368dabf99b6546d535a1288f","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        node \u003d args[0]"},{"line_number":231,"context_line":"        if not isinstance(node, node_obj.Node):"},{"line_number":232,"context_line":"            msg \u003d _(\u0027First parameter of func must be be a node object.\u0027)"},{"line_number":233,"context_line":"            raise ValueError(msg)"},{"line_number":234,"context_line":"        now \u003d time.time()"},{"line_number":235,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":236,"context_line":"        last_awake \u003d driver_internal_info.get(\u0027amt_last_awake_call\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_65e66046","line":233,"in_reply_to":"da85f559_c2d2155c","updated":"2015-11-13 04:03:54.000000000","message":"This log is intent to help developers to debug when writing a new func used the decorator. Doubt ValueError should be document everywhere because it is only for developers.","commit_id":"93316c023b7b7956e191be761c2275522edbb650"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"3b192c69af376848b0eb51923819e1306e89dee3","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               min\u003d0,"},{"line_number":59,"context_line":"               help\u003d_(\u0027Time interval (in seconds) for successive awake call \u0027"},{"line_number":60,"context_line":"                      \u0027to AMT interface, this is depends on the \u0027"},{"line_number":61,"context_line":"                      \u0027`Idel Timeout` setting on AMT interface. AMT Interface \u0027"},{"line_number":62,"context_line":"                      \u0027will go to sleep after 60 seconds of inactivity as \u0027"},{"line_number":63,"context_line":"                      \u0027default. `Idel Timeout`\u003d0 means AMT will not go to \u0027"},{"line_number":64,"context_line":"                      \u0027sleep at all. So set `awake_interval`\u003d0 will disable \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_3951610f","line":61,"updated":"2015-11-13 06:34:33.000000000","message":"Is there a backtick around Idel Timeout ? Is this expected ?","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"091d8cff39b97a4ae40c9107376ace6efb5d4d8d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               min\u003d0,"},{"line_number":59,"context_line":"               help\u003d_(\u0027Time interval (in seconds) for successive awake call \u0027"},{"line_number":60,"context_line":"                      \u0027to AMT interface, this is depends on the \u0027"},{"line_number":61,"context_line":"                      \u0027`Idel Timeout` setting on AMT interface. AMT Interface \u0027"},{"line_number":62,"context_line":"                      \u0027will go to sleep after 60 seconds of inactivity as \u0027"},{"line_number":63,"context_line":"                      \u0027default. `Idel Timeout`\u003d0 means AMT will not go to \u0027"},{"line_number":64,"context_line":"                      \u0027sleep at all. So set `awake_interval`\u003d0 will disable \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_d463fa18","line":61,"in_reply_to":"da85f559_3951610f","updated":"2015-11-17 16:54:10.000000000","message":"nit - s/Idel/Idle, s/this is depends/this depends","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"091d8cff39b97a4ae40c9107376ace6efb5d4d8d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"               help\u003d_(\u0027Time interval (in seconds) for successive awake call \u0027"},{"line_number":60,"context_line":"                      \u0027to AMT interface, this is depends on the \u0027"},{"line_number":61,"context_line":"                      \u0027`Idel Timeout` setting on AMT interface. AMT Interface \u0027"},{"line_number":62,"context_line":"                      \u0027will go to sleep after 60 seconds of inactivity as \u0027"},{"line_number":63,"context_line":"                      \u0027default. `Idel Timeout`\u003d0 means AMT will not go to \u0027"},{"line_number":64,"context_line":"                      \u0027sleep at all. So set `awake_interval`\u003d0 will disable \u0027"},{"line_number":65,"context_line":"                      \u0027awake call.\u0027)),"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_ef298b8a","line":62,"updated":"2015-11-17 16:54:10.000000000","message":"nit - s/as default/by default","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"091d8cff39b97a4ae40c9107376ace6efb5d4d8d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                      \u0027`Idel Timeout` setting on AMT interface. AMT Interface \u0027"},{"line_number":62,"context_line":"                      \u0027will go to sleep after 60 seconds of inactivity as \u0027"},{"line_number":63,"context_line":"                      \u0027default. `Idel Timeout`\u003d0 means AMT will not go to \u0027"},{"line_number":64,"context_line":"                      \u0027sleep at all. So set `awake_interval`\u003d0 will disable \u0027"},{"line_number":65,"context_line":"                      \u0027awake call.\u0027)),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_cf4da773","line":64,"updated":"2015-11-17 16:54:10.000000000","message":"nit - ...at all, so setting awake_interval...","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"3b192c69af376848b0eb51923819e1306e89dee3","unresolved":false,"context_lines":[{"line_number":88,"context_line":"# ReturnValue constants"},{"line_number":89,"context_line":"RET_SUCCESS \u003d \u00270\u0027"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"# A dict cache last awake call to AMT Interface"},{"line_number":92,"context_line":"AMT_AWAKE_CACHE \u003d {}"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_194c9d75","line":91,"updated":"2015-11-13 06:34:33.000000000","message":"I am not sure if AMT is purely a test hardware or production hardware, but aren\u0027t we restricting this to a single conductor environment if we keep this cache locally ? Shouldn\u0027t this go to driver_internal_info instead, just like our agent heartbeat ?","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6e47ba68dfc3f1bcbc59ca338d0d43fe21f65dc9","unresolved":false,"context_lines":[{"line_number":88,"context_line":"# ReturnValue constants"},{"line_number":89,"context_line":"RET_SUCCESS \u003d \u00270\u0027"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"# A dict cache last awake call to AMT Interface"},{"line_number":92,"context_line":"AMT_AWAKE_CACHE \u003d {}"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_7e76ea07","line":91,"in_reply_to":"da85f559_0b08be27","updated":"2015-11-13 09:02:36.000000000","message":"Ack. Makes sense.","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ac8a21554480fff7f25d88dc6209d805b781aba9","unresolved":false,"context_lines":[{"line_number":88,"context_line":"# ReturnValue constants"},{"line_number":89,"context_line":"RET_SUCCESS \u003d \u00270\u0027"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"# A dict cache last awake call to AMT Interface"},{"line_number":92,"context_line":"AMT_AWAKE_CACHE \u003d {}"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_0b08be27","line":91,"in_reply_to":"da85f559_194c9d75","updated":"2015-11-13 08:49:25.000000000","message":"I think it\u0027s not a problem. If another conductor takes the node this causes only one \"extra\" wake ping. But usage of driver_internal_info causes unnecessary DB requests.","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"3b192c69af376848b0eb51923819e1306e89dee3","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    ping the IP five times which is enough to wake it up."},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    :raises: AMTConnectFailure if unable to connect to the server."},{"line_number":236,"context_line":"    :raises: ValueError if func lack of a node object parameter."},{"line_number":237,"context_line":"    \"\"\""},{"line_number":238,"context_line":"    @six.wraps(func)"},{"line_number":239,"context_line":"    def wrapper(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_b992319e","line":236,"updated":"2015-11-13 06:34:33.000000000","message":"Better if \n\ns/if func lack of a node object parameter/first parameter of func is not a node object","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"091d8cff39b97a4ae40c9107376ace6efb5d4d8d","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            raise ValueError(msg)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        now \u003d time.time()"},{"line_number":250,"context_line":"        last_awake \u003d AMT_AWAKE_CACHE.setdefault(node.uuid, 0)"},{"line_number":251,"context_line":"        if now - last_awake \u003e awake_interval:"},{"line_number":252,"context_line":"            AMT_AWAKE_CACHE[node.uuid] \u003d last_awake"},{"line_number":253,"context_line":"            cmd_args \u003d [\u0027ping\u0027, \u0027-i\u0027, 0.2, \u0027-c\u0027, 5,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_21e1e7d0","line":250,"updated":"2015-11-17 16:54:10.000000000","message":"maybe do .get(node.uuid, 0) instead?","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ac8a21554480fff7f25d88dc6209d805b781aba9","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        now \u003d time.time()"},{"line_number":250,"context_line":"        last_awake \u003d AMT_AWAKE_CACHE.setdefault(node.uuid, 0)"},{"line_number":251,"context_line":"        if now - last_awake \u003e awake_interval:"},{"line_number":252,"context_line":"            AMT_AWAKE_CACHE[node.uuid] \u003d last_awake"},{"line_number":253,"context_line":"            cmd_args \u003d [\u0027ping\u0027, \u0027-i\u0027, 0.2, \u0027-c\u0027, 5,"},{"line_number":254,"context_line":"                        node.driver_info[\u0027amt_address\u0027]]"},{"line_number":255,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_2b7102e1","line":252,"updated":"2015-11-13 08:49:25.000000000","message":"We should do this cache update after successfully ping. Otherwise operator unable to retry after few second in temporary network error case.","commit_id":"e8ad6f904739aa4eaeada09c17c6e4f55d5c11c0"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"a730e65d5d44eaf80eab3b71ec5167789a945996","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                      \u0027setting on AMT interface. AMT Interface will go to \u0027"},{"line_number":61,"context_line":"                      \u0027sleep after 60 seconds of inactivity by default. \u0027"},{"line_number":62,"context_line":"                      \u0027IdleTimeout\u003d0 means AMT will not go to sleep at all. \u0027"},{"line_number":63,"context_line":"                      \u0027So setting awake_interval\u003d0 will disable awake call.\u0027)),"},{"line_number":64,"context_line":"]"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_d1ef53e7","line":63,"updated":"2015-11-18 15:01:37.000000000","message":"s/ So setting/ Setting","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8bde1fb351ca75b6f4f67fb9d00593ba546e991f","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                      \u0027setting on AMT interface. AMT Interface will go to \u0027"},{"line_number":61,"context_line":"                      \u0027sleep after 60 seconds of inactivity by default. \u0027"},{"line_number":62,"context_line":"                      \u0027IdleTimeout\u003d0 means AMT will not go to sleep at all. \u0027"},{"line_number":63,"context_line":"                      \u0027So setting awake_interval\u003d0 will disable awake call.\u0027)),"},{"line_number":64,"context_line":"]"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_402ec8a5","line":63,"in_reply_to":"ba8a016a_d1ef53e7","updated":"2015-11-20 06:23:09.000000000","message":"Done","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"6dcd0aaf0772f711357f1cc07972bbbdefe1b2e1","unresolved":false,"context_lines":[{"line_number":229,"context_line":"    This method will ping AMT interface to wake it up. Because there is"},{"line_number":230,"context_line":"    no guarantee that the AMT address in driver_info is correct, only"},{"line_number":231,"context_line":"    ping the IP five times which is enough to wake it up."},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    :raises: AMTConnectFailure if unable to connect to the server."},{"line_number":234,"context_line":"    \"\"\""},{"line_number":235,"context_line":"    awake_interval \u003d CONF.amt.awake_interval"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_47f95ec6","line":232,"updated":"2015-11-18 16:37:56.000000000","message":"Missing :param node:","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8bde1fb351ca75b6f4f67fb9d00593ba546e991f","unresolved":false,"context_lines":[{"line_number":229,"context_line":"    This method will ping AMT interface to wake it up. Because there is"},{"line_number":230,"context_line":"    no guarantee that the AMT address in driver_info is correct, only"},{"line_number":231,"context_line":"    ping the IP five times which is enough to wake it up."},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    :raises: AMTConnectFailure if unable to connect to the server."},{"line_number":234,"context_line":"    \"\"\""},{"line_number":235,"context_line":"    awake_interval \u003d CONF.amt.awake_interval"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_fb2d2dfe","line":232,"in_reply_to":"ba8a016a_47f95ec6","updated":"2015-11-20 06:23:09.000000000","message":"Done","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"a730e65d5d44eaf80eab3b71ec5167789a945996","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            LOG.error(_LE(\u0027Unable to awake AMT interface on node \u0027"},{"line_number":248,"context_line":"                          \u0027%(node_id)s. Error: %(error)s\u0027),"},{"line_number":249,"context_line":"                      {\u0027node_id\u0027: node.uuid, \u0027error\u0027: err})"},{"line_number":250,"context_line":"            raise exception.AMTConnectFailure()"},{"line_number":251,"context_line":"        else:"},{"line_number":252,"context_line":"            LOG.debug((\u0027Successfully awake AMT interface on node \u0027"},{"line_number":253,"context_line":"                       \u0027%(node_id)s.\u0027), {\u0027node_id\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_32d1fe23","line":250,"updated":"2015-11-18 15:01:37.000000000","message":"It may be useful to pass the ProcessExecutionError error string into AMTConnectFailure exception.","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8bde1fb351ca75b6f4f67fb9d00593ba546e991f","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            LOG.error(_LE(\u0027Unable to awake AMT interface on node \u0027"},{"line_number":248,"context_line":"                          \u0027%(node_id)s. Error: %(error)s\u0027),"},{"line_number":249,"context_line":"                      {\u0027node_id\u0027: node.uuid, \u0027error\u0027: err})"},{"line_number":250,"context_line":"            raise exception.AMTConnectFailure()"},{"line_number":251,"context_line":"        else:"},{"line_number":252,"context_line":"            LOG.debug((\u0027Successfully awake AMT interface on node \u0027"},{"line_number":253,"context_line":"                       \u0027%(node_id)s.\u0027), {\u0027node_id\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_5bfd59af","line":250,"in_reply_to":"ba8a016a_32d1fe23","updated":"2015-11-20 06:23:09.000000000","message":"This might be too much information. LOG.error is already have the err","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"a730e65d5d44eaf80eab3b71ec5167789a945996","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                      {\u0027node_id\u0027: node.uuid, \u0027error\u0027: err})"},{"line_number":250,"context_line":"            raise exception.AMTConnectFailure()"},{"line_number":251,"context_line":"        else:"},{"line_number":252,"context_line":"            LOG.debug((\u0027Successfully awake AMT interface on node \u0027"},{"line_number":253,"context_line":"                       \u0027%(node_id)s.\u0027), {\u0027node_id\u0027: node.uuid})"},{"line_number":254,"context_line":"            AMT_AWAKE_CACHE[node.uuid] \u003d now"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_95a8d4dc","line":252,"updated":"2015-11-18 15:01:37.000000000","message":"s/awake/ awakened","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8bde1fb351ca75b6f4f67fb9d00593ba546e991f","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                      {\u0027node_id\u0027: node.uuid, \u0027error\u0027: err})"},{"line_number":250,"context_line":"            raise exception.AMTConnectFailure()"},{"line_number":251,"context_line":"        else:"},{"line_number":252,"context_line":"            LOG.debug((\u0027Successfully awake AMT interface on node \u0027"},{"line_number":253,"context_line":"                       \u0027%(node_id)s.\u0027), {\u0027node_id\u0027: node.uuid})"},{"line_number":254,"context_line":"            AMT_AWAKE_CACHE[node.uuid] \u003d now"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_1b31115a","line":252,"in_reply_to":"ba8a016a_95a8d4dc","updated":"2015-11-20 06:23:09.000000000","message":"Done","commit_id":"0f2e5d2b756d530a406037c07603422e54916497"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1c00fb878c3e0ba4307f7e1af63b4a9159cef266","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    cfg.IntOpt(\u0027awake_interval\u0027,"},{"line_number":56,"context_line":"               default\u003d60,"},{"line_number":57,"context_line":"               min\u003d0,"},{"line_number":58,"context_line":"               help\u003d_(\u0027Time interval (in seconds) for successive awake call \u0027"},{"line_number":59,"context_line":"                      \u0027to AMT interface, this depends on the IdleTimeout \u0027"},{"line_number":60,"context_line":"                      \u0027setting on AMT interface. AMT Interface will go to \u0027"},{"line_number":61,"context_line":"                      \u0027sleep after 60 seconds of inactivity by default. \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_ed8abc63","line":58,"updated":"2015-12-02 15:14:55.000000000","message":"I think the correct term is \u0027wake-up call\u0027.","commit_id":"1ab3c9217edc8ebed7643f8ded7b16c39dd4bc70"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1c00fb878c3e0ba4307f7e1af63b4a9159cef266","unresolved":false,"context_lines":[{"line_number":57,"context_line":"               min\u003d0,"},{"line_number":58,"context_line":"               help\u003d_(\u0027Time interval (in seconds) for successive awake call \u0027"},{"line_number":59,"context_line":"                      \u0027to AMT interface, this depends on the IdleTimeout \u0027"},{"line_number":60,"context_line":"                      \u0027setting on AMT interface. AMT Interface will go to \u0027"},{"line_number":61,"context_line":"                      \u0027sleep after 60 seconds of inactivity by default. \u0027"},{"line_number":62,"context_line":"                      \u0027IdleTimeout\u003d0 means AMT will not go to sleep at all. \u0027"},{"line_number":63,"context_line":"                      \u0027Setting awake_interval\u003d0 will disable awake call.\u0027)),"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_ed4f1c32","line":60,"updated":"2015-12-02 15:14:55.000000000","message":"s/Interface/interface/ (Or change the other one to Interface. I don\u0027t know if \u0027AMT Interface\u0027 is a name or you mean \u0027AMT interface\u0027.","commit_id":"1ab3c9217edc8ebed7643f8ded7b16c39dd4bc70"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1c00fb878c3e0ba4307f7e1af63b4a9159cef266","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    return tree.find(query)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"def awake_amt_interface(node):"},{"line_number":226,"context_line":"    \"\"\"Wake up AMT interface."},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    AMT interface goes to sleep after a period of time if the host is off."}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_4da8a88c","line":225,"updated":"2015-12-02 15:14:55.000000000","message":"I think \u0027awake\u0027 is awkward. Seems like it is \u0027wakeup_amt_interface\u0027. But I\u0027m not sure it is worth changing now that it has been approved. Leaving it for you to decide.","commit_id":"1ab3c9217edc8ebed7643f8ded7b16c39dd4bc70"}],"ironic/drivers/modules/amt/management.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b53fb48e87de6f7b58eea452efbdd7affc795b43","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # FIXME(lintan): validate hangs if unable to reach AMT, so dont"},{"line_number":165,"context_line":"        # connect to the node until bug 1314961 is resolved."},{"line_number":166,"context_line":"        amt_common.parse_driver_info(task.node)"},{"line_number":167,"context_line":"        amt_common.awake_amt_interface(task.node)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def get_supported_boot_devices(self, task):"},{"line_number":170,"context_line":"        \"\"\"Get a list of the supported boot devices."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_c494d138","line":167,"updated":"2015-10-14 11:02:41.000000000","message":"validate() is a bad place to have long-running commands, as it will be run synchronously. please move it to places where we actually need this interface.\n\nalso please handle an exception from utils.execute and reraise an appropriate IronicException","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"5248c99c57375e62ee946f92672f3a08e4eeeadf","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # FIXME(lintan): validate hangs if unable to reach AMT, so dont"},{"line_number":165,"context_line":"        # connect to the node until bug 1314961 is resolved."},{"line_number":166,"context_line":"        amt_common.parse_driver_info(task.node)"},{"line_number":167,"context_line":"        amt_common.awake_amt_interface(task.node)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def get_supported_boot_devices(self, task):"},{"line_number":170,"context_line":"        \"\"\"Get a list of the supported boot devices."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_4c15e3e2","line":167,"in_reply_to":"5a2ca52d_7f5d48e8","updated":"2015-10-16 08:32:20.000000000","message":"Done","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d0b7f28552f21993722b9c7f7225e76385aac527","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # FIXME(lintan): validate hangs if unable to reach AMT, so dont"},{"line_number":165,"context_line":"        # connect to the node until bug 1314961 is resolved."},{"line_number":166,"context_line":"        amt_common.parse_driver_info(task.node)"},{"line_number":167,"context_line":"        amt_common.awake_amt_interface(task.node)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def get_supported_boot_devices(self, task):"},{"line_number":170,"context_line":"        \"\"\"Get a list of the supported boot devices."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a2ca52d_7f5d48e8","line":167,"in_reply_to":"5a2ca52d_c494d138","updated":"2015-10-14 11:22:55.000000000","message":"+1","commit_id":"188f9ff13d29d0ea6455079d2bab1a155e6fd980"}],"ironic/drivers/modules/amt/power.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"cb93c04053963b8b2d0a6125c695990399678d83","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    :param node: a node object."},{"line_number":125,"context_line":"    :returns: one of ironic.common.states POWER_OFF, POWER_ON or ERROR."},{"line_number":126,"context_line":"    :raises: AMTFailure."},{"line_number":127,"context_line":"    :raises: AMTConnectFailure."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    \"\"\""},{"line_number":130,"context_line":"    client \u003d amt_common.get_wsman_client(node)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_3560efce","side":"PARENT","line":127,"updated":"2015-11-11 15:04:11.000000000","message":"Why this removed? I see exception.AMTConnectFailure and save_and_reraise_exception() in lines 134-135. Not sure that client.wsman_get() raises exception.AMTConnectFailure, but connection can be lost after successfully ping and we should catch this error.","commit_id":"ea651baf473d7f7ad63a47a1a66cc3f7edc88ba0"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"7a606acdaf0fb022368dabf99b6546d535a1288f","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    :param node: a node object."},{"line_number":125,"context_line":"    :returns: one of ironic.common.states POWER_OFF, POWER_ON or ERROR."},{"line_number":126,"context_line":"    :raises: AMTFailure."},{"line_number":127,"context_line":"    :raises: AMTConnectFailure."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    \"\"\""},{"line_number":130,"context_line":"    client \u003d amt_common.get_wsman_client(node)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_ff5c22f2","side":"PARENT","line":127,"in_reply_to":"da85f559_3560efce","updated":"2015-11-13 04:03:54.000000000","message":"My mistake. This should be catched","commit_id":"ea651baf473d7f7ad63a47a1a66cc3f7edc88ba0"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"cb93c04053963b8b2d0a6125c695990399678d83","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                 {\u0027state\u0027: target_state, \u0027node_id\u0027: node.uuid})"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"@amt_common.awake_amt_interface"},{"line_number":123,"context_line":"def _power_status(node):"},{"line_number":124,"context_line":"    \"\"\"Get the power status for a node."},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_fc7fb4dd","line":122,"updated":"2015-11-11 15:04:11.000000000","message":"get_power_state() does not require exclusive lock. This may cause a race condition, example:\n\n Ironic acquire a node for some exclusive deploy action\n Ironic acquire the same node for AMT get_power_state()\n Deploy driver updates node.driver_internal_info in DB\n AMT driver updates node.driver_internal_info in DB (l251 in common.py)\n\nAll changes in node.driver_internal_info from deploy driver will be lost.","commit_id":"93316c023b7b7956e191be761c2275522edbb650"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"7a606acdaf0fb022368dabf99b6546d535a1288f","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                 {\u0027state\u0027: target_state, \u0027node_id\u0027: node.uuid})"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"@amt_common.awake_amt_interface"},{"line_number":123,"context_line":"def _power_status(node):"},{"line_number":124,"context_line":"    \"\"\"Get the power status for a node."},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_5f68ce87","line":122,"in_reply_to":"da85f559_fc7fb4dd","updated":"2015-11-13 04:03:54.000000000","message":"hmmm, you are totally right. shared lock task should not contain any write action to DB.\n\nBut I have another concern about how TaskManager work. Normally, exclusive/shared lock has two locks, instance contain exclusive lock will reject another request with shared lock.  But I found Ironic don\u0027t really have `shared lock`, task with shared lock will read DB no matter if the host is reserved or not. So when the node hold exclusive locked, should we allow another task to manipulate it even if it only read?","commit_id":"93316c023b7b7956e191be761c2275522edbb650"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"cb93c04053963b8b2d0a6125c695990399678d83","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        :param task: a TaskManager instance contains the target node."},{"line_number":235,"context_line":"        :raises: AMTFailure."},{"line_number":236,"context_line":"        :raises: AMTConnectFailure."},{"line_number":237,"context_line":"        :raises: InvalidParameterValue."},{"line_number":238,"context_line":"        \"\"\""},{"line_number":239,"context_line":"        return _power_status(task.node)"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_1f014aaf","line":237,"updated":"2015-11-11 15:04:11.000000000","message":"I do not see that it raised in any place inside.","commit_id":"93316c023b7b7956e191be761c2275522edbb650"}],"ironic/drivers/modules/amt/vendor.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"28e6c0032fd447755b60d1e5b56d37d3fbf90df7","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        \"\"\"Wake up AMT interface."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        AMT interface goes to sleep after a period of time if the host is off."},{"line_number":47,"context_line":"        This method will ping AMT interface to wake up it before following"},{"line_number":48,"context_line":"        actions."},{"line_number":49,"context_line":"        :param a TaskManager instance containing the node to act on."},{"line_number":50,"context_line":"        :param kwargs: not used."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_db2b6b93","line":47,"updated":"2015-10-26 01:27:58.000000000","message":"may be you can remove \"it before following actions\"","commit_id":"ae0f496b28645a2ccea30df9ef6df823db135fcc"}],"ironic/tests/unit/drivers/modules/amt/test_management.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"8739360f23b0a9e46dd0c750f49ed12e93ea76c3","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                                               driver\u003d\u0027fake_amt\u0027,"},{"line_number":48,"context_line":"                                               driver_info\u003dINFO_DICT)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, spec_set\u003dTrue, autospec\u003dTrue)"},{"line_number":51,"context_line":"    def test__set_boot_device_order(self, mock_ex, mock_client_pywsman):"},{"line_number":52,"context_line":"        namespace \u003d resource_uris.CIM_BootConfigSetting"},{"line_number":53,"context_line":"        device \u003d boot_devices.PXE"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_43524f36","line":50,"updated":"2015-11-20 08:20:15.000000000","message":"Better mock awake_amt_interface() and test that it\u0027s called with self.node (in tests below also).","commit_id":"c0da5e623a7f99fa9df5dd49170ec0b7f45751f5"}],"ironic/tests/unit/drivers/modules/amt/test_power.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"8739360f23b0a9e46dd0c750f49ed12e93ea76c3","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        CONF.set_override(\u0027max_attempts\u0027, 2, \u0027amt\u0027)"},{"line_number":50,"context_line":"        CONF.set_override(\u0027action_wait\u0027, 0, \u0027amt\u0027)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, spec_set\u003dTrue, autospec\u003dTrue)"},{"line_number":53,"context_line":"    @mock.patch.object(amt_common, \u0027get_wsman_client\u0027, spec_set\u003dTrue,"},{"line_number":54,"context_line":"                       autospec\u003dTrue)"},{"line_number":55,"context_line":"    def test__set_power_state(self, mock_client_pywsman, mock_ex):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_a61ea95c","line":52,"updated":"2015-11-20 08:20:15.000000000","message":"ditto as in test_management.py","commit_id":"c0da5e623a7f99fa9df5dd49170ec0b7f45751f5"}]}
