)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0c27c81a22f6d04f8ccbdcc281741bea7969bcd1","unresolved":false,"context_lines":[{"line_number":23,"context_line":"- cbrestore can only restore one bucket at a time"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: Iaf4370dcc978df68e7d01c6f63795eaf50aac89d"},{"line_number":26,"context_line":"Implements: blueprint backups-single-instance-couchbase"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"baada198_d16d1bce","line":26,"updated":"2014-07-17 07:58:30.000000000","message":"Commit description section misses DocImpact section, since you\u0027re changing few options.","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"9a0767392f9d3d740483d627ea018453277bc737","unresolved":false,"context_lines":[{"line_number":23,"context_line":"- cbrestore can only restore one bucket at a time"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: Iaf4370dcc978df68e7d01c6f63795eaf50aac89d"},{"line_number":26,"context_line":"Implements: blueprint backups-single-instance-couchbase"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"baada198_f914aca0","line":26,"in_reply_to":"baada198_d16d1bce","updated":"2014-07-17 18:14:29.000000000","message":"Done","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"}],"etc/trove/trove-guestagent.conf.sample":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0c27c81a22f6d04f8ccbdcc281741bea7969bcd1","unresolved":false,"context_lines":[{"line_number":93,"context_line":"backup_aes_cbc_key \u003d \"default_aes_cbc_key\""},{"line_number":94,"context_line":"backup_use_snet \u003d False"},{"line_number":95,"context_line":"backup_chunk_size \u003d 65536"},{"line_number":96,"context_line":"backup_segment_max_size \u003d 2147483648"}],"source_content_type":"application/octet-stream","patch_set":27,"id":"baada198_71452f42","line":96,"updated":"2014-07-17 07:58:30.000000000","message":"i\u0027d suggest to add datastore sections with backup/restore related options.\n\n[couchbase]\nbackup_namespace \u003d trove.guestagent.strategies.backup.couchbase_impl.py\nrestore_namespace \u003d trove.guestagent.strategies.restore.couchbase_impl.py\n\n[mysql]\n...","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"}],"trove/common/cfg.py":[{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":370,"context_line":"                help\u003d\u0027List of UDP ports and/or port ranges to open\u0027"},{"line_number":371,"context_line":"                     \u0027 in the security group (only applicable \u0027"},{"line_number":372,"context_line":"                     \u0027if trove_security_groups_support is True).\u0027),"},{"line_number":373,"context_line":"    cfg.StrOpt(\u0027backup_strategy\u0027, default\u003d\u0027CbBackup\u0027,"},{"line_number":374,"context_line":"               help\u003d\u0027Default strategy to perform backups.\u0027),"},{"line_number":375,"context_line":"    cfg.StrOpt(\u0027mount_point\u0027, default\u003d\u0027/var/lib/couchbase\u0027,"},{"line_number":376,"context_line":"               help\u003d\"Filesystem path for mounting \""}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_0ff5e7ca","line":373,"updated":"2014-05-21 04:58:15.000000000","message":"This should not be changed from the default of None. It can be changed from the configuration.","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":383,"context_line":"                \u0027the root user is immediately returned in the response of \u0027"},{"line_number":384,"context_line":"                \"instance-create as the \u0027password\u0027 field.\"),"},{"line_number":385,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":386,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.couchbase_impl\u0027),"},{"line_number":387,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":388,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.couchbase_impl\u0027)"},{"line_number":389,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_2f02a3b4","line":386,"updated":"2014-05-21 04:58:15.000000000","message":"defaults should not be tied to a datastore/manager that is not being tested in the gate.","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"}],"trove/guestagent/datastore/couchbase/manager.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.app.install_if_needed(packages)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if backup_info:"},{"line_number":80,"context_line":"            LOG.debug(\u0027Now going to perform restore...\u0027)"},{"line_number":81,"context_line":"            self._perform_restore(backup_info, context,"},{"line_number":82,"context_line":"                                  mount_point, self.app)"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_46c3b156","line":80,"updated":"2014-05-07 11:55:09.000000000","message":"translation required _()","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def is_root_enabled(self, context):"},{"line_number":164,"context_line":"        return os.path.exists(system.pwd_file)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":167,"context_line":"        LOG.info(_(\"Restoring database from backup %s\") % backup_info[\u0027id\u0027])"},{"line_number":168,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_668a751c","line":165,"updated":"2014-05-07 11:55:09.000000000","message":"app parameter is not required because you already have self.app","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    def is_root_enabled(self, context):"},{"line_number":164,"context_line":"        return os.path.exists(system.pwd_file)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":167,"context_line":"        LOG.info(_(\"Restoring database from backup %s\") % backup_info[\u0027id\u0027])"},{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            backup.restore(context, backup_info, restore_location)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_66a355b2","line":166,"updated":"2014-05-07 11:55:09.000000000","message":"docstring?","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":169,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":170,"context_line":"        except Exception as e:"},{"line_number":171,"context_line":"            LOG.error(e)"},{"line_number":172,"context_line":"            LOG.error(\"Error performing restore from backup %s\","},{"line_number":173,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":174,"context_line":"            self.status.set_status(rd_instance.ServiceStatuses.FAILED)"},{"line_number":175,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_cf2a1f2c","line":172,"updated":"2014-05-21 04:58:15.000000000","message":"_()","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            raise"},{"line_number":176,"context_line":"        LOG.info(_(\"Restored database successfully\"))"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":179,"context_line":"        backup.backup(context, backup_info)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def mount_volume(self, context, device_path\u003dNone, mount_point\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_a680fdf7","line":178,"updated":"2014-05-07 11:55:09.000000000","message":"docstring?","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            self.app.enable_root(root_password)"},{"line_number":81,"context_line":"        self.app.initial_setup()"},{"line_number":82,"context_line":"        if backup_info:"},{"line_number":83,"context_line":"            LOG.debug(_(\u0027Now going to perform restore...\u0027))"},{"line_number":84,"context_line":"            self._perform_restore(backup_info,"},{"line_number":85,"context_line":"                                  context,"},{"line_number":86,"context_line":"                                  mount_point)"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_36903b95","line":83,"updated":"2014-07-01 08:33:02.000000000","message":"please fix translation","commit_id":"87282906290ff9da5f0a8c006930ae9cf56fa913"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"705f33d85d8904db9e25ef3d11f9f0111f290bd8","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.common import exception"},{"line_number":21,"context_line":"from trove.guestagent import dbaas"},{"line_number":22,"context_line":"from trove.guestagent import volume"},{"line_number":23,"context_line":"from trove.guestagent import backup"},{"line_number":24,"context_line":"from trove.guestagent.datastore.couchbase import service"},{"line_number":25,"context_line":"from trove.guestagent.datastore.couchbase import system"},{"line_number":26,"context_line":"from trove.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_231b7c1c","line":23,"updated":"2014-07-02 00:03:51.000000000","message":"according to hacking rules, should be before \"from trove.guestagent import dbaas\"","commit_id":"ab393f9dd2c38e4965898154634e7b8fb839b6d0"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            device \u003d volume.VolumeDevice(device_path)"},{"line_number":70,"context_line":"            # unmount if device is already mounted"},{"line_number":71,"context_line":"            device.unmount_device(device_path)"},{"line_number":72,"context_line":"            device.format()"},{"line_number":73,"context_line":"            device.mount(mount_point)"},{"line_number":74,"context_line":"            LOG.debug(\u0027Mounted the volume.\u0027)"},{"line_number":75,"context_line":"        self.app.start_db_with_conf_changes(config_contents)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_9814514e","side":"PARENT","line":72,"updated":"2014-07-12 02:19:13.000000000","message":"You have some code here that is plays around with the mount_point and stuff. I see a mount immediately. Would you please confirm that install_if_needed() doesn\u0027t start the db or initialize any data structures on the underlying volume? \n\nOtherwise you\u0027ll have migrate data (and if the db is running stop it first). Looking at the code, and the fact that there\u0027s no migrate, I\u0027m assuming that the db won\u0027t be running.","commit_id":"42a866fbf1cba42877cd1c4893b72c13b928f24d"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05fca99bec5ad33eaed8ae80ac107be5edc1970a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            device \u003d volume.VolumeDevice(device_path)"},{"line_number":70,"context_line":"            # unmount if device is already mounted"},{"line_number":71,"context_line":"            device.unmount_device(device_path)"},{"line_number":72,"context_line":"            device.format()"},{"line_number":73,"context_line":"            device.mount(mount_point)"},{"line_number":74,"context_line":"            LOG.debug(\u0027Mounted the volume.\u0027)"},{"line_number":75,"context_line":"        self.app.start_db_with_conf_changes(config_contents)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f9e38f31","side":"PARENT","line":72,"in_reply_to":"baada198_9814514e","updated":"2014-07-12 10:06:45.000000000","message":"I am still unsure about this. Would like your opinion.","commit_id":"42a866fbf1cba42877cd1c4893b72c13b928f24d"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            self.app.enable_root(root_password)"},{"line_number":81,"context_line":"        self.app.initial_setup()"},{"line_number":82,"context_line":"        if backup_info:"},{"line_number":83,"context_line":"            LOG.debug(_(\u0027Now going to perform restore.\u0027))"},{"line_number":84,"context_line":"            self._perform_restore(backup_info,"},{"line_number":85,"context_line":"                                  context,"},{"line_number":86,"context_line":"                                  mount_point)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_38198588","line":83,"updated":"2014-07-12 02:19:13.000000000","message":"I believe that LOG.debug messages should not be internationalized.\n\nAlso the first thing that _perform_restore() does is a LOG.info. so this logging may be redundant.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            self.app.enable_root(root_password)"},{"line_number":81,"context_line":"        self.app.initial_setup()"},{"line_number":82,"context_line":"        if backup_info:"},{"line_number":83,"context_line":"            LOG.debug(_(\u0027Now going to perform restore.\u0027))"},{"line_number":84,"context_line":"            self._perform_restore(backup_info,"},{"line_number":85,"context_line":"                                  context,"},{"line_number":86,"context_line":"                                  mount_point)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_96f07268","line":83,"in_reply_to":"baada198_38198588","updated":"2014-07-14 18:40:32.000000000","message":"Done","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        self.app.initial_setup()"},{"line_number":82,"context_line":"        if backup_info:"},{"line_number":83,"context_line":"            LOG.debug(_(\u0027Now going to perform restore.\u0027))"},{"line_number":84,"context_line":"            self._perform_restore(backup_info,"},{"line_number":85,"context_line":"                                  context,"},{"line_number":86,"context_line":"                                  mount_point)"},{"line_number":87,"context_line":"        self.app.complete_install_or_restart()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_780f7d39","line":84,"updated":"2014-07-12 02:19:13.000000000","message":"At this point, I believe that the database will be running. You should stop it. \n\nNote earlier call that started db (app.start_db_with_conf_chages).","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05fca99bec5ad33eaed8ae80ac107be5edc1970a","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        self.app.initial_setup()"},{"line_number":82,"context_line":"        if backup_info:"},{"line_number":83,"context_line":"            LOG.debug(_(\u0027Now going to perform restore.\u0027))"},{"line_number":84,"context_line":"            self._perform_restore(backup_info,"},{"line_number":85,"context_line":"                                  context,"},{"line_number":86,"context_line":"                                  mount_point)"},{"line_number":87,"context_line":"        self.app.complete_install_or_restart()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_99f533ef","line":84,"in_reply_to":"baada198_780f7d39","updated":"2014-07-12 10:06:45.000000000","message":"The comment I made here is wrong. In trying out your patch I realize that unlike other datastores you are doing a restore by what amounts to reloading the database; so you do need the database to be up.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        self.app.initial_setup()"},{"line_number":82,"context_line":"        if backup_info:"},{"line_number":83,"context_line":"            LOG.debug(_(\u0027Now going to perform restore.\u0027))"},{"line_number":84,"context_line":"            self._perform_restore(backup_info,"},{"line_number":85,"context_line":"                                  context,"},{"line_number":86,"context_line":"                                  mount_point)"},{"line_number":87,"context_line":"        self.app.complete_install_or_restart()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_9184fc5e","line":84,"in_reply_to":"baada198_99f533ef","updated":"2014-07-14 18:40:32.000000000","message":"Correct.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def _perform_restore(self, backup_info, context, restore_location):"},{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        Restores all couchbase buckets and its documents from the backup."},{"line_number":170,"context_line":"        \"\"\""},{"line_number":171,"context_line":"        LOG.info(_(\"Restoring database from backup %s\") %"},{"line_number":172,"context_line":"                 backup_info[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_08f1086a","line":169,"updated":"2014-07-17 21:28:51.000000000","message":"its \u003d\u003e their","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def _perform_restore(self, backup_info, context, restore_location):"},{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        Restores all couchbase buckets and its documents from the backup."},{"line_number":170,"context_line":"        \"\"\""},{"line_number":171,"context_line":"        LOG.info(_(\"Restoring database from backup %s\") %"},{"line_number":172,"context_line":"                 backup_info[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_d41166b0","line":169,"in_reply_to":"baada198_08f1086a","updated":"2014-07-17 22:15:58.000000000","message":"Done","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        try:"},{"line_number":174,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":175,"context_line":"        except Exception as e:"},{"line_number":176,"context_line":"            LOG.error(e)"},{"line_number":177,"context_line":"            LOG.error(_(\"Error performing restore from backup %s\") %"},{"line_number":178,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":179,"context_line":"            self.status.set_status(rd_instance.ServiceStatuses.FAILED)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_88fc3841","line":176,"updated":"2014-07-17 21:28:51.000000000","message":"I believe you can combine this and next line into LOG.exception.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        try:"},{"line_number":174,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":175,"context_line":"        except Exception as e:"},{"line_number":176,"context_line":"            LOG.error(e)"},{"line_number":177,"context_line":"            LOG.error(_(\"Error performing restore from backup %s\") %"},{"line_number":178,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":179,"context_line":"            self.status.set_status(rd_instance.ServiceStatuses.FAILED)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_7467ba51","line":176,"in_reply_to":"baada198_88fc3841","updated":"2014-07-17 22:15:58.000000000","message":"I\u0027d rather split it up especially since the second one is translatable, whereas the first one isn\u0027t.\n\nWhat I can do is put the LOG.error(e) afterwards.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":184,"context_line":"        \"\"\""},{"line_number":185,"context_line":"        Backup all couchbase buckets and its documents."},{"line_number":186,"context_line":"        \"\"\""},{"line_number":187,"context_line":"        backup.backup(context, backup_info)"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_48eb0078","line":185,"updated":"2014-07-17 21:28:51.000000000","message":"its \u003d\u003e their","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":184,"context_line":"        \"\"\""},{"line_number":185,"context_line":"        Backup all couchbase buckets and its documents."},{"line_number":186,"context_line":"        \"\"\""},{"line_number":187,"context_line":"        backup.backup(context, backup_info)"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_f414aaa0","line":185,"in_reply_to":"baada198_48eb0078","updated":"2014-07-17 22:15:58.000000000","message":"Done","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"}],"trove/guestagent/datastore/couchbase/system.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":19,"context_line":"COUCHBASE_CONF_DIR \u003d \u0027/etc/couchbase\u0027"},{"line_number":20,"context_line":"SERVICE_CANDIDATES \u003d [\"couchbase-server\"]"},{"line_number":21,"context_line":"cmd_couchbase_status \u003d (\u0027sudo /opt/couchbase/bin/couchbase-cli server-info \u0027"},{"line_number":22,"context_line":"                        \u0027-c %(IP)s:8091 -u root -p %(PWD)s\u0027)"},{"line_number":23,"context_line":"cmd_node_init \u003d (\u0027sudo /opt/couchbase/bin/couchbase-cli node-init \u0027"},{"line_number":24,"context_line":"                 \u0027-c %(IP)s:8091 --node-init-data-path\u003d%(data_path)s \u0027"},{"line_number":25,"context_line":"                 \u0027-u root -p %(PWD)s\u0027)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_d8096932","side":"PARENT","line":22,"updated":"2014-07-12 02:19:13.000000000","message":"I\u0027m leary of hard-coding the port number here (and in the lines below). I know you didn\u0027t change it but I\u0027m pointing it out because I see the code right here.","commit_id":"42a866fbf1cba42877cd1c4893b72c13b928f24d"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":16,"context_line":"CONF \u003d cfg.CONF"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"TIME_OUT \u003d 1200"},{"line_number":19,"context_line":"CB_DUMP_DIR \u003d \u0027/tmp/backups\u0027"},{"line_number":20,"context_line":"COUCHBASE_CONF_DIR \u003d \u0027/etc/couchbase\u0027"},{"line_number":21,"context_line":"SERVICE_CANDIDATES \u003d [\"couchbase-server\"]"},{"line_number":22,"context_line":"cmd_couchbase_status \u003d (\u0027sudo /opt/couchbase/bin/couchbase-cli server-info \u0027"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b80cb543","line":19,"updated":"2014-07-12 02:19:13.000000000","message":"would you consider calling it COUCHBASE_DUMP_DIR, the very next variable seems to be COUCHBASE_CONF_DIR ;)","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":16,"context_line":"CONF \u003d cfg.CONF"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"TIME_OUT \u003d 1200"},{"line_number":19,"context_line":"CB_DUMP_DIR \u003d \u0027/tmp/backups\u0027"},{"line_number":20,"context_line":"COUCHBASE_CONF_DIR \u003d \u0027/etc/couchbase\u0027"},{"line_number":21,"context_line":"SERVICE_CANDIDATES \u003d [\"couchbase-server\"]"},{"line_number":22,"context_line":"cmd_couchbase_status \u003d (\u0027sudo /opt/couchbase/bin/couchbase-cli server-info \u0027"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_76d4bee8","line":19,"in_reply_to":"baada198_b80cb543","updated":"2014-07-14 18:40:32.000000000","message":"Done","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0c27c81a22f6d04f8ccbdcc281741bea7969bcd1","unresolved":false,"context_lines":[{"line_number":18,"context_line":"TIME_OUT \u003d 1200"},{"line_number":19,"context_line":"COUCHBASE_DUMP_DIR \u003d \u0027/tmp/backups\u0027"},{"line_number":20,"context_line":"COUCHBASE_CONF_DIR \u003d \u0027/etc/couchbase\u0027"},{"line_number":21,"context_line":"COUCHBASE_WEBADMIN_PORT \u003d \u00278091\u0027"},{"line_number":22,"context_line":"COUCHBASE_REST_API \u003d \u0027http://localhost:\u0027 + COUCHBASE_WEBADMIN_PORT"},{"line_number":23,"context_line":"SERVICE_CANDIDATES \u003d [\"couchbase-server\"]"},{"line_number":24,"context_line":"cmd_couchbase_status \u003d (\u0027sudo /opt/couchbase/bin/couchbase-cli server-info \u0027"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_31901796","line":21,"updated":"2014-07-17 07:58:30.000000000","message":"i guess this port can be retrieved from somewhere, as an example from \u0027netstat atx | grep couchbase\u0027","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"27eebd13307683ebd8797d903a710e2c26b690ab","unresolved":false,"context_lines":[{"line_number":18,"context_line":"TIME_OUT \u003d 1200"},{"line_number":19,"context_line":"COUCHBASE_DUMP_DIR \u003d \u0027/tmp/backups\u0027"},{"line_number":20,"context_line":"COUCHBASE_CONF_DIR \u003d \u0027/etc/couchbase\u0027"},{"line_number":21,"context_line":"COUCHBASE_WEBADMIN_PORT \u003d \u00278091\u0027"},{"line_number":22,"context_line":"COUCHBASE_REST_API \u003d \u0027http://localhost:\u0027 + COUCHBASE_WEBADMIN_PORT"},{"line_number":23,"context_line":"SERVICE_CANDIDATES \u003d [\"couchbase-server\"]"},{"line_number":24,"context_line":"cmd_couchbase_status \u003d (\u0027sudo /opt/couchbase/bin/couchbase-cli server-info \u0027"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_71dfefd6","line":21,"in_reply_to":"baada198_31901796","updated":"2014-07-17 08:11:34.000000000","message":"if there\u0027s consensus on this approach, it should be applied for all datastores, not selectively, and therefore it\u0027s outside the scope of this patch-set.","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"75b88dfe17afce8399db0f74598294028aa5e095","unresolved":false,"context_lines":[{"line_number":21,"context_line":"COUCHBASE_WEBADMIN_PORT \u003d \u00278091\u0027"},{"line_number":22,"context_line":"COUCHBASE_REST_API \u003d \u0027http://localhost:\u0027 + COUCHBASE_WEBADMIN_PORT"},{"line_number":23,"context_line":"BUCKETS_JSON \u003d \u0027/buckets.json\u0027"},{"line_number":24,"context_line":"SECRET_KEY \u003d \u0027/secret_key\u0027"},{"line_number":25,"context_line":"SERVICE_CANDIDATES \u003d [\"couchbase-server\"]"},{"line_number":26,"context_line":"cmd_couchbase_status \u003d (\u0027sudo /opt/couchbase/bin/couchbase-cli server-info \u0027"},{"line_number":27,"context_line":"                        \u0027-c %(IP)s:8091 -u root -p %(PWD)s\u0027)"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_4fcaff4f","line":24,"updated":"2014-07-18 18:12:46.000000000","message":"I think these filenames are better left without the slash prefix and then joined later with os.path.join.","commit_id":"61935d35128e7b19e68778b46aa252a4cd8fe6e2"}],"trove/guestagent/strategies/backup/couchbase_impl.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from trove.common import utils as utils"},{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.guestagent.strategies.backup import base"},{"line_number":20,"context_line":"from trove.guestagent.datastore.couchbase import system"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsF4%3D","line":17,"updated":"2014-04-18 07:58:41.000000000","message":"no need to do this.\nfrom trove.common import utils is enough","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from trove.common import utils as utils"},{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.guestagent.strategies.backup import base"},{"line_number":20,"context_line":"from trove.guestagent.datastore.couchbase import system"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa0Q%3D","line":17,"in_reply_to":"AAAAXH%2F%2FsF4%3D","updated":"2014-04-21 23:11:56.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.guestagent.strategies.backup import base"},{"line_number":20,"context_line":"from trove.guestagent.datastore.couchbase import system"},{"line_number":21,"context_line":"from trove.guestagent.datastore.couchbase.service import CouchbaseRootAccess"},{"line_number":22,"context_line":"from trove.openstack.common import log as logging"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsGA%3D","line":21,"updated":"2014-04-18 07:58:41.000000000","message":"please import module instead of a class","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.guestagent.strategies.backup import base"},{"line_number":20,"context_line":"from trove.guestagent.datastore.couchbase import system"},{"line_number":21,"context_line":"from trove.guestagent.datastore.couchbase.service import CouchbaseRootAccess"},{"line_number":22,"context_line":"from trove.openstack.common import log as logging"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa0M%3D","line":21,"in_reply_to":"AAAAXH%2F%2FsGA%3D","updated":"2014-04-21 23:11:56.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":"CB_DUMP_DIR \u003d \"/tmp/backups\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class CbBackup(base.BackupRunner):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsGE%3D","line":26,"updated":"2014-04-18 07:58:41.000000000","message":"move this to system.py","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":"CB_DUMP_DIR \u003d \"/tmp/backups\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class CbBackup(base.BackupRunner):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa0I%3D","line":26,"in_reply_to":"AAAAXH%2F%2FsGE%3D","updated":"2014-04-21 23:11:56.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        root \u003d CouchbaseRootAccess()"},{"line_number":53,"context_line":"        url \u003d \u0027http://localhost:8091/pools/default/buckets\u0027"},{"line_number":54,"context_line":"        outfile \u003d \u0027/tmp/buckets.json\u0027"},{"line_number":55,"context_line":"        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root.get_password() +"},{"line_number":56,"context_line":"                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":57,"context_line":"                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsGo%3D","line":55,"updated":"2014-04-18 07:58:41.000000000","message":"try: except is required","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        root \u003d CouchbaseRootAccess()"},{"line_number":53,"context_line":"        url \u003d \u0027http://localhost:8091/pools/default/buckets\u0027"},{"line_number":54,"context_line":"        outfile \u003d \u0027/tmp/buckets.json\u0027"},{"line_number":55,"context_line":"        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root.get_password() +"},{"line_number":56,"context_line":"                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":57,"context_line":"                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FazU%3D","line":55,"in_reply_to":"AAAAXH%2F%2FsGo%3D","updated":"2014-04-21 23:11:56.000000000","message":"Maybe, I\u0027m misunderstanding something.  If there\u0027s an exception here, it will just be thrown (raised) with the message from the exception.  Why do I need to catch the exception and throw (raise) another different exception (e.g. BackupError)?  If that is what you are suggesting.","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def _backup(self):"},{"line_number":60,"context_line":"        root \u003d CouchbaseRootAccess()"},{"line_number":61,"context_line":"        pw \u003d root.get_password()"},{"line_number":62,"context_line":"        utils.execute_with_timeout(\u0027/opt/couchbase/bin/cbbackup \u0027 +"},{"line_number":63,"context_line":"                                   \u0027http://localhost:8091 \u0027 +"},{"line_number":64,"context_line":"                                   CB_DUMP_DIR + \u0027 -u root -p \u0027 + pw,"},{"line_number":65,"context_line":"                                   shell\u003dTrue, timeout\u003d600)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsGk%3D","line":62,"updated":"2014-04-18 07:58:41.000000000","message":"try:except is required","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def _backup(self):"},{"line_number":60,"context_line":"        root \u003d CouchbaseRootAccess()"},{"line_number":61,"context_line":"        pw \u003d root.get_password()"},{"line_number":62,"context_line":"        utils.execute_with_timeout(\u0027/opt/couchbase/bin/cbbackup \u0027 +"},{"line_number":63,"context_line":"                                   \u0027http://localhost:8091 \u0027 +"},{"line_number":64,"context_line":"                                   CB_DUMP_DIR + \u0027 -u root -p \u0027 + pw,"},{"line_number":65,"context_line":"                                   shell\u003dTrue, timeout\u003d600)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FazQ%3D","line":62,"in_reply_to":"AAAAXH%2F%2FsGk%3D","updated":"2014-04-21 23:11:56.000000000","message":"Maybe, I\u0027m misunderstanding something.  If there\u0027s an exception here, it will just be thrown (raised) with the message from the exception.  Why do I need to catch the exception and throw (raise) another different exception (e.g. BackupError)?  If that is what you are suggesting.","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"    __strategy_name__ \u003d \u0027cbbackup\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    pre_backup_commands \u003d ["},{"line_number":33,"context_line":"        \u0027sudo /etc/init.d/couchbase-server stop\u0027,"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        \u0027rm -rf \u0027 + system.CB_DUMP_DIR,"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_4f160ff3","line":33,"updated":"2014-05-21 04:58:15.000000000","message":"guests for other datastore\u0027s have the start/stop commands in the system.py.","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"            self._save_buckets_config()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            f \u003d open(\"/tmp/buckets.json\", \"r\")"},{"line_number":83,"context_line":"            out \u003d f.read()"},{"line_number":84,"context_line":"            if out \u003d\u003d \"[]\":"},{"line_number":85,"context_line":"                #TODO(pass to red balloon)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_06a28998","line":82,"updated":"2014-05-07 11:55:09.000000000","message":"with open(\"/tmp/buckets.json\", \"r\") as stream:","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"            self._save_buckets_config()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            f \u003d open(\"/tmp/buckets.json\", \"r\")"},{"line_number":83,"context_line":"            out \u003d f.read()"},{"line_number":84,"context_line":"            if out \u003d\u003d \"[]\":"},{"line_number":85,"context_line":"                #TODO(pass to red balloon)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_6f874b13","line":82,"in_reply_to":"9ad9bd40_06a28998","updated":"2014-05-21 04:58:15.000000000","message":"that works or\n\n   with open(\"/tmp/buckets.json\", \"r\") as f:\n\nso all the rest can stay the same but definitely use a with block for any file opening because it will close the file when the block exits for free.\n\nhttp://effbot.org/zone/python-with-statement.htm","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                                       system.CB_DUMP_DIR,"},{"line_number":91,"context_line":"                                       shell\u003dTrue)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":94,"context_line":"            raise"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _run_post_backup(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_e6a4c5a7","line":93,"updated":"2014-05-07 11:55:09.000000000","message":"it would be better to log the command that failed\n\nplease add more verbose logging","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            for cmd in self.post_backup_commands:"},{"line_number":99,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":100,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":101,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_a6971d39","line":100,"updated":"2014-05-07 11:55:09.000000000","message":"it would be better to log the command that failed\n\nplease add more verbose logging","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"705f33d85d8904db9e25ef3d11f9f0111f290bd8","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from trove.guestagent.strategies.backup import base"},{"line_number":20,"context_line":"from trove.guestagent.datastore.couchbase import system"},{"line_number":21,"context_line":"from trove.guestagent.datastore.couchbase import service"},{"line_number":22,"context_line":"from trove.openstack.common import log as logging"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import json"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_e3cee482","line":22,"updated":"2014-07-02 00:03:51.000000000","message":"import ordering is a bit off (see hacking rules)","commit_id":"ab393f9dd2c38e4965898154634e7b8fb839b6d0"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        Creates backup dump dir, tars it up, and encrypts it."},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        cmd \u003d \u0027tar cPf - \u0027 + system.CB_DUMP_DIR"},{"line_number":52,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _save_buckets_config(self, password):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f35e4e12","line":51,"updated":"2014-07-12 02:19:13.000000000","message":"would you consider adding either z or j to these options (compress) to avoid having to have a pipeline for the zip command.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        Creates backup dump dir, tars it up, and encrypts it."},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        cmd \u003d \u0027tar cPf - \u0027 + system.CB_DUMP_DIR"},{"line_number":52,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _save_buckets_config(self, password):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_11fb8cc1","line":51,"in_reply_to":"baada198_f35e4e12","updated":"2014-07-14 18:40:32.000000000","message":"Following mongodb does it:\n\nhttps://review.openstack.org/#/c/78339/16/trove/guestagent/strategies/backup/mongo_impl.py","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _save_buckets_config(self, password):"},{"line_number":55,"context_line":"        url \u003d \u0027http://localhost:8091/pools/default/buckets\u0027"},{"line_number":56,"context_line":"        outfile \u003d \u0027/tmp/buckets.json\u0027"},{"line_number":57,"context_line":"        utils.execute_with_timeout(\u0027curl -u root:\u0027 + password +"},{"line_number":58,"context_line":"                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_d3106a50","line":55,"updated":"2014-07-12 02:19:13.000000000","message":"the hardcoding of ports scares me.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4badc19ce18d4d9edd081d4d5a6e0d49b20bbbeb","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _save_buckets_config(self, password):"},{"line_number":55,"context_line":"        url \u003d \u0027http://localhost:8091/pools/default/buckets\u0027"},{"line_number":56,"context_line":"        outfile \u003d \u0027/tmp/buckets.json\u0027"},{"line_number":57,"context_line":"        utils.execute_with_timeout(\u0027curl -u root:\u0027 + password +"},{"line_number":58,"context_line":"                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b2556251","line":55,"in_reply_to":"baada198_d3106a50","updated":"2014-07-15 12:23:47.000000000","message":"+1 to given concern","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _save_buckets_config(self, password):"},{"line_number":55,"context_line":"        url \u003d \u0027http://localhost:8091/pools/default/buckets\u0027"},{"line_number":56,"context_line":"        outfile \u003d \u0027/tmp/buckets.json\u0027"},{"line_number":57,"context_line":"        utils.execute_with_timeout(\u0027curl -u root:\u0027 + password +"},{"line_number":58,"context_line":"                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":59,"context_line":"                                   shell\u003dTrue, timeout\u003d300)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_13174246","line":56,"updated":"2014-07-12 02:19:13.000000000","message":"creating a name (outfile) which you will use once seems pointless. Why not make it OUTFILE and use it at all places in this source file?","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _save_buckets_config(self, password):"},{"line_number":55,"context_line":"        url \u003d \u0027http://localhost:8091/pools/default/buckets\u0027"},{"line_number":56,"context_line":"        outfile \u003d \u0027/tmp/buckets.json\u0027"},{"line_number":57,"context_line":"        utils.execute_with_timeout(\u0027curl -u root:\u0027 + password +"},{"line_number":58,"context_line":"                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":59,"context_line":"                                   shell\u003dTrue, timeout\u003d300)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_311df00f","line":56,"in_reply_to":"baada198_13174246","updated":"2014-07-14 18:40:32.000000000","message":"Done","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            root \u003d service.CouchbaseRootAccess()"},{"line_number":73,"context_line":"            pw \u003d root.get_password()"},{"line_number":74,"context_line":"            self._save_buckets_config(pw)"},{"line_number":75,"context_line":"            with open(\"/tmp/buckets.json\", \"r\") as f:"},{"line_number":76,"context_line":"                out \u003d f.read()"},{"line_number":77,"context_line":"                if out !\u003d \"[]\":"},{"line_number":78,"context_line":"                    d \u003d json.loads(out)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_532c5a99","line":75,"updated":"2014-07-12 02:19:13.000000000","message":"in the previous function _save_buckets() you have a variable outfile ... I\u0027m hoping you\u0027ll change to OUTFILE, a variable you can use anywhere in this source file.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            root \u003d service.CouchbaseRootAccess()"},{"line_number":73,"context_line":"            pw \u003d root.get_password()"},{"line_number":74,"context_line":"            self._save_buckets_config(pw)"},{"line_number":75,"context_line":"            with open(\"/tmp/buckets.json\", \"r\") as f:"},{"line_number":76,"context_line":"                out \u003d f.read()"},{"line_number":77,"context_line":"                if out !\u003d \"[]\":"},{"line_number":78,"context_line":"                    d \u003d json.loads(out)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_117e2c19","line":75,"in_reply_to":"baada198_532c5a99","updated":"2014-07-14 18:40:32.000000000","message":"Done","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                            break"},{"line_number":85,"context_line":"                    if not all_memcached:"},{"line_number":86,"context_line":"                        self._backup(pw)"},{"line_number":87,"context_line":"            utils.execute_with_timeout(\"mv /tmp/buckets.json \" +"},{"line_number":88,"context_line":"                                       system.CB_DUMP_DIR,"},{"line_number":89,"context_line":"                                       shell\u003dTrue)"},{"line_number":90,"context_line":"            if pw !\u003d \"password\":"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b33a16cb","line":87,"updated":"2014-07-12 02:19:13.000000000","message":"Why not make _save_buckets_config() put the file in the right place?\n\nYou seem to rely on the name buckets.json in restore, why not make it a variable or something; instead of a literal string here.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                            break"},{"line_number":85,"context_line":"                    if not all_memcached:"},{"line_number":86,"context_line":"                        self._backup(pw)"},{"line_number":87,"context_line":"            utils.execute_with_timeout(\"mv /tmp/buckets.json \" +"},{"line_number":88,"context_line":"                                       system.CB_DUMP_DIR,"},{"line_number":89,"context_line":"                                       shell\u003dTrue)"},{"line_number":90,"context_line":"            if pw !\u003d \"password\":"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b194a037","line":87,"in_reply_to":"baada198_b33a16cb","updated":"2014-07-14 18:40:32.000000000","message":"Done","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            utils.execute_with_timeout(\"mv /tmp/buckets.json \" +"},{"line_number":88,"context_line":"                                       system.CB_DUMP_DIR,"},{"line_number":89,"context_line":"                                       shell\u003dTrue)"},{"line_number":90,"context_line":"            if pw !\u003d \"password\":"},{"line_number":91,"context_line":"                utils.execute_with_timeout(\u0027sudo cp \u0027 + system.pwd_file +"},{"line_number":92,"context_line":"                                           \u0027 \u0027 + system.CB_DUMP_DIR,"},{"line_number":93,"context_line":"                                           shell\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_132e628c","line":90,"updated":"2014-07-12 02:19:13.000000000","message":"a comment explaining this would be good. What\u0027s special about the password \u0027password\u0027 and why don\u0027t you copy the pwd_file?","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            utils.execute_with_timeout(\"mv /tmp/buckets.json \" +"},{"line_number":88,"context_line":"                                       system.CB_DUMP_DIR,"},{"line_number":89,"context_line":"                                       shell\u003dTrue)"},{"line_number":90,"context_line":"            if pw !\u003d \"password\":"},{"line_number":91,"context_line":"                utils.execute_with_timeout(\u0027sudo cp \u0027 + system.pwd_file +"},{"line_number":92,"context_line":"                                           \u0027 \u0027 + system.CB_DUMP_DIR,"},{"line_number":93,"context_line":"                                           shell\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_912ddc00","line":90,"in_reply_to":"baada198_132e628c","updated":"2014-07-14 18:40:32.000000000","message":"Added comment.\n\nAs for why \"password\", see:\nhttps://github.com/openstack/trove/blob/master/trove/guestagent/datastore/couchbase/service.py#L290","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                utils.execute_with_timeout(\u0027sudo cp \u0027 + system.pwd_file +"},{"line_number":92,"context_line":"                                           \u0027 \u0027 + system.CB_DUMP_DIR,"},{"line_number":93,"context_line":"                                           shell\u003dTrue)"},{"line_number":94,"context_line":"        except exception.ProcessExecutionError as p:"},{"line_number":95,"context_line":"            LOG.error(p)"},{"line_number":96,"context_line":"            raise p"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_334e0670","line":94,"updated":"2014-07-12 02:19:13.000000000","message":"is this too restrictive a catcher?","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                utils.execute_with_timeout(\u0027sudo cp \u0027 + system.pwd_file +"},{"line_number":92,"context_line":"                                           \u0027 \u0027 + system.CB_DUMP_DIR,"},{"line_number":93,"context_line":"                                           shell\u003dTrue)"},{"line_number":94,"context_line":"        except exception.ProcessExecutionError as p:"},{"line_number":95,"context_line":"            LOG.error(p)"},{"line_number":96,"context_line":"            raise p"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f15b7883","line":94,"in_reply_to":"baada198_334e0670","updated":"2014-07-14 18:40:32.000000000","message":"No.  execute_with_timeout can throw ProcessExecutionError.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            for cmd in self.post_backup_commands:"},{"line_number":101,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":102,"context_line":"        except exception.ProcessExecutionError as p:"},{"line_number":103,"context_line":"            LOG.error(p)"},{"line_number":104,"context_line":"            raise p"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_53537a16","line":102,"updated":"2014-07-12 02:19:13.000000000","message":"is this too restrictive?","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            for cmd in self.post_backup_commands:"},{"line_number":101,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":102,"context_line":"        except exception.ProcessExecutionError as p:"},{"line_number":103,"context_line":"            LOG.error(p)"},{"line_number":104,"context_line":"            raise p"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_11562c5c","line":102,"in_reply_to":"baada198_53537a16","updated":"2014-07-14 18:40:32.000000000","message":"No.  execute_with_timeout can throw ProcessExecutionError.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4badc19ce18d4d9edd081d4d5a6e0d49b20bbbeb","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            for cmd in self.post_backup_commands:"},{"line_number":101,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":102,"context_line":"        except exception.ProcessExecutionError as p:"},{"line_number":103,"context_line":"            LOG.error(p)"},{"line_number":104,"context_line":"            raise p"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b203a240","line":103,"updated":"2014-07-15 12:23:47.000000000","message":"it\u0027s required since backupagent expects that exception could happen, but silent death is not what should happen. Also it would be useful to backup status definition.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 eBay, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_08bf4861","line":1,"updated":"2014-07-17 21:28:51.000000000","message":"eBay Software Foundation","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 eBay, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_97c7f063","line":1,"in_reply_to":"baada198_08bf4861","updated":"2014-07-17 22:15:58.000000000","message":"Done","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                        if bucket_type !\u003d \"memcached\":"},{"line_number":83,"context_line":"                            all_memcached \u003d False"},{"line_number":84,"context_line":"                            break"},{"line_number":85,"context_line":"                    if not all_memcached:"},{"line_number":86,"context_line":"                        self._backup(pw)"},{"line_number":87,"context_line":"            utils.execute_with_timeout(\"mv \" + OUTFILE + \" \" +"},{"line_number":88,"context_line":"                                       system.COUCHBASE_DUMP_DIR,"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_0efe716b","line":85,"updated":"2014-07-17 21:28:51.000000000","message":"An else with a log statement explaining that no buckets are being backed up may be nice.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                        if bucket_type !\u003d \"memcached\":"},{"line_number":83,"context_line":"                            all_memcached \u003d False"},{"line_number":84,"context_line":"                            break"},{"line_number":85,"context_line":"                    if not all_memcached:"},{"line_number":86,"context_line":"                        self._backup(pw)"},{"line_number":87,"context_line":"            utils.execute_with_timeout(\"mv \" + OUTFILE + \" \" +"},{"line_number":88,"context_line":"                                       system.COUCHBASE_DUMP_DIR,"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_34154249","line":85,"in_reply_to":"baada198_0efe716b","updated":"2014-07-17 22:15:58.000000000","message":"Done","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2a7f4b7f245c6b0c6096aa5ccfb75b313d9c5fb4","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                   system.COUCHBASE_REST_API + \u0027 \u0027 +"},{"line_number":65,"context_line":"                                   system.COUCHBASE_DUMP_DIR +"},{"line_number":66,"context_line":"                                   \u0027 -u root -p \u0027 + password,"},{"line_number":67,"context_line":"                                   shell\u003dTrue, timeout\u003d600)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _run_pre_backup(self):"},{"line_number":70,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_7c74c39b","line":67,"updated":"2014-07-20 12:09:39.000000000","message":"these hard-coded backup timeouts (not just this change, others have similar numbers) are a cause for concern.","commit_id":"61935d35128e7b19e68778b46aa252a4cd8fe6e2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2a7f4b7f245c6b0c6096aa5ccfb75b313d9c5fb4","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                    else:"},{"line_number":89,"context_line":"                        LOG.info(_(\"All buckets are memcached.  \""},{"line_number":90,"context_line":"                                   \"Skipping backup.\"))"},{"line_number":91,"context_line":"            utils.execute_with_timeout(\"mv \" + OUTFILE + \" \" +"},{"line_number":92,"context_line":"                                       system.COUCHBASE_DUMP_DIR,"},{"line_number":93,"context_line":"                                       shell\u003dTrue)"},{"line_number":94,"context_line":"            if pw !\u003d \"password\":"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_9c799795","line":91,"updated":"2014-07-20 12:09:39.000000000","message":"default timeout isn\u0027t all that long.","commit_id":"61935d35128e7b19e68778b46aa252a4cd8fe6e2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2a7f4b7f245c6b0c6096aa5ccfb75b313d9c5fb4","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                                       shell\u003dTrue)"},{"line_number":94,"context_line":"            if pw !\u003d \"password\":"},{"line_number":95,"context_line":"                # Not default password, backup generated root password"},{"line_number":96,"context_line":"                utils.execute_with_timeout(\u0027sudo cp \u0027 + system.pwd_file +"},{"line_number":97,"context_line":"                                           \u0027 \u0027 + system.COUCHBASE_DUMP_DIR,"},{"line_number":98,"context_line":"                                           shell\u003dTrue)"},{"line_number":99,"context_line":"        except exception.ProcessExecutionError as p:"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_bc6adbb2","line":96,"updated":"2014-07-20 12:09:39.000000000","message":"default timeout isn\u0027t all that long.","commit_id":"61935d35128e7b19e68778b46aa252a4cd8fe6e2"}],"trove/guestagent/strategies/restore/couchbase_impl.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from trove.common import utils as utils"},{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.guestagent.strategies.restore import base"},{"line_number":20,"context_line":"from trove.guestagent.datastore.couchbase.service import CouchbaseRootAccess"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsFw%3D","line":17,"updated":"2014-04-18 07:58:41.000000000","message":"same","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from trove.common import utils as utils"},{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.guestagent.strategies.restore import base"},{"line_number":20,"context_line":"from trove.guestagent.datastore.couchbase.service import CouchbaseRootAccess"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa84%3D","line":17,"in_reply_to":"AAAAXH%2F%2FsFw%3D","updated":"2014-04-21 23:11:56.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from trove.common import utils as utils"},{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.guestagent.strategies.restore import base"},{"line_number":20,"context_line":"from trove.guestagent.datastore.couchbase.service import CouchbaseRootAccess"},{"line_number":21,"context_line":"from trove.openstack.common import log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import json"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsFs%3D","line":20,"updated":"2014-04-18 07:58:41.000000000","message":"same","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from trove.common import utils as utils"},{"line_number":18,"context_line":"from trove.common import exception"},{"line_number":19,"context_line":"from trove.guestagent.strategies.restore import base"},{"line_number":20,"context_line":"from trove.guestagent.datastore.couchbase.service import CouchbaseRootAccess"},{"line_number":21,"context_line":"from trove.openstack.common import log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import json"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa80%3D","line":20,"in_reply_to":"AAAAXH%2F%2FsFs%3D","updated":"2014-04-21 23:11:56.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":"CB_DUMP_DIR \u003d \"/tmp/backups\""},{"line_number":30,"context_line":"BYTES_PER_MB \u003d 1048576"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsFU%3D","line":29,"updated":"2014-04-18 07:58:41.000000000","message":"move this to system.py","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":"CB_DUMP_DIR \u003d \"/tmp/backups\""},{"line_number":30,"context_line":"BYTES_PER_MB \u003d 1048576"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa8w%3D","line":29,"in_reply_to":"AAAAXH%2F%2FsFU%3D","updated":"2014-04-21 23:11:56.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            if bucket_type \u003d\u003d \"membase\":"},{"line_number":80,"context_line":"                bucket_type \u003d \"couchbase\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            ram \u003d (d[i][\"quota\"][\"ram\"]) / BYTES_PER_MB"},{"line_number":83,"context_line":"            auth_type \u003d d[i][\"authType\"]"},{"line_number":84,"context_line":"            password \u003d d[i][\"saslPassword\"]"},{"line_number":85,"context_line":"            port \u003d d[i][\"proxyPort\"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsE8%3D","line":82,"updated":"2014-04-18 07:58:41.000000000","message":"use method to_gb from dbaas.py","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"394dba5e9af15be79b0564bb7ca669d8980b561d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            if bucket_type \u003d\u003d \"membase\":"},{"line_number":80,"context_line":"                bucket_type \u003d \"couchbase\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            ram \u003d (d[i][\"quota\"][\"ram\"]) / BYTES_PER_MB"},{"line_number":83,"context_line":"            auth_type \u003d d[i][\"authType\"]"},{"line_number":84,"context_line":"            password \u003d d[i][\"saslPassword\"]"},{"line_number":85,"context_line":"            port \u003d d[i][\"proxyPort\"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FGwY%3D","line":82,"in_reply_to":"AAAAXH%2F%2Fa%2FY%3D","updated":"2014-04-24 00:17:22.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            if bucket_type \u003d\u003d \"membase\":"},{"line_number":80,"context_line":"                bucket_type \u003d \"couchbase\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            ram \u003d (d[i][\"quota\"][\"ram\"]) / BYTES_PER_MB"},{"line_number":83,"context_line":"            auth_type \u003d d[i][\"authType\"]"},{"line_number":84,"context_line":"            password \u003d d[i][\"saslPassword\"]"},{"line_number":85,"context_line":"            port \u003d d[i][\"proxyPort\"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa%2FY%3D","line":82,"in_reply_to":"AAAAXH%2F%2FsE8%3D","updated":"2014-04-21 23:11:56.000000000","message":"Added to_mb for dbaas.py and using it here","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            flush \u003d 1 if \"flush\" in d[i][\"controllers\"] else 0"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"            # cbrestore requires you to manually create destination buckets"},{"line_number":92,"context_line":"            create_bucket_cmd \u003d \u0027curl -X POST -u root:\u0027 + root_pwd +   \\"},{"line_number":93,"context_line":"                                \u0027 -d name\u003d\"\u0027 + bucket_name + \u0027\"\u0027 +          \\"},{"line_number":94,"context_line":"                                \u0027 -d bucketType\u003d\"\u0027 + bucket_type + \u0027\"\u0027 +    \\"},{"line_number":95,"context_line":"                                \u0027 -d ramQuotaMB\u003d\"\u0027 + str(ram) + \u0027\"\u0027 +       \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsEw%3D","line":92,"updated":"2014-04-18 07:58:41.000000000","message":"do not use \\ in string formatting, use simple braces ()","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"394dba5e9af15be79b0564bb7ca669d8980b561d","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            flush \u003d 1 if \"flush\" in d[i][\"controllers\"] else 0"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"            # cbrestore requires you to manually create destination buckets"},{"line_number":92,"context_line":"            create_bucket_cmd \u003d \u0027curl -X POST -u root:\u0027 + root_pwd +   \\"},{"line_number":93,"context_line":"                                \u0027 -d name\u003d\"\u0027 + bucket_name + \u0027\"\u0027 +          \\"},{"line_number":94,"context_line":"                                \u0027 -d bucketType\u003d\"\u0027 + bucket_type + \u0027\"\u0027 +    \\"},{"line_number":95,"context_line":"                                \u0027 -d ramQuotaMB\u003d\"\u0027 + str(ram) + \u0027\"\u0027 +       \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FGwo%3D","line":92,"in_reply_to":"AAAAXH%2F%2FXIA%3D","updated":"2014-04-24 00:17:22.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"51c440779bb7415e8da63e2e3e534b6764a53938","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            flush \u003d 1 if \"flush\" in d[i][\"controllers\"] else 0"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"            # cbrestore requires you to manually create destination buckets"},{"line_number":92,"context_line":"            create_bucket_cmd \u003d \u0027curl -X POST -u root:\u0027 + root_pwd +   \\"},{"line_number":93,"context_line":"                                \u0027 -d name\u003d\"\u0027 + bucket_name + \u0027\"\u0027 +          \\"},{"line_number":94,"context_line":"                                \u0027 -d bucketType\u003d\"\u0027 + bucket_type + \u0027\"\u0027 +    \\"},{"line_number":95,"context_line":"                                \u0027 -d ramQuotaMB\u003d\"\u0027 + str(ram) + \u0027\"\u0027 +       \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FXIA%3D","line":92,"in_reply_to":"AAAAXH%2F%2Fa0Y%3D","updated":"2014-04-22 09:57:16.000000000","message":"(\u0027curl -X POST -u root:\u0027 + root_pwd\u0027\n\n......\n\n\u0027 http://localhost:8091/pools/default/buckets\u0027)","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            flush \u003d 1 if \"flush\" in d[i][\"controllers\"] else 0"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"            # cbrestore requires you to manually create destination buckets"},{"line_number":92,"context_line":"            create_bucket_cmd \u003d \u0027curl -X POST -u root:\u0027 + root_pwd +   \\"},{"line_number":93,"context_line":"                                \u0027 -d name\u003d\"\u0027 + bucket_name + \u0027\"\u0027 +          \\"},{"line_number":94,"context_line":"                                \u0027 -d bucketType\u003d\"\u0027 + bucket_type + \u0027\"\u0027 +    \\"},{"line_number":95,"context_line":"                                \u0027 -d ramQuotaMB\u003d\"\u0027 + str(ram) + \u0027\"\u0027 +       \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa0Y%3D","line":92,"in_reply_to":"AAAAXH%2F%2FsEw%3D","updated":"2014-04-21 23:11:56.000000000","message":"Can you give me an example of using simple braces ()?","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                                str(flush) + \u0027\"\u0027 +                          \\"},{"line_number":107,"context_line":"                                \u0027 http://localhost:8091/pools/default/buckets\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            utils.execute_with_timeout(create_bucket_cmd,"},{"line_number":110,"context_line":"                                       shell\u003dTrue, timeout\u003d300)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            if bucket_type !\u003d \"memcached\":"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsEo%3D","line":109,"updated":"2014-04-18 07:58:41.000000000","message":"try:except is required","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                                str(flush) + \u0027\"\u0027 +                          \\"},{"line_number":107,"context_line":"                                \u0027 http://localhost:8091/pools/default/buckets\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            utils.execute_with_timeout(create_bucket_cmd,"},{"line_number":110,"context_line":"                                       shell\u003dTrue, timeout\u003d300)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            if bucket_type !\u003d \"memcached\":"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa2w%3D","line":109,"in_reply_to":"AAAAXH%2F%2FsEo%3D","updated":"2014-04-21 23:11:56.000000000","message":"Maybe, I\u0027m misunderstanding something.  If there\u0027s an exception here, it will just be thrown (raised) with the message from the exception.  Why do I need to catch the exception and throw (raise) another different exception (e.g. RestoreError)?  If that is what you are suggesting.","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                # (follows same logic as --wait for couchbase-cli)"},{"line_number":142,"context_line":"                healthy \u003d False"},{"line_number":143,"context_line":"                while (time.time() - start) \u003c\u003d timeout_in_seconds:"},{"line_number":144,"context_line":"                    url \u003d \u0027http://localhost:8091/pools/default/buckets/\u0027 + \\"},{"line_number":145,"context_line":"                          bucket_name"},{"line_number":146,"context_line":"                    outfile \u003d CB_DUMP_DIR + \u0027/\u0027 + bucket_name"},{"line_number":147,"context_line":"                    utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsEQ%3D","line":144,"updated":"2014-04-18 07:58:41.000000000","message":"do not use \\ in string formatting","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"394dba5e9af15be79b0564bb7ca669d8980b561d","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                # (follows same logic as --wait for couchbase-cli)"},{"line_number":142,"context_line":"                healthy \u003d False"},{"line_number":143,"context_line":"                while (time.time() - start) \u003c\u003d timeout_in_seconds:"},{"line_number":144,"context_line":"                    url \u003d \u0027http://localhost:8091/pools/default/buckets/\u0027 + \\"},{"line_number":145,"context_line":"                          bucket_name"},{"line_number":146,"context_line":"                    outfile \u003d CB_DUMP_DIR + \u0027/\u0027 + bucket_name"},{"line_number":147,"context_line":"                    utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FGwk%3D","line":144,"in_reply_to":"AAAAXH%2F%2Fa0U%3D","updated":"2014-04-24 00:17:22.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                # (follows same logic as --wait for couchbase-cli)"},{"line_number":142,"context_line":"                healthy \u003d False"},{"line_number":143,"context_line":"                while (time.time() - start) \u003c\u003d timeout_in_seconds:"},{"line_number":144,"context_line":"                    url \u003d \u0027http://localhost:8091/pools/default/buckets/\u0027 + \\"},{"line_number":145,"context_line":"                          bucket_name"},{"line_number":146,"context_line":"                    outfile \u003d CB_DUMP_DIR + \u0027/\u0027 + bucket_name"},{"line_number":147,"context_line":"                    utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa0U%3D","line":144,"in_reply_to":"AAAAXH%2F%2FsEQ%3D","updated":"2014-04-21 23:11:56.000000000","message":"Can you give me an example of using simple braces ()?","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                                               timeout\u003d600)"},{"line_number":182,"context_line":"                except exception.ProcessExecutionError as err:"},{"line_number":183,"context_line":"                    # cbrestore mysteriously failed (race condition?)"},{"line_number":184,"context_line":"                    # Best we can do is wait and try again"},{"line_number":185,"context_line":"                    LOG.error(\"cbrestore failed\")"},{"line_number":186,"context_line":"                    LOG.error(err)"},{"line_number":187,"context_line":"                    LOG.info(\"sleeping 60 seconds...\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsCw%3D","line":184,"updated":"2014-04-18 07:58:41.000000000","message":"sound like a bad idea, no need to try multiple time to perform restore, if it once failed - its failed. This kind of uneeded hook only increases provisioning time.\n\n600 secs as the first exec + 60 sec for sleep (IMHO meaningless) + 600 sec on next exec \u003d 11 mins ???\n\nrestore time should be decreased!","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                                               timeout\u003d600)"},{"line_number":182,"context_line":"                except exception.ProcessExecutionError as err:"},{"line_number":183,"context_line":"                    # cbrestore mysteriously failed (race condition?)"},{"line_number":184,"context_line":"                    # Best we can do is wait and try again"},{"line_number":185,"context_line":"                    LOG.error(\"cbrestore failed\")"},{"line_number":186,"context_line":"                    LOG.error(err)"},{"line_number":187,"context_line":"                    LOG.info(\"sleeping 60 seconds...\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa1w%3D","line":184,"in_reply_to":"AAAAXH%2F%2FsCw%3D","updated":"2014-04-21 23:11:56.000000000","message":"Decreased 600 seconds to 300 seconds.\nRemoved 60 second sleep.\n\nIn my opinion, we need to have a retry mechanism for cbrestore because I have seen (first-hand) cbrestore failing or hanging at times.  And then when you retry it again, it works.  I have opened a Couchbase bug for this:\n\nhttp://www.couchbase.com/issues/browse/MB-10832","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                    # Best we can do is wait and try again"},{"line_number":185,"context_line":"                    LOG.error(\"cbrestore failed\")"},{"line_number":186,"context_line":"                    LOG.error(err)"},{"line_number":187,"context_line":"                    LOG.info(\"sleeping 60 seconds...\")"},{"line_number":188,"context_line":"                    time.sleep(60)"},{"line_number":189,"context_line":"                    LOG.info(\"... woke up\")"},{"line_number":190,"context_line":"                    utils.execute_with_timeout(\u0027/opt/couchbase/bin/cbrestore\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsDw%3D","line":187,"updated":"2014-04-18 07:58:41.000000000","message":"no need to do this","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                    # Best we can do is wait and try again"},{"line_number":185,"context_line":"                    LOG.error(\"cbrestore failed\")"},{"line_number":186,"context_line":"                    LOG.error(err)"},{"line_number":187,"context_line":"                    LOG.info(\"sleeping 60 seconds...\")"},{"line_number":188,"context_line":"                    time.sleep(60)"},{"line_number":189,"context_line":"                    LOG.info(\"... woke up\")"},{"line_number":190,"context_line":"                    utils.execute_with_timeout(\u0027/opt/couchbase/bin/cbrestore\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa1s%3D","line":187,"in_reply_to":"AAAAXH%2F%2FsDw%3D","updated":"2014-04-21 23:11:56.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4402877f398ae479aea17bd8e98c5e132168153b","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                    LOG.info(\"sleeping 60 seconds...\")"},{"line_number":188,"context_line":"                    time.sleep(60)"},{"line_number":189,"context_line":"                    LOG.info(\"... woke up\")"},{"line_number":190,"context_line":"                    utils.execute_with_timeout(\u0027/opt/couchbase/bin/cbrestore\u0027,"},{"line_number":191,"context_line":"                                               CB_DUMP_DIR,"},{"line_number":192,"context_line":"                                               \u0027couchbase://localhost:8091\u0027,"},{"line_number":193,"context_line":"                                               \u0027--bucket-source\u003d\u0027 +"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FsDs%3D","line":190,"updated":"2014-04-18 07:58:41.000000000","message":"code duplication","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"8af9465407305a3389fbfa2415c7c61b606ff7ac","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                    LOG.info(\"sleeping 60 seconds...\")"},{"line_number":188,"context_line":"                    time.sleep(60)"},{"line_number":189,"context_line":"                    LOG.info(\"... woke up\")"},{"line_number":190,"context_line":"                    utils.execute_with_timeout(\u0027/opt/couchbase/bin/cbrestore\u0027,"},{"line_number":191,"context_line":"                                               CB_DUMP_DIR,"},{"line_number":192,"context_line":"                                               \u0027couchbase://localhost:8091\u0027,"},{"line_number":193,"context_line":"                                               \u0027--bucket-source\u003d\u0027 +"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2Fa1o%3D","line":190,"in_reply_to":"AAAAXH%2F%2FsDs%3D","updated":"2014-04-21 23:11:56.000000000","message":"Done","commit_id":"cfcbe6949ce1a7de53af02fe6dd672432b4457b8"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class CbBackup(base.RestoreRunner):"},{"line_number":34,"context_line":"    __strategy_name__ \u003d \u0027cbbackup\u0027"},{"line_number":35,"context_line":"    base_prepare_cmd \u003d \u0027\u0027"},{"line_number":36,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xPf -\u0027"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_2fc38339","line":35,"updated":"2014-05-21 04:58:15.000000000","message":"is this suppose to be empty because you are executing it in the _run_prepare method?","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        utils.execute_with_timeout(\"rm -rf \" + system.CB_DUMP_DIR, shell\u003dTrue)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _run_prepare(self):"},{"line_number":47,"context_line":"        LOG.info(\"Running cbrestore prepare: %s\" % self.prepare_cmd)"},{"line_number":48,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":49,"context_line":"        LOG.info(\"cbrestore prepare finished successfully\")"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_26ab0d76","line":47,"updated":"2014-05-07 11:55:09.000000000","message":"translation required _()","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    def _run_prepare(self):"},{"line_number":47,"context_line":"        LOG.info(\"Running cbrestore prepare: %s\" % self.prepare_cmd)"},{"line_number":48,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":49,"context_line":"        LOG.info(\"cbrestore prepare finished successfully\")"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def post_restore(self):"},{"line_number":52,"context_line":"        self._run_prepare()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_46a81177","line":49,"updated":"2014-05-07 11:55:09.000000000","message":"translation required _()","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        # Compensate for any delays in restoring /tmp/backups/*"},{"line_number":55,"context_line":"        while not os.path.exists(system.CB_DUMP_DIR + \"/buckets.json\"):"},{"line_number":56,"context_line":"            time.sleep(1)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # Root enabled for the backup"},{"line_number":59,"context_line":"        if os.path.exists(system.CB_DUMP_DIR + \"/secret_key\"):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_affdd370","line":56,"updated":"2014-05-21 04:58:15.000000000","message":"this seems hacky not sure why you have to sleep.","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # Root enabled for the backup"},{"line_number":59,"context_line":"        if os.path.exists(system.CB_DUMP_DIR + \"/secret_key\"):"},{"line_number":60,"context_line":"            f \u003d open(system.CB_DUMP_DIR + \"/secret_key\", \"r\")"},{"line_number":61,"context_line":"            pw \u003d f.read()"},{"line_number":62,"context_line":"            f.close()"},{"line_number":63,"context_line":"            root \u003d service.CouchbaseRootAccess()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_86bdb9b9","line":60,"updated":"2014-05-07 11:55:09.000000000","message":"with open(...) as stream:","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # Root enabled for the backup"},{"line_number":59,"context_line":"        if os.path.exists(system.CB_DUMP_DIR + \"/secret_key\"):"},{"line_number":60,"context_line":"            f \u003d open(system.CB_DUMP_DIR + \"/secret_key\", \"r\")"},{"line_number":61,"context_line":"            pw \u003d f.read()"},{"line_number":62,"context_line":"            f.close()"},{"line_number":63,"context_line":"            root \u003d service.CouchbaseRootAccess()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_cf021f6f","line":60,"in_reply_to":"9ad9bd40_86bdb9b9","updated":"2014-05-21 04:58:15.000000000","message":"+1 like mentioned before.","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":67,"context_line":"        root \u003d service.CouchbaseRootAccess()"},{"line_number":68,"context_line":"        root_pwd \u003d root.get_password()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        f \u003d open(system.CB_DUMP_DIR + \"/buckets.json\", \"r\")"},{"line_number":71,"context_line":"        out \u003d f.read()"},{"line_number":72,"context_line":"        f.close()"},{"line_number":73,"context_line":"        d \u003d json.loads(out)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_cf393f43","line":70,"updated":"2014-05-21 04:58:15.000000000","message":"with open() as f:","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            if bucket_type !\u003d \"memcached\":"},{"line_number":113,"context_line":"                # Wait for bucket creation to complete"},{"line_number":114,"context_line":"                # (follows same logic as --wait for couchbase-cli)"},{"line_number":115,"context_line":"                timeout_in_seconds \u003d 120"},{"line_number":116,"context_line":"                start \u003d time.time()"},{"line_number":117,"context_line":"                bucket_exist \u003d False"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_2fe463ab","line":114,"updated":"2014-05-21 04:58:15.000000000","message":"this looks like it could be done with a poll_until() similar to here.\n\nhttps://github.com/openstack/trove/blob/e58fea01da22720377ef69eed68d56d9c38f9ffb/trove/taskmanager/models.py#L260\n\nor\n\nhttps://github.com/openstack/trove/blob/22b80bdb594086dfc6425d3cbfa83643601aed24/trove/guestagent/strategies/restore/mysql_impl.py#L57\n\nWe also use it a ton in the tests for other example uses.","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                    utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"},{"line_number":122,"context_line":"                                               \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":123,"context_line":"                                               shell\u003dTrue, timeout\u003d300)"},{"line_number":124,"context_line":"                    file \u003d open(outfile, \"r\")"},{"line_number":125,"context_line":"                    out \u003d file.read()"},{"line_number":126,"context_line":"                    file.close()"},{"line_number":127,"context_line":"                    buckets \u003d json.loads(out)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_06c9a958","line":124,"updated":"2014-05-07 11:55:09.000000000","message":"with open(....) as stream","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"                # Query status"},{"line_number":141,"context_line":"                # (follows same logic as --wait for couchbase-cli)"},{"line_number":142,"context_line":"                healthy \u003d False"},{"line_number":143,"context_line":"                while (time.time() - start) \u003c\u003d timeout_in_seconds:"},{"line_number":144,"context_line":"                    url \u003d (\u0027http://localhost:8091/pools/default/buckets/\u0027 +"},{"line_number":145,"context_line":"                           bucket_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_8fc017e2","line":142,"updated":"2014-05-21 04:58:15.000000000","message":"you can apply poll_until here as well.","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":147,"context_line":"                    utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"},{"line_number":148,"context_line":"                                               \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":149,"context_line":"                                               shell\u003dTrue, timeout\u003d300)"},{"line_number":150,"context_line":"                    file \u003d open(outfile, \"r\")"},{"line_number":151,"context_line":"                    out \u003d file.read()"},{"line_number":152,"context_line":"                    file.close()"},{"line_number":153,"context_line":"                    bucket \u003d json.loads(out)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_af34f34a","line":150,"updated":"2014-05-21 04:58:15.000000000","message":"with open() as f:","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                               \u0027 --bucket-destination\u003d\u0027 + bucket_name +"},{"line_number":176,"context_line":"                               \u0027 -u root\u0027 + \u0027 -p \u0027 + root_pwd)"},{"line_number":177,"context_line":"                try:"},{"line_number":178,"context_line":"                    utils.execute_with_timeout(restore_cmd, timeout\u003d300)"},{"line_number":179,"context_line":"                except exception.ProcessExecutionError as err:"},{"line_number":180,"context_line":"                    # cbrestore mysteriously fails or hangs at times"},{"line_number":181,"context_line":"                    # Best we can do is wait and try again"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad9bd40_e6d205ff","line":178,"updated":"2014-05-07 11:55:09.000000000","message":"why timeout cannot be just increased to timeout 600 or more and execute restore only once?","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":178,"context_line":"                    utils.execute_with_timeout(restore_cmd, timeout\u003d300)"},{"line_number":179,"context_line":"                except exception.ProcessExecutionError as err:"},{"line_number":180,"context_line":"                    # cbrestore mysteriously fails or hangs at times"},{"line_number":181,"context_line":"                    # Best we can do is wait and try again"},{"line_number":182,"context_line":"                    LOG.error(\"cbrestore failed\")"},{"line_number":183,"context_line":"                    LOG.error(err)"},{"line_number":184,"context_line":"                    utils.execute_with_timeout(restore_cmd, timeout\u003d300)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_cfba1f6e","line":181,"updated":"2014-05-21 04:58:15.000000000","message":"that sounds terrible :-P","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"unresolved":false,"context_lines":[{"line_number":181,"context_line":"                    # Best we can do is wait and try again"},{"line_number":182,"context_line":"                    LOG.error(\"cbrestore failed\")"},{"line_number":183,"context_line":"                    LOG.error(err)"},{"line_number":184,"context_line":"                    utils.execute_with_timeout(restore_cmd, timeout\u003d300)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_2fa9c324","line":184,"updated":"2014-05-21 04:58:15.000000000","message":"the exception thrown from here should be caught and raised as a RestoreError i believe.","commit_id":"1902fc6e2a116063c2512329383a3fc102df3fcd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f99e2bdfdec5decda6e6155f5c3de859f884cf29","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                        utils.execute_with_timeout(restore_cmd,"},{"line_number":192,"context_line":"                                                   shell\u003dTrue,"},{"line_number":193,"context_line":"                                                   timeout\u003d300)"},{"line_number":194,"context_line":"        except Exception as e:"},{"line_number":195,"context_line":"            LOG.error(e)"},{"line_number":196,"context_line":"            raise base.RestoreError(\"Couchbase restore failed.\")"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_f6716378","line":194,"updated":"2014-07-01 08:33:02.000000000","message":"I\u0027d not suggest to catch too broad exception. Please fix it.","commit_id":"87282906290ff9da5f0a8c006930ae9cf56fa913"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class CbBackup(base.RestoreRunner):"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    Implementation of Restore Strategy for Couchbase."},{"line_number":36,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_33752698","line":33,"updated":"2014-07-12 02:19:13.000000000","message":"is this CbBackup or CbRestore?","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"33bf7422ca6be432f72c5e6b03e41d577ebd2014","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class CbBackup(base.RestoreRunner):"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    Implementation of Restore Strategy for Couchbase."},{"line_number":36,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_5fa7f1a6","line":33,"in_reply_to":"baada198_33752698","updated":"2014-07-13 21:10:39.000000000","message":"let me try to explain,\nfrom the guestagent framework perspective [1] - guest looks over strategies for the same name as the name of a strategy that was used to create a backup. That\u0027s why restore and backup strategies should have equal names.\n\n[1] https://github.com/openstack/trove/blob/master/trove/guestagent/backup/backupagent.py#L159-L170","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    Implementation of Restore Strategy for Couchbase."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    __strategy_name__ \u003d \u0027cbbackup\u0027"},{"line_number":38,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xPf -\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_537a9a88","line":37,"updated":"2014-07-12 02:19:13.000000000","message":"is this restore or backup?","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    Implementation of Restore Strategy for Couchbase."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    __strategy_name__ \u003d \u0027cbbackup\u0027"},{"line_number":38,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xPf -\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f1e9b87f","line":37,"in_reply_to":"baada198_537a9a88","updated":"2014-07-14 18:40:32.000000000","message":"See Denis\u0027 comment above.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def post_restore(self):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            # Root enabled for the backup"},{"line_number":54,"context_line":"            if os.path.exists(system.CB_DUMP_DIR + \"/secret_key\"):"},{"line_number":55,"context_line":"                with open(system.CB_DUMP_DIR + \"/secret_key\", \"r\") as f:"},{"line_number":56,"context_line":"                    pw \u003d f.read().rstrip(\"\\n\")"},{"line_number":57,"context_line":"                    root \u003d service.CouchbaseRootAccess()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_339c46c0","line":54,"updated":"2014-07-12 02:19:13.000000000","message":"would you consider not having the manifest constant string \"/secret_key\" hard-coded in multiple places.\n\nAlso, is this system.pwd_file?","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def post_restore(self):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            # Root enabled for the backup"},{"line_number":54,"context_line":"            if os.path.exists(system.CB_DUMP_DIR + \"/secret_key\"):"},{"line_number":55,"context_line":"                with open(system.CB_DUMP_DIR + \"/secret_key\", \"r\") as f:"},{"line_number":56,"context_line":"                    pw \u003d f.read().rstrip(\"\\n\")"},{"line_number":57,"context_line":"                    root \u003d service.CouchbaseRootAccess()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_9165dc1f","line":54,"in_reply_to":"baada198_339c46c0","updated":"2014-07-14 18:40:32.000000000","message":"system.pwd_file \u003d /etc/couchbase/secret_key\n\nWe backed up this file to /tmp/backups during Couchbase backup.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                        outfile \u003d system.CB_DUMP_DIR + \u0027/buckets.all\u0027"},{"line_number":124,"context_line":"                        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"},{"line_number":125,"context_line":"                                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":126,"context_line":"                                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":127,"context_line":"                        with open(outfile, \"r\") as file:"},{"line_number":128,"context_line":"                            out \u003d file.read()"},{"line_number":129,"context_line":"                            buckets \u003d json.loads(out)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b3af76e2","line":126,"updated":"2014-07-12 02:19:13.000000000","message":"if you have a timeout of 300 here, then having a timeout of 120 on the loop above confuses me.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                        outfile \u003d system.CB_DUMP_DIR + \u0027/buckets.all\u0027"},{"line_number":124,"context_line":"                        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"},{"line_number":125,"context_line":"                                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":126,"context_line":"                                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":127,"context_line":"                        with open(outfile, \"r\") as file:"},{"line_number":128,"context_line":"                            out \u003d file.read()"},{"line_number":129,"context_line":"                            buckets \u003d json.loads(out)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_71ff6802","line":126,"in_reply_to":"baada198_b3af76e2","updated":"2014-07-14 18:40:32.000000000","message":"This follows the same logic as --wait for couchbase-cli.\n\nhttps://github.com/couchbase/couchbase-cli/blob/master/buckets.py#L208-L252\n\nCouchbase API does not have ability to wait until bucket is completely done creating.  Thus, we need to follow same logic as --wait for couchbase-cli.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                                    bucket_exist \u003d True"},{"line_number":133,"context_line":"                                    break"},{"line_number":134,"context_line":"                        if not bucket_exist:"},{"line_number":135,"context_line":"                            time.sleep(2)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"                    if not bucket_exist:"},{"line_number":138,"context_line":"                        raise base.RestoreError(\"Failed to create bucket \u0027%s\u0027 \""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b3969692","line":135,"updated":"2014-07-12 02:19:13.000000000","message":"I\u0027m puzzled by the need for this timeout. You are executing a command with a timeout of 300 seconds. So, ostensibly if the execute is performed (which is blocking) it will take some time.\n\nIf it runs and the bucket doesn\u0027t exist, why wait? You don\u0027t want to try for more than 2 minutes and your curl operation may take upto 300 ;)","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                                    bucket_exist \u003d True"},{"line_number":133,"context_line":"                                    break"},{"line_number":134,"context_line":"                        if not bucket_exist:"},{"line_number":135,"context_line":"                            time.sleep(2)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"                    if not bucket_exist:"},{"line_number":138,"context_line":"                        raise base.RestoreError(\"Failed to create bucket \u0027%s\u0027 \""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_9c017307","line":135,"in_reply_to":"baada198_b3969692","updated":"2014-07-14 18:40:32.000000000","message":"This follows the same logic as --wait for couchbase-cli.\n\nhttps://github.com/couchbase/couchbase-cli/blob/master/buckets.py#L208-L252\n\nCouchbase API does not have ability to wait until bucket is completely done creating.  Thus, we need to follow same logic as --wait for couchbase-cli.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                        outfile \u003d system.CB_DUMP_DIR + \u0027/\u0027 + bucket_name"},{"line_number":150,"context_line":"                        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"},{"line_number":151,"context_line":"                                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":152,"context_line":"                                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":153,"context_line":"                        all_node_ready \u003d True"},{"line_number":154,"context_line":"                        with open(outfile, \"r\") as file:"},{"line_number":155,"context_line":"                            out \u003d file.read()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_33836657","line":152,"updated":"2014-07-12 02:19:13.000000000","message":"same concern about this timeout","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"3cca027478c29d41a9c2eb9736e12d5345a0951f","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                        outfile \u003d system.CB_DUMP_DIR + \u0027/\u0027 + bucket_name"},{"line_number":150,"context_line":"                        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"},{"line_number":151,"context_line":"                                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + outfile,"},{"line_number":152,"context_line":"                                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":153,"context_line":"                        all_node_ready \u003d True"},{"line_number":154,"context_line":"                        with open(outfile, \"r\") as file:"},{"line_number":155,"context_line":"                            out \u003d file.read()"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_fc0a6f1e","line":152,"in_reply_to":"baada198_33836657","updated":"2014-07-14 18:40:32.000000000","message":"This follows the same logic as --wait for couchbase-cli.\n\nhttps://github.com/couchbase/couchbase-cli/blob/master/buckets.py#L208-L252\n\nCouchbase API does not have ability to wait until bucket is completely done creating.  Thus, we need to follow same logic as --wait for couchbase-cli.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                        # Retrying typically works"},{"line_number":189,"context_line":"                        LOG.error(p)"},{"line_number":190,"context_line":"                        LOG.error(\"cbrestore failed. Retrying...\")"},{"line_number":191,"context_line":"                        utils.execute_with_timeout(restore_cmd,"},{"line_number":192,"context_line":"                                                   shell\u003dTrue,"},{"line_number":193,"context_line":"                                                   timeout\u003d300)"},{"line_number":194,"context_line":"        except exception.ProcessExecutionError as p:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f3e3ae31","line":191,"updated":"2014-07-12 02:19:13.000000000","message":"I\u0027m not sure that the best way to retry is to execute the same command in the exception block. I\u0027d recommend a more conventional loop with a counter.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0c27c81a22f6d04f8ccbdcc281741bea7969bcd1","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                    timeout_in_seconds \u003d 120"},{"line_number":118,"context_line":"                    start \u003d time.time()"},{"line_number":119,"context_line":"                    bucket_exist \u003d False"},{"line_number":120,"context_line":"                    while (time.time() - start) \u003c\u003d timeout_in_seconds and \\"},{"line_number":121,"context_line":"                            not bucket_exist:"},{"line_number":122,"context_line":"                        url \u003d system.COUCHBASE_REST_API + \u0027/pools/default\u0027 \\"},{"line_number":123,"context_line":"                                                          \u0027/buckets/\u0027"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_913643b3","line":120,"updated":"2014-07-17 07:58:30.000000000","message":"Please do not use \\ while working with multiple lines formating, you can use ().\n\nFor the future, \\ is not pythonic way to format lines, string any more.","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"27eebd13307683ebd8797d903a710e2c26b690ab","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                    timeout_in_seconds \u003d 120"},{"line_number":118,"context_line":"                    start \u003d time.time()"},{"line_number":119,"context_line":"                    bucket_exist \u003d False"},{"line_number":120,"context_line":"                    while (time.time() - start) \u003c\u003d timeout_in_seconds and \\"},{"line_number":121,"context_line":"                            not bucket_exist:"},{"line_number":122,"context_line":"                        url \u003d system.COUCHBASE_REST_API + \u0027/pools/default\u0027 \\"},{"line_number":123,"context_line":"                                                          \u0027/buckets/\u0027"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_f1ea1f73","line":120,"in_reply_to":"baada198_913643b3","updated":"2014-07-17 08:11:34.000000000","message":"+1","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"9a0767392f9d3d740483d627ea018453277bc737","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                    timeout_in_seconds \u003d 120"},{"line_number":118,"context_line":"                    start \u003d time.time()"},{"line_number":119,"context_line":"                    bucket_exist \u003d False"},{"line_number":120,"context_line":"                    while (time.time() - start) \u003c\u003d timeout_in_seconds and \\"},{"line_number":121,"context_line":"                            not bucket_exist:"},{"line_number":122,"context_line":"                        url \u003d system.COUCHBASE_REST_API + \u0027/pools/default\u0027 \\"},{"line_number":123,"context_line":"                                                          \u0027/buckets/\u0027"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_39eb8479","line":120,"in_reply_to":"baada198_f1ea1f73","updated":"2014-07-17 18:14:29.000000000","message":"Done","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0c27c81a22f6d04f8ccbdcc281741bea7969bcd1","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    bucket_exist \u003d False"},{"line_number":120,"context_line":"                    while (time.time() - start) \u003c\u003d timeout_in_seconds and \\"},{"line_number":121,"context_line":"                            not bucket_exist:"},{"line_number":122,"context_line":"                        url \u003d system.COUCHBASE_REST_API + \u0027/pools/default\u0027 \\"},{"line_number":123,"context_line":"                                                          \u0027/buckets/\u0027"},{"line_number":124,"context_line":"                        outfile \u003d system.COUCHBASE_DUMP_DIR + \u0027/buckets.all\u0027"},{"line_number":125,"context_line":"                        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_b13987a5","line":122,"updated":"2014-07-17 07:58:30.000000000","message":"same","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"9a0767392f9d3d740483d627ea018453277bc737","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    bucket_exist \u003d False"},{"line_number":120,"context_line":"                    while (time.time() - start) \u003c\u003d timeout_in_seconds and \\"},{"line_number":121,"context_line":"                            not bucket_exist:"},{"line_number":122,"context_line":"                        url \u003d system.COUCHBASE_REST_API + \u0027/pools/default\u0027 \\"},{"line_number":123,"context_line":"                                                          \u0027/buckets/\u0027"},{"line_number":124,"context_line":"                        outfile \u003d system.COUCHBASE_DUMP_DIR + \u0027/buckets.all\u0027"},{"line_number":125,"context_line":"                        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_59011838","line":122,"in_reply_to":"baada198_51fbcb46","updated":"2014-07-17 18:14:29.000000000","message":"Done","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"27eebd13307683ebd8797d903a710e2c26b690ab","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    bucket_exist \u003d False"},{"line_number":120,"context_line":"                    while (time.time() - start) \u003c\u003d timeout_in_seconds and \\"},{"line_number":121,"context_line":"                            not bucket_exist:"},{"line_number":122,"context_line":"                        url \u003d system.COUCHBASE_REST_API + \u0027/pools/default\u0027 \\"},{"line_number":123,"context_line":"                                                          \u0027/buckets/\u0027"},{"line_number":124,"context_line":"                        outfile \u003d system.COUCHBASE_DUMP_DIR + \u0027/buckets.all\u0027"},{"line_number":125,"context_line":"                        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_51fbcb46","line":122,"in_reply_to":"baada198_b13987a5","updated":"2014-07-17 08:11:34.000000000","message":"+1","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0c27c81a22f6d04f8ccbdcc281741bea7969bcd1","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    # (follows same logic as --wait for couchbase-cli)"},{"line_number":146,"context_line":"                    healthy \u003d False"},{"line_number":147,"context_line":"                    while (time.time() - start) \u003c\u003d timeout_in_seconds:"},{"line_number":148,"context_line":"                        url \u003d (system.COUCHBASE_REST_API +"},{"line_number":149,"context_line":"                               \u0027/pools/default/buckets/\u0027 + bucket_name)"},{"line_number":150,"context_line":"                        outfile \u003d system.COUCHBASE_DUMP_DIR + \u0027/\u0027 + bucket_name"},{"line_number":151,"context_line":"                        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_b160a7a5","line":148,"updated":"2014-07-17 07:58:30.000000000","message":"use the same pattern here for lines #120-123","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"9a0767392f9d3d740483d627ea018453277bc737","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    # (follows same logic as --wait for couchbase-cli)"},{"line_number":146,"context_line":"                    healthy \u003d False"},{"line_number":147,"context_line":"                    while (time.time() - start) \u003c\u003d timeout_in_seconds:"},{"line_number":148,"context_line":"                        url \u003d (system.COUCHBASE_REST_API +"},{"line_number":149,"context_line":"                               \u0027/pools/default/buckets/\u0027 + bucket_name)"},{"line_number":150,"context_line":"                        outfile \u003d system.COUCHBASE_DUMP_DIR + \u0027/\u0027 + bucket_name"},{"line_number":151,"context_line":"                        utils.execute_with_timeout(\u0027curl -u root:\u0027 + root_pwd +"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_f94cac9f","line":148,"in_reply_to":"baada198_b160a7a5","updated":"2014-07-17 18:14:29.000000000","message":"Done","commit_id":"430f48037cb0714dde24b1149d92f73e9f5fb83b"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 eBay, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_1183f0cc","line":1,"updated":"2014-07-17 21:28:51.000000000","message":"eBay Software Foundation","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 eBay, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_1720409a","line":1,"in_reply_to":"baada198_1183f0cc","updated":"2014-07-17 22:15:58.000000000","message":"Done","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def post_restore(self):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            # Root enabled for the backup"},{"line_number":54,"context_line":"            if os.path.exists(system.COUCHBASE_DUMP_DIR + \"/secret_key\"):"},{"line_number":55,"context_line":"                with open(system.COUCHBASE_DUMP_DIR + \"/secret_key\", \"r\") as f:"},{"line_number":56,"context_line":"                    pw \u003d f.read().rstrip(\"\\n\")"},{"line_number":57,"context_line":"                    root \u003d service.CouchbaseRootAccess()"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_2ea2554b","line":54,"updated":"2014-07-17 21:28:51.000000000","message":"It\u0027s a shame you have to specify \u0027secret_key\u0027 here. Can you do:\n\n    pwd_file_basename \u003d os.path.basename(system.pwd_file)\n    if os.path.exists(os.path.join(system.COUCHBASE_DUMP_DIR, pwd_file_basename):\n\ninstead?","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def post_restore(self):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            # Root enabled for the backup"},{"line_number":54,"context_line":"            if os.path.exists(system.COUCHBASE_DUMP_DIR + \"/secret_key\"):"},{"line_number":55,"context_line":"                with open(system.COUCHBASE_DUMP_DIR + \"/secret_key\", \"r\") as f:"},{"line_number":56,"context_line":"                    pw \u003d f.read().rstrip(\"\\n\")"},{"line_number":57,"context_line":"                    root \u003d service.CouchbaseRootAccess()"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_57ae38e8","line":54,"in_reply_to":"baada198_2ea2554b","updated":"2014-07-17 22:15:58.000000000","message":"I\u0027d rather not call these extra methods (basename and join) if we can avoid it.\n\nMaybe, I can just create a variable in system.py for \"secret_key\" and use that instead.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            # Root enabled for the backup"},{"line_number":54,"context_line":"            if os.path.exists(system.COUCHBASE_DUMP_DIR + \"/secret_key\"):"},{"line_number":55,"context_line":"                with open(system.COUCHBASE_DUMP_DIR + \"/secret_key\", \"r\") as f:"},{"line_number":56,"context_line":"                    pw \u003d f.read().rstrip(\"\\n\")"},{"line_number":57,"context_line":"                    root \u003d service.CouchbaseRootAccess()"},{"line_number":58,"context_line":"                    root.set_password(pw)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_b171640e","line":55,"updated":"2014-07-17 21:28:51.000000000","message":"Same as above.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            root_pwd \u003d root.get_password()"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"            # Iterate through each bucket config"},{"line_number":65,"context_line":"            with open(system.COUCHBASE_DUMP_DIR + \"/buckets.json\", \"r\") as f:"},{"line_number":66,"context_line":"                out \u003d f.read()"},{"line_number":67,"context_line":"                if out \u003d\u003d \"[]\":"},{"line_number":68,"context_line":"                    # No buckets or data to restore. Done."}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_5153a86b","line":65,"updated":"2014-07-17 21:28:51.000000000","message":"buckets.json could be a constant. It\u0027s used during restore and backup and you already have dump dir as a constant.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            root_pwd \u003d root.get_password()"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"            # Iterate through each bucket config"},{"line_number":65,"context_line":"            with open(system.COUCHBASE_DUMP_DIR + \"/buckets.json\", \"r\") as f:"},{"line_number":66,"context_line":"                out \u003d f.read()"},{"line_number":67,"context_line":"                if out \u003d\u003d \"[]\":"},{"line_number":68,"context_line":"                    # No buckets or data to restore. Done."}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_57955886","line":65,"in_reply_to":"baada198_5153a86b","updated":"2014-07-17 22:15:58.000000000","message":"Done","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                                         \u0027 -d threadsNumber\u003d\"\u0027 +"},{"line_number":104,"context_line":"                                         str(threads) + \u0027\"\u0027 +"},{"line_number":105,"context_line":"                                         \u0027 -d flushEnabled\u003d\"\u0027 +"},{"line_number":106,"context_line":"                                         str(flush) + \u0027\" \u0027 +"},{"line_number":107,"context_line":"                                         system.COUCHBASE_REST_API +"},{"line_number":108,"context_line":"                                         \u0027/pools/default/buckets\u0027)"},{"line_number":109,"context_line":"                    utils.execute_with_timeout(create_bucket_cmd,"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_11ca10a1","line":106,"updated":"2014-07-17 21:28:51.000000000","message":"In the future, you might want to consider formatting with %s.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                    timeout_in_seconds \u003d 120"},{"line_number":118,"context_line":"                    start \u003d time.time()"},{"line_number":119,"context_line":"                    bucket_exist \u003d False"},{"line_number":120,"context_line":"                    while ((time.time() - start) \u003c\u003d timeout_in_seconds and"},{"line_number":121,"context_line":"                            not bucket_exist):"},{"line_number":122,"context_line":"                        url \u003d (system.COUCHBASE_REST_API +"},{"line_number":123,"context_line":"                               \u0027/pools/default/buckets/\u0027)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_315b94f7","line":120,"updated":"2014-07-17 21:28:51.000000000","message":"This feels like a job for utils.poll_until.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                    timeout_in_seconds \u003d 120"},{"line_number":118,"context_line":"                    start \u003d time.time()"},{"line_number":119,"context_line":"                    bucket_exist \u003d False"},{"line_number":120,"context_line":"                    while ((time.time() - start) \u003c\u003d timeout_in_seconds and"},{"line_number":121,"context_line":"                            not bucket_exist):"},{"line_number":122,"context_line":"                        url \u003d (system.COUCHBASE_REST_API +"},{"line_number":123,"context_line":"                               \u0027/pools/default/buckets/\u0027)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_17dda042","line":120,"in_reply_to":"baada198_315b94f7","updated":"2014-07-17 22:15:58.000000000","message":"Originally, I considered this but wanted to stick to the exact same logic as --wait for couchbase-cli","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                    # Query status"},{"line_number":145,"context_line":"                    # (follows same logic as --wait for couchbase-cli)"},{"line_number":146,"context_line":"                    healthy \u003d False"},{"line_number":147,"context_line":"                    while ((time.time() - start) \u003c\u003d timeout_in_seconds):"},{"line_number":148,"context_line":"                        url \u003d (system.COUCHBASE_REST_API +"},{"line_number":149,"context_line":"                               \u0027/pools/default/buckets/\u0027 +"},{"line_number":150,"context_line":"                               bucket_name)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_51dac8e9","line":147,"updated":"2014-07-17 21:28:51.000000000","message":"Same as above.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                    # Query status"},{"line_number":145,"context_line":"                    # (follows same logic as --wait for couchbase-cli)"},{"line_number":146,"context_line":"                    healthy \u003d False"},{"line_number":147,"context_line":"                    while ((time.time() - start) \u003c\u003d timeout_in_seconds):"},{"line_number":148,"context_line":"                        url \u003d (system.COUCHBASE_REST_API +"},{"line_number":149,"context_line":"                               \u0027/pools/default/buckets/\u0027 +"},{"line_number":150,"context_line":"                               bucket_name)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_97f0d0ca","line":147,"in_reply_to":"baada198_51dac8e9","updated":"2014-07-17 22:15:58.000000000","message":"Originally, I considered this but wanted to stick to the exact same logic as --wait for couchbase-cli","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"27274bd7a5ad98c034dc8482f520bfc0d4752f00","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                        # Retrying typically works"},{"line_number":191,"context_line":"                        LOG.error(p)"},{"line_number":192,"context_line":"                        LOG.error(\"cbrestore failed. Retrying...\")"},{"line_number":193,"context_line":"                        utils.execute_with_timeout(restore_cmd,"},{"line_number":194,"context_line":"                                                   shell\u003dTrue,"},{"line_number":195,"context_line":"                                                   timeout\u003d300)"},{"line_number":196,"context_line":"        except exception.ProcessExecutionError as p:"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_d1d25833","line":193,"updated":"2014-07-17 21:28:51.000000000","message":"No dupes are created as part of this retry?","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"f3ab7207c0985c62fa0a6e2d934c84b20a78b75a","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                        # Retrying typically works"},{"line_number":191,"context_line":"                        LOG.error(p)"},{"line_number":192,"context_line":"                        LOG.error(\"cbrestore failed. Retrying...\")"},{"line_number":193,"context_line":"                        utils.execute_with_timeout(restore_cmd,"},{"line_number":194,"context_line":"                                                   shell\u003dTrue,"},{"line_number":195,"context_line":"                                                   timeout\u003d300)"},{"line_number":196,"context_line":"        except exception.ProcessExecutionError as p:"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_d7b968ed","line":193,"in_reply_to":"baada198_d1d25833","updated":"2014-07-17 22:15:58.000000000","message":"No dupes.","commit_id":"bf4bc4392dddb05e6e2328613aa02e11afbc43ce"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2a7f4b7f245c6b0c6096aa5ccfb75b313d9c5fb4","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                    # Query status"},{"line_number":147,"context_line":"                    # (follows same logic as --wait for couchbase-cli)"},{"line_number":148,"context_line":"                    healthy \u003d False"},{"line_number":149,"context_line":"                    while ((time.time() - start) \u003c\u003d timeout_in_seconds):"},{"line_number":150,"context_line":"                        url \u003d (system.COUCHBASE_REST_API +"},{"line_number":151,"context_line":"                               \u0027/pools/default/buckets/\u0027 +"},{"line_number":152,"context_line":"                               bucket_name)"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_bca1fbf8","line":149,"updated":"2014-07-20 12:09:39.000000000","message":"I think this hunk of code checking status could be reused later.","commit_id":"61935d35128e7b19e68778b46aa252a4cd8fe6e2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"2a7f4b7f245c6b0c6096aa5ccfb75b313d9c5fb4","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                        # Retrying typically works"},{"line_number":193,"context_line":"                        LOG.error(p)"},{"line_number":194,"context_line":"                        LOG.error(\"cbrestore failed. Retrying...\")"},{"line_number":195,"context_line":"                        utils.execute_with_timeout(restore_cmd,"},{"line_number":196,"context_line":"                                                   shell\u003dTrue,"},{"line_number":197,"context_line":"                                                   timeout\u003d300)"},{"line_number":198,"context_line":"        except exception.ProcessExecutionError as p:"}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_fcae13e6","line":195,"updated":"2014-07-20 12:09:39.000000000","message":"if you do want to do a retry, better do it as a loop with a retry counter.","commit_id":"61935d35128e7b19e68778b46aa252a4cd8fe6e2"}],"trove/tests/unittests/guestagent/test_backups.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"05de25cb8e2677a304cc606fe08ccc40d7ed7702","unresolved":false,"context_lines":[{"line_number":37,"context_line":"BACKUP_CBBACKUP_CLS \u003d (\"trove.guestagent.strategies.backup.\""},{"line_number":38,"context_line":"                       \"couchbase_impl.CbBackup\")"},{"line_number":39,"context_line":"RESTORE_CBBACKUP_CLS \u003d (\"trove.guestagent.strategies.restore.\""},{"line_number":40,"context_line":"                        \"couchbase_impl.CbBackup\")"},{"line_number":41,"context_line":"PIPE \u003d \" | \""},{"line_number":42,"context_line":"ZIP \u003d \"gzip\""},{"line_number":43,"context_line":"UNZIP \u003d \"gzip -d -c\""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_53d61a50","line":40,"updated":"2014-07-12 02:19:13.000000000","message":"this is confusing ... why not CbRestore (I marked the same thing in the ...impl.py file)","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"33bf7422ca6be432f72c5e6b03e41d577ebd2014","unresolved":false,"context_lines":[{"line_number":37,"context_line":"BACKUP_CBBACKUP_CLS \u003d (\"trove.guestagent.strategies.backup.\""},{"line_number":38,"context_line":"                       \"couchbase_impl.CbBackup\")"},{"line_number":39,"context_line":"RESTORE_CBBACKUP_CLS \u003d (\"trove.guestagent.strategies.restore.\""},{"line_number":40,"context_line":"                        \"couchbase_impl.CbBackup\")"},{"line_number":41,"context_line":"PIPE \u003d \" | \""},{"line_number":42,"context_line":"ZIP \u003d \"gzip\""},{"line_number":43,"context_line":"UNZIP \u003d \"gzip -d -c\""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_3faa3d71","line":40,"in_reply_to":"baada198_53d61a50","updated":"2014-07-13 21:10:39.000000000","message":"let me try to explain,\nfrom the guestagent framework perspective [1] - guest looks over strategies for the same name as the name of a strategy that was used to create a backup. That\u0027s why restore and backup strategies should have equal names.\n\n[1] https://github.com/openstack/trove/blob/master/trove/guestagent/backup/backupagent.py#L159-L170","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"}],"trove/tests/unittests/guestagent/test_couchbase_manager.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"4badc19ce18d4d9edd081d4d5a6e0d49b20bbbeb","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        mock_status.begin_install.assert_any_call()"},{"line_number":101,"context_line":"        couch_service.CouchbaseApp.install_if_needed.assert_any_call("},{"line_number":102,"context_line":"            self.packages)"},{"line_number":103,"context_line":"        couch_service.CouchbaseApp.complete_install_or_restart.\\"},{"line_number":104,"context_line":"            assert_any_call()"},{"line_number":105,"context_line":"        if backup_info:"},{"line_number":106,"context_line":"            backup.restore.assert_any_call(self.context,"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_128c4ed6","line":103,"updated":"2014-07-15 12:23:47.000000000","message":"could you please fix this part of code \u0027\\\u0027, please do not use it anywhere else.","commit_id":"cdb06071b82b0a4c7c00d04afd37f14936e44f82"}]}
