)]}'
{"senlin/engine/actions/node_action.py":[{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"f14d40301019cb81250091af9b237f3e63a7f56e","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                return self.RES_ERROR, \u0027Policy check:\u0027 + self.data[\u0027reason\u0027]"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            forced \u003d True if self.action \u003d\u003d self.NODE_DELETE else False"},{"line_number":114,"context_line":"            res \u003d senlin_lock.node_lock_acquire(node.id, self.id, forced)"},{"line_number":115,"context_line":"            if not res:"},{"line_number":116,"context_line":"                reason \u003d \u0027Failed locking node\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_2d7465fb","line":113,"updated":"2015-08-19 06:07:25.000000000","message":"this is a dangerous. We don\u0027t know the node\u0027s status yet. It may mess up the node further instead of solving it. We need to ensure that the node is in a state that can be deleted.","commit_id":"b81b4934ff2c91b328087b7d6b2ebd129a4fb095"},{"author":{"_account_id":11034,"name":"Yanyan Hu","email":"huyanyan84@gmail.com","username":"yanyanhu"},"change_message_id":"bf8f3a72e6a6ed5c38f6e279989af4cff848ab47","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                return self.RES_ERROR, \u0027Policy check:\u0027 + self.data[\u0027reason\u0027]"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            forced \u003d True if self.action \u003d\u003d self.NODE_DELETE else False"},{"line_number":114,"context_line":"            res \u003d senlin_lock.node_lock_acquire(node.id, self.id, forced)"},{"line_number":115,"context_line":"            if not res:"},{"line_number":116,"context_line":"                reason \u003d \u0027Failed locking node\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_f82aad7d","line":113,"in_reply_to":"fa1b9901_2d7465fb","updated":"2015-08-19 06:32:09.000000000","message":"Hi, Qiming, you\u0027re right. But the problem is we may not be able to know whether the physical resource back the node can be deleted in some cases since different backend service may provide different support, e.g. nova server can be deleted when it is in creating progress, but neutron loadbalancer can\u0027t be deleted when it is provisioned. So what I\u0027m thinking is maybe we let node be deletable no matter what status it is in since \u0027delete\u0027 sounds like the most powerful operation user can apply on a node.  What we will do is to ensure that a node deletion operation can be executed correctly if backend service allows it.  If there is error happened during the deletion progress and we can\u0027t handle it, or the backend service doesn\u0027t support resource deletion in some cases, we just raise an exception and marked the status of node to delete_failed. Then user can retry to delete the node later.","commit_id":"b81b4934ff2c91b328087b7d6b2ebd129a4fb095"},{"author":{"_account_id":11034,"name":"Yanyan Hu","email":"huyanyan84@gmail.com","username":"yanyanhu"},"change_message_id":"08080dc73036d7f2b16e0e7231eef57cf5fa11c4","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                return self.RES_ERROR, \u0027Policy check:\u0027 + self.data[\u0027reason\u0027]"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            forced \u003d True if self.action \u003d\u003d self.NODE_DELETE else False"},{"line_number":114,"context_line":"            res \u003d senlin_lock.node_lock_acquire(node.id, self.id, forced)"},{"line_number":115,"context_line":"            if not res:"},{"line_number":116,"context_line":"                reason \u003d \u0027Failed locking node\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_8502256e","line":113,"in_reply_to":"fa1b9901_b3ec5690","updated":"2015-08-19 07:38:54.000000000","message":"In other cases, we just wait before the timeout. I think if the action progress is design correctly, we can always get the lock to be released finally unless the action/engine is killed.","commit_id":"b81b4934ff2c91b328087b7d6b2ebd129a4fb095"},{"author":{"_account_id":11034,"name":"Yanyan Hu","email":"huyanyan84@gmail.com","username":"yanyanhu"},"change_message_id":"be85bd707123fd09cb82138c1db165bd7f559660","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                return self.RES_ERROR, \u0027Policy check:\u0027 + self.data[\u0027reason\u0027]"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            forced \u003d True if self.action \u003d\u003d self.NODE_DELETE else False"},{"line_number":114,"context_line":"            res \u003d senlin_lock.node_lock_acquire(node.id, self.id, forced)"},{"line_number":115,"context_line":"            if not res:"},{"line_number":116,"context_line":"                reason \u003d \u0027Failed locking node\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_b3ec5690","line":113,"in_reply_to":"fa1b9901_d3130ab7","updated":"2015-08-19 07:30:23.000000000","message":"Understand, actually it is dangerous especially in multi-engine scenario.  But I think we may not be able to decide whether the lock stealing is safe just based on the node status?  I guess in current stage, the only case that is really safe to do the node lock stealing is the old owner action of node has died, which means the worker/engine who drives that action has gone. So maybe we just provide support for this case now? I think at least it can help to avoid node deadlock which caused by engine die/restart.","commit_id":"b81b4934ff2c91b328087b7d6b2ebd129a4fb095"},{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"6e78ab4a6832d0e9caf2c1b6e2629c9da083b619","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                return self.RES_ERROR, \u0027Policy check:\u0027 + self.data[\u0027reason\u0027]"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            forced \u003d True if self.action \u003d\u003d self.NODE_DELETE else False"},{"line_number":114,"context_line":"            res \u003d senlin_lock.node_lock_acquire(node.id, self.id, forced)"},{"line_number":115,"context_line":"            if not res:"},{"line_number":116,"context_line":"                reason \u003d \u0027Failed locking node\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_d3130ab7","line":113,"in_reply_to":"fa1b9901_f82aad7d","updated":"2015-08-19 07:07:52.000000000","message":"I understand how complicated this could be.\nWhat I meant is to check the node status, in addition to the action to execute.\n\nFor this kind of problems, we are not gonna mask bugs by allowing node deletion all the time.","commit_id":"b81b4934ff2c91b328087b7d6b2ebd129a4fb095"}]}
