)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"03c5abcd720d518ba4e62ca6f3d7d8fd6561204e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Reasons:"},{"line_number":10,"context_line":" - backup/restore is a significant"},{"line_number":11,"context_line":"   features for database management;"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Changes:"},{"line_number":14,"context_line":" - adding required configurations for resolving"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"1ae5cdf2_9d3f24d6","line":11,"updated":"2014-06-02 15:38:38.000000000","message":"is a significant feature (singular) OR\nare significant features (plural)","commit_id":"d46081daed9e9845fba782c388f48cee14b49fcf"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"766030db36283c3e5439b3d25162ff85cc219261","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Reasons:"},{"line_number":10,"context_line":" - backup/restore is a significant"},{"line_number":11,"context_line":"   features for database management;"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Changes:"},{"line_number":14,"context_line":" - adding required configurations for resolving"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"1ae5cdf2_b396d192","line":11,"in_reply_to":"1ae5cdf2_9d3f24d6","updated":"2014-06-02 15:53:00.000000000","message":"Backup/restore is the same feature, that contains two operations in terms of Trove","commit_id":"d46081daed9e9845fba782c388f48cee14b49fcf"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Changes:"},{"line_number":14,"context_line":" - adding required configurations for resolving"},{"line_number":15,"context_line":"   backup/restore strategy and it\u0027s namespaces;"},{"line_number":16,"context_line":" - adding backup/restore implementations;"},{"line_number":17,"context_line":" - updating discovery mechanism;"},{"line_number":18,"context_line":" - adding oslo-group attribute to distinct"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"1ae5cdf2_b33abaca","line":15,"updated":"2014-07-06 12:32:25.000000000","message":"typo; that should be \"its\" not \"it\u0027s\"","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":20,"context_line":"   clean and improve readabilitily;"},{"line_number":21,"context_line":" - unit/int tests proposed."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DocImpact: added configuration options backup/restore namespaces and "},{"line_number":24,"context_line":"           backup_strategy for Cassandra datastore"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I6da2cf726bdb4ab2b969b745f32429e3b2c98bdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"baada198_160d423e","line":23,"updated":"2014-07-21 19:40:11.000000000","message":"trailing space in DocImpact line","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":24,"context_line":"           backup_strategy for Cassandra datastore"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I6da2cf726bdb4ab2b969b745f32429e3b2c98bdb"},{"line_number":27,"context_line":"Implements: blueprint cassandra-backup-restore"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":27,"id":"baada198_76fe7e07","line":27,"updated":"2014-07-21 19:40:11.000000000","message":"Add newline at end of file","commit_id":"623a0682d937743bb1b601c288c3379387e38563"}],"etc/trove/trove-guestagent.conf.sample":[{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"806c0d7d147ab1e61fb24ee5b35079d542fdf1dc","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"[mysql]"},{"line_number":99,"context_line":"backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":100,"context_line":"restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"}],"source_content_type":"application/octet-stream","patch_set":23,"id":"baada198_76493030","line":100,"updated":"2014-07-06 04:08:51.000000000","message":"this should also include the following, no?\n\n    [percona]\n    backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl\n    restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl\n    \n    [cassandra]\n    backup_namespace \u003d trove.guestagent.strategies.restore.cassandra_impl\n    backup_namespace \u003d trove.guestagent.strategies.restore.cassandra_impl\n\notherwise something is amiss.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"2339326277065444f9bcfb11b9f5cb44e768645b","unresolved":false,"context_lines":[{"line_number":115,"context_line":"# replication_password \u003d slave_password"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"[percona]"},{"line_number":118,"context_line":"backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":119,"context_line":"restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"[couchbase]"}],"source_content_type":"application/octet-stream","patch_set":43,"id":"da86d52c_55003d35","line":118,"updated":"2015-02-16 06:37:11.000000000","message":"These changes does not looks matching with what is the proposed intent of patchset, as the patchset says to propse backup/restore for Cassandra","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"}],"trove/common/cfg.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"03c5abcd720d518ba4e62ca6f3d7d8fd6561204e","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                     \u0027if trove_security_groups_support is True).\u0027),"},{"line_number":358,"context_line":"    cfg.ListOpt(\u0027udp_ports\u0027, default\u003d[],"},{"line_number":359,"context_line":"                help\u003d\u0027List of UDP ports and/or port ranges to open\u0027"},{"line_number":360,"context_line":"                     \u0027 in the security group (only applicable \u0027),"},{"line_number":361,"context_line":"    cfg.StrOpt(\u0027backup_strategy\u0027, default\u003d\u0027NodetoolSnapshot\u0027,"},{"line_number":362,"context_line":"               help\u003d\u0027Default strategy to perform backups.\u0027),"},{"line_number":363,"context_line":"    cfg.StrOpt(\u0027mount_point\u0027, default\u003d\u0027/var/lib/cassandra\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_78cb46a5","line":360,"updated":"2014-06-02 15:38:38.000000000","message":"the help text on udp_ports is now incomplete?","commit_id":"d46081daed9e9845fba782c388f48cee14b49fcf"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":161,"context_line":"               help\u003d\u0027The region this service is located.\u0027),"},{"line_number":162,"context_line":"    cfg.StrOpt(\u0027backup_runner\u0027,"},{"line_number":163,"context_line":"               default\u003d\u0027trove.guestagent.backup.backup_types.InnoBackupEx\u0027),"},{"line_number":164,"context_line":"    cfg.DictOpt(\u0027backup_runner_options\u0027, default\u003d{},"},{"line_number":165,"context_line":"                help\u003d\u0027Additional options to be passed to the backup runner.\u0027),"},{"line_number":166,"context_line":"    cfg.StrOpt(\u0027backup_strategy\u0027, default\u003d\u0027InnoBackupEx\u0027,"},{"line_number":167,"context_line":"               help\u003d\u0027Default strategy to perform backups.\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ae5cdf2_135a8e1d","side":"PARENT","line":164,"updated":"2014-07-06 12:32:25.000000000","message":"If you remove the runner, do you need these options? backup_runner_options that is.","commit_id":"064622e005f934145b609f77f2f81cc59b031785"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7e4157e119a96ed8154ebe055407aae50e9b2ac0","unresolved":false,"context_lines":[{"line_number":161,"context_line":"               help\u003d\u0027The region this service is located.\u0027),"},{"line_number":162,"context_line":"    cfg.StrOpt(\u0027backup_runner\u0027,"},{"line_number":163,"context_line":"               default\u003d\u0027trove.guestagent.backup.backup_types.InnoBackupEx\u0027),"},{"line_number":164,"context_line":"    cfg.DictOpt(\u0027backup_runner_options\u0027, default\u003d{},"},{"line_number":165,"context_line":"                help\u003d\u0027Additional options to be passed to the backup runner.\u0027),"},{"line_number":166,"context_line":"    cfg.StrOpt(\u0027backup_strategy\u0027, default\u003d\u0027InnoBackupEx\u0027,"},{"line_number":167,"context_line":"               help\u003d\u0027Default strategy to perform backups.\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_cb05e711","side":"PARENT","line":164,"in_reply_to":"1ae5cdf2_135a8e1d","updated":"2014-07-07 10:04:03.000000000","message":"i looked over the code and this option is not used at all.","commit_id":"064622e005f934145b609f77f2f81cc59b031785"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":366,"context_line":"               \"volumes if volume support is enabled.\"),"},{"line_number":367,"context_line":"    cfg.IntOpt(\u0027usage_timeout\u0027, default\u003d600,"},{"line_number":368,"context_line":"               help\u003d\u0027Timeout to wait for a guest to become active.\u0027),"},{"line_number":369,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":370,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.cassandra_impl\u0027,"},{"line_number":371,"context_line":"               help\u003d\u0027Namespace to load backup strategies from.\u0027),"},{"line_number":372,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_b9a73ba6","line":369,"updated":"2014-07-06 12:32:25.000000000","message":"don\u0027t you need to add this block for all datastores?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7e4157e119a96ed8154ebe055407aae50e9b2ac0","unresolved":false,"context_lines":[{"line_number":366,"context_line":"               \"volumes if volume support is enabled.\"),"},{"line_number":367,"context_line":"    cfg.IntOpt(\u0027usage_timeout\u0027, default\u003d600,"},{"line_number":368,"context_line":"               help\u003d\u0027Timeout to wait for a guest to become active.\u0027),"},{"line_number":369,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":370,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.cassandra_impl\u0027,"},{"line_number":371,"context_line":"               help\u003d\u0027Namespace to load backup strategies from.\u0027),"},{"line_number":372,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_88005503","line":369,"in_reply_to":"baada198_b9a73ba6","updated":"2014-07-07 10:04:03.000000000","message":"was discussed with Nikhil that we should add only new options that are being used by given code, other sections should not be touched","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"09e1f77886710d658c36ecbcf658d59949501b29","unresolved":false,"context_lines":[{"line_number":560,"context_line":"    cfg.DictOpt(\u0027backup_incremental_strategy\u0027, default\u003d{},"},{"line_number":561,"context_line":"                help\u003d\u0027Incremental Backup Runner based on the default \u0027"},{"line_number":562,"context_line":"                \u0027strategy. For strategies that do not implement an \u0027"},{"line_number":563,"context_line":"                \u0027incremental, the runner will use the default full backup.\u0027,"},{"line_number":564,"context_line":"                deprecated_name\u003d\u0027backup_incremental_strategy\u0027,"},{"line_number":565,"context_line":"                deprecated_group\u003d\u0027DEFAULT\u0027),"},{"line_number":566,"context_line":"    cfg.StrOpt(\u0027backup_strategy\u0027, default\u003d\"NodetoolSnapshot\","}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_2827a3cb","line":563,"range":{"start_line":563,"start_character":2,"end_line":563,"end_character":24},"updated":"2015-02-04 02:26:25.000000000","message":"Seems like a word is missing after \u0027incremental\u0027 - \u0027... that do not implement an incremental (what), the runner ...\u0027.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"1653bd14e7835409f7092a40c233dfbdf46f93da","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                help\u003d\u0027Whether to provision a Cinder volume for datadir.\u0027),"},{"line_number":577,"context_line":"    cfg.StrOpt(\u0027device_path\u0027, default\u003d\u0027/dev/vdb\u0027,"},{"line_number":578,"context_line":"               help\u003d\u0027Device path for volume if volume support is enabled.\u0027),"},{"line_number":579,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027, default\u003dNone,"},{"line_number":580,"context_line":"               help\u003d\u0027Namespace to load backup strategies from.\u0027,"},{"line_number":581,"context_line":"               deprecated_name\u003d\u0027backup_namespace\u0027,"},{"line_number":582,"context_line":"               deprecated_group\u003d\u0027DEFAULT\u0027),"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_2e159848","line":579,"updated":"2015-02-05 19:31:15.000000000","message":"Needs to define \u0027backup\u0027 and \u0027restore\u0027 namespases. See below.\n\n\u0027trove.guestagent.strategies.backup.postgresql_impl\u0027\n\u0027trove.guestagent.strategies.restore.postgresql_impl\u0027","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"}],"trove/guestagent/backup/backupagent.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"03c5abcd720d518ba4e62ca6f3d7d8fd6561204e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            runner \u003d get_restore_strategy(backup_type, RESTORE_NAMESPACE)"},{"line_number":57,"context_line":"        except ImportError:"},{"line_number":58,"context_line":"            raise UnknownBackupType(\"Unknown Backup type: %s in namespace %s\""},{"line_number":59,"context_line":"                                    % (backup_type, RESTORE_NAMESPACE))"},{"line_number":60,"context_line":"        return runner"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_9813b20c","line":58,"updated":"2014-06-02 15:38:38.000000000","message":"need to localize with _?","commit_id":"d46081daed9e9845fba782c388f48cee14b49fcf"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"766030db36283c3e5439b3d25162ff85cc219261","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            runner \u003d get_restore_strategy(backup_type, RESTORE_NAMESPACE)"},{"line_number":57,"context_line":"        except ImportError:"},{"line_number":58,"context_line":"            raise UnknownBackupType(\"Unknown Backup type: %s in namespace %s\""},{"line_number":59,"context_line":"                                    % (backup_type, RESTORE_NAMESPACE))"},{"line_number":60,"context_line":"        return runner"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_138ce57e","line":58,"in_reply_to":"1ae5cdf2_9813b20c","updated":"2014-06-02 15:53:00.000000000","message":"it is an exception, not logging message","commit_id":"d46081daed9e9845fba782c388f48cee14b49fcf"}],"trove/guestagent/datastore/cassandra/manager.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"03c5abcd720d518ba4e62ca6f3d7d8fd6561204e","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            operation\u003d\u0027is_root_enabled\u0027, datastore\u003dMANAGER)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _perform_restore(self, backup_info, context, restore_location):"},{"line_number":151,"context_line":"        LOG.info(_(\"Restoring database from backup %s\") % backup_info[\u0027id\u0027])"},{"line_number":152,"context_line":"        try:"},{"line_number":153,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":154,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_f8c4b641","line":151,"updated":"2014-06-02 15:38:38.000000000","message":"localize with _LI()?","commit_id":"d46081daed9e9845fba782c388f48cee14b49fcf"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"766030db36283c3e5439b3d25162ff85cc219261","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            operation\u003d\u0027is_root_enabled\u0027, datastore\u003dMANAGER)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _perform_restore(self, backup_info, context, restore_location):"},{"line_number":151,"context_line":"        LOG.info(_(\"Restoring database from backup %s\") % backup_info[\u0027id\u0027])"},{"line_number":152,"context_line":"        try:"},{"line_number":153,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":154,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_53d4ad46","line":151,"in_reply_to":"1ae5cdf2_f8c4b641","updated":"2014-06-02 15:53:00.000000000","message":"INFO level should come with _(), except DEBUG.","commit_id":"d46081daed9e9845fba782c388f48cee14b49fcf"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"03c5abcd720d518ba4e62ca6f3d7d8fd6561204e","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":154,"context_line":"        except Exception as e:"},{"line_number":155,"context_line":"            LOG.error(e)"},{"line_number":156,"context_line":"            LOG.error(\"Error performing restore from backup %s\","},{"line_number":157,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":158,"context_line":"            self.app.status.set_status(rd_instance.ServiceStatuses.FAILED)"},{"line_number":159,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_d8c53a3e","line":156,"updated":"2014-06-02 15:38:38.000000000","message":"must localize with _LE()","commit_id":"d46081daed9e9845fba782c388f48cee14b49fcf"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from trove.openstack.common import periodic_task"},{"line_number":23,"context_line":"from trove.openstack.common import log as logging"},{"line_number":24,"context_line":"from trove.openstack.common.gettextutils import _"},{"line_number":25,"context_line":"from trove.guestagent import dbaas"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"CONF \u003d cfg.CONF"},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_b1782090","side":"PARENT","line":25,"updated":"2014-07-21 19:40:11.000000000","message":"is this ordering of imports correct?","commit_id":"5869b3cabbf25362319559efaf960f40d589a754"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import os"},{"line_number":18,"context_line":"from trove.common import cfg"},{"line_number":19,"context_line":"from trove.common import exception"},{"line_number":20,"context_line":"from trove.common import instance as rd_instance"},{"line_number":21,"context_line":"from trove.guestagent import backup"},{"line_number":22,"context_line":"from trove.guestagent import volume"},{"line_number":23,"context_line":"from trove.guestagent.datastore.cassandra import service"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_f157f8fe","line":20,"updated":"2014-07-21 19:40:11.000000000","message":"why rd_instance? I thought we were moving away from the \u0027reddwarf\u0027 name","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                device.mount(mount_point)"},{"line_number":94,"context_line":"                LOG.debug(\"Mounting new volume.\")"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            LOG.debug(\"Restarting database after changes.\")"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if backup_info:"},{"line_number":99,"context_line":"            self._perform_restore(backup_info, context, mount_point)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_b1d4a047","line":96,"range":{"start_line":96,"start_character":16,"end_line":96,"end_character":21},"updated":"2014-07-21 19:40:11.000000000","message":"I don\u0027t see a call to restart the database after this debug message; that\u0027s because your change broke the intent of the block beginning on line 71.","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        if backup_info:"},{"line_number":99,"context_line":"            self._perform_restore(backup_info, context, mount_point)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.app.start_db()"},{"line_number":102,"context_line":"        self.appStatus.end_install_or_restart()"},{"line_number":103,"context_line":"        LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_d1f034ff","line":101,"range":{"start_line":101,"start_character":0,"end_line":101,"end_character":8},"updated":"2014-07-21 19:40:11.000000000","message":"indentation is wrong. the start db need not be attempted in all cases; \n\nYou want to add backup_info to the IF beginning on line 71 and put your restore into that conditional.","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            operation\u003d\u0027is_root_enabled\u0027, datastore\u003dMANAGER)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _perform_restore(self, backup_info, context, restore_location):"},{"line_number":164,"context_line":"        LOG.info(_(\"Restoring database from backup %s\") % backup_info[\u0027id\u0027])"},{"line_number":165,"context_line":"        try:"},{"line_number":166,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":167,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_51bb440e","line":164,"range":{"start_line":164,"start_character":53,"end_line":164,"end_character":55},"updated":"2014-07-21 19:40:11.000000000","message":"end with a \u0027.\u0027","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":167,"context_line":"        except Exception as e:"},{"line_number":168,"context_line":"            LOG.error(e)"},{"line_number":169,"context_line":"            LOG.error(_(\"Error performing restore from backup %s\") %"},{"line_number":170,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":171,"context_line":"            self.app.status.set_status(rd_instance.ServiceStatuses.FAILED)"},{"line_number":172,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_3147b01e","line":169,"range":{"start_line":169,"start_character":49,"end_line":169,"end_character":50},"updated":"2014-07-21 19:40:11.000000000","message":"end with a \u0027.\u0027","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":171,"context_line":"            self.app.status.set_status(rd_instance.ServiceStatuses.FAILED)"},{"line_number":172,"context_line":"            raise"},{"line_number":173,"context_line":"        LOG.info(_(\"Restored database successfully\"))"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":176,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_11738c80","line":173,"updated":"2014-07-21 19:40:11.000000000","message":"end with a \u0027.\u0027","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":176,"context_line":"        \"\"\""},{"line_number":177,"context_line":"        Entry point for initiating a backup for this guest agents db instance."},{"line_number":178,"context_line":"        The call currently blocks until the backup is complete or errors. If"},{"line_number":179,"context_line":"        device_path is specified, it will be mounted based to a point specified"},{"line_number":180,"context_line":"        in configuration."}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_f10ff8dd","line":177,"updated":"2014-07-21 19:40:11.000000000","message":"the word agents is used in the wrong sense; I don\u0027t know what the plural of guest agent means.\n\nThis doc string requires cleanup.","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"75dc565a01e7d6124391fa1a733f4a78f8626209","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            self._perform_restore(backup_info, context, mount_point)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        LOG.debug(\"Starting database after changes.\")"},{"line_number":100,"context_line":"        self.app.start_db()"},{"line_number":101,"context_line":"        self.appStatus.end_install_or_restart()"},{"line_number":102,"context_line":"        LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_02fc8071","line":100,"updated":"2014-07-31 15:00:17.000000000","message":"I don\u0027t understand this sequence of changes.\n\nFirst, why remove the start from line 96?\n\nWhy have this start at 100?","commit_id":"3b5650d6eb9bdfc7e1bc3f0123e8174c297e605a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a63cf65d308f0c290978048826bae3ccdc2da019","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                device.mount(mount_point)"},{"line_number":94,"context_line":"                LOG.debug(\"Mounting new volume.\")"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        # While restoring Cassandra should stay turned off."},{"line_number":97,"context_line":"        # Once restore is finished guest should start Cassandra."},{"line_number":98,"context_line":"        if backup_info:"},{"line_number":99,"context_line":"            self._perform_restore(backup_info, context, mount_point)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baada198_54ae1230","line":96,"updated":"2014-08-01 10:33:11.000000000","message":"Sorry, adding a comment won\u0027t fix this. The correct code should look like this:\n\n-        if config_contents or device_path:\n+        if config_contents or device_path or backup_info:\n             # Stop the db while we configure\n             # FIXME(amrith) Once the cassandra bug\n             # https://issues.apache.org/jira/browse/CASSANDRA-2356\n@@ -92,6 +94,9 @@ class Manager(periodic_task.PeriodicTasks):\n                 device.mount(mount_point)\n                 LOG.debug(\"Mounting new volume.\")\n \n+            if backup_info:\n+                self._perform_restore(backup_info, context, mount_point)\n+\n             LOG.debug(\"Restarting database after changes.\")\n             self.app.start_db()","commit_id":"29d21591ca03b63328ca34aa55be15b64d791175"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"efa7e882bedd138cd743af3d102563879b6b7a37","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.app.install_if_needed(packages)"},{"line_number":68,"context_line":"        self.app.init_storage_structure(mount_point)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if config_contents or device_path:"},{"line_number":71,"context_line":"            # Stop the db while we configure"},{"line_number":72,"context_line":"            # FIXME(amrith) Once the cassandra bug"},{"line_number":73,"context_line":"            # https://issues.apache.org/jira/browse/CASSANDRA-2356"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_26a6cdc0","side":"PARENT","line":70,"updated":"2014-08-01 14:26:38.000000000","message":"Add backup_info to this if","commit_id":"a31640024d10ebd754b39192ac3a3656f86a8b1d"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"efa7e882bedd138cd743af3d102563879b6b7a37","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            LOG.debug(\"Restarting database after changes.\")"},{"line_number":96,"context_line":"            self.app.start_db()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        self.appStatus.end_install_or_restart()"},{"line_number":99,"context_line":"        LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def change_passwords(self, context, users):"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_46358143","side":"PARENT","line":98,"updated":"2014-08-01 14:26:38.000000000","message":"It is my understanding that when you are done with this change, your code should look like this:\n\n        if config_contents or device_path or backup_info:\n            # Stop the db while we configure\n            # FIXME(amrith) Once the cassandra bug\n            # https://issues.apache.org/jira/browse/CASSANDRA-2356\n            # is fixed, this code may have to be revisited.\n            LOG.debug(\"Stopping database prior to changes.\")\n            self.app.stop_db()\n\n            if config_contents:\n                LOG.debug(\"Processing configuration.\")\n                self.app.write_config(config_contents)\n                self.app.make_host_reachable()\n\n            if device_path:\n                device \u003d volume.VolumeDevice(device_path)\n                # unmount if device is already mounted\n                device.unmount_device(device_path)\n                device.format()\n                if os.path.exists(mount_point):\n                    #rsync exiting data\n                    device.migrate_data(mount_point)\n                #mount the volume\n                device.mount(mount_point)\n                LOG.debug(\"Mounting new volume.\")\n\n            if backup_info:\n                LOG.debug(\"Performing restore.\")\n                self._perform_restore(backup_info, context, mount_point)\n\n            LOG.debug(\"Starting database after changes.\")\n            self.app.start_db()","commit_id":"a31640024d10ebd754b39192ac3a3656f86a8b1d"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"efa7e882bedd138cd743af3d102563879b6b7a37","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                device.mount(mount_point)"},{"line_number":94,"context_line":"                LOG.debug(\"Mounting new volume.\")"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            # While restoring Cassandra should stay turned off."},{"line_number":97,"context_line":"            # Once restore is finished guest should start Cassandra."},{"line_number":98,"context_line":"            if backup_info:"},{"line_number":99,"context_line":"                self._perform_restore(backup_info, context, mount_point)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_e69f7563","line":96,"updated":"2014-08-01 14:26:38.000000000","message":"comment is superfluous, there\u0027s a comment at 71 already.","commit_id":"f4bf0d9d46c5c1ae664fa5a6fab12cab14090af0"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"efa7e882bedd138cd743af3d102563879b6b7a37","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            if backup_info:"},{"line_number":99,"context_line":"                self._perform_restore(backup_info, context, mount_point)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        LOG.debug(\"Starting database after changes.\")"},{"line_number":102,"context_line":"        self.app.start_db()"},{"line_number":103,"context_line":"        self.appStatus.end_install_or_restart()"},{"line_number":104,"context_line":"        LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_86c9597b","line":101,"updated":"2014-08-01 14:26:38.000000000","message":"Indent under the if starting at 70/71","commit_id":"f4bf0d9d46c5c1ae664fa5a6fab12cab14090af0"}],"trove/guestagent/strategies/backup/cassandra_impl.py":[{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":62,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":63,"context_line":"            LOG.error(e)"},{"line_number":64,"context_line":"            LOG.debug(_(\"Failed command: %s\") % self.current_cmd)"},{"line_number":65,"context_line":"            raise"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _run_post_backup(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_db73b4af","line":64,"range":{"start_line":64,"start_character":23,"end_line":64,"end_character":25},"updated":"2014-05-30 15:46:55.000000000","message":"no localization on debug","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"9f6af315ff3863d07f1d280fe7a6c32fd04a63f0","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":62,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":63,"context_line":"            LOG.error(e)"},{"line_number":64,"context_line":"            LOG.debug(_(\"Failed command: %s\") % self.current_cmd)"},{"line_number":65,"context_line":"            raise"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _run_post_backup(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_3f3f2327","line":64,"range":{"start_line":64,"start_character":23,"end_line":64,"end_character":25},"in_reply_to":"1ae5cdf2_db73b4af","updated":"2014-05-30 16:02:13.000000000","message":"thanks for all comments","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":71,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":72,"context_line":"            LOG.error(e)"},{"line_number":73,"context_line":"            LOG.debug(_(\"Failed command: %s\") % self.current_cmd)"},{"line_number":74,"context_line":"            raise"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_bba50806","line":73,"updated":"2014-05-30 15:46:55.000000000","message":"no localization on debug","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    before_backup_cmd_list \u003d ["},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        \"nodetool snapshot -t all_ks \u003e\u003e /dev/null\","},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_79c84355","line":38,"updated":"2014-07-06 12:32:25.000000000","message":"1. Since there is a possibility that the port on which cassandra is listening may be something other than the default, don\u0027t you have to also specify the port?\n\ni.e. -p \u003cnumber\u003e","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"741be91419953d4be5a3f2a7f996ead30e22670a","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    before_backup_cmd_list \u003d ["},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        \"nodetool snapshot -t all_ks \u003e\u003e /dev/null\","},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_131c5f69","line":38,"in_reply_to":"baada198_3694068a","updated":"2014-07-07 18:32:26.000000000","message":"i\u0027m ok with the lack of a port, but now that i think about it, i think clearsnapshot should directly target the all_ks tag:\n\n    nodetool clearsnapshot -t all_ks\n\nthis protects against trove accidentally blowing out a backup that\u0027s being done by a dba manually (or out-of-band). generalizing the point: trove only creates all_ks, therefore it should only delete all_ks.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0b902a8f642a7737d14422abeb9ebda193b07092","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    before_backup_cmd_list \u003d ["},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        \"nodetool snapshot -t all_ks \u003e\u003e /dev/null\","},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_3694068a","line":38,"in_reply_to":"baada198_79c84355","updated":"2014-07-07 10:32:39.000000000","message":"accodring to http://www.datastax.com/documentation/cassandra/2.0/cassandra/tools/toolsNodetool_r.html port is not required, and even more, nodetool is able to find port on which JMX service is running.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    before_backup_cmd_list \u003d ["},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        \"nodetool snapshot -t all_ks \u003e\u003e /dev/null\","},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_b9be5bac","line":39,"updated":"2014-07-06 12:32:25.000000000","message":"1. I am unfamiliar with the notion of \"appending\" to /dev/null.\n\nIs there some specific intent here with the use of \"\u003e\u003e\"?\n\n2. This command will generate a snapshot of all keyspaces. This includes system key spaces and user keyspaces. I am not positive about the validity of this approach, especially restoring system keyspaces.\n\nI\u0027ll further point out that every piece of documentation I have found indicates that the thing to do is to perform a snapshot per keyspace (of interest).\n\ncassandra_snapshotter (github project) appears to do the same thing.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"741be91419953d4be5a3f2a7f996ead30e22670a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    before_backup_cmd_list \u003d ["},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        \"nodetool snapshot -t all_ks \u003e\u003e /dev/null\","},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_134a9f54","line":39,"in_reply_to":"baada198_0b5a7f29","updated":"2014-07-07 18:32:26.000000000","message":"1. the output of clearnsnapshot in every situation is redundant, so i\u0027m ok with this.\n\n2. \"mastering apache cassandra\" by packt publishing seems to indicate it\u0027s ok. you do have a point that most cassandra books provide a singular example, and that example is snapshotting a single keyspace, but that\u0027s not necessarily indicative of there being an issue for the all-keyspace scenario.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7e4157e119a96ed8154ebe055407aae50e9b2ac0","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    before_backup_cmd_list \u003d ["},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        \"nodetool snapshot -t all_ks \u003e\u003e /dev/null\","},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_0b5a7f29","line":39,"in_reply_to":"baada198_b9be5bac","updated":"2014-07-07 10:04:03.000000000","message":"\"nodetool clearsnapshot\" command produces redundant output for backup process, so, to ignore it i just redirected stdout into dev/null.\n\nFrom the production use of cassandra, it\u0027s very useful to backup all keyspaces, not only user-defined. Because system keyspace contain significant indexes for user-defined keyspaces.So, it\u0027ll take too much time to rebuild them on fresh new instance (taking into account size of backup).\n\nI\u0027m using only official tools that comes out of box, without any tunings/additional packages.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        \"nodetool snapshot -t all_ks \u003e\u003e /dev/null\","},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":43,"context_line":"        \"/tmp/all_ks.tar.bz2 \""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_19e747e5","line":40,"updated":"2014-07-06 12:32:25.000000000","message":"1. Similar to earlier, shouldn\u0027t you be specifying port here?\n\n2. What\u0027s with \"\u003e\u003e\"?\n\n3. Using a fixed name \"all_ks\" could be problematic. Books generally show a usage including a timestamp or some machine identification. At least one problem is if a user has a database called all_ks.\n\n4. As best as I understand cassandra (which isn\u0027t a whole lot), running nodetool snapshot without first running flush produces a snapshot of unknown value. \n\nPractical Cassandra: A Developer\u0027s Approach, By Russell Bradberry, Eric Lubow opines that one must first run a nodetool flush command before running a nodetool snapshot command.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"806c0d7d147ab1e61fb24ee5b35079d542fdf1dc","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        \"nodetool snapshot -t all_ks \u003e\u003e /dev/null\","},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":43,"context_line":"        \"/tmp/all_ks.tar.bz2 \""},{"line_number":44,"context_line":"        \"$(sudo find %s/data/ \""},{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_56fc2cb8","line":42,"updated":"2014-07-06 04:08:51.000000000","message":"why is the verbose flag present if you\u0027re immediately redirecting to /dev/null?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":43,"context_line":"        \"/tmp/all_ks.tar.bz2 \""},{"line_number":44,"context_line":"        \"$(sudo find %s/data/ \""},{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""},{"line_number":46,"context_line":"        % CONF.cassandra.mount_point,"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_d9986f1e","line":44,"updated":"2014-07-06 12:32:25.000000000","message":"1. I worry about the use of the path %{CONF.cassandra.mount_point}/data\n\nThe default behavior of nodetool is to store snapshots in \n\n\u003cdata directory location\u003e/\u003ckeyspace name\u003e/\u003ctable name\u003e/snapshots/\u003csnapshot_name\u003e\n\nIn our case that should be:\n\n\u003cdata directory location\u003e/\u003ckeyspace name\u003e/\u003ctable name\u003e/snapshots/all_ks\n\nUnless there\u0027s some implicit guarantee that\n\n\u003cdata directory location\u003e \u003d %{CONF.cassandra.mount_point}/data\n\nthis could go very wrong.\n\n2. The recovery process indicates that you do some things like delete all the *.db files in various places but not in the snapshots and backups directories etc.,\n\nTo that end, why don\u0027t you do that cleanup right here so that the thing that you are saving as the \"snapshot\" is smaller and only contains the things that you need for restore?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0b902a8f642a7737d14422abeb9ebda193b07092","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":43,"context_line":"        \"/tmp/all_ks.tar.bz2 \""},{"line_number":44,"context_line":"        \"$(sudo find %s/data/ \""},{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""},{"line_number":46,"context_line":"        % CONF.cassandra.mount_point,"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_d6810afc","line":44,"in_reply_to":"baada198_d9986f1e","updated":"2014-07-07 10:32:39.000000000","message":"I\u0027m saving only snapshots, and only, and i don\u0027t have to do cleanup at this stage, clearsnapshot will do that for me at the next stage","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"806c0d7d147ab1e61fb24ee5b35079d542fdf1dc","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":43,"context_line":"        \"/tmp/all_ks.tar.bz2 \""},{"line_number":44,"context_line":"        \"$(sudo find %s/data/ \""},{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""},{"line_number":46,"context_line":"        % CONF.cassandra.mount_point,"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_d6083cdc","line":45,"updated":"2014-07-06 04:08:51.000000000","message":"$ sudo find /var/lib/cassandra/data/ -type d -name all_ks\n    /var/lib/cassandra/data/system/local/snapshots/all_ks\n    /var/lib/cassandra/data/system/schema_keyspaces/snapshots/all_ks\n    /var/lib/cassandra/data/system/compaction_history/snapshots/all_ks\n    /var/lib/cassandra/data/system/peers/snapshots/all_ks\n    /var/lib/cassandra/data/system/schema_columns/snapshots/all_ks\n    /var/lib/cassandra/data/system/schema_columnfamilies/snapshots/all_ks\n    /var/lib/cassandra/data/mykeyspace/users/snapshots/all_ks\n\naccording to the datastax documentation:\n\n    The snapshot is created in data_directory_location/keyspace_name/table_name/snapshots/snapshot_name.\n    Each snapshot folder contains numerous .db files that contain the data at the time of the snapshot.\n\ntherefore, given that i\u0027m not that familiar with cassandra: why are you including the others? if it\u0027s purposeful, please add a comment to this command, describing the intent.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":43,"context_line":"        \"/tmp/all_ks.tar.bz2 \""},{"line_number":44,"context_line":"        \"$(sudo find %s/data/ \""},{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""},{"line_number":46,"context_line":"        % CONF.cassandra.mount_point,"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_199f4704","line":45,"updated":"2014-07-06 12:32:25.000000000","message":"I would like to know this as well. I\u0027m not certain why we\u0027re snagging all this stuff from directories that we shouldn\u0027t really care about.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"741be91419953d4be5a3f2a7f996ead30e22670a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":43,"context_line":"        \"/tmp/all_ks.tar.bz2 \""},{"line_number":44,"context_line":"        \"$(sudo find %s/data/ \""},{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""},{"line_number":46,"context_line":"        % CONF.cassandra.mount_point,"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_b3cc93bc","line":45,"in_reply_to":"baada198_199f4704","updated":"2014-07-07 18:32:26.000000000","message":"Denis, after quickly reviewing 5 Cassandra books and googling for a few minutes, I can\u0027t find any mention of the strategy you\u0027re using here (in terms of system schemas). Can you please reply with links to blogs/literature?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7e4157e119a96ed8154ebe055407aae50e9b2ac0","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":43,"context_line":"        \"/tmp/all_ks.tar.bz2 \""},{"line_number":44,"context_line":"        \"$(sudo find %s/data/ \""},{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""},{"line_number":46,"context_line":"        % CONF.cassandra.mount_point,"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_4b93975a","line":45,"in_reply_to":"baada198_d6083cdc","updated":"2014-07-07 10:04:03.000000000","message":"system keyspaces are storing build indexes to existing user-defined keyspaces, so backuping system keyspace will reduce time on restoring, because there wouldn\u0027t be any reasons to rebuild indexes on start.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""},{"line_number":46,"context_line":"        % CONF.cassandra.mount_point,"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    ]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_598c5fda","line":48,"updated":"2014-07-06 12:32:25.000000000","message":"if you are going to clearsnapshot before the snapshot operation, why do it again here?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"741be91419953d4be5a3f2a7f996ead30e22670a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""},{"line_number":46,"context_line":"        % CONF.cassandra.mount_point,"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    ]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_53d6d728","line":48,"in_reply_to":"baada198_4bf717d3","updated":"2014-07-07 18:32:26.000000000","message":"as stated in the prior clearsnapshot comment:\n\ni think clearsnapshot should directly target the all_ks tag:\n\n    nodetool clearsnapshot -t all_ks\n\nthis protects against trove accidentally blowing out a backup that\u0027s being done by a dba manually (or out-of-band). generalizing the point: trove only creates all_ks, therefore it should only delete all_ks.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7e4157e119a96ed8154ebe055407aae50e9b2ac0","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        \"-type d -name all_ks) \u003e\u003e /dev/null\""},{"line_number":46,"context_line":"        % CONF.cassandra.mount_point,"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    ]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_4bf717d3","line":48,"in_reply_to":"baada198_598c5fda","updated":"2014-07-07 10:04:03.000000000","message":"because it\u0027ll be used with incremental backups. It\u0027s special option for full backups.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"806c0d7d147ab1e61fb24ee5b35079d542fdf1dc","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    ]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    after_backup_cmd_list \u003d ["},{"line_number":53,"context_line":"        \"rm -fr /tmp/all_ks.tar.bz2\""},{"line_number":54,"context_line":"    ]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _run_pre_backup(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_b66668b9","line":53,"updated":"2014-07-06 04:08:51.000000000","message":"should just be rm -f, not rm -rf, because there\u0027s nothing recursive about a singular file.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    ]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    after_backup_cmd_list \u003d ["},{"line_number":53,"context_line":"        \"rm -fr /tmp/all_ks.tar.bz2\""},{"line_number":54,"context_line":"    ]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _run_pre_backup(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_39a24b4b","line":53,"in_reply_to":"baada198_b66668b9","updated":"2014-07-06 12:32:25.000000000","message":"I\u0027d go further and say that neither -r nor -f should be there. After all, if the rm fails for any reason, that\u0027s a problem worth highlighting.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @property"},{"line_number":76,"context_line":"    def cmd(self):"},{"line_number":77,"context_line":"        cmd \u003d \"cat /tmp/all_ks.tar.bz2\""},{"line_number":78,"context_line":"        return cmd + self.encrypt_cmd"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_999277f4","line":77,"updated":"2014-07-06 12:32:25.000000000","message":"the name of the file you are using is hardcoded in so many places it ought to be a variable, a manifest constant, something other than a value hardcoded in so many places ...","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7e4157e119a96ed8154ebe055407aae50e9b2ac0","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @property"},{"line_number":76,"context_line":"    def cmd(self):"},{"line_number":77,"context_line":"        cmd \u003d \"cat /tmp/all_ks.tar.bz2\""},{"line_number":78,"context_line":"        return cmd + self.encrypt_cmd"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_4bcc7789","line":77,"in_reply_to":"baada198_999277f4","updated":"2014-07-07 10:04:03.000000000","message":"It\u0027s not configurable, no need to extract to specific constant. It\u0027s pointless to add additional string rendering logic to each line of code where snapshot path is used.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027nodetool flush\u0027,"},{"line_number":42,"context_line":"        # /dev/null used to ignore next message:"},{"line_number":43,"context_line":"        # Requested clearing snapshot for: all keyspaces"},{"line_number":44,"context_line":"        \"nodetool clearsnapshot 1\u003e/dev/null\","},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        # Creating snapshots of each SST"},{"line_number":47,"context_line":"        \"nodetool snapshot -t %(backup_name)s 1\u003e/dev/null\","}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_f1eb35ae","line":44,"updated":"2014-07-08 21:39:21.000000000","message":"The use of \"1\" in the redirection is redundant.\n\nIf you want to be really precise, you\u0027d do\n\n2\u003e\u00261 \u003e /dev/null\n\nBut, don\u0027t feel compelled to do that.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027nodetool flush\u0027,"},{"line_number":42,"context_line":"        # /dev/null used to ignore next message:"},{"line_number":43,"context_line":"        # Requested clearing snapshot for: all keyspaces"},{"line_number":44,"context_line":"        \"nodetool clearsnapshot 1\u003e/dev/null\","},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        # Creating snapshots of each SST"},{"line_number":47,"context_line":"        \"nodetool snapshot -t %(backup_name)s 1\u003e/dev/null\","}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_90991a22","line":44,"updated":"2014-07-08 20:04:43.000000000","message":"clearsnapshot should directly target the tag:\n\n    nodetool clearsnapshot -t %(backup_name)s\n\nthis protects against trove accidentally blowing out a backup that\u0027s being done by a dba manually (or out-of-band). generalizing the point: trove only creates \u003ctag\u003e, therefore it should only delete \u003ctag\u003e.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        # related to existing user-defined keyspace,"},{"line_number":57,"context_line":"        # so keeping system keyspaces will give an ability to reduce"},{"line_number":58,"context_line":"        # time on restoring to avoid spending time on rebuilding indexes"},{"line_number":59,"context_line":"        # for user-defined keyspaces."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        \"sudo tar cpjfP /tmp/all_ks.tar.gz \""},{"line_number":62,"context_line":"        \"$(sudo find %(datadir)s -type d -name %(backup_name)s)\","}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_e4cc588d","line":59,"updated":"2014-07-08 20:04:43.000000000","message":"As mentioned in the prior patch-set, after quickly reviewing 5 Cassandra books and googling for a few minutes, I can\u0027t find any mention of the strategy you\u0027re using here (in terms of including system schemas). Can you please reply with links to blogs/literature?","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        # related to existing user-defined keyspace,"},{"line_number":57,"context_line":"        # so keeping system keyspaces will give an ability to reduce"},{"line_number":58,"context_line":"        # time on restoring to avoid spending time on rebuilding indexes"},{"line_number":59,"context_line":"        # for user-defined keyspaces."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        \"sudo tar cpjfP /tmp/all_ks.tar.gz \""},{"line_number":62,"context_line":"        \"$(sudo find %(datadir)s -type d -name %(backup_name)s)\","}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_917839fa","line":59,"updated":"2014-07-08 21:39:21.000000000","message":"So, this is one of the significant reasons for my objecting to this chkin.\n\nI can find no mention of a guarantees being made that nodetool will provide a consistent view of system and user defined namespaces when this kind of command is issued. The best I can glean is that there is a per namespace guarantee of integrity, and representation that things that were flushed would be reflected.\n\nI CANNOT however prove (and I\u0027ve been trying to) that this approach would lead to a potentially invalid restore.\n\nI question therefore this notion of avoiding the rebuilding of indices and such when nodetool is run on a cassandra instance that is potentially operating normally.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        # time on restoring to avoid spending time on rebuilding indexes"},{"line_number":59,"context_line":"        # for user-defined keyspaces."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        \"sudo tar cpjfP /tmp/all_ks.tar.gz \""},{"line_number":62,"context_line":"        \"$(sudo find %(datadir)s -type d -name %(backup_name)s)\","},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Once all snapshots were collected into common tarball,"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_711c85c2","line":61,"updated":"2014-07-08 21:39:21.000000000","message":"Isn\u0027t the use of sudo here redundant?\n\nAlso, please don\u0027t use bzip2 to compress a file and give it the extension .gz\n\nEither that, or use tar ... and z for compression","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"8bbbc296a7c16827180ade2e84c674c49893b9fa","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # for user-defined keyspaces."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        \"sudo tar cpjfP /tmp/all_ks.tar.gz \""},{"line_number":62,"context_line":"        \"$(sudo find %(datadir)s -type d -name %(backup_name)s)\","},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Once all snapshots were collected into common tarball,"},{"line_number":65,"context_line":"        # snapshots should be dropped"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_b408cb92","line":62,"updated":"2014-07-08 21:32:54.000000000","message":"per a conversation with the nice folks in #cassandra on irc (see log @ https://gist.github.com/amcrn/dc7d013cb5321871ba15), we should NOT restore system keyspaces.\n\nhowever, denis and i are thinking: why not include the system keyspaces in the backup, but on restore, ignore/don\u0027t-use them. the reasoning here is that it\u0027s possibly useful if something goes really awry, and you need *some* sort of artifact to tell you what the system used to look like.\n\nhowever, for what it\u0027s worth, netflix has written priam (https://github.com/Netflix/Priam) to deal with cassandra backups, and they handle it as follows:\n\n* https://github.com/Netflix/Priam/blob/4e68963f97fcd392dcf571313e11ec9713c0ed55/priam/src/main/java/com/netflix/priam/backup/SnapshotBackup.java\n* https://github.com/Netflix/Priam/blob/master/priam/src/main/java/com/netflix/priam/backup/AbstractBackup.java#L43\n\nnote how the last link specifically excludes some keyspaces.\n\ni need to digest priam a bit more, but my gut tells me we should mirror what\u0027s being done there as closely as possible, considering the # of production miles on this tool.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Once all snapshots were collected into common tarball,"},{"line_number":65,"context_line":"        # snapshots should be dropped"},{"line_number":66,"context_line":"        \"nodetool clearsnapshot 1\u003e/dev/null\","},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    ]"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_645da8ec","line":66,"updated":"2014-07-08 20:04:43.000000000","message":"clearsnapshot should directly target the tag:\n\n    nodetool clearsnapshot -t %(backup_name)s\n\nthis protects against trove accidentally blowing out a backup that\u0027s being done by a dba manually (or out-of-band). generalizing the point: trove only creates \u003ctag\u003e, therefore it should only delete \u003ctag\u003e.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Once all snapshots were collected into common tarball,"},{"line_number":70,"context_line":"        # snapshots should be dropped"},{"line_number":71,"context_line":"        \"nodetool clearsnapshot -t %s 2\u003e\u00261\u003e/dev/null\" % backup_name,"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    ]"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_d1fbd478","line":71,"updated":"2014-07-21 19:40:11.000000000","message":"since you render the string in _run_pre_backup() anyway, why have %backup_name here?","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        try:"},{"line_number":89,"context_line":"            for cmd in self.before_backup_cmd_list:"},{"line_number":90,"context_line":"                self.current_cmd \u003d cmd"},{"line_number":91,"context_line":"                utils.execute_with_timeout(cmd % args, shell\u003dTrue)"},{"line_number":92,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":93,"context_line":"            LOG.error(e)"},{"line_number":94,"context_line":"            LOG.debug(\"Failed command: %s\" % self.current_cmd)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_511d04bd","line":91,"updated":"2014-07-21 19:40:11.000000000","message":"what\u0027s the timeout and is it sufficient?","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                self.current_cmd \u003d cmd"},{"line_number":91,"context_line":"                utils.execute_with_timeout(cmd % args, shell\u003dTrue)"},{"line_number":92,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":93,"context_line":"            LOG.error(e)"},{"line_number":94,"context_line":"            LOG.debug(\"Failed command: %s\" % self.current_cmd)"},{"line_number":95,"context_line":"            raise"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_b17d80e9","line":93,"updated":"2014-07-21 19:40:11.000000000","message":"change to LOG.exception","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            for cmd in self.after_backup_cmd_list:"},{"line_number":100,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":101,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":102,"context_line":"            LOG.error(e)"},{"line_number":103,"context_line":"            LOG.debug(\"Failed command: %s\" % self.current_cmd)"},{"line_number":104,"context_line":"            raise"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_31697025","line":102,"updated":"2014-07-21 19:40:11.000000000","message":"change to LOG.exception","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":6268,"name":"Robert Myers","email":"myer0052@gmail.com","username":"rmyers"},"change_message_id":"d4b67fbeba3d55b5f016176d2fabb81826957785","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        # Per discussion with cassandra devs:"},{"line_number":64,"context_line":"        #  - we should backup all keyspaces."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        \"sudo tar cpzfP /tmp/all_ks.tar.gz \""},{"line_number":67,"context_line":"        \"$(sudo find %(datadir)s -type d -name %(backup_name)s)\","},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Once all snapshots were collected into common tarball,"}],"source_content_type":"text/x-python","patch_set":32,"id":"1abeadc6_c2566506","line":66,"updated":"2014-08-25 16:11:05.000000000","message":"First off this tar command is wrong the \u0027f\u0027 must be the last option as that is the file you wish to write, in this command that would result in the file \u0027P\u0027 created. Second there is absolutely no reason to create a tar file on the system then cat the file to swift. Tar supports streaming the output to stdout. So *this* command is the actual backup command:\n\n    sudo tar cpPf - $(sudo find ... )\n\nNote the \u0027-\u0027 as the filename is for stdout, also notice the absence of the \u0027z\u0027 flag this is to allow the backup system \u0027use_gzip\u0027 logic to work properly.","commit_id":"831abec8d30c5ef7934344bf1be1420754b1ff87"},{"author":{"_account_id":6268,"name":"Robert Myers","email":"myer0052@gmail.com","username":"rmyers"},"change_message_id":"d4b67fbeba3d55b5f016176d2fabb81826957785","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Once all snapshots were collected into common tarball,"},{"line_number":70,"context_line":"        # snapshots should be dropped"},{"line_number":71,"context_line":"        \"nodetool clearsnapshot -t %(backup_name)s 2\u003e\u00261\u003e/dev/null\","},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    ]"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1abeadc6_6247514c","line":71,"updated":"2014-08-25 16:11:05.000000000","message":"This should be run in the \u0027after_backup\u0027 commands","commit_id":"831abec8d30c5ef7934344bf1be1420754b1ff87"},{"author":{"_account_id":6268,"name":"Robert Myers","email":"myer0052@gmail.com","username":"rmyers"},"change_message_id":"d4b67fbeba3d55b5f016176d2fabb81826957785","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    ]"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    after_backup_cmd_list \u003d ["},{"line_number":76,"context_line":"        \"rm -f /tmp/all_ks.tar.gz\","},{"line_number":77,"context_line":"    ]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _run_pre_backup(self):"}],"source_content_type":"text/x-python","patch_set":32,"id":"1abeadc6_625e7114","line":76,"updated":"2014-08-25 16:11:05.000000000","message":"no need for this if you switch to my above tar command","commit_id":"831abec8d30c5ef7934344bf1be1420754b1ff87"},{"author":{"_account_id":6268,"name":"Robert Myers","email":"myer0052@gmail.com","username":"rmyers"},"change_message_id":"d4b67fbeba3d55b5f016176d2fabb81826957785","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    @property"},{"line_number":105,"context_line":"    def cmd(self):"},{"line_number":106,"context_line":"        cmd \u003d \"cat /tmp/all_ks.tar.gz\""},{"line_number":107,"context_line":"        return cmd + self.encrypt_cmd"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @property"},{"line_number":110,"context_line":"    def manifest(self):"}],"source_content_type":"text/x-python","patch_set":32,"id":"1abeadc6_024a1d27","line":107,"updated":"2014-08-25 16:11:05.000000000","message":"See the above comment for the new command. Also this should return:\n\n    return cmd + self.zip_cmd + self.encrypt_cmd","commit_id":"831abec8d30c5ef7934344bf1be1420754b1ff87"},{"author":{"_account_id":6268,"name":"Robert Myers","email":"myer0052@gmail.com","username":"rmyers"},"change_message_id":"a54dfc737190376bdb6c2d64257300b779134c49","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    __strategy_name__ \u003d \u0027nodetoolsnapshot\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    backup_name \u003d \u0027backup_for_%s_%s\u0027 % ("},{"line_number":38,"context_line":"        CONF.guest_id, time.strftime(\"%d-%m-%Y-%H-%M-%S\"))"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    # Backup file structure:"},{"line_number":41,"context_line":"    # /var/lib/cassandra/data/{{keyspace}}/{{directory}}/snapshots/"}],"source_content_type":"text/x-python","patch_set":35,"id":"1abeadc6_e7d425bf","line":38,"updated":"2014-08-26 15:43:02.000000000","message":"This isn\u0027t going to work like you think it is. Basically this property will be set on the class construction so the time will always be the same. You should instead override the __init__ method and add an attribute for this. That way the time is set when the class instance is initialized.","commit_id":"a28124b97411cd5455f103d82be0695e0deb5f16"},{"author":{"_account_id":6268,"name":"Robert Myers","email":"myer0052@gmail.com","username":"rmyers"},"change_message_id":"a54dfc737190376bdb6c2d64257300b779134c49","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    conf \u003d service.CassandraApp("},{"line_number":76,"context_line":"        service.CassandraAppStatus()).read_conf()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    args \u003d {"},{"line_number":79,"context_line":"        \u0027backup_name\u0027: backup_name,"},{"line_number":80,"context_line":"        \u0027datadir\u0027: conf[\u0027data_file_directories\u0027][0],"},{"line_number":81,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":35,"id":"1abeadc6_7a26e8bb","line":78,"updated":"2014-08-26 15:43:02.000000000","message":"these too (conf and args) should be added to the __init__ method","commit_id":"a28124b97411cd5455f103d82be0695e0deb5f16"},{"author":{"_account_id":6268,"name":"Robert Myers","email":"myer0052@gmail.com","username":"rmyers"},"change_message_id":"a54dfc737190376bdb6c2d64257300b779134c49","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @property"},{"line_number":106,"context_line":"    def manifest(self):"},{"line_number":107,"context_line":"        manifest \u003d (\"%(ip)s_%(date)s.cassandra.tar.gz\" %"},{"line_number":108,"context_line":"                    {"},{"line_number":109,"context_line":"                        \u0027ip\u0027: operating_system.get_ip_address(),"},{"line_number":110,"context_line":"                        \u0027date\u0027: time.strftime(\"%d-%m-%Y-%H-%M-%S\"),"}],"source_content_type":"text/x-python","patch_set":35,"id":"1abeadc6_a766ad27","line":107,"updated":"2014-08-26 15:43:02.000000000","message":"You should instead override the \u0027filename\u0027 property. See https://github.com/openstack/trove/blob/master/trove/guestagent/strategies/backup/base.py#L99\n\nThe manifest property handles adding the .gz and .enc extentions depending on the backup settings.","commit_id":"a28124b97411cd5455f103d82be0695e0deb5f16"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"09e1f77886710d658c36ecbcf658d59949501b29","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    before_backup_cmd_list \u003d ["},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # Flushing SST files for consistency"},{"line_number":67,"context_line":"        \u0027nodetool flush\u0027,"},{"line_number":68,"context_line":"        # /dev/null used to ignore next message:"},{"line_number":69,"context_line":"        # Requested clearing snapshot for: all keyspaces"},{"line_number":70,"context_line":"        \"nodetool clearsnapshot %(backup_name)s 2\u003e\u00261\u003e/dev/null\","}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_fa2abe2a","line":67,"updated":"2015-02-04 02:26:25.000000000","message":"Documentation ( http://www.datastax.com/documentation/cassandra/2.0/cassandra/tools/toolsSnapShot.html - last paragraph in section \u0027Description\u0027 ) seems to be suggesting this happens automatically.\nI think we can safely remove this line - it should not have any effect on the subsequent \u0027nodetool clearsnapshot\u0027.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"09e1f77886710d658c36ecbcf658d59949501b29","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        \u0027nodetool flush\u0027,"},{"line_number":68,"context_line":"        # /dev/null used to ignore next message:"},{"line_number":69,"context_line":"        # Requested clearing snapshot for: all keyspaces"},{"line_number":70,"context_line":"        \"nodetool clearsnapshot %(backup_name)s 2\u003e\u00261\u003e/dev/null\","},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # Creating snapshots of each SST"},{"line_number":73,"context_line":"        \"nodetool snapshot -t %(backup_name)s 1\u003e/dev/null\","}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_5d910498","line":70,"updated":"2015-02-04 02:26:25.000000000","message":"If we want to delete all snapshots for all keyspaces, this should probably omit the \u0027backup_name\u0027. Otherwise there should probably be a \u0027-t\u0027 in front of it. ( http://www.datastax.com/documentation/cassandra/2.0/cassandra/tools/toolsClearSnapShot.html ). If that is the case we should probably replace this and \u0027after_backup\u0027 command with a single constant.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        \u0027nodetool flush\u0027,"},{"line_number":68,"context_line":"        # /dev/null used to ignore next message:"},{"line_number":69,"context_line":"        # Requested clearing snapshot for: all keyspaces"},{"line_number":70,"context_line":"        \"nodetool clearsnapshot %(backup_name)s 2\u003e\u00261\u003e/dev/null\","},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # Creating snapshots of each SST"},{"line_number":73,"context_line":"        \"nodetool snapshot -t %(backup_name)s 1\u003e/dev/null\","}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_47b2af4c","line":70,"in_reply_to":"da86d52c_5d910498","updated":"2015-02-05 22:20:23.000000000","message":"Do not hide output and errors. It may be useful.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        \"nodetool clearsnapshot %(backup_name)s 2\u003e\u00261\u003e/dev/null\","},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # Creating snapshots of each SST"},{"line_number":73,"context_line":"        \"nodetool snapshot -t %(backup_name)s 1\u003e/dev/null\","},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    ]"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_673fb3b4","line":73,"updated":"2015-02-05 22:20:23.000000000","message":"Do not hide output. It may be useful.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    after_backup_cmd_list \u003d ["},{"line_number":78,"context_line":"        # Once all snapshots were collected into common tarball,"},{"line_number":79,"context_line":"        # snapshots should be dropped"},{"line_number":80,"context_line":"        \"nodetool clearsnapshot -t %(backup_name)s 2\u003e\u00261\u003e/dev/null\","},{"line_number":81,"context_line":"    ]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _run_pre_backup(self):"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_c785bf5a","line":80,"updated":"2015-02-05 22:20:23.000000000","message":"Do not hide output and errors. It may be useful.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        try:"},{"line_number":86,"context_line":"            for cmd in self.before_backup_cmd_list:"},{"line_number":87,"context_line":"                utils.execute_with_timeout(cmd % self.args, shell\u003dTrue,"},{"line_number":88,"context_line":"                                           timeout\u003d100)"},{"line_number":89,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":90,"context_line":"            LOG.exception()"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_1d3807d2","line":87,"updated":"2015-02-05 22:20:23.000000000","message":"These operations may execute a long time - hours/days. Is the timeout of \u0027100s\u0027 going to be sufficient? Should not be using timout at all.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"2339326277065444f9bcfb11b9f5cb44e768645b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        try:"},{"line_number":86,"context_line":"            for cmd in self.before_backup_cmd_list:"},{"line_number":87,"context_line":"                utils.execute_with_timeout(cmd % self.args, shell\u003dTrue,"},{"line_number":88,"context_line":"                                           timeout\u003d100)"},{"line_number":89,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":90,"context_line":"            LOG.exception()"},{"line_number":91,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_d516ed57","line":88,"updated":"2015-02-16 06:37:11.000000000","message":"Hardcoded timeout probably qualifies to be cfg parameter, as pre-empted value should be large enough to work with bigger database","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    def _run_post_backup(self):"},{"line_number":94,"context_line":"        try:"},{"line_number":95,"context_line":"            for cmd in self.after_backup_cmd_list:"},{"line_number":96,"context_line":"                utils.execute_with_timeout(cmd % self.args, shell\u003dTrue)"},{"line_number":97,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":98,"context_line":"            LOG.exception()"},{"line_number":99,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_7d7743a0","line":96,"range":{"start_line":96,"start_character":16,"end_line":96,"end_character":33},"updated":"2015-02-05 22:20:23.000000000","message":"Again, is the default timeout going to be sufficient? See the note above.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"}],"trove/guestagent/strategies/backup/mysql_impl.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"1119ee66a95d72242a6e936568558cc4a7d39e0a","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        return _meta"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class NodetoolSnapshot(base.BackupRunner, object):"},{"line_number":127,"context_line":"    \"\"\"NodetoolSnapshot backup.\"\"\""},{"line_number":128,"context_line":"    __strategy_name__ \u003d \u0027nodetoolsnapshot\u0027"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2FTT0%3D","line":126,"updated":"2014-04-22 16:35:53.000000000","message":"the name suggests mysql_impl.py; why is a cassandra backup here? shouldn\u0027t it be cassandra_impl.py?","commit_id":"705965963fb41caa9fa3bf76c9fbaf3e0a6a2998"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"1119ee66a95d72242a6e936568558cc4a7d39e0a","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":137,"context_line":"        \"/tmp/all_ks`date +%%F`.tar.bz2 \""},{"line_number":138,"context_line":"        \"$(sudo find /var/lib/cassandra/data/ \""},{"line_number":139,"context_line":"        \"-type d -name all_ks`date +%%F`) \u003e\u003e /dev/null\","},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2FTZU%3D","line":138,"updated":"2014-04-22 16:35:53.000000000","message":"this hard-codes the data directory location; shouldn\u0027t this be a config parameter?","commit_id":"705965963fb41caa9fa3bf76c9fbaf3e0a6a2998"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"1119ee66a95d72242a6e936568558cc4a7d39e0a","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        \"sudo tar cpjvfP \""},{"line_number":137,"context_line":"        \"/tmp/all_ks`date +%%F`.tar.bz2 \""},{"line_number":138,"context_line":"        \"$(sudo find /var/lib/cassandra/data/ \""},{"line_number":139,"context_line":"        \"-type d -name all_ks`date +%%F`) \u003e\u003e /dev/null\","},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        \"nodetool clearsnapshot \u003e\u003e /dev/null\","},{"line_number":142,"context_line":"    ]"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2FTZk%3D","line":139,"updated":"2014-04-22 16:35:53.000000000","message":"the argument all_ks`date +%%F` is going to reexecute the date command.\n\nExecute these commands at a couple of minutes/seconds before midnight and there\u0027s a chance that the nodetool command will generate an output file that this tar command won\u0027t find.\n\nRelying on date +%F to remain constant is not a good idea.","commit_id":"705965963fb41caa9fa3bf76c9fbaf3e0a6a2998"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"1119ee66a95d72242a6e936568558cc4a7d39e0a","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    ]"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    after_backup_cmd_list \u003d ["},{"line_number":145,"context_line":"        \"rm -fr /tmp/all_ks`date +%%F`.tar.bz2\""},{"line_number":146,"context_line":"    ]"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def _run_pre_backup(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2FTZs%3D","line":145,"updated":"2014-04-22 16:35:53.000000000","message":"same issue as earlier; assuming date +%F will remain constant is a bad idea.","commit_id":"705965963fb41caa9fa3bf76c9fbaf3e0a6a2998"}],"trove/guestagent/strategies/restore/cassandra_impl.py":[{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        super(NodetoolSnapshot, self).__init__(*args, **kwargs)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def pre_restore(self):"},{"line_number":41,"context_line":"        LOG.info(\"Stoping db for restore\")"},{"line_number":42,"context_line":"        self.app.stop_db()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def _unpack(self, location, checksum, command):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_9b176ca3","line":41,"updated":"2014-05-30 15:46:55.000000000","message":"should have localization","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            \u0027${data_dir}/${keyspace}/${directories}/ \u0027"},{"line_number":74,"context_line":"            \u00272\u003e\u003e/dev/null; done ; done;\u0027)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        LOG.info(\u0027Running restore\u0027)"},{"line_number":77,"context_line":"        try:"},{"line_number":78,"context_line":"            # Unziping pulled tarball"},{"line_number":79,"context_line":"            unziping \u003d \u0027sudo tar xfj /tmp/backup.tar.bz2 -C /tmp 2\u003e/dev/null\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_db8814ea","line":76,"updated":"2014-05-30 15:46:55.000000000","message":"should have localization","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            # Unziping pulled tarball"},{"line_number":79,"context_line":"            unziping \u003d \u0027sudo tar xfj /tmp/backup.tar.bz2 -C /tmp 2\u003e/dev/null\u0027"},{"line_number":80,"context_line":"            out, err \u003d utils.execute_with_timeout(unziping, shell\u003dTrue)"},{"line_number":81,"context_line":"            LOG.debug(_(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\")"},{"line_number":82,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: unziping})"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            # Removing unneeded tarball"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_3b773804","line":81,"updated":"2014-05-30 15:46:55.000000000","message":"shouldn\u0027t have localization","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            # Removing unneeded tarball"},{"line_number":85,"context_line":"            cleaning \u003d \u0027sudo rm -fr /tmp/backup.tar.bz2\u0027"},{"line_number":86,"context_line":"            out, err \u003d utils.execute_with_timeout(cleaning, shell\u003dTrue)"},{"line_number":87,"context_line":"            LOG.debug(_(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\")"},{"line_number":88,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: cleaning})"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"            # Splitting sst tables to its snapshot directories"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_bb5a6881","line":87,"updated":"2014-05-30 15:46:55.000000000","message":"shouldn\u0027t have localization","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            # Splitting sst tables to its snapshot directories"},{"line_number":91,"context_line":"            out, err \u003d utils.execute_with_timeout("},{"line_number":92,"context_line":"                clean_and_move, shell\u003dTrue)"},{"line_number":93,"context_line":"            LOG.debug(_(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\")"},{"line_number":94,"context_line":"                      % {\u0027cmd\u0027: clean_and_move, \u0027out\u0027: out, \u0027err\u0027: err})"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            # Extracting sst tables and removing empty snapshot directories"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_3b4e58c2","line":93,"updated":"2014-05-30 15:46:55.000000000","message":"shouldn\u0027t have localization","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                \u0027sudo rm -rf $(sudo find /tmp/var -type d -name snapshots)\u0027)"},{"line_number":99,"context_line":"            out, err \u003d utils.execute_with_timeout("},{"line_number":100,"context_line":"                removing_snapshots_dirs, shell\u003dTrue)"},{"line_number":101,"context_line":"            LOG.debug(_(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\")"},{"line_number":102,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err,"},{"line_number":103,"context_line":"                         \u0027cmd\u0027: removing_snapshots_dirs})"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_7bee208d","line":101,"updated":"2014-05-30 15:46:55.000000000","message":"shouldn\u0027t have localization","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            # Moving data to destination directory"},{"line_number":106,"context_line":"            cp \u003d \u0027sudo cp -R /tmp/var/lib/cassandra/data/ /var/lib/cassandra/\u0027"},{"line_number":107,"context_line":"            out, err \u003d utils.execute_with_timeout(cp, shell\u003dTrue)"},{"line_number":108,"context_line":"            LOG.debug(_(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\")"},{"line_number":109,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: cp})"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"            # Removing up temp storage"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_bbe8a87d","line":108,"updated":"2014-05-30 15:46:55.000000000","message":"shouldn\u0027t have localization","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            # Removing up temp storage"},{"line_number":112,"context_line":"            final_cleanup \u003d \u0027sudo rm -fr /tmp/var\u0027"},{"line_number":113,"context_line":"            out, err \u003d utils.execute_with_timeout(final_cleanup, shell\u003dTrue)"},{"line_number":114,"context_line":"            LOG.debug(_(\"CMD: %(cmd)s \""},{"line_number":115,"context_line":"                        \"Out: %(out)s Error: %(err)s\")"},{"line_number":116,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: final_cleanup})"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_1bffdc35","line":114,"updated":"2014-05-30 15:46:55.000000000","message":"shouldn\u0027t have localization","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"41ae0006eb946d3925c6fd180bdd606b0740514b","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":119,"context_line":"            LOG.error(\"Error while post-restoring\")"},{"line_number":120,"context_line":"            raise"},{"line_number":121,"context_line":"        LOG.info(\"Starting db after restore\")"},{"line_number":122,"context_line":"        self.app.restart()"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_3bfc983e","line":121,"updated":"2014-05-30 15:46:55.000000000","message":"should have localization","commit_id":"945c38065200837fbca1fb78b82f846c6151e697"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"03c5abcd720d518ba4e62ca6f3d7d8fd6561204e","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: final_cleanup})"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":118,"context_line":"            LOG.error(\"Error while post-restoring\")"},{"line_number":119,"context_line":"            LOG.error(e)"},{"line_number":120,"context_line":"            raise"},{"line_number":121,"context_line":"        LOG.info(_(\"Starting db after restore\"))"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_b8f86e7d","line":118,"updated":"2014-06-02 15:38:38.000000000","message":"localize with _LE()","commit_id":"d46081daed9e9845fba782c388f48cee14b49fcf"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"806c0d7d147ab1e61fb24ee5b35079d542fdf1dc","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from trove.openstack.common.gettextutils import _  # noqa"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLazyLogger(__name__)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class NodetoolSnapshot(base.RestoreRunner):"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_d62f5c3d","line":25,"updated":"2014-07-06 04:08:51.000000000","message":"why LazyLogger here?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    \"\"\"Implementation of Restore Strategy for NodetoolSnapshot.\"\"\""},{"line_number":30,"context_line":"    __strategy_name__ \u003d \u0027nodetoolsnapshot\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    base_restore_cmd \u003d (\u0027cat \u003e backup.tar.bz2\u0027 + \u0027.enc\u0027"},{"line_number":33,"context_line":"                        if base.RestoreRunner.is_encrypted else None)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    app \u003d service.CassandraApp("}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_790a0327","line":32,"updated":"2014-07-06 12:32:25.000000000","message":"I\u0027m not following why you don\u0027t just pipe stdin directly to this fine. Why cat?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0f03109c08a9b915eff707d86b64c9944c0edb01","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    \"\"\"Implementation of Restore Strategy for NodetoolSnapshot.\"\"\""},{"line_number":30,"context_line":"    __strategy_name__ \u003d \u0027nodetoolsnapshot\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    base_restore_cmd \u003d (\u0027cat \u003e backup.tar.bz2\u0027 + \u0027.enc\u0027"},{"line_number":33,"context_line":"                        if base.RestoreRunner.is_encrypted else None)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    app \u003d service.CassandraApp("}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_b6f4965b","line":32,"in_reply_to":"baada198_790a0327","updated":"2014-07-07 10:44:35.000000000","message":"and since restore framework uses stream that is passed to std cat will redirect stdin into specific file, that\u0027s why it\u0027s used","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7e4157e119a96ed8154ebe055407aae50e9b2ac0","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    \"\"\"Implementation of Restore Strategy for NodetoolSnapshot.\"\"\""},{"line_number":30,"context_line":"    __strategy_name__ \u003d \u0027nodetoolsnapshot\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    base_restore_cmd \u003d (\u0027cat \u003e backup.tar.bz2\u0027 + \u0027.enc\u0027"},{"line_number":33,"context_line":"                        if base.RestoreRunner.is_encrypted else None)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    app \u003d service.CassandraApp("}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_6b769b07","line":32,"in_reply_to":"baada198_790a0327","updated":"2014-07-07 10:04:03.000000000","message":"because \u0027cat\u0027 does streaming, that\u0027s all","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            with open(restore_file, \u0027w+\u0027) as rst_file:"},{"line_number":53,"context_line":"                rst_file.write(chunk)"},{"line_number":54,"context_line":"            content_length +\u003d len(chunk)"},{"line_number":55,"context_line":"        decr_cmd \u003d (\u0027%(decrypt_cmd)s cat %(restore_file)s \u0027"},{"line_number":56,"context_line":"                    \u0027| cat \u003e %(filename)s\u0027"},{"line_number":57,"context_line":"                    % {\u0027decrypt_cmd\u0027: self.decrypt_cmd,"},{"line_number":58,"context_line":"                       \u0027restore_file\u0027: restore_file,"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_99a99726","line":55,"updated":"2014-07-06 12:32:25.000000000","message":"isn\u0027t the \u0027cat\u0027 in the line above going to be a problem?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0f03109c08a9b915eff707d86b64c9944c0edb01","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            with open(restore_file, \u0027w+\u0027) as rst_file:"},{"line_number":53,"context_line":"                rst_file.write(chunk)"},{"line_number":54,"context_line":"            content_length +\u003d len(chunk)"},{"line_number":55,"context_line":"        decr_cmd \u003d (\u0027%(decrypt_cmd)s cat %(restore_file)s \u0027"},{"line_number":56,"context_line":"                    \u0027| cat \u003e %(filename)s\u0027"},{"line_number":57,"context_line":"                    % {\u0027decrypt_cmd\u0027: self.decrypt_cmd,"},{"line_number":58,"context_line":"                       \u0027restore_file\u0027: restore_file,"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_f6a1ae46","line":55,"in_reply_to":"baada198_99a99726","updated":"2014-07-07 10:44:35.000000000","message":"Previous \u0027cat\u0027 will save backup stream into file (encoded or not). This \u0027cat\u0027 will help to decrypt file. And decrypt cmd already comes with pipeline. So, no, it wouldn\u0027t be a problem","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                rst_file.write(chunk)"},{"line_number":54,"context_line":"            content_length +\u003d len(chunk)"},{"line_number":55,"context_line":"        decr_cmd \u003d (\u0027%(decrypt_cmd)s cat %(restore_file)s \u0027"},{"line_number":56,"context_line":"                    \u0027| cat \u003e %(filename)s\u0027"},{"line_number":57,"context_line":"                    % {\u0027decrypt_cmd\u0027: self.decrypt_cmd,"},{"line_number":58,"context_line":"                       \u0027restore_file\u0027: restore_file,"},{"line_number":59,"context_line":"                       \u0027filename\u0027: filename})"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_f969b3f9","line":56,"updated":"2014-07-06 12:32:25.000000000","message":"if what you are doing is redirecting stdin to a file, why have a cat in the pipeline?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        LOG.info(_(\"Restored %s bytes from stream.\") % content_length)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def post_restore(self):"},{"line_number":67,"context_line":"        clean_and_move \u003d ("},{"line_number":68,"context_line":"            \u0027data_dir\u003d\"/tmp/var/lib/cassandra/data\" \u0026\u0026 \u0027"},{"line_number":69,"context_line":"            \u0027for keyspace in `sudo ls -1 ${data_dir} | \u0027"},{"line_number":70,"context_line":"            \u0027grep -xv \"\"`; do for directories in `sudo ls -1 \u0027"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_590fff36","line":67,"updated":"2014-07-06 12:32:25.000000000","message":"1. you need to also clean out commitlog directory.\n\n2. To that point, what\u0027s the use in creating a backup with a bunch of stuff that gets deleted in the restore process? Aren\u0027t you effectively saving a bunch of useless stuff?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0f03109c08a9b915eff707d86b64c9944c0edb01","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        LOG.info(_(\"Restored %s bytes from stream.\") % content_length)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def post_restore(self):"},{"line_number":67,"context_line":"        clean_and_move \u003d ("},{"line_number":68,"context_line":"            \u0027data_dir\u003d\"/tmp/var/lib/cassandra/data\" \u0026\u0026 \u0027"},{"line_number":69,"context_line":"            \u0027for keyspace in `sudo ls -1 ${data_dir} | \u0027"},{"line_number":70,"context_line":"            \u0027grep -xv \"\"`; do for directories in `sudo ls -1 \u0027"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_d11f5459","line":67,"in_reply_to":"baada198_590fff36","updated":"2014-07-07 10:44:35.000000000","message":"No, i don\u0027t have to cleanup commitlog, since it\u0027s almost empty, becuase you\u0027re doing restore on fresh new instance.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        clean_and_move \u003d ("},{"line_number":68,"context_line":"            \u0027data_dir\u003d\"/tmp/var/lib/cassandra/data\" \u0026\u0026 \u0027"},{"line_number":69,"context_line":"            \u0027for keyspace in `sudo ls -1 ${data_dir} | \u0027"},{"line_number":70,"context_line":"            \u0027grep -xv \"\"`; do for directories in `sudo ls -1 \u0027"},{"line_number":71,"context_line":"            \u0027${data_dir}/${keyspace} | grep -xv \"\"`; do i\u003d`sudo find \u0027"},{"line_number":72,"context_line":"            \u0027${data_dir}/${keyspace}/${directories}  \u0027"},{"line_number":73,"context_line":"            \u0027-name *.db`; sudo mv -f $i \u0027"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_f950d333","line":70,"updated":"2014-07-06 12:32:25.000000000","message":"to Auston\u0027s point, I\u0027m not sure how ls -1 could ever return a blank line. The grep -xv \"\" should, I think be redundant. But I may be wrong so the explanation of this behemoth would be good.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"806c0d7d147ab1e61fb24ee5b35079d542fdf1dc","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            \u0027${data_dir}/${keyspace}/${directories}  \u0027"},{"line_number":73,"context_line":"            \u0027-name *.db`; sudo mv -f $i \u0027"},{"line_number":74,"context_line":"            \u0027${data_dir}/${keyspace}/${directories}/ \u0027"},{"line_number":75,"context_line":"            \u00272\u003e\u003e/dev/null; done ; done;\u0027)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        LOG.info(_(\u0027Running restore\u0027))"},{"line_number":78,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_36125809","line":75,"updated":"2014-07-06 04:08:51.000000000","message":"this gigantic command needs a comment describing what\u0027s going on (step-by-step)","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"806c0d7d147ab1e61fb24ee5b35079d542fdf1dc","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        LOG.info(_(\u0027Running restore\u0027))"},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            # Unziping pulled tarball"},{"line_number":80,"context_line":"            unziping \u003d \u0027sudo tar xfj /tmp/backup.tar.bz2 -C /tmp 2\u003e/dev/null\u0027"},{"line_number":81,"context_line":"            out, err \u003d utils.execute_with_timeout(unziping, shell\u003dTrue)"},{"line_number":82,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_960244b2","line":79,"updated":"2014-07-06 04:08:51.000000000","message":"spelling error: should be \"Unzipping\" not \"Unziping\"","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        LOG.info(_(\u0027Running restore\u0027))"},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            # Unziping pulled tarball"},{"line_number":80,"context_line":"            unziping \u003d \u0027sudo tar xfj /tmp/backup.tar.bz2 -C /tmp 2\u003e/dev/null\u0027"},{"line_number":81,"context_line":"            out, err \u003d utils.execute_with_timeout(unziping, shell\u003dTrue)"},{"line_number":82,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_1944a772","line":79,"in_reply_to":"baada198_960244b2","updated":"2014-07-06 12:32:25.000000000","message":"Or Unbziping ;)","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        LOG.info(_(\u0027Running restore\u0027))"},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            # Unziping pulled tarball"},{"line_number":80,"context_line":"            unziping \u003d \u0027sudo tar xfj /tmp/backup.tar.bz2 -C /tmp 2\u003e/dev/null\u0027"},{"line_number":81,"context_line":"            out, err \u003d utils.execute_with_timeout(unziping, shell\u003dTrue)"},{"line_number":82,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":83,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: unziping})"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_3947ab78","line":80,"updated":"2014-07-06 12:32:25.000000000","message":"1. same typo re unzipping\n2. why sudo?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"806c0d7d147ab1e61fb24ee5b35079d542fdf1dc","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: unziping})"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            # Removing unneeded tarball"},{"line_number":86,"context_line":"            cleaning \u003d \u0027sudo rm -fr /tmp/backup.tar.bz2\u0027"},{"line_number":87,"context_line":"            out, err \u003d utils.execute_with_timeout(cleaning, shell\u003dTrue)"},{"line_number":88,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":89,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: cleaning})"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_76f770d3","line":86,"updated":"2014-07-06 04:08:51.000000000","message":"no need for -fr, should just be -f (it\u0027s a single file)","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"de149277666ca625a6ce6fffc20968e38d10a36b","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"            # Extracting sst tables and removing empty snapshot directories"},{"line_number":98,"context_line":"            removing_snapshots_dirs \u003d ("},{"line_number":99,"context_line":"                \u0027sudo rm -rf $(sudo find /tmp/var -type d -name snapshots)\u0027)"},{"line_number":100,"context_line":"            out, err \u003d utils.execute_with_timeout("},{"line_number":101,"context_line":"                removing_snapshots_dirs, shell\u003dTrue)"},{"line_number":102,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_1912e761","line":99,"updated":"2014-07-06 12:32:25.000000000","message":"please qualify this path more ... /tmp/var/lib/cassandra","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"741be91419953d4be5a3f2a7f996ead30e22670a","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"            # Extracting sst tables and removing empty snapshot directories"},{"line_number":98,"context_line":"            removing_snapshots_dirs \u003d ("},{"line_number":99,"context_line":"                \u0027sudo rm -rf $(sudo find /tmp/var -type d -name snapshots)\u0027)"},{"line_number":100,"context_line":"            out, err \u003d utils.execute_with_timeout("},{"line_number":101,"context_line":"                removing_snapshots_dirs, shell\u003dTrue)"},{"line_number":102,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_73c03b50","line":99,"in_reply_to":"baada198_1912e761","updated":"2014-07-07 18:32:26.000000000","message":"agreed amrith, but then wouldn\u0027t you agree that the \"sudo rm -fr /tmp/var\" should be more qualified as well?","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"741be91419953d4be5a3f2a7f996ead30e22670a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: cp})"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            # Removing up temp storage"},{"line_number":113,"context_line":"            final_cleanup \u003d \u0027sudo rm -fr /tmp/var\u0027"},{"line_number":114,"context_line":"            out, err \u003d utils.execute_with_timeout(final_cleanup, shell\u003dTrue)"},{"line_number":115,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":116,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: final_cleanup})"}],"source_content_type":"text/x-python","patch_set":23,"id":"baada198_13753f31","line":113,"updated":"2014-07-07 18:32:26.000000000","message":"please qualify this path more.","commit_id":"dc3b13f60b2312c8a84497d9bbdc07b6982e5a10"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            content_length +\u003d len(chunk)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        # backup can come as plain text, guest"},{"line_number":57,"context_line":"        # should verify if encryption/decription was enabled"},{"line_number":58,"context_line":"        if self.is_encrypted:"},{"line_number":59,"context_line":"            decr_cmd \u003d (\u0027%(decrypt_cmd)s \u0027"},{"line_number":60,"context_line":"                        \u0027-in %(restore_file)s -out %(filename)s\u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_84babcbe","line":57,"updated":"2014-07-08 20:04:43.000000000","message":"decriptoin should be decryption (spelling error)","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                           \u0027restore_file\u0027: restore_file,"},{"line_number":63,"context_line":"                           \u0027filename\u0027: self.filename})"},{"line_number":64,"context_line":"            # Decrypts incoming backup"},{"line_number":65,"context_line":"            utils.execute_with_timeout(decr_cmd, shell\u003dTrue, timeout\u003d100)"},{"line_number":66,"context_line":"            utils.execute_with_timeout(\u0027rm -fr %s\u0027 % restore_file, shell\u003dTrue)"},{"line_number":67,"context_line":"        LOG.info(_(\"Restored %s bytes from stream.\") % content_length)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_745e3314","line":65,"updated":"2014-07-08 21:39:21.000000000","message":"sounds like a very short timeout (100s).\n\nAlso, you are decrypting a file, reading storage and writing storage. Can this decrypt command not stream its output so you can directly pipe it into the tar command later?","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        #"},{"line_number":83,"context_line":"        # to ${data_dir}/${keyspace}/${directories}/"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        clean_and_move \u003d ("},{"line_number":86,"context_line":"            \u0027data_dir\u003d\"/tmp/var/lib/cassandra/data\" \u0026\u0026 \u0027"},{"line_number":87,"context_line":"            \u0027for keyspace in `sudo ls -1 ${data_dir}`; \u0027"},{"line_number":88,"context_line":"            \u0027do for directories in `sudo ls -1 ${data_dir}/${keyspace}`; \u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_94874712","line":85,"updated":"2014-07-08 21:39:21.000000000","message":"since cleaning is done as an independent step, this is just \u0027moving\u0027","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            \u0027for keyspace in `sudo ls -1 ${data_dir}`; \u0027"},{"line_number":88,"context_line":"            \u0027do for directories in `sudo ls -1 ${data_dir}/${keyspace}`; \u0027"},{"line_number":89,"context_line":"            \u0027do i\u003d`sudo find ${data_dir}/${keyspace}/${directories}\u0027"},{"line_number":90,"context_line":"            \u0027 -name *.db`; \u0027"},{"line_number":91,"context_line":"            \u0027sudo mv -f $i ${data_dir}/${keyspace}/${directories}/ \u0027"},{"line_number":92,"context_line":"            \u00272\u003e/dev/null; \u0027"},{"line_number":93,"context_line":"            \u0027done ; \u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_74ed53ef","line":90,"updated":"2014-07-08 21:39:21.000000000","message":"I have no idea what your present working directory will be when you execute this command but having an unquoted \u0027*.db\u0027 in your command is a recipe for disaster.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            \u0027do for directories in `sudo ls -1 ${data_dir}/${keyspace}`; \u0027"},{"line_number":89,"context_line":"            \u0027do i\u003d`sudo find ${data_dir}/${keyspace}/${directories}\u0027"},{"line_number":90,"context_line":"            \u0027 -name *.db`; \u0027"},{"line_number":91,"context_line":"            \u0027sudo mv -f $i ${data_dir}/${keyspace}/${directories}/ \u0027"},{"line_number":92,"context_line":"            \u00272\u003e/dev/null; \u0027"},{"line_number":93,"context_line":"            \u0027done ; \u0027"},{"line_number":94,"context_line":"            \u0027done;\u0027)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_54c76f64","line":91,"updated":"2014-07-08 21:39:21.000000000","message":"I have no idea what nodetools naming convention is, and whether these file names can have spaces in them or not.\n\nI suggest \"${i}\" and \"${data_dir}/${keyspace}/${directories}\"\n\nPlease treat this as a general comment to quote your path names.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        LOG.info(_(\u0027Running restore\u0027))"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            # Unzippng pulled tarball"},{"line_number":99,"context_line":"            # ignoring output"},{"line_number":100,"context_line":"            # tar: Removing leading `/\u0027 from member names"},{"line_number":101,"context_line":"            unzipping \u003d \u0027sudo tar xfj %s -C /tmp 2\u003e/dev/null\u0027 % self.filename"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_64876813","line":98,"updated":"2014-07-08 20:04:43.000000000","message":"should be Unzipping, not Unzippng","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            # Unzippng pulled tarball"},{"line_number":99,"context_line":"            # ignoring output"},{"line_number":100,"context_line":"            # tar: Removing leading `/\u0027 from member names"},{"line_number":101,"context_line":"            unzipping \u003d \u0027sudo tar xfj %s -C /tmp 2\u003e/dev/null\u0027 % self.filename"},{"line_number":102,"context_line":"            out, err \u003d utils.execute_with_timeout(unzipping, shell\u003dTrue)"},{"line_number":103,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":104,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: unzipping})"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_54da0f18","line":101,"updated":"2014-07-08 21:39:21.000000000","message":"what about permissions? You preserved them in the tar that created this file.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":115,"context_line":"                      % {\u0027cmd\u0027: clean_and_move, \u0027out\u0027: out, \u0027err\u0027: err})"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"            # Finding and deleting snapshots directories to be able"},{"line_number":118,"context_line":"            # to copy baked /tmp/var directory to /var"},{"line_number":119,"context_line":"            removing_snapshots_dirs \u003d ("},{"line_number":120,"context_line":"                \u0027sudo rm -rf $(sudo find /tmp/var -type d -name snapshots)\u0027)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_c4867413","line":117,"updated":"2014-07-08 20:04:43.000000000","message":"should be \"snapshot directories\" not \"snapshots directories\" (grammar)","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            # Finding and deleting snapshots directories to be able"},{"line_number":118,"context_line":"            # to copy baked /tmp/var directory to /var"},{"line_number":119,"context_line":"            removing_snapshots_dirs \u003d ("},{"line_number":120,"context_line":"                \u0027sudo rm -rf $(sudo find /tmp/var -type d -name snapshots)\u0027)"},{"line_number":121,"context_line":"            out, err \u003d utils.execute_with_timeout("},{"line_number":122,"context_line":"                removing_snapshots_dirs, shell\u003dTrue)"},{"line_number":123,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_64b5a8cf","line":120,"updated":"2014-07-08 20:04:43.000000000","message":"as stated by amrith and myself in the prior patch-set: qualify this path more (/tmp/var/lib/cassandra)","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                         \u0027cmd\u0027: removing_snapshots_dirs})"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"            # Moving data to destination directory from /tmp/var tp /var/"},{"line_number":128,"context_line":"            cp \u003d \u0027sudo cp -R /tmp/var/lib/cassandra/data/ %s\u0027 % datadir"},{"line_number":129,"context_line":"            out, err \u003d utils.execute_with_timeout(cp, shell\u003dTrue)"},{"line_number":130,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":131,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: cp})"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_74d713ee","line":128,"updated":"2014-07-08 21:39:21.000000000","message":"You took great care to preserve permissions in the backup, shouldn\u0027t they be managed here? cp -p maybe?","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: cp})"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            # Removing temporary backup storage"},{"line_number":134,"context_line":"            final_cleanup \u003d \u0027sudo rm -fr /tmp/var\u0027"},{"line_number":135,"context_line":"            out, err \u003d utils.execute_with_timeout(final_cleanup, shell\u003dTrue)"},{"line_number":136,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":137,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: final_cleanup})"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_84939c4e","line":134,"updated":"2014-07-08 20:04:43.000000000","message":"please qualify this path more.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"486162992b53093c0797e593be441a7021051021","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: cp})"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            # Removing temporary backup storage"},{"line_number":134,"context_line":"            final_cleanup \u003d \u0027sudo rm -fr /tmp/var\u0027"},{"line_number":135,"context_line":"            out, err \u003d utils.execute_with_timeout(final_cleanup, shell\u003dTrue)"},{"line_number":136,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":137,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: final_cleanup})"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_3f72d949","line":134,"in_reply_to":"baada198_84939c4e","updated":"2014-07-08 21:45:42.000000000","message":"As for me, at this step is totaly fine to use /tmp/var since i had to drop var/ completely, not just only certain files.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            LOG.error(e)"},{"line_number":142,"context_line":"            raise"},{"line_number":143,"context_line":"        LOG.info(_(\"Starting db after restore\"))"},{"line_number":144,"context_line":"        self.app.restart()"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_f487a3d5","line":144,"updated":"2014-07-08 21:39:21.000000000","message":"shouldn\u0027t this be self.app.start_db()? restart will first attempt to stop the database.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    \"\"\"Implementation of Restore Strategy for NodetoolSnapshot.\"\"\""},{"line_number":30,"context_line":"    __strategy_name__ \u003d \u0027nodetoolsnapshot\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    base_restore_cmd \u003d (\u0027cat \u003e backup.tar.gz\u0027 + \u0027.enc\u0027"},{"line_number":33,"context_line":"                        if base.RestoreRunner.is_encrypted else \u0027\u0027)"},{"line_number":34,"context_line":"    filename \u003d \"/tmp/backup.tar.gz\""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_11038c42","line":32,"updated":"2014-07-21 19:40:11.000000000","message":"why concatenate two literal strings; why not just have the whole thing?","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7c6c8f5b1ffd0e5a93fd521e3212ddfd930f5f65","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    \"\"\"Implementation of Restore Strategy for NodetoolSnapshot.\"\"\""},{"line_number":30,"context_line":"    __strategy_name__ \u003d \u0027nodetoolsnapshot\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    base_restore_cmd \u003d (\u0027cat \u003e backup.tar.gz\u0027 + \u0027.enc\u0027"},{"line_number":33,"context_line":"                        if base.RestoreRunner.is_encrypted else \u0027\u0027)"},{"line_number":34,"context_line":"    filename \u003d \"/tmp/backup.tar.gz\""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7dd8161e","line":32,"in_reply_to":"baada198_11038c42","updated":"2014-07-21 20:27:20.000000000","message":"Because it\u0027s conditinal string concatanation.","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        super(NodetoolSnapshot, self).__init__(*args, **kwargs)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def pre_restore(self):"},{"line_number":42,"context_line":"        LOG.info(_(\"Stopping db for restore\"))"},{"line_number":43,"context_line":"        self.app.stop_db()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _unpack(self, location, checksum, command):"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_3185f0ac","line":42,"updated":"2014-07-21 19:40:11.000000000","message":"punctuate","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _unpack(self, location, checksum, command):"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        restore_file \u003d (\u0027%s\u0027 % self.filename +"},{"line_number":48,"context_line":"                        \u0027.enc\u0027 if self.is_encrypted else \u0027\u0027)"},{"line_number":49,"context_line":"        stream \u003d self.storage.load(location, checksum)"},{"line_number":50,"context_line":"        content_length \u003d 0"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_51a7c44f","line":47,"updated":"2014-07-21 19:40:11.000000000","message":"isn\u0027t this just self.filename + \u0027.enc\u0027 if self.is_encrypted else \u0027\u0027\n\nWhy the rendering?","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            # tar: Removing leading `/\u0027 from member names"},{"line_number":102,"context_line":"            unzipping \u003d \u0027sudo tar xfzp %s -C /tmp 2\u003e/dev/null\u0027 % self.filename"},{"line_number":103,"context_line":"            out, err \u003d utils.execute_with_timeout(unzipping, shell\u003dTrue)"},{"line_number":104,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":105,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: unzipping})"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"            # Removing tarball"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_7f73ae4d","line":104,"updated":"2014-07-21 19:40:11.000000000","message":"if you are piping output to /dev/null, why log it in this debug message? optionally, if you want to log it, don\u0027t pipe it to /dev/null","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            # Removing tarball"},{"line_number":108,"context_line":"            cleaning \u003d \u0027sudo rm -f %s\u0027 % self.filename"},{"line_number":109,"context_line":"            out, err \u003d utils.execute_with_timeout(cleaning, shell\u003dTrue)"},{"line_number":110,"context_line":"            LOG.debug(\"CMD: %(cmd)s Out: %(out)s Error: %(err)s\""},{"line_number":111,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: cleaning})"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"            # Per discussion with cassandra devs:"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_5fc6ea49","line":110,"updated":"2014-07-21 19:40:11.000000000","message":"This whole block of code would be much more readable if you made a list of commands and then iterated through that list, just as you have done in other places in this code.","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"767d29b5b70ada11c9ab08f7e552aa73088fc628","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                      % {\u0027out\u0027: out, \u0027err\u0027: err, \u0027cmd\u0027: final_cleanup})"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        except exception.ProcessExecutionError as e:"},{"line_number":153,"context_line":"            LOG.error(_(\"Error while post-restoring\"))"},{"line_number":154,"context_line":"            LOG.error(e)"},{"line_number":155,"context_line":"            raise"},{"line_number":156,"context_line":"        LOG.info(_(\"Starting db after restore\"))"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_ffe41ee1","line":153,"updated":"2014-07-21 19:40:11.000000000","message":"Just use LOG.exception()","commit_id":"623a0682d937743bb1b601c288c3379387e38563"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"75dc565a01e7d6124391fa1a733f4a78f8626209","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        # Unzipping pulled tarball"},{"line_number":40,"context_line":"        # ignoring output"},{"line_number":41,"context_line":"        # tar: Removing leading `/\u0027 from member names"},{"line_number":42,"context_line":"        \u0027sudo tar xfzp %(filename)s -C /tmp 2\u003e/dev/null\u0027,"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # Removing tarball"},{"line_number":45,"context_line":"        \u0027sudo rm -f %(filename)s\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_02e640b0","line":42,"updated":"2014-07-31 15:00:17.000000000","message":"this sends stderr to /dev/null but not stdout.","commit_id":"3b5650d6eb9bdfc7e1bc3f0123e8174c297e605a"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"09e1f77886710d658c36ecbcf658d59949501b29","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    base_restore_cmd \u003d (\u0027cat \u003e backup.tar.gz\u0027 + \u0027.enc\u0027"},{"line_number":33,"context_line":"                        if base.RestoreRunner.is_encrypted else \u0027\u0027)"},{"line_number":34,"context_line":"    filename \u003d \"/tmp/backup.tar.gz\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    app \u003d service.CassandraApp(service.CassandraAppStatus())"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_c832875e","line":34,"updated":"2015-02-04 02:26:25.000000000","message":"Wouldn\u0027t it be better to use a random tempfile (name) here rather than hardcoded \u0027backup\u0027? May help to avoid collisions any time in the future and the variable could also be reused in the above line.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    base_restore_cmd \u003d (\u0027cat \u003e backup.tar.gz\u0027 + \u0027.enc\u0027"},{"line_number":33,"context_line":"                        if base.RestoreRunner.is_encrypted else \u0027\u0027)"},{"line_number":34,"context_line":"    filename \u003d \"/tmp/backup.tar.gz\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    app \u003d service.CassandraApp(service.CassandraAppStatus())"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_5d24400c","line":34,"in_reply_to":"da86d52c_847ea517","updated":"2015-02-05 22:20:23.000000000","message":"Speaking of portability is \u0027/tmp\u0027 always going to be available? Shouldn\u0027t we be using a Python call to get the location of \u0027temp\u0027 instead?\n\ntempfile.gettempdir()","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f0a6f2a04a4382ef7cb9e59270b4767b143f0699","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    base_restore_cmd \u003d (\u0027cat \u003e backup.tar.gz\u0027 + \u0027.enc\u0027"},{"line_number":33,"context_line":"                        if base.RestoreRunner.is_encrypted else \u0027\u0027)"},{"line_number":34,"context_line":"    filename \u003d \"/tmp/backup.tar.gz\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    app \u003d service.CassandraApp(service.CassandraAppStatus())"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_847ea517","line":34,"in_reply_to":"da86d52c_c832875e","updated":"2015-02-04 14:11:06.000000000","message":"I don\u0027t think so, it would require additional commands rendering depending on actual file location, so it is easier to use hardcode here.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    app \u003d service.CassandraApp(service.CassandraAppStatus())"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    post_restore_cmd_list \u003d ["},{"line_number":39,"context_line":"        # Unzipping pulled tarball"},{"line_number":40,"context_line":"        # ignoring output"},{"line_number":41,"context_line":"        # tar: Removing leading `/\u0027 from member names"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_5dc8c054","line":38,"updated":"2015-02-05 22:20:23.000000000","message":"OK, essentially all these commands are non-portable. Is it going to work on Unix, Solaris, Windows? Is it going to work in csh, dash, bash?\nWe should be really using Python calls instead.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        # Unzipping pulled tarball"},{"line_number":40,"context_line":"        # ignoring output"},{"line_number":41,"context_line":"        # tar: Removing leading `/\u0027 from member names"},{"line_number":42,"context_line":"        \u0027sudo tar xfzp %(filename)s -C /tmp 2\u003e\u00261\u003e/dev/null\u0027,"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # Removing tarball"},{"line_number":45,"context_line":"        \u0027sudo rm -f %(filename)s\u0027,"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_a78a8b61","line":42,"updated":"2015-02-05 22:20:23.000000000","message":"Why are we hiding all errors when the only thing checked is the status code? The output (unless overly large) may be useful in debugging.\n\nnote) In order to be compatible with the Ubuntu\u0027s default shell (dash) \u00272\u003e\u00261\u003e/dev/null\u0027 needs to be tokenized like \u00272\u003e\u00261 \u003e/dev/null\u0027","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"09e1f77886710d658c36ecbcf658d59949501b29","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        # Per discussion with cassandra devs:"},{"line_number":48,"context_line":"        # we might skip system keyspace on restore"},{"line_number":49,"context_line":"        \u0027rm -fr /tmp/var/lib/cassandra/data/system\u0027,"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # Backup file structure:"},{"line_number":52,"context_line":"        # /var/lib/cassandra/data/{{keyspace}}/{{directory}}/snapshots/"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_c889a776","line":49,"range":{"start_line":49,"start_character":16,"end_line":49,"end_character":43},"updated":"2015-02-04 02:26:25.000000000","message":"\u0027/tmp/var/lib/cassandra/data\u0027 is being used at almost every line. Replacing it with a string constant would make the code more maintainable.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"e65eac4a3ed7e2c6f4d0177f92c9c211ef30755f","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        # Per discussion with cassandra devs:"},{"line_number":48,"context_line":"        # we might skip system keyspace on restore"},{"line_number":49,"context_line":"        \u0027rm -fr /tmp/var/lib/cassandra/data/system\u0027,"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # Backup file structure:"},{"line_number":52,"context_line":"        # /var/lib/cassandra/data/{{keyspace}}/{{directory}}/snapshots/"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_c3af6e7b","line":49,"range":{"start_line":49,"start_character":16,"end_line":49,"end_character":43},"in_reply_to":"da86d52c_c889a776","updated":"2015-02-05 23:15:27.000000000","message":"This needs to run as \u0027sudo\u0027 otherwise \"Permission denied\". Alternatively, the question is, whether we actually need to do this temp shuffling as root at all...","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"269edb1e9e9a3da118ae896250f63bcb1c86c82b","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        \u0027data_dir\u003d\"/tmp/var/lib/cassandra/data\" \u0026\u0026 \u0027"},{"line_number":63,"context_line":"        \u0027for keyspace in `sudo ls -1 ${data_dir}`; \u0027"},{"line_number":64,"context_line":"        \u0027do for directories in `sudo ls -1 ${data_dir}/${keyspace}`; \u0027"},{"line_number":65,"context_line":"        \u0027do i\u003d`sudo find ${data_dir}/${keyspace}/${directories}\u0027"},{"line_number":66,"context_line":"        \u0027 -name *.db`; \u0027"},{"line_number":67,"context_line":"        \u0027sudo mv -f $i ${data_dir}/${keyspace}/${directories}/ \u0027"},{"line_number":68,"context_line":"        \u00272\u003e/dev/null; \u0027"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_19a47cb8","line":65,"updated":"2015-02-06 16:19:59.000000000","message":"This is not going to work with empty directories (i.e. $i\u003d\u0027\u0027). I really think we should be using Python calls instead.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \u0027do i\u003d`sudo find ${data_dir}/${keyspace}/${directories}\u0027"},{"line_number":66,"context_line":"        \u0027 -name *.db`; \u0027"},{"line_number":67,"context_line":"        \u0027sudo mv -f $i ${data_dir}/${keyspace}/${directories}/ \u0027"},{"line_number":68,"context_line":"        \u00272\u003e/dev/null; \u0027"},{"line_number":69,"context_line":"        \u0027done ; \u0027"},{"line_number":70,"context_line":"        \u0027done;\u0027,"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_bd8b7c1d","line":68,"updated":"2015-02-05 22:20:23.000000000","message":"Do not hide output and errors. It may be useful.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"09e1f77886710d658c36ecbcf658d59949501b29","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        \u0027sudo rm -rf $(sudo find /tmp/var/lib/cassandra/data/\u0027"},{"line_number":75,"context_line":"        \u0027 -type d -name snapshots)\u0027,"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # Copying data to destination directory from /tmp/var tp /var"},{"line_number":78,"context_line":"        \u0027sudo cp -p -R /tmp/var/lib/cassandra/data/ %(datadir)s\u0027,"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Removing temporary backup storage"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_932fe487","line":77,"range":{"start_line":77,"start_character":61,"end_line":77,"end_character":64},"updated":"2015-02-04 02:26:25.000000000","message":"\u0027tp\u0027 -\u003e \u0027to\u0027","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"09e1f77886710d658c36ecbcf658d59949501b29","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        \u0027 -type d -name snapshots)\u0027,"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # Copying data to destination directory from /tmp/var tp /var"},{"line_number":78,"context_line":"        \u0027sudo cp -p -R /tmp/var/lib/cassandra/data/ %(datadir)s\u0027,"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Removing temporary backup storage"},{"line_number":81,"context_line":"        \u0027sudo rm -fr /tmp/var\u0027,"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_336ab8b3","line":78,"updated":"2015-02-04 02:26:25.000000000","message":"Couldn\u0027t we, in this case, just move the directory? Should be faster, especially since we delete it immediately afterwards.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"f0a6f2a04a4382ef7cb9e59270b4767b143f0699","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        \u0027 -type d -name snapshots)\u0027,"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # Copying data to destination directory from /tmp/var tp /var"},{"line_number":78,"context_line":"        \u0027sudo cp -p -R /tmp/var/lib/cassandra/data/ %(datadir)s\u0027,"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Removing temporary backup storage"},{"line_number":81,"context_line":"        \u0027sudo rm -fr /tmp/var\u0027,"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_64b451d1","line":78,"in_reply_to":"da86d52c_336ab8b3","updated":"2015-02-04 14:11:06.000000000","message":"Movement would change permissions of backup data, but copying would save them (flag -p)","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"d3d444bf31509a35a2cbea99dccec19fc8b1516e","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        \u0027 -type d -name snapshots)\u0027,"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # Copying data to destination directory from /tmp/var tp /var"},{"line_number":78,"context_line":"        \u0027sudo cp -p -R /tmp/var/lib/cassandra/data/ %(datadir)s\u0027,"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Removing temporary backup storage"},{"line_number":81,"context_line":"        \u0027sudo rm -fr /tmp/var\u0027,"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_48c0d2e0","line":78,"in_reply_to":"da86d52c_336ab8b3","updated":"2015-02-06 22:09:14.000000000","message":"This does not work in my testing environment. The permissions change somewhere along the way.\nCassandra needs \u0027rwx\u0027 permissions to its data directory. I had to insert the following two lines to make it work.\n\n# FIXME(pmalik) Use portable user name.\n# Make the data directory accessible to Cassandra.\n\u0027sudo chown -R cassandra %(datadir)s\u0027,\n\u0027sudo chmod -R u\u003drwx,g\u003d,o\u003d %(datadir)s\u0027,\n\nThe proper way, however, would be to use platform independent Python calls everywhere from extraction through directory traversal to cleanup.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"f605e40e54f1576046c47335a5386d80a13c381d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        \u0027 -type d -name snapshots)\u0027,"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # Copying data to destination directory from /tmp/var tp /var"},{"line_number":78,"context_line":"        \u0027sudo cp -p -R /tmp/var/lib/cassandra/data/ %(datadir)s\u0027,"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Removing temporary backup storage"},{"line_number":81,"context_line":"        \u0027sudo rm -fr /tmp/var\u0027,"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_5ee550da","line":78,"in_reply_to":"da86d52c_64b451d1","updated":"2015-02-04 18:20:55.000000000","message":"Wait, I believe that \u0027mv\u0027 always tries to preserve metadata.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"6f3bdf03733f679e4869dcf221720a49c6ce4d84","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                           \u0027filename\u0027: self.filename})"},{"line_number":106,"context_line":"            # Decrypts incoming backup"},{"line_number":107,"context_line":"            utils.execute_with_timeout("},{"line_number":108,"context_line":"                decr_cmd, shell\u003dTrue, timeout\u003d10000)"},{"line_number":109,"context_line":"            utils.execute_with_timeout(\u0027rm -fr %s\u0027 % restore_file, shell\u003dTrue)"},{"line_number":110,"context_line":"        LOG.info(_(\"Restored %s bytes from stream.\") % content_length)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_dd9bd015","line":108,"updated":"2015-02-05 22:20:23.000000000","message":"Why a magic number \u002710000\u0027? I can imagine this particular (and critical) call could realistically take hours/days to complete. Should be executing without any timeout.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"09e1f77886710d658c36ecbcf658d59949501b29","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            for cmd in self.post_restore_cmd_list:"},{"line_number":120,"context_line":"                utils.execute_with_timeout(cmd % args, shell\u003dTrue)"},{"line_number":121,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":122,"context_line":"            LOG.error(_(\"Error while post-restoring\"))"},{"line_number":123,"context_line":"            LOG.exception()"},{"line_number":124,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_681efbbc","line":122,"range":{"start_line":122,"start_character":12,"end_line":122,"end_character":40},"updated":"2015-02-04 02:26:25.000000000","message":"I would personally prefer something like \u0027Failed/Error while executing post-restore commands.\u0027","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"1653bd14e7835409f7092a40c233dfbdf46f93da","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                utils.execute_with_timeout(cmd % args, shell\u003dTrue)"},{"line_number":121,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":122,"context_line":"            LOG.error(_(\"Error while post-restoring\"))"},{"line_number":123,"context_line":"            LOG.exception()"},{"line_number":124,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":43,"id":"da86d52c_b1456d44","line":123,"updated":"2015-02-05 19:31:15.000000000","message":"\u0027LOG.exception()\u0027 requires a parameter - message.","commit_id":"c5186025c96fe0b28b8bf78a7054bc0711ebf684"}],"trove/guestagent/strategies/restore/mysql_impl.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"1119ee66a95d72242a6e936568558cc4a7d39e0a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from trove.common import exception"},{"line_number":25,"context_line":"from trove.common import utils"},{"line_number":26,"context_line":"import trove.guestagent.datastore.mysql.service as mysql_service"},{"line_number":27,"context_line":"import trove.guestagent.datastore.cassandra.service as cassandra_service"},{"line_number":28,"context_line":"from trove.openstack.common.gettextutils import _  # noqa"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2FTU8%3D","line":27,"updated":"2014-04-22 16:35:53.000000000","message":"Why in mysql_impl.py? By the name, one would reasonably assume that this is for mysql, not cassandra.","commit_id":"705965963fb41caa9fa3bf76c9fbaf3e0a6a2998"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"7cdc06f14cdfabd23418b9bd9c3f86b80150a18b","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                        \u0027 --defaults-file\u003d%(restore_location)s/backup-my.cnf\u0027"},{"line_number":111,"context_line":"                        \u0027 --ibbackup xtrabackup 2\u003e/tmp/innoprepare.log\u0027)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    app \u003d mysql_service.MySqlApp(mysql_service.MySqlAppStatus.get())"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":116,"context_line":"        super(InnoBackupEx, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_12f2ba05","line":113,"updated":"2014-06-12 19:58:25.000000000","message":"How is this related to Cassandra backup/restore?","commit_id":"dac5507ecee50138706d3dae057894c3bfc50dd9"}],"trove/guestagent/volume.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        if not mysql_base[-1] \u003d\u003d \u0027/\u0027:"},{"line_number":42,"context_line":"            mysql_base \u003d \"%s/\" % mysql_base"},{"line_number":43,"context_line":"        # Valid exit codes: 0, 24"},{"line_number":44,"context_line":"        # Exit code 24 appeart when files are being"},{"line_number":45,"context_line":"        # modified when rsync was executed"},{"line_number":46,"context_line":"        utils.execute(\"sudo\", \"rsync\", \"--safe-links\", \"--perms\","},{"line_number":47,"context_line":"                      \"--recursive\", \"--owner\", \"--group\", \"--xattrs\","}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_14da57e9","line":44,"updated":"2014-07-08 21:39:21.000000000","message":"please remove this comment (so I won\u0027t mention the typos in it)\n\nmigrate_data should NOT be called when the database is running. And ignoring the error isn\u0027t a valid solution. There\u0027s an independent bug for this.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"}],"trove/tests/unittests/guestagent/test_backups.py":[{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"7cdc06f14cdfabd23418b9bd9c3f86b80150a18b","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"BACKUP_NODETOOLSNAPSHOT_CLS \u003d (\"trove.guestagent.strategies.backup.\""},{"line_number":69,"context_line":"                               \"cassandra_impl.NodetoolSnapshot\")"},{"line_number":70,"context_line":"RESTORE_NODETOOLSNAPSHOT_CLS \u003d (\"trove.guestagent.strategies.restore.\""},{"line_number":71,"context_line":"                                \"cassandra_impl.NodetoolSnapshot\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"NODETOOLSNAPSHOT_CMD \u003d \"cat /tmp/all_ks.tar.bz2\""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_327ed66a","line":70,"range":{"start_line":70,"start_character":0,"end_line":70,"end_character":28},"updated":"2014-06-12 19:58:25.000000000","message":"I don\u0027t see a test for Restore - Wouldn\u0027t it make sense to add one?","commit_id":"dac5507ecee50138706d3dae057894c3bfc50dd9"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":70,"context_line":"RESTORE_NODETOOLSNAPSHOT_CLS \u003d (\"trove.guestagent.strategies.restore.\""},{"line_number":71,"context_line":"                                \"cassandra_impl.NodetoolSnapshot\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"NODETOOLSNAPSHOT_CMD \u003d \"cat /tmp/all_ks.tar.bz2\""},{"line_number":74,"context_line":"RESTORE_NODETOOLSNAPSHOT_CMD \u003d (\u0027cat \u003e backup.tar.bz2\u0027 + \u0027.enc\u0027"},{"line_number":75,"context_line":"                                if restoreBase.RestoreRunner.is_encrypted"},{"line_number":76,"context_line":"                                else None)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_44eee4b5","line":73,"updated":"2014-07-08 20:04:43.000000000","message":"should be .gz not .bz2 (due to your new code changes)","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                                \"cassandra_impl.NodetoolSnapshot\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"NODETOOLSNAPSHOT_CMD \u003d \"cat /tmp/all_ks.tar.bz2\""},{"line_number":74,"context_line":"RESTORE_NODETOOLSNAPSHOT_CMD \u003d (\u0027cat \u003e backup.tar.bz2\u0027 + \u0027.enc\u0027"},{"line_number":75,"context_line":"                                if restoreBase.RestoreRunner.is_encrypted"},{"line_number":76,"context_line":"                                else None)"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_842f1cf6","line":74,"updated":"2014-07-08 20:04:43.000000000","message":"should be .gz not .bz2 (due to your new code changes)","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"710db81e36107e17c1cd45c4985477c21b754f34","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"NODETOOLSNAPSHOT_CMD \u003d \"cat /tmp/all_ks.tar.bz2\""},{"line_number":74,"context_line":"RESTORE_NODETOOLSNAPSHOT_CMD \u003d (\u0027cat \u003e backup.tar.bz2\u0027 + \u0027.enc\u0027"},{"line_number":75,"context_line":"                                if restoreBase.RestoreRunner.is_encrypted"},{"line_number":76,"context_line":"                                else None)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_d4e7ffaa","line":75,"updated":"2014-07-08 21:39:21.000000000","message":"This is more of a reason why making these names a manifest constant is a good thing. Avoids these cut and pate issues.","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        self.assertIsNotNone(bkp)"},{"line_number":267,"context_line":"        self.assertEqual("},{"line_number":268,"context_line":"            NODETOOLSNAPSHOT_CMD + PIPE + ENCRYPT, bkp.command)"},{"line_number":269,"context_line":"        self.assertIn(\"tar.bz2.enc\", bkp.manifest)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def test_backup_not_encrypted_nodetoolsnapshot_command(self):"},{"line_number":272,"context_line":"        backupBase.BackupRunner.is_encrypted \u003d False"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_a434204b","line":269,"updated":"2014-07-08 20:04:43.000000000","message":"should be .gz not .bz2 (due to your new code changes)","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"f375b89ab1f22ea957766c0cdb3aa031bbb7201b","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        bkp \u003d RunnerClass(12345)"},{"line_number":278,"context_line":"        self.assertIsNotNone(bkp)"},{"line_number":279,"context_line":"        self.assertEqual(NODETOOLSNAPSHOT_CMD, bkp.command)"},{"line_number":280,"context_line":"        self.assertIn(\"tar.bz2\", bkp.manifest)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def test_restore_nodetoolsnapshot_encrypted_command(self):"},{"line_number":283,"context_line":"        restoreBase.RestoreRunner.is_zipped \u003d False"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_c4391443","line":280,"updated":"2014-07-08 20:04:43.000000000","message":"should be .gz not .bz2 (due to your new code changes)","commit_id":"c34c8e0da13235ef957515013a997be9a77f74c2"}],"trove/tests/unittests/guestagent/test_cassandra_manager.py":[{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"7cdc06f14cdfabd23418b9bd9c3f86b80150a18b","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        volume.VolumeDevice.migrate_data \u003d MagicMock(return_value\u003dNone)"},{"line_number":123,"context_line":"        volume.VolumeDevice.mount \u003d MagicMock(return_value\u003dNone)"},{"line_number":124,"context_line":"        volume.VolumeDevice.mount_points \u003d MagicMock(return_value\u003d[])"},{"line_number":125,"context_line":"        backup.restore \u003d MagicMock(return_value\u003dNone)"},{"line_number":126,"context_line":"        # invocation"},{"line_number":127,"context_line":"        self.manager.prepare(context\u003dself.context, packages\u003dpackages,"},{"line_number":128,"context_line":"                             config_contents\u003dconfig_content,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_f2c1cee4","line":125,"range":{"start_line":125,"start_character":25,"end_line":125,"end_character":34},"updated":"2014-06-12 19:58:25.000000000","message":"Related to my comment on a restore test. I don\u0027t think mocking the restore method constitutes a reasonable test.","commit_id":"dac5507ecee50138706d3dae057894c3bfc50dd9"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fbe6f259657fc9fb957913ff5a82f73ee40e3a5e","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        volume.VolumeDevice.migrate_data \u003d MagicMock(return_value\u003dNone)"},{"line_number":123,"context_line":"        volume.VolumeDevice.mount \u003d MagicMock(return_value\u003dNone)"},{"line_number":124,"context_line":"        volume.VolumeDevice.mount_points \u003d MagicMock(return_value\u003d[])"},{"line_number":125,"context_line":"        backup.restore \u003d MagicMock(return_value\u003dNone)"},{"line_number":126,"context_line":"        # invocation"},{"line_number":127,"context_line":"        self.manager.prepare(context\u003dself.context, packages\u003dpackages,"},{"line_number":128,"context_line":"                             config_contents\u003dconfig_content,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7d866fba","line":125,"range":{"start_line":125,"start_character":25,"end_line":125,"end_character":34},"in_reply_to":"1ae5cdf2_f2c1cee4","updated":"2014-06-12 20:23:24.000000000","message":"this mock related to prepare method.\ni do agree about adding test for restore, but as you can see, we have separate modules for backup/restoer functionality and testing \u0027prepare\u0027 method with different cases/inputs.","commit_id":"dac5507ecee50138706d3dae057894c3bfc50dd9"}],"trove/tests/unittests/guestagent/test_dbaas.py":[{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"7cdc06f14cdfabd23418b9bd9c3f86b80150a18b","unresolved":false,"context_lines":[{"line_number":1152,"context_line":""},{"line_number":1153,"context_line":"        # status object is a singleton, it should"},{"line_number":1154,"context_line":"        # not be instantiated multiple times"},{"line_number":1155,"context_line":"        self.mySqlAppStatus \u003d MySqlAppStatus.get()"},{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"    def tearDown(self):"},{"line_number":1158,"context_line":"        super(MySqlAppStatusTest, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_327096a3","line":1155,"range":{"start_line":1155,"start_character":27,"end_line":1155,"end_character":28},"updated":"2014-06-12 19:58:25.000000000","message":"How is this change related to Cassandra backup/restore?","commit_id":"dac5507ecee50138706d3dae057894c3bfc50dd9"}]}
