)]}'
{"ironic/drivers/modules/pxe.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"22947eb06dfd01c9ded6dc1dafd9da44f59578e8","unresolved":false,"context_lines":[{"line_number":621,"context_line":"            node.save(task.context)"},{"line_number":622,"context_line":"            try:"},{"line_number":623,"context_line":"                manager_utils.node_power_action(task, node, states.POWER_OFF)"},{"line_number":624,"context_line":"            finally:"},{"line_number":625,"context_line":"                # NOTE(deva): we must set last_error here because"},{"line_number":626,"context_line":"                #             node_power_action clears error if it succeeds"},{"line_number":627,"context_line":"                node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F83pU%3D","line":624,"updated":"2013-12-19 11:38:21.000000000","message":"I like idea that _continue_deploy method no raises exception, but IMO also exception from node_power_action should not be reraised.","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":1726,"name":"Ghe Rivero","email":"ghe.rivero@gmail.com","username":"ghe.rivero"},"change_message_id":"3f6f36fa1487a67959277ed533501f8af39d8e26","unresolved":false,"context_lines":[{"line_number":621,"context_line":"            node.save(task.context)"},{"line_number":622,"context_line":"            try:"},{"line_number":623,"context_line":"                manager_utils.node_power_action(task, node, states.POWER_OFF)"},{"line_number":624,"context_line":"            finally:"},{"line_number":625,"context_line":"                # NOTE(deva): we must set last_error here because"},{"line_number":626,"context_line":"                #             node_power_action clears error if it succeeds"},{"line_number":627,"context_line":"                node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8y1A%3D","line":624,"in_reply_to":"AAAATn%2F83c4%3D","updated":"2013-12-20 08:53:11.000000000","message":"+1, We need to differentiate provisioning errors vs powering ones. Also, we must be careful about keeping both in \u0027sync\u0027 (don\u0027t mix errors from different cycles)","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"c19e769348d81c22d48a628895bfc1bed496e548","unresolved":false,"context_lines":[{"line_number":621,"context_line":"            node.save(task.context)"},{"line_number":622,"context_line":"            try:"},{"line_number":623,"context_line":"                manager_utils.node_power_action(task, node, states.POWER_OFF)"},{"line_number":624,"context_line":"            finally:"},{"line_number":625,"context_line":"                # NOTE(deva): we must set last_error here because"},{"line_number":626,"context_line":"                #             node_power_action clears error if it succeeds"},{"line_number":627,"context_line":"                node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F46U%3D","line":624,"in_reply_to":"AAAATn%2F83c4%3D","updated":"2013-12-27 23:23:19.000000000","message":"I am not yet convinced we need to track separate error messages for every driver interface.\n\nHowever, I think that by catching any exception from node_power_action here, we can set last_error to an appropriate value that indicates the deploy failed due to a power action failing.","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"941f5c4f1431dd80b0ef474937d204c2933583d9","unresolved":false,"context_lines":[{"line_number":621,"context_line":"            node.save(task.context)"},{"line_number":622,"context_line":"            try:"},{"line_number":623,"context_line":"                manager_utils.node_power_action(task, node, states.POWER_OFF)"},{"line_number":624,"context_line":"            finally:"},{"line_number":625,"context_line":"                # NOTE(deva): we must set last_error here because"},{"line_number":626,"context_line":"                #             node_power_action clears error if it succeeds"},{"line_number":627,"context_line":"                node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F83c4%3D","line":624,"in_reply_to":"AAAATn%2F83pU%3D","updated":"2013-12-19 12:39:02.000000000","message":"Agree with Yuriy.\n\nAlso I wonder,  if the node_power_action fails to power off the node, what error message the last_error field should contain? The error message about the provisioning or the error message about the power off?\n\nI\u0027d say the provisioning error message, but we can\u0027t discard the power off error, we should log it.\n\nJust throwing one idea, and if we had a separated last error for each state type, e.g last_provisioning_error, last_power_error, do you think it would be more precise? I tend to think yes but I\u0027m afraid to make things more complex than they should.","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"c19e769348d81c22d48a628895bfc1bed496e548","unresolved":false,"context_lines":[{"line_number":621,"context_line":"            node.save(task.context)"},{"line_number":622,"context_line":"            try:"},{"line_number":623,"context_line":"                manager_utils.node_power_action(task, node, states.POWER_OFF)"},{"line_number":624,"context_line":"            finally:"},{"line_number":625,"context_line":"                # NOTE(deva): we must set last_error here because"},{"line_number":626,"context_line":"                #             node_power_action clears error if it succeeds"},{"line_number":627,"context_line":"                node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F46Y%3D","line":624,"in_reply_to":"AAAATn%2F83pU%3D","updated":"2013-12-27 23:23:19.000000000","message":"Good point, thanks Yuriy","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":1726,"name":"Ghe Rivero","email":"ghe.rivero@gmail.com","username":"ghe.rivero"},"change_message_id":"3f6f36fa1487a67959277ed533501f8af39d8e26","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                node.save(task.context)"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        # keystone token file is no longer needed"},{"line_number":631,"context_line":"        _destroy_token_file(node)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"        if ramdisk_error:"},{"line_number":634,"context_line":"            msg \u003d (_(\u0027Shutting down node %(node)s due to deploy error. \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8yzE%3D","line":631,"updated":"2013-12-20 08:53:11.000000000","message":"Not an issue now, but being this a security token, destroying it should be the first thing to do, just in case.","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"c19e769348d81c22d48a628895bfc1bed496e548","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                node.save(task.context)"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        # keystone token file is no longer needed"},{"line_number":631,"context_line":"        _destroy_token_file(node)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"        if ramdisk_error:"},{"line_number":634,"context_line":"            msg \u003d (_(\u0027Shutting down node %(node)s due to deploy error. \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F46g%3D","line":631,"in_reply_to":"AAAATn%2F8yzE%3D","updated":"2013-12-27 23:23:19.000000000","message":"It is the first action done by this method, but I can see how it\u0027s not clear from the code layout. I\u0027ll move things around a bit.","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"05a5fbe07b6a409241a6d0b1e83ed7fe79f8a5c1","unresolved":false,"context_lines":[{"line_number":633,"context_line":"            finally:"},{"line_number":634,"context_line":"                # we must set last_error here because node_power_action"},{"line_number":635,"context_line":"                # clears error if it successfully powered off the node."},{"line_number":636,"context_line":"                node.last_error \u003d msg"},{"line_number":637,"context_line":"                node.save(task.context)"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"        # remove cached keystone token immediately"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAT3%2F%2F2GE%3D","line":636,"updated":"2013-12-30 09:37:27.000000000","message":"If no exception from power operation raised \u0027msg\u0027 will not contains \u0027error\u0027.","commit_id":"2a99ffc0e78badebe3ba8e37c9b230f446c0fe34"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"f242419bfec3612abca4fbee3bb909f5a09b778f","unresolved":false,"context_lines":[{"line_number":633,"context_line":"            finally:"},{"line_number":634,"context_line":"                # we must set last_error here because node_power_action"},{"line_number":635,"context_line":"                # clears error if it successfully powered off the node."},{"line_number":636,"context_line":"                node.last_error \u003d msg"},{"line_number":637,"context_line":"                node.save(task.context)"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"        # remove cached keystone token immediately"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAT3%2F%2F0fg%3D","line":636,"in_reply_to":"AAAAT3%2F%2F2GE%3D","updated":"2013-12-30 20:22:44.000000000","message":"Ah, this needs to be formatted. Thanks.","commit_id":"2a99ffc0e78badebe3ba8e37c9b230f446c0fe34"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"dd504b3032bcc732c3e3572a1a406d369c7db570","unresolved":false,"context_lines":[{"line_number":642,"context_line":"        if ramdisk_error:"},{"line_number":643,"context_line":"            LOG.error(_(\u0027Error returned from PXE deploy ramdisk: %s\u0027)"},{"line_number":644,"context_line":"                    % ramdisk_error)"},{"line_number":645,"context_line":"            _set_failed_state(_(\u0027Failure in PXE deploy ramdisk.\u0027))"},{"line_number":646,"context_line":"            return"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"        LOG.info(_(\u0027Continuing deployment for node %(node)s, params \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2FwAk%3D","line":645,"updated":"2014-01-02 12:23:41.000000000","message":"I think it would be nice to include the ramdisk_error in msg like you did on the previous patch, so when the admin look at the last_error he already knows what failed in the ramdisk without having to consult the logs.\n\nMay I suggest something like:\n\nif ramdisk_error:\n    msg \u003d _(\u0027Failure in PXE deploy ramdisk. Error from deploy agent: %s\u0027) % ramdisk_error\n    LOG.error(msg)\n    _set_failed_state(msg)","commit_id":"a8cfa24f9920e9e18c3f175a0aca8938ecadb789"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"e7e9e749a3470e9b53b4f26e99a48aff60a828c6","unresolved":false,"context_lines":[{"line_number":642,"context_line":"        if ramdisk_error:"},{"line_number":643,"context_line":"            LOG.error(_(\u0027Error returned from PXE deploy ramdisk: %s\u0027)"},{"line_number":644,"context_line":"                    % ramdisk_error)"},{"line_number":645,"context_line":"            _set_failed_state(_(\u0027Failure in PXE deploy ramdisk.\u0027))"},{"line_number":646,"context_line":"            return"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"        LOG.info(_(\u0027Continuing deployment for node %(node)s, params \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2FvNA%3D","line":645,"in_reply_to":"AAAAT3%2F%2FwAk%3D","updated":"2014-01-02 16:45:06.000000000","message":"I spent a while thinking through this, and believe that we should not include detailed, potentially-sensitive information in last_error. It should be an explanation of what the error/failure was, not the whole traceback, exception message, or other low-level details that would be in the logs.","commit_id":"a8cfa24f9920e9e18c3f175a0aca8938ecadb789"}],"ironic/tests/drivers/test_pxe.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"941f5c4f1431dd80b0ef474937d204c2933583d9","unresolved":false,"context_lines":[{"line_number":566,"context_line":"                    method\u003d\u0027pass_deploy_info\u0027, address\u003d\u0027123456\u0027, iqn\u003d\u0027aaa-bbb\u0027,"},{"line_number":567,"context_line":"                    key\u003d\u0027fake-56789\u0027)"},{"line_number":568,"context_line":"        self.assertEqual(self.node.provision_state, states.ACTIVE)"},{"line_number":569,"context_line":"        self.assertEqual(self.node.power_state, states.POWER_ON)"},{"line_number":570,"context_line":"        self.assertEqual(self.node.last_error, None)"},{"line_number":571,"context_line":"        self.assertFalse(os.path.exists(token_path))"},{"line_number":572,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F83bE%3D","line":569,"updated":"2013-12-19 12:39:02.000000000","message":"nit about assertEqual, the expected value should be the first parameter\n\ntesttools.TestCase.assertEqual \u003d assertEqual(self, expected, observed, message\u003d\u0027\u0027) unbound testtools.testcase.TestCase method\n    Assert that \u0027expected\u0027 is equal to \u0027observed\u0027.\n    \n    :param expected: The expected value.\n    :param observed: The observed value.\n    :param message: An optional message to include in the error.\n\n\n$ pydoc testtools.TestCase.assertEqual","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"c19e769348d81c22d48a628895bfc1bed496e548","unresolved":false,"context_lines":[{"line_number":566,"context_line":"                    method\u003d\u0027pass_deploy_info\u0027, address\u003d\u0027123456\u0027, iqn\u003d\u0027aaa-bbb\u0027,"},{"line_number":567,"context_line":"                    key\u003d\u0027fake-56789\u0027)"},{"line_number":568,"context_line":"        self.assertEqual(self.node.provision_state, states.ACTIVE)"},{"line_number":569,"context_line":"        self.assertEqual(self.node.power_state, states.POWER_ON)"},{"line_number":570,"context_line":"        self.assertEqual(self.node.last_error, None)"},{"line_number":571,"context_line":"        self.assertFalse(os.path.exists(token_path))"},{"line_number":572,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F418%3D","line":569,"in_reply_to":"AAAATn%2F83bE%3D","updated":"2013-12-27 23:23:19.000000000","message":"Done","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"22947eb06dfd01c9ded6dc1dafd9da44f59578e8","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                    key\u003d\u0027fake-56789\u0027)"},{"line_number":568,"context_line":"        self.assertEqual(self.node.provision_state, states.ACTIVE)"},{"line_number":569,"context_line":"        self.assertEqual(self.node.power_state, states.POWER_ON)"},{"line_number":570,"context_line":"        self.assertEqual(self.node.last_error, None)"},{"line_number":571,"context_line":"        self.assertFalse(os.path.exists(token_path))"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def test_continue_deploy_fail(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F83ms%3D","line":570,"updated":"2013-12-19 11:38:21.000000000","message":"IMO better to use here self.assertIsNone(self.node.last_error), and for other such cases.","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"c19e769348d81c22d48a628895bfc1bed496e548","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                    key\u003d\u0027fake-56789\u0027)"},{"line_number":568,"context_line":"        self.assertEqual(self.node.provision_state, states.ACTIVE)"},{"line_number":569,"context_line":"        self.assertEqual(self.node.power_state, states.POWER_ON)"},{"line_number":570,"context_line":"        self.assertEqual(self.node.last_error, None)"},{"line_number":571,"context_line":"        self.assertFalse(os.path.exists(token_path))"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"    def test_continue_deploy_fail(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F414%3D","line":570,"in_reply_to":"AAAATn%2F83ms%3D","updated":"2013-12-27 23:23:19.000000000","message":"Done","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"22947eb06dfd01c9ded6dc1dafd9da44f59578e8","unresolved":false,"context_lines":[{"line_number":589,"context_line":"                    key\u003d\u0027fake-56789\u0027)"},{"line_number":590,"context_line":"        self.assertEqual(self.node.provision_state, states.DEPLOYFAIL)"},{"line_number":591,"context_line":"        self.assertEqual(self.node.power_state, states.POWER_OFF)"},{"line_number":592,"context_line":"        self.assertNotEqual(self.node.last_error, None)"},{"line_number":593,"context_line":"        self.assertFalse(os.path.exists(token_path))"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def test_continue_deploy_ramdisk_fails(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F83mg%3D","line":592,"updated":"2013-12-19 11:38:21.000000000","message":"ditto self.assertIsNotNone","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"c19e769348d81c22d48a628895bfc1bed496e548","unresolved":false,"context_lines":[{"line_number":589,"context_line":"                    key\u003d\u0027fake-56789\u0027)"},{"line_number":590,"context_line":"        self.assertEqual(self.node.provision_state, states.DEPLOYFAIL)"},{"line_number":591,"context_line":"        self.assertEqual(self.node.power_state, states.POWER_OFF)"},{"line_number":592,"context_line":"        self.assertNotEqual(self.node.last_error, None)"},{"line_number":593,"context_line":"        self.assertFalse(os.path.exists(token_path))"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def test_continue_deploy_ramdisk_fails(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2F410%3D","line":592,"in_reply_to":"AAAATn%2F83mg%3D","updated":"2013-12-27 23:23:19.000000000","message":"Done","commit_id":"5f375e51f51ecdf462ab99775f164acc80c5c10f"}]}
