)]}'
{"trove/taskmanager/models.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"ac935ac49e2157ec6535a8c9528b01685837d43d","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            msg \u003d \"Error creating DNS entry for instance: %s\" % self.id"},{"line_number":182,"context_line":"            err \u003d inst_models.InstanceTasks.BUILDING_ERROR_DNS"},{"line_number":183,"context_line":"            self._log_and_raise(e, msg, err)"},{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2Fh3A%3D","line":184,"updated":"2013-09-25 07:06:35.000000000","message":"Better to use finally section here. Try-else is using in cases when raised exception should be ignored. In case if DNS it is not acceptable.","commit_id":"3c0221ca6738c4f0059b8fc2a34393aebb9c7ed1"},{"author":{"_account_id":7850,"name":"Kevin Conway","email":"kevinjacobconway@gmail.com","username":"kevinconway"},"change_message_id":"84f1d09e94022b911ce29dc58372c21c4799093d","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            msg \u003d \"Error creating DNS entry for instance: %s\" % self.id"},{"line_number":182,"context_line":"            err \u003d inst_models.InstanceTasks.BUILDING_ERROR_DNS"},{"line_number":183,"context_line":"            self._log_and_raise(e, msg, err)"},{"line_number":184,"context_line":"        finally:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FgKM%3D","line":184,"updated":"2013-09-25 16:03:14.000000000","message":"Sorry I didn\u0027t respond to this sooner. I don\u0027t think finally is correct here. You had it right before with else.\n\nFinally is used in cases where the action should ALWAYS happen. With a finally here the success message will be logged even in the event of failure.\n\nThe else clause only happens in the event that an exception is NOT thrown, which is what you wanted.","commit_id":"9279195c7b672c68297649b60d54fe74ea66c509"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"008f17e02fb5341613281bf2fcc60b36a7a0d588","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            msg \u003d \"Error creating DNS entry for instance: %s\" % self.id"},{"line_number":182,"context_line":"            err \u003d inst_models.InstanceTasks.BUILDING_ERROR_DNS"},{"line_number":183,"context_line":"            self._log_and_raise(e, msg, err)"},{"line_number":184,"context_line":"        finally:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FgBY%3D","line":184,"in_reply_to":"AAAAS3%2F%2FgKM%3D","updated":"2013-09-25 16:48:45.000000000","message":"Try-else is not good case for this situation.\n\nThe use of the else clause is better than adding additional code to the try clause because it avoids accidentally catching an exception that wasn’t raised by the code being protected by the try ... except statement. But we have only one call in try block, so this line shouldn\u0027t be protected with try-else, only try-except or try-finaly(which is more acceptable)","commit_id":"9279195c7b672c68297649b60d54fe74ea66c509"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4f793a2bb0d81a536a127aa5a2b2785070fbbf3c","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        finally:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2Fglg%3D","line":187,"updated":"2013-09-25 14:09:41.000000000","message":"Another question. If instance would stack at BUILD status after poll_until code falling into PollTimeout. So, i\u0027m suggesting you to create DNS entry only after poll_until would return with guestagent ACTIVE status.","commit_id":"9279195c7b672c68297649b60d54fe74ea66c509"},{"author":{"_account_id":7593,"name":"Haomai Wang","email":"haomaiwang@gmail.com","username":"HaomaiWang"},"change_message_id":"068c5a01ea69cfc69fc4ea6f8b86b988cc5f6907","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        try:"},{"line_number":179,"context_line":"            self._create_dns_entry()"},{"line_number":180,"context_line":"        except Exception as e:"},{"line_number":181,"context_line":"            msg \u003d \"Error creating DNS entry for instance: %s\" % self.id"},{"line_number":182,"context_line":"            err \u003d inst_models.InstanceTasks.BUILDING_ERROR_DNS"},{"line_number":183,"context_line":"            self._log_and_raise(e, msg, err)"},{"line_number":184,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fa1Y%3D","line":181,"updated":"2013-09-27 03:18:48.000000000","message":"msg \u003d _(\"Error creating DNS entry for instance: %s\") % self.id","commit_id":"cc14932a2fce89909e9d2a236f8aa9612633d644"},{"author":{"_account_id":694,"name":"Tim Simpson","email":"tim.simpson@rackspace.com","username":"tim-simpson"},"change_message_id":"fccdba339a5e30dc1237601dc510fafba0081347","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            err \u003d inst_models.InstanceTasks.BUILDING_ERROR_DNS"},{"line_number":183,"context_line":"            self._log_and_raise(e, msg, err)"},{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fb2g%3D","line":185,"updated":"2013-09-26 17:41:16.000000000","message":"This could be moved to line 180 (before the except).","commit_id":"cc14932a2fce89909e9d2a236f8aa9612633d644"},{"author":{"_account_id":694,"name":"Tim Simpson","email":"tim.simpson@rackspace.com","username":"tim-simpson"},"change_message_id":"6891be3394de83785626264ec02ef4dfaac4b51e","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            err \u003d inst_models.InstanceTasks.BUILDING_ERROR_DNS"},{"line_number":183,"context_line":"            self._log_and_raise(e, msg, err)"},{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fb0I%3D","line":185,"in_reply_to":"AAAAS3%2F%2Fb2g%3D","updated":"2013-09-26 17:44:22.000000000","message":"Actually, it seems like Kevin Conway disagreed with this and wanted \"else.\" I think his reasoning is valid, though it seems like the majority of our code never uses else. Its a good idea so I won\u0027t argue with it based on a precedent which could be wrong.","commit_id":"cc14932a2fce89909e9d2a236f8aa9612633d644"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c3d4d6a68f2f984c37e42e9c6aae991711c9a967","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Ff7s%3D","line":187,"updated":"2013-09-25 17:13:19.000000000","message":"Again. Using try-else is bad for this case! And try to move this code after poll_untill","commit_id":"cc14932a2fce89909e9d2a236f8aa9612633d644"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"8d61cc2c81b7cfdcd884fdac4932039d6eb44a31","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fbck%3D","line":187,"in_reply_to":"AAAAS3%2F%2Fb1Q%3D","updated":"2013-09-26 20:06:25.000000000","message":"Tim, with pleasure. What would happen if instance would stack at BUILDING status? My idea is to protect ourselves from orphaned instance associated parts. If you are providing DNS support before full provisioning please be kind to write cleaning if something would go wrong.","commit_id":"cc14932a2fce89909e9d2a236f8aa9612633d644"},{"author":{"_account_id":694,"name":"Tim Simpson","email":"tim.simpson@rackspace.com","username":"tim-simpson"},"change_message_id":"fccdba339a5e30dc1237601dc510fafba0081347","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fb1Q%3D","line":187,"in_reply_to":"AAAAS3%2F%2Ff7s%3D","updated":"2013-09-26 17:41:16.000000000","message":"I disagree about putting it after poll_until. Could you explain what advantage there would be in waiting until the server had fully provisioned and the guest had set up before provisioning DNS?","commit_id":"cc14932a2fce89909e9d2a236f8aa9612633d644"},{"author":{"_account_id":6739,"name":"Erik Redding","email":"erik.redding@rackspace.com","username":"erik-redding"},"change_message_id":"f0a59d47e22d626bc3babd1342939eeab8d72300","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Ff6M%3D","line":187,"in_reply_to":"AAAAS3%2F%2Ff7s%3D","updated":"2013-09-27 03:55:24.000000000","message":"I\u0027ve explained this quite thoroughly, as a copy/paste from my previous commit:  \n\n\"Actually no. This is not the desired outcome. If DNS is being used, we should NOT start billing until the instance build is \"complete\" -i.e. all the parts are assembled. If we have a problem adding DNS, the exception will actually stop the FreshInstanceTasks with a \"DNS Failure\" task status.\n\nThe idea here is when DNS is supported, it\u0027s a feature that comes with an instance; and that instance isn\u0027t billable until it\u0027s got all the pieces. Does that make sense?\"\n\nA DNS failure should stop things.  We don\u0027t care if we wait until it\u0027s ACTIVE because the DNS portion failed.  So we just mark it as failed and move on and don\u0027t bother waiting longer.\n\nAnd actually - I\u0027m not sure why you\u0027re saying the else is not the right place to log a message.  That\u0027s all the else is doing.","commit_id":"cc14932a2fce89909e9d2a236f8aa9612633d644"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"2f738de53eaab49285049bea0b5cb9d5d7474d6c","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2Fasc%3D","line":187,"updated":"2013-09-27 05:22:58.000000000","message":"Still the same issue. Please implement cleanup for DNS recording when instance failed to become active. Othrewise another orphaned component. Or move this code after poll_until !","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":6739,"name":"Erik Redding","email":"erik.redding@rackspace.com","username":"erik-redding"},"change_message_id":"73724183c335f01afe944bd8c2bda8f3a26734d6","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2F%2F6o%3D","line":187,"in_reply_to":"AAAAS3%2F%2FSm4%3D","updated":"2013-10-05 17:05:31.000000000","message":"To reiterate my previous points - this was just to reorder things so the prepare call wouldn\u0027t rely upon the success of DNS.\n\nWe settled the discussion of anything being removed during a failure - we came to a consensus that is strictly for the delete instance call.  Therefore I don\u0027t understand why this is still being debated;  I\u0027d appreciate if you would review it with that context in mind.","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3f8a884db9193d5350fd463d6aa17e8975f1bd2c","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FSm4%3D","line":187,"in_reply_to":"AAAAS3%2F%2FSpQ%3D","updated":"2013-09-30 19:10:09.000000000","message":"About deleting. If instance could not be deleted if DNS record is not present - seems like a bug.\nAutomated ripping is ok (avoiding instance). We already have discussed it. So. i think doing same with dns on instance fail is although ok.\nMgmt call seems like optinal ability but not the main purpose.","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":6739,"name":"Erik Redding","email":"erik.redding@rackspace.com","username":"erik-redding"},"change_message_id":"a562f61b71223ad749ccf9982600d4d136ec8cfa","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FSpQ%3D","line":187,"in_reply_to":"AAAAS3%2F%2FU0E%3D","updated":"2013-09-30 18:55:36.000000000","message":"AH! IT MAKES SENSE NOW.  You did this:  https://review.openstack.org/#/c/45708/29/trove/taskmanager/models.py\n\nAnd you want me to follow suit here.  \n\nUnfortunately, I\u0027m not sure that your PR is wise because of the issues I\u0027ve outlined.  I\u0027m going to let the community decide - I\u0027m not going to make any updates as of yet.  \n\nI can tell you are a developer and not actually running the service.  The reason is, agree with what I\u0027ve done because you\u0027d have actually seen why I\u0027ve just done the reordering here.  I\u0027m not sure if you\u0027re aware, but the delete instance call fails in the current state if DNS support is activated and DNS doesn\u0027t exist.  You actually have to add the DNS Entry to use the trove API to remove, or rip things out by hand (which isn\u0027t cool).\n\nThus, why I suggested the DNS reorder, and a mgmt api call for a support group to be able to help and re-issue the DNS command.","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c8568a52aca5d31af55415922ae8cbf8a6629adf","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FU0E%3D","line":187,"in_reply_to":"AAAAS3%2F%2FU38%3D","updated":"2013-09-30 07:32:07.000000000","message":"Nobody asking to tead down an instance. I\u0027m trying to say, that you should implement DNS entry removing if instance would fail.\nSo, please, implement this.\n\nAbout feature of mgmt API - it\u0027s cool but not necassery. And why it\u0027s mgmt functionallity ?\nAbout \u0027DNS is a feature\u0027 - everything in Trove is a feature (sec. groups/rules, floating ip, volume etc.) and each of those components need cleanup for avoiding ghosts and quota exceedance. \n\nPlease, do the cleanup code!","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":6739,"name":"Erik Redding","email":"erik.redding@rackspace.com","username":"erik-redding"},"change_message_id":"6743986b19329a1b7739377574266778e0079237","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FU38%3D","line":187,"in_reply_to":"AAAAS3%2F%2FY2U%3D","updated":"2013-09-30 07:05:10.000000000","message":"So you\u0027re asking that trove taskmanager remove all provisioned parts when DNS fails?\n\nWhere does this complete \"cleanup\" occur anywhere else?  \n\nI don\u0027t agree with your request.  I don\u0027t see the necessity to completely tear an instance down if DNS fails.  DNS is an additional feature to a provisioned instance and I don\u0027t think a DNS failure justifies completely de-provisioning an instance.  \n\nThe sane approach would be to retry DNS, or put an instance in a failed state that says DNS failure, which occurs in this case.","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4cfea7c0772d00ca7855fc9145f6caa735331ce7","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FY2U%3D","line":187,"in_reply_to":"AAAAS3%2F%2FZRw%3D","updated":"2013-09-27 16:55:36.000000000","message":"With all pleasure. DNS record is other segnificant part of provisioning. So if instance would fall in poll timeout, there would be orphaned parts: dns record for unreachable instance, volume, security group. That means trove taskmanager should handle cleanup. By \"cleanup\" i mean deleting each component and leave instance with trove instance status FAILED.\nSo, please(!!!!!) do the cleanup at PollTimeout exception(lines 197-199).","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":6739,"name":"Erik Redding","email":"erik.redding@rackspace.com","username":"erik-redding"},"change_message_id":"9855d4965d16090042eb5a423a071d172f5de76f","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FZRw%3D","line":187,"in_reply_to":"AAAAS3%2F%2FagY%3D","updated":"2013-09-27 15:32:39.000000000","message":"When you say \"implement cleaning,\" what do you have in mind?  As far as unit tests, these are covered with this simple reordering.\n\nI was proposing that the next step of the blueprint is to implement a \"retry DNS\" management API call.  This pull request is to address the ordering.","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d6d6beb6e4b67f71dda2e715c288e73919a78e75","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FagY%3D","line":187,"in_reply_to":"AAAAS3%2F%2FakM%3D","updated":"2013-09-27 06:24:49.000000000","message":"Not bad point. So leave this code where it is, but implement cleaning and do some unittests.","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":6739,"name":"Erik Redding","email":"erik.redding@rackspace.com","username":"erik-redding"},"change_message_id":"7f851c9b794a023441edb4893a2f9ed8c232c79f","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FakM%3D","line":187,"in_reply_to":"AAAAS3%2F%2Fasc%3D","updated":"2013-09-27 06:12:27.000000000","message":"The type of exception here is made vague for a reason - the desire for pluggable DNS support could support any variant of base class Exception, thus try\u0027ing this outside of the usage try is a better fail-fast response.\n\nSecond - What happens if DNS fails after the instance becomes active and this is moved after poll until? \n\nYou do make a good point about cleanup, however, in my experience, DNS is more likely to fail than the prepare call.  My counter to that is this: if DNS fails, do we revert a build completely?   Wouldn\u0027t we be better off saying \"something failed and thus, we\u0027re cleaning up the ENTIRE mess\"   If you look at the blueprint, you\u0027ll see that the other part of this is a mgmt api call to retry DNS.    \n\nAdditionally, a \"fail fast\" approach regarding the components of a \"functional\" instance with DNS support would say that if you\u0027re relying on DNS to be a functional piece of your \"product,\"  it\u0027s better to send this after the prepare call and before any usage is sent.  There\u0027s a chance for your support team to retry DNS and hand over a functional instance.  In my experience, I\u0027ve handled many failed builds and DNS is the easy part to fix.","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":739,"name":"Michael Basnight","email":"mbasnight@gmail.com","username":"hubcap"},"change_message_id":"d7e0b2cc9fe7f447e2ab96008d5a0a79a13c1faa","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2F%2Fys%3D","line":187,"in_reply_to":"AAAATH%2F%2F%2F6o%3D","updated":"2013-10-05 19:46:38.000000000","message":"Im not sure this is still being debated. Denis last comment was on monday, which was before the meeting. Just ping him on irc and have him re-review it.","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7843b05a6d5c9c759a15dddb737317a442e2d6cc","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        else:"},{"line_number":185,"context_line":"            LOG.debug(_(\"Successfully created DNS entry for instance: %s\") %"},{"line_number":186,"context_line":"                      self.id)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # Make sure the service becomes active before sending a usage"},{"line_number":189,"context_line":"        # record to avoid over billing a customer for an instance that"},{"line_number":190,"context_line":"        # fails to build properly."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2F%2FyY%3D","line":187,"in_reply_to":"AAAATH%2F%2F%2Fys%3D","updated":"2013-10-05 20:03:56.000000000","message":"Ok. Somehow i agree with reordering, so i\u0027ll +1. But, what about tests for dns in terms of BP for better test coverage ?","commit_id":"2b7c1ec0d7b96aa80792661149346342d5e7a44c"},{"author":{"_account_id":1925,"name":"Vipul Sabhaya","email":"vipuls@gmail.com","username":"vipuls"},"change_message_id":"39b11596e48c964a2b54a12c0e722e1156b3ef39","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            err \u003d inst_models.InstanceTasks.BUILDING_ERROR_DNS"},{"line_number":174,"context_line":"            self._log_and_raise(e, msg, err)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        config \u003d self._render_config(service_type, flavor, self.id)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        if server:"},{"line_number":179,"context_line":"            self._guest_prepare(server, flavor[\u0027ram\u0027], volume_info,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FYgQ%3D","side":"PARENT","line":176,"updated":"2013-10-16 21:07:16.000000000","message":"Why did we remove self.id as an argument?","commit_id":"d146ddadd0781a697fc88be542e036764f343f7e"},{"author":{"_account_id":6739,"name":"Erik Redding","email":"erik.redding@rackspace.com","username":"erik-redding"},"change_message_id":"ae0daee06e291a3ed8f61e79ab4c83f7e2628bf9","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            err \u003d inst_models.InstanceTasks.BUILDING_ERROR_DNS"},{"line_number":174,"context_line":"            self._log_and_raise(e, msg, err)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        config \u003d self._render_config(service_type, flavor, self.id)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        if server:"},{"line_number":179,"context_line":"            self._guest_prepare(server, flavor[\u0027ram\u0027], volume_info,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FYf0%3D","side":"PARENT","line":176,"in_reply_to":"AAAATH%2F%2FYgQ%3D","updated":"2013-10-16 21:10:53.000000000","message":"That\u0027s my fault - I hurried through the rebase - fixing.","commit_id":"d146ddadd0781a697fc88be542e036764f343f7e"},{"author":{"_account_id":7593,"name":"Haomai Wang","email":"haomaiwang@gmail.com","username":"HaomaiWang"},"change_message_id":"afb2c489ecd993976bd5d529a1174328b113560c","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        try:"},{"line_number":184,"context_line":"            self._create_dns_entry()"},{"line_number":185,"context_line":"        except Exception as e:"},{"line_number":186,"context_line":"            msg \u003d \"Error creating DNS entry for instance: %s\" % self.id"},{"line_number":187,"context_line":"            err \u003d inst_models.InstanceTasks.BUILDING_ERROR_DNS"},{"line_number":188,"context_line":"            self._log_and_raise(e, msg, err)"},{"line_number":189,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATH%2F%2FX0s%3D","line":186,"updated":"2013-10-17 02:22:50.000000000","message":"msg \u003d _(....)?","commit_id":"a774f3d50319b7c423517b9dd864ff408bc45af1"}]}
