)]}'
{"ironic/api/controllers/v1/node.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"950b825fd3e7eab5557465f5e704188f677264be","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \"\"\"Set the power state of the machine.\"\"\""},{"line_number":81,"context_line":"        node \u003d objects.Node.get_by_uuid(pecan.request.context, node_id)"},{"line_number":82,"context_line":"        if node.target_power_state is not None:"},{"line_number":83,"context_line":"            raise wsme.exc.ClientSideError(_(\"One power operation is \""},{"line_number":84,"context_line":"                                             \"already in process\"))"},{"line_number":85,"context_line":"        #TODO(lucasagomes): Test if target is a valid state and if it\u0027s able"},{"line_number":86,"context_line":"        # to transition to the target state from the current one"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FM68%3D","side":"PARENT","line":83,"updated":"2013-10-21 16:40:29.000000000","message":"As an aside, would it be useful for debugging purposes, to mention the target_power_state? (I\u0027d also use \u0027progress\u0027 instead of \u0027process\u0027 to be consistent with the other error msg below).","commit_id":"5f664f279c340303a7e953aee5d66f4ffe04abca"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"061bc6095acd539020904f63c415f3ffd813a0d7","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \"\"\"Set the power state of the machine.\"\"\""},{"line_number":81,"context_line":"        node \u003d objects.Node.get_by_uuid(pecan.request.context, node_id)"},{"line_number":82,"context_line":"        if node.target_power_state is not None:"},{"line_number":83,"context_line":"            raise wsme.exc.ClientSideError(_(\"One power operation is \""},{"line_number":84,"context_line":"                                             \"already in process\"))"},{"line_number":85,"context_line":"        #TODO(lucasagomes): Test if target is a valid state and if it\u0027s able"},{"line_number":86,"context_line":"        # to transition to the target state from the current one"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FJqc%3D","side":"PARENT","line":83,"in_reply_to":"AAAATH%2F%2FM68%3D","updated":"2013-10-22 13:00:59.000000000","message":"+1","commit_id":"5f664f279c340303a7e953aee5d66f4ffe04abca"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"950b825fd3e7eab5557465f5e704188f677264be","unresolved":false,"context_lines":[{"line_number":429,"context_line":"        if any(node.get(tgt) for tgt in [\"target_power_state\","},{"line_number":430,"context_line":"                                         \"target_provision_state\"]):"},{"line_number":431,"context_line":"            raise wsme.exc.ClientSideError(_(\"Can not update node %s because \""},{"line_number":432,"context_line":"                                             \"a state change is already in \""},{"line_number":433,"context_line":"                                             \"progress.\") % uuid)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FM7c%3D","side":"PARENT","line":432,"updated":"2013-10-21 16:40:29.000000000","message":"As an aside, would it be useful for debugging purposes, to mention what the current state is?","commit_id":"5f664f279c340303a7e953aee5d66f4ffe04abca"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"061bc6095acd539020904f63c415f3ffd813a0d7","unresolved":false,"context_lines":[{"line_number":429,"context_line":"        if any(node.get(tgt) for tgt in [\"target_power_state\","},{"line_number":430,"context_line":"                                         \"target_provision_state\"]):"},{"line_number":431,"context_line":"            raise wsme.exc.ClientSideError(_(\"Can not update node %s because \""},{"line_number":432,"context_line":"                                             \"a state change is already in \""},{"line_number":433,"context_line":"                                             \"progress.\") % uuid)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FJqE%3D","side":"PARENT","line":432,"in_reply_to":"AAAATH%2F%2FM7c%3D","updated":"2013-10-22 13:00:59.000000000","message":"+1 for target","commit_id":"5f664f279c340303a7e953aee5d66f4ffe04abca"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"01741767ca79e895b9fc14f948f294af902af9b1","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        # change in progress"},{"line_number":428,"context_line":"        changes \u003d \u0027, \u0027.join([target + \u0027: \u0027 + node[target] for target in"},{"line_number":429,"context_line":"                       [\u0027target_power_state\u0027, \u0027target_provision_state\u0027]"},{"line_number":430,"context_line":"                       if node[target]])"},{"line_number":431,"context_line":"        if changes:"},{"line_number":432,"context_line":"            raise wsme.exc.ClientSideError(_(\"Can not update node %(uuid)s \""},{"line_number":433,"context_line":"                \"because a state change is already in progress %(changes)s.\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FJFA%3D","line":430,"updated":"2013-10-22 15:37:12.000000000","message":"Will that work? How about if node.get(target)?","commit_id":"6034725fe1b4a2b20c3eceada053ba556cbd2986"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b0caa1ccca01701b791ced6941f2f7ff9b9c81ef","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        # change in progress"},{"line_number":428,"context_line":"        changes \u003d \u0027, \u0027.join([target + \u0027: \u0027 + node[target] for target in"},{"line_number":429,"context_line":"                       [\u0027target_power_state\u0027, \u0027target_provision_state\u0027]"},{"line_number":430,"context_line":"                       if node[target]])"},{"line_number":431,"context_line":"        if changes:"},{"line_number":432,"context_line":"            raise wsme.exc.ClientSideError(_(\"Can not update node %(uuid)s \""},{"line_number":433,"context_line":"                \"because a state change is already in progress %(changes)s.\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FI7c%3D","line":430,"in_reply_to":"AAAATH%2F%2FI%2FI%3D","updated":"2013-10-22 16:03:25.000000000","message":"Sorry, I only compared against the original code. Thanks for pointing that out.","commit_id":"6034725fe1b4a2b20c3eceada053ba556cbd2986"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b429c7338840ceda56677bab7d2d25563f9404bf","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        # change in progress"},{"line_number":428,"context_line":"        changes \u003d \u0027, \u0027.join([target + \u0027: \u0027 + node[target] for target in"},{"line_number":429,"context_line":"                       [\u0027target_power_state\u0027, \u0027target_provision_state\u0027]"},{"line_number":430,"context_line":"                       if node[target]])"},{"line_number":431,"context_line":"        if changes:"},{"line_number":432,"context_line":"            raise wsme.exc.ClientSideError(_(\"Can not update node %(uuid)s \""},{"line_number":433,"context_line":"                \"because a state change is already in progress %(changes)s.\") %"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FI%2FI%3D","line":430,"in_reply_to":"AAAATH%2F%2FJFA%3D","updated":"2013-10-22 15:53:55.000000000","message":"AFAIK no problem here.\nLook at\n\nhttps://github.com/openstack/ironic/blob/master/ironic/objects/node.py#L26\n\nhttps://github.com/openstack/ironic/blob/master/ironic/objects/node.py#L54","commit_id":"6034725fe1b4a2b20c3eceada053ba556cbd2986"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"916171b12b7bcb7f2d2dd95698310653bc35cdd5","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                       if node[target]])"},{"line_number":431,"context_line":"        if changes:"},{"line_number":432,"context_line":"            raise wsme.exc.ClientSideError(_(\"Can not update node %(uuid)s \""},{"line_number":433,"context_line":"                \"because a state change is already in progress %(changes)s.\") %"},{"line_number":434,"context_line":"                 {\u0027uuid\u0027: uuid, \u0027changes\u0027: changes}, status_code\u003d409)"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FIy0%3D","line":433,"updated":"2013-10-22 16:45:28.000000000","message":"This message lacks clear formatting of the changes. For example, it may read as:\n\n  Can not update node {UUID} because a state change\n  is already in progress target_provision_state, DEPLOYED.\n\nAlso, I don\u0027t think this error message needs to include the target state at all. A user can see those via GET /nodes/{UUID}/detail already. I would prefer a simpler message, such as:\n\n  Can not update node {UUID} while a state transition is in progress.","commit_id":"6034725fe1b4a2b20c3eceada053ba556cbd2986"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"26ee84b3efec00e0312a8b98ca21d4a29cc8bcc2","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                       if node[target]])"},{"line_number":431,"context_line":"        if changes:"},{"line_number":432,"context_line":"            raise wsme.exc.ClientSideError(_(\"Can not update node %(uuid)s \""},{"line_number":433,"context_line":"                \"because a state change is already in progress %(changes)s.\") %"},{"line_number":434,"context_line":"                 {\u0027uuid\u0027: uuid, \u0027changes\u0027: changes}, status_code\u003d409)"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F%2FN0%3D","line":433,"in_reply_to":"AAAATH%2F%2FIy0%3D","updated":"2013-10-23 08:43:55.000000000","message":"Done","commit_id":"6034725fe1b4a2b20c3eceada053ba556cbd2986"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"9e63739a0ab50c8151c6db000cca8e0af5564d0e","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                       if node[target]])"},{"line_number":431,"context_line":"        if changes:"},{"line_number":432,"context_line":"            raise wsme.exc.ClientSideError(_(\"Can not update node %(uuid)s \""},{"line_number":433,"context_line":"                \"because a state change is already in progress %(changes)s.\") %"},{"line_number":434,"context_line":"                 {\u0027uuid\u0027: uuid, \u0027changes\u0027: changes}, status_code\u003d409)"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2FIp8%3D","line":433,"in_reply_to":"AAAATH%2F%2FIy0%3D","updated":"2013-10-22 17:15:23.000000000","message":"To clarify my comment, an update is not allowed during any state change, and the particular target state is not relevant to this error.\n\nIf, at some point in the future, we were to allow some updates during some state transitions (but not others), then I would want more specific error message(s).","commit_id":"6034725fe1b4a2b20c3eceada053ba556cbd2986"}]}
