)]}'
{"ironic/conductor/manager.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b73158cb5b1a9ba5aea93b92b3bb656384bbe80d","unresolved":false,"context_lines":[{"line_number":409,"context_line":"            node[\u0027provision_state\u0027] \u003d states.DELETING"},{"line_number":410,"context_line":"            node[\u0027target_provision_state\u0027] \u003d states.DELETED"},{"line_number":411,"context_line":"            node[\u0027last_error\u0027] \u003d None"},{"line_number":412,"context_line":"            node.save(context)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"    def _do_node_tear_down(self, context, task):"},{"line_number":415,"context_line":"        \"\"\"Internal RPC method to tear down an existing node deployment.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2FWoQ%3D","line":412,"updated":"2014-03-06 17:14:46.000000000","message":"@deva pointed it out at my patch to do the this \"else\" block needs to happen before spawmin the thread or we will be creating a race condition here.","commit_id":"df4c828fb15add2510fd5bff251b437bd948bd91"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f90b56caafc7f3727065e8af21ca8b8f9d62e5a1","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        :param context: an admin context."},{"line_number":401,"context_line":"        :param node_id: the id or uuid of a node."},{"line_number":402,"context_line":"        :raises: InstanceDeployFailure"},{"line_number":403,"context_line":"        :raises: InvalidParameterValue if validation fails"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        \"\"\""},{"line_number":406,"context_line":"        LOG.debug(_(\"RPC do_node_tear_down called for node %s.\") % node_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B3WQ%3D","line":403,"updated":"2014-03-11 16:56:23.000000000","message":"It might also raises NoFreeConductorWorker if there\u0027s no free worker to start the async task.\n\n:raises: NoFreeConductorWorker when there is no free worker to start\n    async task.","commit_id":"e2428d4015bb6d2a49224a66fb9a4a966be2db2a"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"78b51f9b229821e6fd1d311792f14735d6fe136a","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        :param context: an admin context."},{"line_number":401,"context_line":"        :param node_id: the id or uuid of a node."},{"line_number":402,"context_line":"        :raises: InstanceDeployFailure"},{"line_number":403,"context_line":"        :raises: InvalidParameterValue if validation fails"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        \"\"\""},{"line_number":406,"context_line":"        LOG.debug(_(\"RPC do_node_tear_down called for node %s.\") % node_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B1No%3D","line":403,"in_reply_to":"AAAAVn%2F%2B3WQ%3D","updated":"2014-03-11 21:35:04.000000000","message":"Done","commit_id":"e2428d4015bb6d2a49224a66fb9a4a966be2db2a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ebfaaebf728848dd6c5066131e0935008180f301","unresolved":false,"context_lines":[{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    def do_node_tear_down(self, context, node_id):"},{"line_number":398,"context_line":"        \"\"\"RPC method to tear down an existing node deployment."},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        :param context: an admin context."},{"line_number":401,"context_line":"        :param node_id: the id or uuid of a node."},{"line_number":402,"context_line":"        :raises: InstanceDeployFailure"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Bz94%3D","line":399,"updated":"2014-03-12 01:12:22.000000000","message":"Is it worth mentioning that it \u0027Synchronously validate driver specific information and if successful, asynchronously have background worker tear down the node deployment.\u0027 (Or something like that.)","commit_id":"dec7174eccdb96c44913c6213b05df44c47fbb98"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"639e635e95b7615edbab6098adf767a09ef75461","unresolved":false,"context_lines":[{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    def do_node_tear_down(self, context, node_id):"},{"line_number":398,"context_line":"        \"\"\"RPC method to tear down an existing node deployment."},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        :param context: an admin context."},{"line_number":401,"context_line":"        :param node_id: the id or uuid of a node."},{"line_number":402,"context_line":"        :raises: InstanceDeployFailure"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Bxo4%3D","line":399,"in_reply_to":"AAAAVn%2F%2Bz94%3D","updated":"2014-03-12 09:05:28.000000000","message":"Thanks Ruby for the review!\n\nDone","commit_id":"dec7174eccdb96c44913c6213b05df44c47fbb98"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ebfaaebf728848dd6c5066131e0935008180f301","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                raise exception.InstanceDeployFailure(_("},{"line_number":418,"context_line":"                    \"RCP do_node_tear_down \""},{"line_number":419,"context_line":"                    \"not allowed for node %(node)s in state %(state)s\")"},{"line_number":420,"context_line":"                    % {\u0027node\u0027: node_id, \u0027state\u0027: node[\u0027provision_state\u0027]})"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"            task.driver.deploy.validate(task, node)"},{"line_number":423,"context_line":"            node.provision_state \u003d states.DELETING"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2B0Ds%3D","line":420,"updated":"2014-03-12 01:12:22.000000000","message":"if you\u0027re changing to node.provision_state syntax, should probably do the same here :-)","commit_id":"dec7174eccdb96c44913c6213b05df44c47fbb98"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"639e635e95b7615edbab6098adf767a09ef75461","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                raise exception.InstanceDeployFailure(_("},{"line_number":418,"context_line":"                    \"RCP do_node_tear_down \""},{"line_number":419,"context_line":"                    \"not allowed for node %(node)s in state %(state)s\")"},{"line_number":420,"context_line":"                    % {\u0027node\u0027: node_id, \u0027state\u0027: node[\u0027provision_state\u0027]})"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"            task.driver.deploy.validate(task, node)"},{"line_number":423,"context_line":"            node.provision_state \u003d states.DELETING"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Bxow%3D","line":420,"in_reply_to":"AAAAVn%2F%2B0Ds%3D","updated":"2014-03-12 09:05:28.000000000","message":"Done","commit_id":"dec7174eccdb96c44913c6213b05df44c47fbb98"}],"ironic/conductor/rpcapi.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f90b56caafc7f3727065e8af21ca8b8f9d62e5a1","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        :param context: request context."},{"line_number":190,"context_line":"        :param node_id: node id or uuid."},{"line_number":191,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        The node must already be configured and in the appropriate"},{"line_number":194,"context_line":"        deployed state before this method is called."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B3Ww%3D","line":191,"updated":"2014-03-11 16:56:23.000000000","message":"We also need to update this docstring to say the exceptions that it might raise, since now we run part of the process in a sync way exceptions will be bubbled up\n\n:raises: InstanceDeployFailure\n:raises: InvalidParameterValue if validation fails\n:raises: NoFreeConductorWorker when there is no free worker to start\n    async task.","commit_id":"e2428d4015bb6d2a49224a66fb9a4a966be2db2a"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"78b51f9b229821e6fd1d311792f14735d6fe136a","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        :param context: request context."},{"line_number":190,"context_line":"        :param node_id: node id or uuid."},{"line_number":191,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        The node must already be configured and in the appropriate"},{"line_number":194,"context_line":"        deployed state before this method is called."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B1Ng%3D","line":191,"in_reply_to":"AAAAVn%2F%2B3Ww%3D","updated":"2014-03-11 21:35:04.000000000","message":"Done","commit_id":"e2428d4015bb6d2a49224a66fb9a4a966be2db2a"}],"ironic/tests/conductor/test_manager.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f90b56caafc7f3727065e8af21ca8b8f9d62e5a1","unresolved":false,"context_lines":[{"line_number":736,"context_line":"        self.assertEqual(states.DELETED, node.target_provision_state)"},{"line_number":737,"context_line":"        self.assertIsNone(node.last_error)"},{"line_number":738,"context_line":"        mock_tear_down.assert_called_once_with(mock.ANY, mock.ANY)"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    def test_validate_driver_interfaces(self):"},{"line_number":741,"context_line":"        ndict \u003d utils.get_test_node(driver\u003d\u0027fake\u0027)"},{"line_number":742,"context_line":"        node \u003d self.dbapi.create_node(ndict)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B3Uk%3D","line":739,"updated":"2014-03-11 16:56:23.000000000","message":"Since do_node_tear_down now might raise NoFreeConductorWorker if there\u0027s no free worker to start the async task, I suggest adding a test to it:\n\ndef test_do_node_tear_down_worker_pool_full(self):\n    ndict \u003d utils.get_test_node(driver\u003d\u0027fake\u0027)\n    node \u003d self.dbapi.create_node(ndict)\n    self.service.start()\n\n    with mock.patch.object(self.service, \u0027_spawn_worker\u0027) as mock_spawn:\n        mock_spawn.side_effect \u003d exception.NoFreeConductorWorker()\n\n        self.assertRaises(exception.NoFreeConductorWorker,\n                          self.service.do_node_tear_down,\n                          self.context, node.uuid)\n        self.service._worker_pool.waitall()\n        node.refresh(self.context)\n        # This is a sync operation last_error should be None.\n        self.assertIsNone(node.last_error)\n        # Verify reservation has been cleared.\n        self.assertIsNone(node.reservation)","commit_id":"e2428d4015bb6d2a49224a66fb9a4a966be2db2a"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"78b51f9b229821e6fd1d311792f14735d6fe136a","unresolved":false,"context_lines":[{"line_number":736,"context_line":"        self.assertEqual(states.DELETED, node.target_provision_state)"},{"line_number":737,"context_line":"        self.assertIsNone(node.last_error)"},{"line_number":738,"context_line":"        mock_tear_down.assert_called_once_with(mock.ANY, mock.ANY)"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    def test_validate_driver_interfaces(self):"},{"line_number":741,"context_line":"        ndict \u003d utils.get_test_node(driver\u003d\u0027fake\u0027)"},{"line_number":742,"context_line":"        node \u003d self.dbapi.create_node(ndict)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B1NU%3D","line":739,"in_reply_to":"AAAAVn%2F%2B3Uk%3D","updated":"2014-03-11 21:35:04.000000000","message":"Done","commit_id":"e2428d4015bb6d2a49224a66fb9a4a966be2db2a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ebfaaebf728848dd6c5066131e0935008180f301","unresolved":false,"context_lines":[{"line_number":716,"context_line":"        mock_tear_down.return_value \u003d states.DELETED"},{"line_number":717,"context_line":"        self.service.do_node_tear_down(self.context, node.uuid)"},{"line_number":718,"context_line":"        node.refresh(self.context)"},{"line_number":719,"context_line":"        self.assertEqual(states.DELETING, node.provision_state)"},{"line_number":720,"context_line":"        self.assertEqual(states.DELETED, node.target_provision_state)"},{"line_number":721,"context_line":"        self.assertIsNone(node.last_error)"},{"line_number":722,"context_line":"        mock_tear_down.assert_called_once_with(mock.ANY, mock.ANY)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Bz3U%3D","line":719,"updated":"2014-03-12 01:12:22.000000000","message":"I must have missed something. I would have thought this would be states.NOSTATE, and also for target_provision_state?","commit_id":"dec7174eccdb96c44913c6213b05df44c47fbb98"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"639e635e95b7615edbab6098adf767a09ef75461","unresolved":false,"context_lines":[{"line_number":716,"context_line":"        mock_tear_down.return_value \u003d states.DELETED"},{"line_number":717,"context_line":"        self.service.do_node_tear_down(self.context, node.uuid)"},{"line_number":718,"context_line":"        node.refresh(self.context)"},{"line_number":719,"context_line":"        self.assertEqual(states.DELETING, node.provision_state)"},{"line_number":720,"context_line":"        self.assertEqual(states.DELETED, node.target_provision_state)"},{"line_number":721,"context_line":"        self.assertIsNone(node.last_error)"},{"line_number":722,"context_line":"        mock_tear_down.assert_called_once_with(mock.ANY, mock.ANY)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2Bxg8%3D","line":719,"in_reply_to":"AAAAVn%2F%2Bz3U%3D","updated":"2014-03-12 09:05:28.000000000","message":"Mea Culpa.  Thanks for noticing this.  Fixed.","commit_id":"dec7174eccdb96c44913c6213b05df44c47fbb98"}]}
