)]}'
{"ironic/conductor/manager.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e0b8a530b92634c506bad8b402448e6777aeafe6","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":250,"context_line":"            node \u003d task.node"},{"line_number":251,"context_line":"            if node.provision_state is not states.NOSTATE:"},{"line_number":252,"context_line":"                raise exception.InstanceDeployFailure(_("},{"line_number":253,"context_line":"                    \"RPC do_node_deploy called for %(node)s, but provision \""},{"line_number":254,"context_line":"                    \"state is already %(state)s.\") %"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2F8ao%3D","line":251,"updated":"2014-01-06 12:53:55.000000000","message":"Hi Deva, removing the dict-like behavior when accessing the nodes attributes doesn\u0027t seems to be part of this change (not mentioned on the commit message)","commit_id":"e148fa9b6ade1f09a8fa7ae64a7304db001ca874"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"b0da2c0c0b87915a4aa041b5872f946830d18594","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":250,"context_line":"            node \u003d task.node"},{"line_number":251,"context_line":"            if node.provision_state is not states.NOSTATE:"},{"line_number":252,"context_line":"                raise exception.InstanceDeployFailure(_("},{"line_number":253,"context_line":"                    \"RPC do_node_deploy called for %(node)s, but provision \""},{"line_number":254,"context_line":"                    \"state is already %(state)s.\") %"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B4VI%3D","line":251,"in_reply_to":"AAAAUH%2F%2F8ao%3D","updated":"2014-01-21 06:14:37.000000000","message":"Done","commit_id":"e148fa9b6ade1f09a8fa7ae64a7304db001ca874"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a033dadc170df9be3046da0cd47088b8751911c5","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            except Exception:"},{"line_number":260,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":261,"context_line":"                    node.last_error \u003d _("},{"line_number":262,"context_line":"                            \"Failed to validate deploy driver info.\")"},{"line_number":263,"context_line":"            else:"},{"line_number":264,"context_line":"                # set target state to expose that work is in progress"},{"line_number":265,"context_line":"                node.provision_state \u003d states.DEPLOYING"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FsbY%3D","line":262,"updated":"2014-01-09 14:53:56.000000000","message":"The error for power driver is \"Power driver failed to validate info ...\n\". How about \"Deploy driver failed to validate info while provisioning the node.\"?","commit_id":"e148fa9b6ade1f09a8fa7ae64a7304db001ca874"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"b0da2c0c0b87915a4aa041b5872f946830d18594","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            except Exception:"},{"line_number":260,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":261,"context_line":"                    node.last_error \u003d _("},{"line_number":262,"context_line":"                            \"Failed to validate deploy driver info.\")"},{"line_number":263,"context_line":"            else:"},{"line_number":264,"context_line":"                # set target state to expose that work is in progress"},{"line_number":265,"context_line":"                node.provision_state \u003d states.DEPLOYING"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B4U4%3D","line":262,"in_reply_to":"AAAAUH%2F%2FsbY%3D","updated":"2014-01-21 06:14:37.000000000","message":"Done","commit_id":"e148fa9b6ade1f09a8fa7ae64a7304db001ca874"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"3177ac7c0a8393e3f2c285c7d11ad4697dc9238a","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                    return task.driver.vendor.validate(task.node,"},{"line_number":221,"context_line":"                                                       method\u003ddriver_method,"},{"line_number":222,"context_line":"                                                       **info)"},{"line_number":223,"context_line":"                except Exception:"},{"line_number":224,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":225,"context_line":"                        task.node[\u0027last_error\u0027] \u003d _("},{"line_number":226,"context_line":"                                \"Vendor driver failed to validate info during \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B29g%3D","line":223,"updated":"2014-01-21 11:32:51.000000000","message":"1) driver.vendor.validate raises exception.InvalidParameterValue, for example in pxe driver with info which parameter is missing. This info not logged. IMO the manager should log all driver\u0027s exceptions.\n\n2) excutils.save_and_reraise_exception() reraises original driver\u0027s exception and it returns to client.","commit_id":"f732d8f8ec346df499727cbb43e6d243bb7593b2"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"fd80c533d4318e0d2d5848c042f010438d2cea01","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                    return task.driver.vendor.validate(task.node,"},{"line_number":221,"context_line":"                                                       method\u003ddriver_method,"},{"line_number":222,"context_line":"                                                       **info)"},{"line_number":223,"context_line":"                except Exception:"},{"line_number":224,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":225,"context_line":"                        task.node[\u0027last_error\u0027] \u003d _("},{"line_number":226,"context_line":"                                \"Vendor driver failed to validate info during \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B0pI%3D","line":223,"in_reply_to":"AAAAUH%2F%2B29g%3D","updated":"2014-01-21 18:37:14.000000000","message":"save_and_reraise_exception should still log it, afaik ....\n\nand the exception being returned to the client is another bug, already known. the client *should* get the exception, but it should be sanitized by API tier (which today it is not).","commit_id":"f732d8f8ec346df499727cbb43e6d243bb7593b2"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e36ceab54234bbe54c9b9cf045570d471b384682","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        with task_manager.acquire(context, [node_id], shared\u003dTrue) as task:"},{"line_number":136,"context_line":"            node \u003d task.resources[0].node"},{"line_number":137,"context_line":"            driver \u003d task.resources[0].driver"},{"line_number":138,"context_line":"            state \u003d driver.power.get_power_state(task, node)"},{"line_number":139,"context_line":"            return state"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def update_node(self, context, node_obj):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9gTg%3D","line":138,"updated":"2014-02-06 13:16:18.000000000","message":"*\n\nAs for this one - I filled a bug https://bugs.launchpad.net/ironic/+bug/1277062\nThe whole method is unused","commit_id":"08568aae3d519f300eeaece5d69638487c2e9634"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e36ceab54234bbe54c9b9cf045570d471b384682","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            # TODO(deva): Determine what value will be passed by API when"},{"line_number":165,"context_line":"            #             instance_uuid needs to be unset, and handle it."},{"line_number":166,"context_line":"            if \u0027instance_uuid\u0027 in delta:"},{"line_number":167,"context_line":"                task.driver.power.validate(node_obj)"},{"line_number":168,"context_line":"                node_obj[\u0027power_state\u0027] \u003d \\"},{"line_number":169,"context_line":"                        task.driver.power.get_power_state(task, node_obj)"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9gTk%3D","line":167,"updated":"2014-02-06 13:16:18.000000000","message":"*\n\nIf this will fail we\u0027re still exposing the full message, and last_error is not filled, right? \n\nhttps://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/node.py#L602-L604\n\nThis is probably a separate bug. See my comments with * below","commit_id":"08568aae3d519f300eeaece5d69638487c2e9634"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e36ceab54234bbe54c9b9cf045570d471b384682","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            if \u0027instance_uuid\u0027 in delta:"},{"line_number":167,"context_line":"                task.driver.power.validate(node_obj)"},{"line_number":168,"context_line":"                node_obj[\u0027power_state\u0027] \u003d \\"},{"line_number":169,"context_line":"                        task.driver.power.get_power_state(task, node_obj)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"                if node_obj[\u0027power_state\u0027] !\u003d states.POWER_OFF:"},{"line_number":172,"context_line":"                    raise exception.NodeInWrongPowerState("}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9gTo%3D","line":169,"updated":"2014-02-06 13:16:18.000000000","message":"*\n\nsame here","commit_id":"08568aae3d519f300eeaece5d69638487c2e9634"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e36ceab54234bbe54c9b9cf045570d471b384682","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                                                       **info)"},{"line_number":223,"context_line":"                except Exception:"},{"line_number":224,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":225,"context_line":"                        task.node[\u0027last_error\u0027] \u003d _("},{"line_number":226,"context_line":"                                \"Vendor driver failed to validate info during \""},{"line_number":227,"context_line":"                                \"call to %s.\") % driver_method"},{"line_number":228,"context_line":"                        task.node.save(context)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9g0Q%3D","line":225,"updated":"2014-02-06 13:16:18.000000000","message":"This patch switches to dict-like interface while it\u0027s being removed by a bunch of other patches in Ironic... Comparing to base version where we use task.node.driver I think we should keep that notation. Makes sense?\n\nApplicable to the code below too","commit_id":"08568aae3d519f300eeaece5d69638487c2e9634"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e36ceab54234bbe54c9b9cf045570d471b384682","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                task.node.save(context)"},{"line_number":234,"context_line":"                raise exception.UnsupportedDriverExtension("},{"line_number":235,"context_line":"                                        driver\u003dtask.node[\u0027driver\u0027],"},{"line_number":236,"context_line":"                                        extension\u003d\u0027vendor passthru\u0027)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def do_vendor_action(self, context, node_id, driver_method, info):"},{"line_number":239,"context_line":"        \"\"\"Run driver action asynchronously.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9gxc%3D","line":236,"updated":"2014-02-06 13:16:18.000000000","message":"I suggest to reformat this method to\n\n    if not hasattr(task.driver, \u0027vendor\u0027):\n         task.node[\u0027last_error\u0027] \u003d (_(\"Vendor passthru is not supported by %s.\")\n\t                        % task.node[\u0027driver\u0027])\n\t task.node.save(context)\n\t raise exception.UnsupportedDriverExtension(\n\t                 driver\u003dtask.node[\u0027driver\u0027],\n\t                 extension\u003d\u0027vendor passthru\u0027)\n\n    \n    try:\n         return task.driver.vendor.validate(task.node, method\u003ddriver_method, **info)\n    except Exception:\n         with excutils.save_and_reraise_exception():\n              task.node[\u0027last_error\u0027] \u003d _(\"Vendor driver failed to validate info during call to %s.\") \\\n                                                    % driver_method\n              task.node.save(context)","commit_id":"08568aae3d519f300eeaece5d69638487c2e9634"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e36ceab54234bbe54c9b9cf045570d471b384682","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                    task.node[\u0027last_error\u0027] \u003d _("},{"line_number":248,"context_line":"                            \"Vendor extension failed while invoking method \""},{"line_number":249,"context_line":"                            \"%s.\") % driver_method"},{"line_number":250,"context_line":"                    task.node.save(context)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def do_node_deploy(self, context, node_id):"},{"line_number":253,"context_line":"        \"\"\"RPC method to initiate deployment to a node."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9gv0%3D","line":250,"updated":"2014-02-06 13:16:18.000000000","message":"*\n\nSo this was not reflected by \u0027last_error\u0027 before at all, right? \nhttps://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/node.py#L389-L390\n\nProbably this should be related to the separate bug as mentioned above\n\nSo, for all comments with *, would it make sense to fill a separate bug that we have unwrapped driver calls, therefore the driver exception are not correctly logged and are not reflected in last_error. Or maybe to fix this within this patch?","commit_id":"08568aae3d519f300eeaece5d69638487c2e9634"}],"ironic/conductor/utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a033dadc170df9be3046da0cd47088b8751911c5","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    except Exception:"},{"line_number":88,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":89,"context_line":"            node.last_error \u003d _("},{"line_number":90,"context_line":"                    \"Power driver failed to set state %s.\") % msg_str"},{"line_number":91,"context_line":"    else:"},{"line_number":92,"context_line":"        node.power_state \u003d new_state"},{"line_number":93,"context_line":"    finally:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fsaw%3D","line":90,"updated":"2014-01-09 14:53:56.000000000","message":"Just wondering if \"Power driver failed to set state while rebooting.\" is clear. But \"Power driver failed to reboot\" is not specific enough. \"Power driver failed to go into rebooting state\"? Gah. What you have is fine :-)  (Although I\u0027ll leave this here in case someone else can do better.)","commit_id":"e148fa9b6ade1f09a8fa7ae64a7304db001ca874"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"b0da2c0c0b87915a4aa041b5872f946830d18594","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    except Exception:"},{"line_number":88,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":89,"context_line":"            node.last_error \u003d _("},{"line_number":90,"context_line":"                    \"Power driver failed to set state %s.\") % msg_str"},{"line_number":91,"context_line":"    else:"},{"line_number":92,"context_line":"        node.power_state \u003d new_state"},{"line_number":93,"context_line":"    finally:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B4VQ%3D","line":90,"in_reply_to":"AAAAUH%2F%2Fsaw%3D","updated":"2014-01-21 06:14:37.000000000","message":"It\u0027s a nit, but I agree -- \"power driver failed while rebooting\" is clearer than \"power driver failed to set state while rebooting\". \n\nHow does that sound to you?","commit_id":"e148fa9b6ade1f09a8fa7ae64a7304db001ca874"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e36ceab54234bbe54c9b9cf045570d471b384682","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    node[\u0027last_error\u0027] \u003d None"},{"line_number":70,"context_line":"    node.save(context)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    # take power action"},{"line_number":73,"context_line":"    try:"},{"line_number":74,"context_line":"        if state !\u003d states.REBOOT:"},{"line_number":75,"context_line":"            task.driver.power.set_power_state(task, node, new_state)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9gV0%3D","side":"PARENT","line":72,"updated":"2014-02-06 13:16:18.000000000","message":"This comment seems useful to me :)","commit_id":"087a8ea666a4b33fa4a24b2fca45a6717c333336"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e36ceab54234bbe54c9b9cf045570d471b384682","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                  \"Error: %(error)s\") % {"},{"line_number":83,"context_line":"                    \u0027target\u0027: new_state, \u0027error\u0027: e}"},{"line_number":84,"context_line":"    else:"},{"line_number":85,"context_line":"        # success!"},{"line_number":86,"context_line":"        node[\u0027power_state\u0027] \u003d new_state"},{"line_number":87,"context_line":"    finally:"},{"line_number":88,"context_line":"        node[\u0027target_power_state\u0027] \u003d states.NOSTATE"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F9gUU%3D","side":"PARENT","line":85,"updated":"2014-02-06 13:16:18.000000000","message":"And this too :) this one probably was intended to folks who are not familiar what exactly try-except-else do. \n\nFor current case we can also move \n\nnode[\u0027power_state\u0027] \u003d new_state\n\nto the end of try block, and remove this else","commit_id":"087a8ea666a4b33fa4a24b2fca45a6717c333336"}]}
