)]}'
{"etc/trove/trove-guestagent.conf.sample":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":56,"context_line":"ignore_dbs \u003d lost+found, mysql, information_schema"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"# Strategy information for backups"},{"line_number":59,"context_line":"backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":60,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":61,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"},{"line_number":62,"context_line":"restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAWH%2F%2F8Uw%3D","side":"PARENT","line":59,"updated":"2014-03-12 19:41:13.000000000","message":"do not delete it","commit_id":"fba8cabea326527bacdeca56760a97e14cdcc18f"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":59,"context_line":"backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":60,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":61,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"},{"line_number":62,"context_line":"restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"},{"line_number":63,"context_line":"storage_strategy \u003d SwiftStorage"},{"line_number":64,"context_line":"storage_namespace \u003d trove.guestagent.strategies.storage.swift"},{"line_number":65,"context_line":"backup_swift_container \u003d database_backups"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAWH%2F%2F8Us%3D","side":"PARENT","line":62,"updated":"2014-03-12 19:41:13.000000000","message":"do not delete it","commit_id":"fba8cabea326527bacdeca56760a97e14cdcc18f"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"backup_aes_cbc_key \u003d \"default_aes_cbc_key\""},{"line_number":67,"context_line":"backup_use_snet \u003d False"},{"line_number":68,"context_line":"backup_chunk_size \u003d 65536"},{"line_number":69,"context_line":"backup_segment_max_size \u003d 2147483648"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"baada198_0b663451","line":69,"updated":"2014-07-18 22:19:31.000000000","message":"please add per-datastore sections with required options (related to backup/restore procedure)","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"54ade20bae2530b5fb80c58ac1273d777a511d98","unresolved":false,"context_lines":[{"line_number":83,"context_line":"ignore_dbs \u003d lost+found, mysql, information_schema"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# Strategy information for backups"},{"line_number":86,"context_line":"backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":87,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":88,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"},{"line_number":89,"context_line":"restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"1ae5cdf2_fa02170a","side":"PARENT","line":86,"updated":"2014-06-09 15:48:48.000000000","message":"Can you just leave this line commented out instead of removing it entirely?  It\u0027s good to have an example (especially in the sample conf file :) ).","commit_id":"71446a6f177a89fc04b7c662cc05cbe4a77eea8b"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"766dadfcc1ca47882fd2ab991d24ed22a2c40773","unresolved":false,"context_lines":[{"line_number":83,"context_line":"ignore_dbs \u003d lost+found, mysql, information_schema"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# Strategy information for backups"},{"line_number":86,"context_line":"backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":87,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":88,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"},{"line_number":89,"context_line":"restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"1ae5cdf2_fdedac8f","side":"PARENT","line":86,"in_reply_to":"1ae5cdf2_fa02170a","updated":"2014-06-09 18:58:19.000000000","message":"ok will do","commit_id":"71446a6f177a89fc04b7c662cc05cbe4a77eea8b"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"54ade20bae2530b5fb80c58ac1273d777a511d98","unresolved":false,"context_lines":[{"line_number":86,"context_line":"backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":87,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":88,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"},{"line_number":89,"context_line":"restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"},{"line_number":90,"context_line":"storage_strategy \u003d SwiftStorage"},{"line_number":91,"context_line":"storage_namespace \u003d trove.guestagent.strategies.storage.swift"},{"line_number":92,"context_line":"backup_swift_container \u003d database_backups"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"1ae5cdf2_05ff6802","side":"PARENT","line":89,"updated":"2014-06-09 15:48:48.000000000","message":"ditto","commit_id":"71446a6f177a89fc04b7c662cc05cbe4a77eea8b"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"b84a05ec7af1d52cd0876fd0b02ef75317ab28ee","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# Strategy information for backups"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"#backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":88,"context_line":"#restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":91,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"}],"source_content_type":"application/octet-stream","patch_set":16,"id":"baada198_2bc77899","line":88,"updated":"2014-07-18 22:11:30.000000000","message":"Can you remove these?  Line 86-88.","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"323049219a200ac63705133b4bff5d066f67a4fa","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# Strategy information for backups"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"#backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":88,"context_line":"#restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":91,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"}],"source_content_type":"application/octet-stream","patch_set":16,"id":"baada198_c6519131","line":88,"in_reply_to":"baada198_2bc77899","updated":"2014-07-21 13:14:29.000000000","message":"Michael, in a previous review I was asked to retain these as an example","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"227e5441ed1a63301c87efb51ec58f24ddc6599e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# Strategy information for backups"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"#backup_namespace \u003d trove.guestagent.strategies.backup.mysql_impl"},{"line_number":88,"context_line":"#restore_namespace \u003d trove.guestagent.strategies.restore.mysql_impl"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":91,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"}],"source_content_type":"application/octet-stream","patch_set":16,"id":"baada198_22b75d86","line":88,"in_reply_to":"baada198_c6519131","updated":"2014-07-21 20:08:33.000000000","message":"Ah, ok.","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5963d014cafe7ae1d37f0e26b58534370154c22f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"ignore_dbs \u003d lost+found, mysql, information_schema"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# Strategy information for backups"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":88,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"},{"line_number":89,"context_line":"storage_strategy \u003d SwiftStorage"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"baada198_8d85ceae","line":86,"updated":"2014-07-21 14:17:10.000000000","message":"please revert it and add section related to [mongodb] option group:\n\nbackup_strategy \u003d ...\n\nbackup_namespace \u003d ...\n\nrestore_namespace \u003d ...","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"603065a273aa033af2078bcf85d0715efafc14bd","unresolved":false,"context_lines":[{"line_number":83,"context_line":"ignore_dbs \u003d lost+found, mysql, information_schema"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# Strategy information for backups"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":88,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"},{"line_number":89,"context_line":"storage_strategy \u003d SwiftStorage"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"baada198_bc5f1e0e","line":86,"in_reply_to":"baada198_8d85ceae","updated":"2014-07-21 15:42:17.000000000","message":"So I understand the whitespace revert. But recently merged Couchbase backup didn\u0027t add the items you\u0027re speaking of. I guess we\u0027re just relying on defaults.","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":83,"context_line":"ignore_dbs \u003d lost+found, mysql, information_schema"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# Strategy information for backups"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"# Additional commandline options to be passed to the backup runner (by strategy). For example:"},{"line_number":88,"context_line":"# backup_runner_options \u003d InnoBackupEx:--no-lock,  MySQLDump:--events --routines --triggers"},{"line_number":89,"context_line":"storage_strategy \u003d SwiftStorage"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"baada198_e85551c2","line":86,"in_reply_to":"baada198_bc5f1e0e","updated":"2014-07-21 17:21:23.000000000","message":"agree with Mat. change is from rebase. will remove the whitespace","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"}],"trove/common/cfg.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":290,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mysql_impl\u0027),"},{"line_number":291,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":292,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mysql_impl\u0027),"},{"line_number":293,"context_line":"]"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"# Percona"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8TU%3D","line":292,"updated":"2014-03-12 19:41:13.000000000","message":"please amend this change in favor of https://review.openstack.org/#/c/77899/","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":313,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":314,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mysql_impl\u0027),"},{"line_number":315,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":316,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mysql_impl\u0027),"},{"line_number":317,"context_line":"]"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"# Redis"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8TQ%3D","line":316,"updated":"2014-03-12 19:41:13.000000000","message":"please amend this change in favor of https://review.openstack.org/#/c/77899/","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":399,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":400,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mongo_impl\u0027),"},{"line_number":401,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":402,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mongo_impl\u0027)"},{"line_number":403,"context_line":"]"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8TM%3D","line":402,"updated":"2014-03-12 19:41:13.000000000","message":"please amend this change in favor of https://review.openstack.org/#/c/77899/","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"abf877cd258e4362b9c6080690b789965055aa70","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":285,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mysql_impl\u0027),"},{"line_number":286,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":287,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mysql_impl\u0027),"},{"line_number":288,"context_line":"]"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"# Percona"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWn%2F%2F32A%3D","line":287,"updated":"2014-04-08 20:17:29.000000000","message":"still strongly recomend to make this patch dependent on https://review.openstack.org/#/c/77899/\n\nfrom the other point, Trove doesn\u0027t need this config attribute, it pollutes confis, guest config should stay simple.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"b9116a522aa4c63f638b9842036237f8ebca5836","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":285,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mysql_impl\u0027),"},{"line_number":286,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":287,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mysql_impl\u0027),"},{"line_number":288,"context_line":"]"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"# Percona"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2Bmw%3D","line":287,"in_reply_to":"AAAAW3%2F%2F%2Bog%3D","updated":"2014-04-09 05:53:17.000000000","message":"Denis M. What you are not making clear is that your patch also forces all backup and restore implementations to be stuffed into a single module (single .py file). That is how your changes are able to get away with not defining these additional config opts.  I am not sure that is the right approach. We have to let the community (and core) decide on which approach to choose and I shall accordingly make the dependency if the direction chosen by the team demands it. \nIf the approach agreed upon is to not have all implementations in a single module, then these options then do become necessary. So without that direction being agreed upon you cannot say there is absolute dependency on your patch and/or these config options are not necessary. They are two different approaches and I will make changes as necessary to align with whatever direction is chosen/agreed upon.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"a3859b8a1bd002e709f68f761035e24b248d7eed","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":285,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mysql_impl\u0027),"},{"line_number":286,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":287,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mysql_impl\u0027),"},{"line_number":288,"context_line":"]"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"# Percona"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2Bog%3D","line":287,"in_reply_to":"AAAAW3%2F%2F%2F8A%3D","updated":"2014-04-09 05:22:39.000000000","message":"Adding another set of the config attributes is not the easiest way to do it. My patch refractors the strategies implementation to look way more clean. Also, my patch operates only with one config attribute, and it\u0027s easier not to misconfigure the guest.  This is why this patch should be dependent over on mine.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"b78594a9f77524fea0397215b0d57a04ba5bb4bc","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":285,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mysql_impl\u0027),"},{"line_number":286,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":287,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mysql_impl\u0027),"},{"line_number":288,"context_line":"]"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"# Percona"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2F8A%3D","line":287,"in_reply_to":"AAAAWn%2F%2F32A%3D","updated":"2014-04-08 22:51:10.000000000","message":"Please help me understand the dependency here.\n\nAlso this change appears to be a corollary of the change to trove-guestagent.conf.sample. Is that not the case?","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"abf877cd258e4362b9c6080690b789965055aa70","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":316,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mysql_impl\u0027),"},{"line_number":317,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":318,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mysql_impl\u0027),"},{"line_number":319,"context_line":"]"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"# Redis"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWn%2F%2F30s%3D","line":318,"updated":"2014-04-08 20:17:29.000000000","message":"still strongly recomend to make this patch dependent on https://review.openstack.org/#/c/77899/\n\nfrom the other point, Trove doesn\u0027t need this config attribute, it pollutes confis, guest config should stay simple.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"b9116a522aa4c63f638b9842036237f8ebca5836","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":316,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mysql_impl\u0027),"},{"line_number":317,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":318,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mysql_impl\u0027),"},{"line_number":319,"context_line":"]"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"# Redis"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2Bmg%3D","line":318,"in_reply_to":"AAAAWn%2F%2F30s%3D","updated":"2014-04-09 05:53:17.000000000","message":"Please see response above.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"abf877cd258e4362b9c6080690b789965055aa70","unresolved":false,"context_lines":[{"line_number":409,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":410,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mongo_impl\u0027),"},{"line_number":411,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":412,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mongo_impl\u0027)"},{"line_number":413,"context_line":"]"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWn%2F%2F30o%3D","line":412,"updated":"2014-04-08 20:17:29.000000000","message":"still strongly recomend to make this patch dependent on https://review.openstack.org/#/c/77899/\n\nfrom the other point, Trove doesn\u0027t need this config attribute, it pollutes confis, guest config should stay simple.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"b9116a522aa4c63f638b9842036237f8ebca5836","unresolved":false,"context_lines":[{"line_number":409,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":410,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mongo_impl\u0027),"},{"line_number":411,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":412,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mongo_impl\u0027)"},{"line_number":413,"context_line":"]"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2BmY%3D","line":412,"in_reply_to":"AAAAWn%2F%2F30o%3D","updated":"2014-04-09 05:53:17.000000000","message":"Please see response above","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"33c8f16b178e077110dff0d40835d6e44f6924e6","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                \"instance-create as the \u0027password\u0027 field.\"),"},{"line_number":283,"context_line":"    cfg.IntOpt(\u0027usage_timeout\u0027, default\u003d400,"},{"line_number":284,"context_line":"               help\u003d\u0027Timeout to wait for a guest to become active.\u0027),"},{"line_number":285,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":286,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mysql_impl\u0027),"},{"line_number":287,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":288,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mysql_impl\u0027),"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSo8%3D","line":285,"updated":"2014-04-22 18:28:25.000000000","message":"Wouldn\u0027t these changes be better as a separate patch set? https://review.openstack.org/86731 surprisingly depends on this patch set for this reason (I assume).","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"87cdcdeacafbea40b38d349417eb55736b52648d","unresolved":false,"context_lines":[{"line_number":525,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":526,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mongo_impl\u0027),"},{"line_number":527,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":528,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mongo_impl\u0027)"},{"line_number":529,"context_line":"]"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa98f980_345a5883","line":528,"updated":"2014-09-04 14:50:50.000000000","message":"since backup_incremental_strategy is a per-datastore option, we need to add it too, even if there\u0027s no ability to implement it.\n\nplease add it","commit_id":"8c24ae44754d748b6d8c4d481db3d92e39244b0c"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"269568892b33e0b16adb14f4a808caa012b36922","unresolved":false,"context_lines":[{"line_number":525,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":526,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mongo_impl\u0027),"},{"line_number":527,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":528,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mongo_impl\u0027)"},{"line_number":529,"context_line":"]"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa98f980_f5714be1","line":528,"in_reply_to":"fa98f980_00ae99e7","updated":"2014-09-08 16:54:49.000000000","message":"Added this for mongodb. The gerrit review should take care of other databases.","commit_id":"8c24ae44754d748b6d8c4d481db3d92e39244b0c"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"25f0564482bb025f4ea1c9d2c98d3623aee7b21c","unresolved":false,"context_lines":[{"line_number":525,"context_line":"    cfg.StrOpt(\u0027backup_namespace\u0027,"},{"line_number":526,"context_line":"               default\u003d\u0027trove.guestagent.strategies.backup.mongo_impl\u0027),"},{"line_number":527,"context_line":"    cfg.StrOpt(\u0027restore_namespace\u0027,"},{"line_number":528,"context_line":"               default\u003d\u0027trove.guestagent.strategies.restore.mongo_impl\u0027)"},{"line_number":529,"context_line":"]"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa98f980_00ae99e7","line":528,"in_reply_to":"fa98f980_345a5883","updated":"2014-09-08 10:48:25.000000000","message":"Due to https://review.openstack.org/119636 and its bug report, please add incremental strategy too.","commit_id":"8c24ae44754d748b6d8c4d481db3d92e39244b0c"}],"trove/common/utils.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"def execute_with_timeout(*args, **kwargs):"},{"line_number":274,"context_line":"    time \u003d kwargs.pop(\u0027timeout\u0027, 30)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def cb_timeout():"},{"line_number":277,"context_line":"        msg \u003d (_(\"Time out after waiting\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8S0%3D","line":274,"updated":"2014-03-12 19:41:13.000000000","message":"change out of bp scope","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"}],"trove/guestagent/backup/backupagent.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":36,"context_line":"# configuration file, would be used mysql as datastore_manager by the default"},{"line_number":37,"context_line":"STRATEGY \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_strategy"},{"line_number":38,"context_line":"NAMESPACE \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_namespace"},{"line_number":39,"context_line":"RESTORE_NAMESPACE \u003d \\"},{"line_number":40,"context_line":"    CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).restore_namespace"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"RUNNER \u003d get_backup_strategy(STRATEGY, NAMESPACE)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8SQ%3D","line":39,"updated":"2014-03-12 19:41:13.000000000","message":"please amend this change in favor of https://review.openstack.org/#/c/77899/","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            runner \u003d get_restore_strategy(backup_type, RESTORE_NAMESPACE)"},{"line_number":58,"context_line":"        except ImportError:"},{"line_number":59,"context_line":"            raise UnknownBackupType(\"Unknown Backup type: %s in namespace %s\""},{"line_number":60,"context_line":"                                    % (backup_type, RESTORE_NAMESPACE))"},{"line_number":61,"context_line":"        return runner"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def execute_backup(self, context, backup_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8SM%3D","line":60,"updated":"2014-03-12 19:41:13.000000000","message":"please amend this change in favor of https://review.openstack.org/#/c/77899/","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"abf877cd258e4362b9c6080690b789965055aa70","unresolved":false,"context_lines":[{"line_number":37,"context_line":"STRATEGY \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_strategy"},{"line_number":38,"context_line":"NAMESPACE \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_namespace"},{"line_number":39,"context_line":"RESTORE_NAMESPACE \u003d \\"},{"line_number":40,"context_line":"    CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).restore_namespace"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"RUNNER \u003d get_backup_strategy(STRATEGY, NAMESPACE)"},{"line_number":43,"context_line":"EXTRA_OPTS \u003d CONF.backup_runner_options.get(STRATEGY, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWn%2F%2F30g%3D","line":40,"updated":"2014-04-08 20:17:29.000000000","message":"still strongly recomend to make this patch dependent on https://review.openstack.org/#/c/77899/\n\nfrom the other point, Trove doesn\u0027t need this config attribute, it pollutes confis, guest config should stay simple.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"b9116a522aa4c63f638b9842036237f8ebca5836","unresolved":false,"context_lines":[{"line_number":37,"context_line":"STRATEGY \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_strategy"},{"line_number":38,"context_line":"NAMESPACE \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_namespace"},{"line_number":39,"context_line":"RESTORE_NAMESPACE \u003d \\"},{"line_number":40,"context_line":"    CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).restore_namespace"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"RUNNER \u003d get_backup_strategy(STRATEGY, NAMESPACE)"},{"line_number":43,"context_line":"EXTRA_OPTS \u003d CONF.backup_runner_options.get(STRATEGY, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2BiI%3D","line":40,"in_reply_to":"AAAAWn%2F%2F30g%3D","updated":"2014-04-09 05:53:17.000000000","message":"As mentioned in other comments the patch 77899 and this patch take different approaches (which boils down to whether or not each datastore\u0027s backup/restore implementations should all exist in a single module (single .py) file or not. \nAlso it is not sure how it pollutes configs. If the direction chosen is to keep separate backup/datastore implementations (in separate modules) for each datastore , then these config opts become necessary. \nSo these two are parallel approaches at the moment and based on direction chosen I will align accordingly and make necessary changes/add dependencies.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"d21623adde43c500f3f1977b08609612a45000c8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"# If datastore manager is not mentioned in guest"},{"line_number":36,"context_line":"# configuration file, would be used mysql as datastore_manager by the default"},{"line_number":37,"context_line":"STRATEGY \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_strategy"},{"line_number":38,"context_line":"NAMESPACE \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_namespace"},{"line_number":39,"context_line":"RESTORE_NAMESPACE \u003d \\"},{"line_number":40,"context_line":"    CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).restore_namespace"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2Fct4%3D","line":38,"updated":"2014-04-21 19:06:13.000000000","message":"Suggest renaming NAMESPACE to BACKUP_NAMESPACE to be consistent with RESTORE_NAMESPACE","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":36,"context_line":"# configuration file, would be used mysql as datastore_manager by the default"},{"line_number":37,"context_line":"STRATEGY \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_strategy"},{"line_number":38,"context_line":"NAMESPACE \u003d CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).backup_namespace"},{"line_number":39,"context_line":"RESTORE_NAMESPACE \u003d \\"},{"line_number":40,"context_line":"    CONF.get(\u0027mysql\u0027 if not MANAGER else MANAGER).restore_namespace"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"RUNNER \u003d get_backup_strategy(STRATEGY, NAMESPACE)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR%2FA%3D","line":39,"updated":"2014-04-22 19:27:37.000000000","message":"incorrect string lines formatting","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"}],"trove/guestagent/datastore/mongodb/manager.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            self.app.start_db_with_conf_changes(config_contents)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            LOG.exception(\"Error during start_db_with_conf_changess\")"},{"line_number":82,"context_line":"            LOG.error(e)"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8R0%3D","line":80,"updated":"2014-03-12 19:41:13.000000000","message":"except TroveError","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            LOG.error(e)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if backup_info:"},{"line_number":85,"context_line":"            LOG.debug(\u0027Now going to perform restore...\u0027)"},{"line_number":86,"context_line":"            self._perform_restore(backup_info, context,"},{"line_number":87,"context_line":"                                  mount_point, self.app)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8PA%3D","line":85,"updated":"2014-03-12 19:41:13.000000000","message":"_()","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        if backup_info:"},{"line_number":85,"context_line":"            LOG.debug(\u0027Now going to perform restore...\u0027)"},{"line_number":86,"context_line":"            self._perform_restore(backup_info, context,"},{"line_number":87,"context_line":"                                  mount_point, self.app)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8Rs%3D","line":87,"updated":"2014-03-12 19:41:13.000000000","message":"self.app is not required here","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":155,"context_line":"        except Exception as e:"},{"line_number":156,"context_line":"            LOG.error(e)"},{"line_number":157,"context_line":"            LOG.error(\"Error performing restore from backup %s\","},{"line_number":158,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":159,"context_line":"            self.status.set_status(rd_instance.ServiceStatuses.FAILED)"},{"line_number":160,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8O8%3D","line":157,"updated":"2014-03-12 19:41:13.000000000","message":"_()","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":159,"context_line":"            self.status.set_status(rd_instance.ServiceStatuses.FAILED)"},{"line_number":160,"context_line":"            raise"},{"line_number":161,"context_line":"        LOG.info(_(\"Restored database successfully\"))"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":164,"context_line":"        backup.backup(context, backup_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8Rc%3D","line":161,"updated":"2014-03-12 19:41:13.000000000","message":"parameter app is not used","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            raise"},{"line_number":161,"context_line":"        LOG.info(_(\"Restored database successfully\"))"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":164,"context_line":"        backup.backup(context, backup_info)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def mount_volume(self, context, device_path\u003dNone, mount_point\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8RQ%3D","line":163,"updated":"2014-03-12 19:41:13.000000000","message":"misisng doc strings","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        if backup_info:"},{"line_number":85,"context_line":"            LOG.debug(\u0027Now going to perform restore...\u0027)"},{"line_number":86,"context_line":"            self._perform_restore(backup_info, context,"},{"line_number":87,"context_line":"                                  mount_point, self.app)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_4bd3ccd4","line":87,"updated":"2014-07-18 22:19:31.000000000","message":"no need to pass application as the parameter, you can use it through \u0027self\u0027","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":169,"context_line":"        except Exception as e:"},{"line_number":170,"context_line":"            LOG.error(e)"},{"line_number":171,"context_line":"            LOG.error(\"Error performing restore from backup %s\","},{"line_number":172,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":173,"context_line":"            self.status.set_status(rd_instance.ServiceStatuses.FAILED)"},{"line_number":174,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_abe1c89c","line":171,"updated":"2014-07-18 22:19:31.000000000","message":"Error while","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            raise"},{"line_number":175,"context_line":"        LOG.info(_(\"Restored database successfully\"))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":178,"context_line":"        backup.backup(context, backup_info)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def mount_volume(self, context, device_path\u003dNone, mount_point\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_ebee608a","line":177,"updated":"2014-07-18 22:19:31.000000000","message":"missing docstrings","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"d21623adde43c500f3f1977b08609612a45000c8","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            self.app.start_db_with_conf_changes(config_contents)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            LOG.exception(\"Error during start_db_with_conf_changess\")"},{"line_number":82,"context_line":"            LOG.error(e)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if backup_info:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2Fctc%3D","line":81,"updated":"2014-04-21 19:06:13.000000000","message":"s/changess/changes/\nAlso, add some context to the exception message.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            self.app.start_db_with_conf_changes(config_contents)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            LOG.exception(\"Error during start_db_with_conf_changess\")"},{"line_number":82,"context_line":"            LOG.error(e)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if backup_info:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR%2Bs%3D","line":81,"in_reply_to":"AAAAXH%2F%2Fctc%3D","updated":"2014-04-22 19:27:37.000000000","message":"agreed","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"d21623adde43c500f3f1977b08609612a45000c8","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            LOG.error(e)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if backup_info:"},{"line_number":85,"context_line":"            LOG.debug(\u0027Now going to perform restore...\u0027)"},{"line_number":86,"context_line":"            self._perform_restore(backup_info, context,"},{"line_number":87,"context_line":"                                  mount_point, self.app)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2Fcs4%3D","line":85,"updated":"2014-04-21 19:06:13.000000000","message":"Add some context info please.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            LOG.error(e)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if backup_info:"},{"line_number":85,"context_line":"            LOG.debug(\u0027Now going to perform restore...\u0027)"},{"line_number":86,"context_line":"            self._perform_restore(backup_info, context,"},{"line_number":87,"context_line":"                                  mount_point, self.app)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR%2Bg%3D","line":85,"in_reply_to":"AAAAXH%2F%2Fcs4%3D","updated":"2014-04-22 19:27:37.000000000","message":"and localization","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"02d9c0854fc97b8d6ab28d31d44658ded0611a31","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            self._perform_restore(backup_info, context,"},{"line_number":87,"context_line":"                                  mount_point, self.app)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def restart(self, context):"},{"line_number":92,"context_line":"        self.app.restart()"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FcIM%3D","line":89,"updated":"2014-04-21 19:27:55.000000000","message":"should this be a debug (LOG.debug)","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            self._perform_restore(backup_info, context,"},{"line_number":87,"context_line":"                                  mount_point, self.app)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def restart(self, context):"},{"line_number":92,"context_line":"        self.app.restart()"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR%2BQ%3D","line":89,"in_reply_to":"AAAAXH%2F%2FcIM%3D","updated":"2014-04-22 19:27:37.000000000","message":"it depends, we don\u0027t have any restricte policy against types of log messages","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"0229d54c3156ed73d202ea92055589eef567b974","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            self.app.start_db_with_conf_changes(config_contents)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            LOG.exception(_(\"Error during start_db_with_conf_changes\"))"},{"line_number":82,"context_line":"            LOG.error(e)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if backup_info:"},{"line_number":85,"context_line":"            self._perform_restore(backup_info, context,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ae8d1ca_3a1d7467","line":82,"updated":"2014-05-27 18:45:20.000000000","message":"Two questions:\n\n* Is the error() call necessary with the exception() call?\n* Is there no need to re-raise the original exception here?","commit_id":"edcd59c65e0322f4ec860b3219e1e5fa6c617d11"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"9cbcf3caef1e730f19fd8641b0a7c2bc44e614a2","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            self.app.start_db_with_conf_changes(config_contents)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            LOG.exception(_(\"Error during start_db_with_conf_changes\"))"},{"line_number":82,"context_line":"            LOG.error(e)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if backup_info:"},{"line_number":85,"context_line":"            self._perform_restore(backup_info, context,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ae8d1ca_e02b5e80","line":82,"in_reply_to":"3ae8d1ca_3a1d7467","updated":"2014-05-27 19:00:23.000000000","message":"Good point. This may just be a carryover from patch set 10. Will rectify","commit_id":"edcd59c65e0322f4ec860b3219e1e5fa6c617d11"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"54ade20bae2530b5fb80c58ac1273d777a511d98","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from trove.common import cfg"},{"line_number":19,"context_line":"from trove.common import instance as rd_instance"},{"line_number":20,"context_line":"from trove.common import exception"},{"line_number":21,"context_line":"from trove.guestagent import dbaas"},{"line_number":22,"context_line":"from trove.guestagent import volume"}],"source_content_type":"text/x-python","patch_set":14,"id":"1ae5cdf2_e5eefcb3","line":19,"updated":"2014-06-09 15:48:48.000000000","message":"Wouldn\u0027t db_instance or dbaas_instance be a better name here?","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"766dadfcc1ca47882fd2ab991d24ed22a2c40773","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from trove.common import cfg"},{"line_number":19,"context_line":"from trove.common import instance as rd_instance"},{"line_number":20,"context_line":"from trove.common import exception"},{"line_number":21,"context_line":"from trove.guestagent import dbaas"},{"line_number":22,"context_line":"from trove.guestagent import volume"}],"source_content_type":"text/x-python","patch_set":14,"id":"1ae5cdf2_1d65f844","line":19,"in_reply_to":"1ae5cdf2_e5eefcb3","updated":"2014-06-09 18:58:19.000000000","message":"ok agree will changed to db_instance","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"b84a05ec7af1d52cd0876fd0b02ef75317ab28ee","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from trove.common import cfg"},{"line_number":19,"context_line":"from trove.common import instance as db_instance"},{"line_number":20,"context_line":"from trove.common import exception"},{"line_number":21,"context_line":"from trove.guestagent import dbaas"},{"line_number":22,"context_line":"from trove.guestagent import volume"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_2b0cd8eb","line":19,"updated":"2014-07-18 22:11:30.000000000","message":"Can you put this after \"from trove.common import exception\"?\n\nAccording to hacking guidelines:\nhttp://docs.openstack.org/developer/hacking/","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"323049219a200ac63705133b4bff5d066f67a4fa","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from trove.common import cfg"},{"line_number":19,"context_line":"from trove.common import instance as db_instance"},{"line_number":20,"context_line":"from trove.common import exception"},{"line_number":21,"context_line":"from trove.guestagent import dbaas"},{"line_number":22,"context_line":"from trove.guestagent import volume"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_e631350c","line":19,"in_reply_to":"baada198_2b0cd8eb","updated":"2014-07-21 13:14:29.000000000","message":"ok","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"b84a05ec7af1d52cd0876fd0b02ef75317ab28ee","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.common import exception"},{"line_number":21,"context_line":"from trove.guestagent import dbaas"},{"line_number":22,"context_line":"from trove.guestagent import volume"},{"line_number":23,"context_line":"from trove.guestagent import backup"},{"line_number":24,"context_line":"from trove.guestagent.datastore.mongodb import service as mongo_service"},{"line_number":25,"context_line":"from trove.guestagent.datastore.mongodb import system"},{"line_number":26,"context_line":"from trove.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_eb2ca04c","line":23,"updated":"2014-07-18 22:11:30.000000000","message":"Can you put this before \"from trove.guestagent import dbaas\"?\n\nAccording to hacking guidelines:\nhttp://docs.openstack.org/developer/hacking/","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"323049219a200ac63705133b4bff5d066f67a4fa","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.common import exception"},{"line_number":21,"context_line":"from trove.guestagent import dbaas"},{"line_number":22,"context_line":"from trove.guestagent import volume"},{"line_number":23,"context_line":"from trove.guestagent import backup"},{"line_number":24,"context_line":"from trove.guestagent.datastore.mongodb import service as mongo_service"},{"line_number":25,"context_line":"from trove.guestagent.datastore.mongodb import system"},{"line_number":26,"context_line":"from trove.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_06370900","line":23,"in_reply_to":"baada198_eb2ca04c","updated":"2014-07-21 13:14:29.000000000","message":"ok","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"603065a273aa033af2078bcf85d0715efafc14bd","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                self._perform_restore(backup_info, context,"},{"line_number":82,"context_line":"                                      mount_point, self.app)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            LOG.error(e)"},{"line_number":87,"context_line":"            self.status.set_status(db_instance.ServiceStatuses.FAILED)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_e6fe6705","line":84,"updated":"2014-07-21 15:42:17.000000000","message":"Perhaps this log line should go in a finally clause so that it appears as the last line (even after an exception). Alternatively, you could change the wording so that success is obvious.","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                self._perform_restore(backup_info, context,"},{"line_number":82,"context_line":"                                      mount_point, self.app)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            LOG.error(e)"},{"line_number":87,"context_line":"            self.status.set_status(db_instance.ServiceStatuses.FAILED)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_48c0fd7b","line":84,"in_reply_to":"baada198_e2c73096","updated":"2014-07-21 17:21:23.000000000","message":"thanks.. keeping this as is for consistency","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"c89f7239b639dcd91b2eb5ac7614da84c44946f4","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                self._perform_restore(backup_info, context,"},{"line_number":82,"context_line":"                                      mount_point, self.app)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            LOG.info(_(\u0027\"prepare\" call has finished.\u0027))"},{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            LOG.error(e)"},{"line_number":87,"context_line":"            self.status.set_status(db_instance.ServiceStatuses.FAILED)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_e2c73096","line":84,"in_reply_to":"baada198_e6fe6705","updated":"2014-07-21 16:04:49.000000000","message":"Feel free to ignore this. I see that other datastores are doing the same thing.","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"603065a273aa033af2078bcf85d0715efafc14bd","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            LOG.error(e)"},{"line_number":87,"context_line":"            self.status.set_status(db_instance.ServiceStatuses.FAILED)"},{"line_number":88,"context_line":"            raise RuntimeError(\"prepare call has failed.\")"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def restart(self, context):"},{"line_number":91,"context_line":"        self.app.restart()"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_a13d39bd","line":88,"updated":"2014-07-21 15:42:17.000000000","message":"Why not just raise original exception?","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            LOG.error(e)"},{"line_number":87,"context_line":"            self.status.set_status(db_instance.ServiceStatuses.FAILED)"},{"line_number":88,"context_line":"            raise RuntimeError(\"prepare call has failed.\")"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def restart(self, context):"},{"line_number":91,"context_line":"        self.app.restart()"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_68bb010f","line":88,"in_reply_to":"baada198_22c5a88d","updated":"2014-07-21 17:21:23.000000000","message":"thanks.. keeping this as is for consistency","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"c89f7239b639dcd91b2eb5ac7614da84c44946f4","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            LOG.error(e)"},{"line_number":87,"context_line":"            self.status.set_status(db_instance.ServiceStatuses.FAILED)"},{"line_number":88,"context_line":"            raise RuntimeError(\"prepare call has failed.\")"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def restart(self, context):"},{"line_number":91,"context_line":"        self.app.restart()"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_22c5a88d","line":88,"in_reply_to":"baada198_a13d39bd","updated":"2014-07-21 16:04:49.000000000","message":"Feel free to ignore this. I see that other datastores are doing the same thing.","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"77b96b44da193bfb170811079c3e711fdab0d43c","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                        \u0027dbpath\u0027: mount_point,"},{"line_number":76,"context_line":"                    })"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"            self.app.start_db_with_conf_changes(config_contents)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"            if backup_info:"},{"line_number":81,"context_line":"                self._perform_restore(backup_info, context,"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_36224601","line":78,"updated":"2014-07-21 17:36:26.000000000","message":"Does mongo needs to be running while restoring? if it does - i\u0027m fine with it, but if not, datastore should be turned off","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"9b42648f527c54b4618d7003403261da7ffacb8f","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                        \u0027dbpath\u0027: mount_point,"},{"line_number":76,"context_line":"                    })"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"            self.app.start_db_with_conf_changes(config_contents)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"            if backup_info:"},{"line_number":81,"context_line":"                self._perform_restore(backup_info, context,"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_37ca406e","line":78,"in_reply_to":"baada198_36224601","updated":"2014-07-21 18:29:02.000000000","message":"Denis, you should be looking at strategies/restore/mongo_impl.py. The pre_restore method does stop the db","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"4e896569a14f564543719a4f090652bdd3b7cfcc","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                        \u0027dbpath\u0027: mount_point,"},{"line_number":76,"context_line":"                    })"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"            self.app.start_db_with_conf_changes(config_contents)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"            if backup_info:"},{"line_number":81,"context_line":"                self._perform_restore(backup_info, context,"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_315a5050","line":78,"in_reply_to":"baada198_36224601","updated":"2014-07-21 17:56:36.000000000","message":"First thing _run_pre_backup does is stops db.","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5c6e62727fae34d716c3127f1e752ccca709e390","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            operation\u003d\u0027is_root_enabled\u0027, datastore\u003dMANAGER)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":205,"context_line":"        LOG.info(_(\"Restoring database from backup %s\") % backup_info[\u0027id\u0027])"},{"line_number":206,"context_line":"        try:"},{"line_number":207,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":208,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_7a0bf08d","line":205,"updated":"2014-10-07 12:01:12.000000000","message":"missing period","commit_id":"17a6f441ec261a2e91e61b015d701efec9a49ec8"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"f70a999097c82daefb95ba7e0d7e90e8a36662d2","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            operation\u003d\u0027is_root_enabled\u0027, datastore\u003dMANAGER)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def _perform_restore(self, backup_info, context, restore_location, app):"},{"line_number":205,"context_line":"        LOG.info(_(\"Restoring database from backup %s\") % backup_info[\u0027id\u0027])"},{"line_number":206,"context_line":"        try:"},{"line_number":207,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":208,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_bf19c023","line":205,"in_reply_to":"baa201ad_7a0bf08d","updated":"2014-10-07 16:39:14.000000000","message":"Done","commit_id":"17a6f441ec261a2e91e61b015d701efec9a49ec8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5c6e62727fae34d716c3127f1e752ccca709e390","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":208,"context_line":"        except Exception as e:"},{"line_number":209,"context_line":"            LOG.error(e)"},{"line_number":210,"context_line":"            LOG.error(_(\"Error performing restore from backup %s\") %"},{"line_number":211,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":212,"context_line":"            self.status.set_status(ds_instance.ServiceStatuses.FAILED)"},{"line_number":213,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_9afc1474","line":210,"updated":"2014-10-07 12:01:12.000000000","message":"missing period","commit_id":"17a6f441ec261a2e91e61b015d701efec9a49ec8"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"f70a999097c82daefb95ba7e0d7e90e8a36662d2","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            backup.restore(context, backup_info, restore_location)"},{"line_number":208,"context_line":"        except Exception as e:"},{"line_number":209,"context_line":"            LOG.error(e)"},{"line_number":210,"context_line":"            LOG.error(_(\"Error performing restore from backup %s\") %"},{"line_number":211,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":212,"context_line":"            self.status.set_status(ds_instance.ServiceStatuses.FAILED)"},{"line_number":213,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_ffd6e826","line":210,"in_reply_to":"baa201ad_9afc1474","updated":"2014-10-07 16:39:14.000000000","message":"Done","commit_id":"17a6f441ec261a2e91e61b015d701efec9a49ec8"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5c6e62727fae34d716c3127f1e752ccca709e390","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":212,"context_line":"            self.status.set_status(ds_instance.ServiceStatuses.FAILED)"},{"line_number":213,"context_line":"            raise"},{"line_number":214,"context_line":"        LOG.info(_(\"Restored database successfully\"))"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":217,"context_line":"        backup.backup(context, backup_info)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_ba01d86b","line":214,"updated":"2014-10-07 12:01:12.000000000","message":"missing period","commit_id":"17a6f441ec261a2e91e61b015d701efec9a49ec8"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"f70a999097c82daefb95ba7e0d7e90e8a36662d2","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                      backup_info[\u0027id\u0027])"},{"line_number":212,"context_line":"            self.status.set_status(ds_instance.ServiceStatuses.FAILED)"},{"line_number":213,"context_line":"            raise"},{"line_number":214,"context_line":"        LOG.info(_(\"Restored database successfully\"))"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def create_backup(self, context, backup_info):"},{"line_number":217,"context_line":"        backup.backup(context, backup_info)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_1fdacc4b","line":214,"in_reply_to":"baa201ad_ba01d86b","updated":"2014-10-07 16:39:14.000000000","message":"Done","commit_id":"17a6f441ec261a2e91e61b015d701efec9a49ec8"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"1fe31e5b494afce86cacd9ba466c0920270aea58","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            LOG.error(e)"},{"line_number":109,"context_line":"            self.status.set_status(ds_instance.ServiceStatuses.FAILED)"},{"line_number":110,"context_line":"            raise RuntimeError(\"prepare call has failed.\")"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def get_config_changes(self, cluster_config, mount_point\u003dNone):"},{"line_number":113,"context_line":"        LOG.debug(\"Getting configuration changes.\")"},{"line_number":114,"context_line":"        config_changes \u003d {}"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_af7cda73","line":111,"updated":"2014-10-20 15:34:47.000000000","message":"Need to add \u0027_\u0027 for internationalization. Thanks.","commit_id":"b73e384f1ac59f13b85bde8c8674001f47c7c4fb"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"5454345f37acb728432bc14f5db78f6176fadac6","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            LOG.error(e)"},{"line_number":109,"context_line":"            self.status.set_status(ds_instance.ServiceStatuses.FAILED)"},{"line_number":110,"context_line":"            raise RuntimeError(\"prepare call has failed.\")"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def get_config_changes(self, cluster_config, mount_point\u003dNone):"},{"line_number":113,"context_line":"        LOG.debug(\"Getting configuration changes.\")"},{"line_number":114,"context_line":"        config_changes \u003d {}"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_3791c552","line":111,"in_reply_to":"9aa7fdbe_af7cda73","updated":"2014-10-23 03:53:35.000000000","message":"+1, plus should probably be changed to \"Setup of MongoDB database instance unsuccessful.\"","commit_id":"b73e384f1ac59f13b85bde8c8674001f47c7c4fb"}],"trove/guestagent/strategies/backup/base.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"abf877cd258e4362b9c6080690b789965055aa70","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def __exit__(self, exc_type, exc_value, traceback):"},{"line_number":74,"context_line":"        \"\"\"Clean up everything.\"\"\""},{"line_number":75,"context_line":"        self._run_post_backup()"},{"line_number":76,"context_line":"        if exc_type is not None:"},{"line_number":77,"context_line":"            return False"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWn%2F%2F30E%3D","line":75,"updated":"2014-04-08 20:17:29.000000000","message":"as discussed with community, this method should stay where it was.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def __exit__(self, exc_type, exc_value, traceback):"},{"line_number":74,"context_line":"        \"\"\"Clean up everything.\"\"\""},{"line_number":75,"context_line":"        self._run_post_backup()"},{"line_number":76,"context_line":"        if exc_type is not None:"},{"line_number":77,"context_line":"            return False"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_8b86c4b7","line":75,"in_reply_to":"AAAAW3%2F%2F%2Bkw%3D","updated":"2014-07-18 22:19:31.000000000","message":"Please rebase this patch since related change was already merged into the master branch.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"b9116a522aa4c63f638b9842036237f8ebca5836","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def __exit__(self, exc_type, exc_value, traceback):"},{"line_number":74,"context_line":"        \"\"\"Clean up everything.\"\"\""},{"line_number":75,"context_line":"        self._run_post_backup()"},{"line_number":76,"context_line":"        if exc_type is not None:"},{"line_number":77,"context_line":"            return False"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2Bkw%3D","line":75,"in_reply_to":"AAAAWn%2F%2F30E%3D","updated":"2014-04-09 05:53:17.000000000","message":"Can you point me to the discussion other than the long chat we had on IRC over this. Based on the semantics of the \u0027with\u0027 construct in python and the corresponding execution flow of __enter__ and __exit__ methods, it is not safe to have post_backup() method to be executed as part of __enter__() method itself. I thought at the conclusion of our discussion you agreed with me as well.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def __exit__(self, exc_type, exc_value, traceback):"},{"line_number":74,"context_line":"        \"\"\"Clean up everything.\"\"\""},{"line_number":75,"context_line":"        self._run_post_backup()"},{"line_number":76,"context_line":"        if exc_type is not None:"},{"line_number":77,"context_line":"            return False"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR%2BE%3D","line":75,"updated":"2014-04-22 19:27:37.000000000","message":"please move it back","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"5ba6db7b5b8cc978a87b2f1aa7923b529a26118f","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def __exit__(self, exc_type, exc_value, traceback):"},{"line_number":74,"context_line":"        \"\"\"Clean up everything.\"\"\""},{"line_number":75,"context_line":"        self._run_post_backup()"},{"line_number":76,"context_line":"        if exc_type is not None:"},{"line_number":77,"context_line":"            return False"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXX%2F%2F%2B84%3D","line":75,"in_reply_to":"AAAAXH%2F%2FR%2BE%3D","updated":"2014-04-24 20:51:58.000000000","message":"Let\u0027s assume _run_pre_backup() stops the service. run() starts the streaming (not this patch but in general). And that _run_post_backup() starts the service back up. If _run_post_backup() occurs before the streaming has completed, isn\u0027t there potential for inconsistencies in the result?","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"a59a78a350742dfcd5e0b5fbb947be5d7dbdd094","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":"        self._run_post_backup()"},{"line_number":93,"context_line":"        return True"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def metadata(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5adbc538_066cfb9b","line":92,"updated":"2014-05-25 08:12:54.000000000","message":"Should not be moved from __enter__ method","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"92c82d3ba5e451445336989e1dc584af306d88f7","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":"        self._run_post_backup()"},{"line_number":93,"context_line":"        return True"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def metadata(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5adbc538_844e2cc0","line":92,"in_reply_to":"5adbc538_066cfb9b","updated":"2014-05-27 00:47:06.000000000","message":"Reason for this change: The _run_post_backup hook needs to be invoked only after the backup operation is over. Having this method in enter allowed for _run_post_backup to execute even before backup is fully executed. If the post backup operation is a cleanup of backup contents it messes the backup which is still executing.\nI also see you agreed to this before http://eavesdrop.openstack.org/irclogs/%23openstack-trove/%23openstack-trove.2014-03-12.log","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"474ac2ae766fe3b923ae55416be84ebc5af44743","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":"        self._run_post_backup()"},{"line_number":93,"context_line":"        return True"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def metadata(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_db1d6168","line":92,"updated":"2014-05-28 07:46:02.000000000","message":"Please move it back to __enter__","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"766dadfcc1ca47882fd2ab991d24ed22a2c40773","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":"        self._run_post_backup()"},{"line_number":93,"context_line":"        return True"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def metadata(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1ae5cdf2_7a0b622b","line":92,"in_reply_to":"1ae5cdf2_261d4a74","updated":"2014-06-09 18:58:19.000000000","message":"Can you elaborate on why this is a prime candidate for another bug. Also explain why should this fix be separate when it is integral to the correct functioning of this patchset","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"54ade20bae2530b5fb80c58ac1273d777a511d98","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":"        self._run_post_backup()"},{"line_number":93,"context_line":"        return True"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def metadata(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1ae5cdf2_261d4a74","line":92,"in_reply_to":"3ae8d1ca_4e9b3f72","updated":"2014-06-09 15:48:48.000000000","message":"I agree with leaving this as-is.  This affects all datastores and should not be implemented in a mongodb-specific bug.  Looks like it\u0027s a prime candidate for another bug, though. ;)","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"2012fdad77815e3d718fd3a478c27a2ed3429fb7","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":"        self._run_post_backup()"},{"line_number":93,"context_line":"        return True"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def metadata(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_4e9b3f72","line":92,"in_reply_to":"3ae8d1ca_db1d6168","updated":"2014-05-28 16:48:54.000000000","message":"Reason for this change and why this should not be moved back: The _run_post_backup hook needs to be invoked only after the backup operation is over. Having this method in enter allowed for _run_post_backup to execute even before backup is fully executed. If the post backup operation is a cleanup of backup contents it messes the backup which is still executing. I also see you agreed to this before http://eavesdrop.openstack.org/irclogs/%23openstack-trove/%23openstack-trove.2014-03-12.log","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"32092b4ecfa4f8fa98db2238f5f32965b7902184","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":"        self._run_post_backup()"},{"line_number":93,"context_line":"        return True"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def metadata(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_6763c21a","line":92,"updated":"2014-06-09 21:22:25.000000000","message":"If this fix *only* affects mongodb, then it belongs in this patchset (but then the code probably shouldn\u0027t reside in backup/base.py).  If it affects *all* datastores, then it should not be included in a fix for a bug entitled \u0027Adds support to do full backups and restore mongodb single instance.\u0027\n\nPlease see https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes for a recourse on why splitting changes into discrete chunks is a good idea (it covers your last point quite nicely).","commit_id":"60c041da706c5be5a93f101c2bd609810ad059cd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"0291c58ccd927d4f54ae82ee2ff2a2716eedba8c","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":"        self._run_post_backup()"},{"line_number":93,"context_line":"        return True"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def metadata(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_b3263acc","line":92,"in_reply_to":"1ae5cdf2_6763c21a","updated":"2014-06-14 15:46:56.000000000","message":"+1 to Peter\u0027s comments.","commit_id":"60c041da706c5be5a93f101c2bd609810ad059cd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5963d014cafe7ae1d37f0e26b58534370154c22f","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        self._run_post_backup()"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_edbd6a69","side":"PARENT","line":92,"updated":"2014-07-21 14:17:10.000000000","message":"please revert unneeded diff","commit_id":"5869b3cabbf25362319559efaf960f40d589a754"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            utils.raise_if_process_errored(self.process, BackupError)"},{"line_number":90,"context_line":"            if not self.check_process():"},{"line_number":91,"context_line":"                raise BackupError"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        self._run_post_backup()"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_48ab9dd5","side":"PARENT","line":92,"in_reply_to":"baada198_edbd6a69","updated":"2014-07-21 17:21:23.000000000","message":"Done","commit_id":"5869b3cabbf25362319559efaf960f40d589a754"}],"trove/guestagent/strategies/backup/mongo_impl.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 eBay, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8RA%3D","line":1,"updated":"2014-03-12 19:41:13.000000000","message":"please amend this change in favor of https://review.openstack.org/#/c/77899/,\nmove your impl to the mysql_impl.py","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\"Creates dump and then tars and streams the dump dir contents to"},{"line_number":35,"context_line":"        the stdout"},{"line_number":36,"context_line":"        \"\"\""},{"line_number":37,"context_line":"        cmd \u003d (\u0027{ { sudo service mongodb stop 1\u003e/dev/null 2\u003e\u00261 || true; } \u0026\u0026\u0027"},{"line_number":38,"context_line":"               \u0027 sudo rm -fr \u0027 + MONGO_DUMP_DIR + \u0027 1\u003e/dev/null 2\u003e\u00261 \u0026\u0026\u0027"},{"line_number":39,"context_line":"               \u0027 sudo mongodump --journal --dbpath \u0027 + MONGODB_DBPATH +"},{"line_number":40,"context_line":"               \u0027 --out \u0027 + MONGO_DUMP_DIR + \u0027 1\u003e/dev/null 2\u003e\u00261 \u0026\u0026\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8P8%3D","line":37,"updated":"2014-03-12 19:41:13.000000000","message":"whole restore cmd should be splitted into three groups and executed one by one for the better error handling:\n\n_pre_backup\n\nrun_backup\n\n_post_packup\n\nthere are separated methods in base.BackupRunner class.","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"17b2a4da45ae2ba38500d429a738a5d8b73b60de","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":"MONGODB_DBPATH \u003d \"/var/lib/mongodb\""},{"line_number":26,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":27,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2Fhj0%3D","line":25,"updated":"2014-04-20 13:34:13.000000000","message":"I\u0027m not wild about burying a path (paths) here. This makes it harder for people who want to build images.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":"MONGODB_DBPATH \u003d \"/var/lib/mongodb\""},{"line_number":26,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":27,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_aba62852","line":25,"in_reply_to":"AAAAXH%2F%2FddI%3D","updated":"2014-07-18 22:19:31.000000000","message":"should be retrieved from mongodb conf file","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"e91c86d8c58074051ba656c46c58aa3830794e57","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":"MONGODB_DBPATH \u003d \"/var/lib/mongodb\""},{"line_number":26,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":27,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2FddI%3D","line":25,"in_reply_to":"AAAAXH%2F%2Fhj0%3D","updated":"2014-04-21 15:48:08.000000000","message":"Agreed, and addressed in patchset 10","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d4fca39b271ef6b465fe722cde0c349fd1609f7f","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":25,"context_line":"MONGODB_DBPATH \u003d \"/var/lib/mongodb\""},{"line_number":26,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":27,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2Fhgs%3D","line":25,"in_reply_to":"AAAAXH%2F%2Fhj0%3D","updated":"2014-04-20 13:48:46.000000000","message":"why is that ?","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @property"},{"line_number":54,"context_line":"    def cmd(self):"},{"line_number":55,"context_line":"        \"\"\"Creates dump and then tars and streams the dump dir contents to"},{"line_number":56,"context_line":"        the stdout"},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        cmd \u003d \u0027sudo tar cPf - \u0027 + MONGO_DUMP_DIR"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_0b50f430","line":55,"updated":"2014-07-18 22:19:31.000000000","message":"this docstring look a bit agly, could you please fix it?\n\n\"\"\"\n\nCreates dump and then tars and\n\nstreams the dump dir contents to the stdout\n\n\"\"\"","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        try:"},{"line_number":63,"context_line":"            for cmd in self.pre_backup_commands:"},{"line_number":64,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":65,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":66,"context_line":"            raise"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def _run_post_backup(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_8b5b2453","line":65,"updated":"2014-07-18 22:19:31.000000000","message":"Please log exception","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            for cmd in self.post_backup_commands:"},{"line_number":71,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":72,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":73,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_ab546822","line":73,"updated":"2014-07-18 22:19:31.000000000","message":"same here","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"33c8f16b178e077110dff0d40835d6e44f6924e6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"CONF \u003d cfg.CONF"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":"MONGODB_DBPATH \u003d CONF.get(\u0027mongodb\u0027).mount_point"},{"line_number":28,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":29,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSoQ%3D","line":27,"updated":"2014-04-22 18:28:25.000000000","message":"I think this is available as self.restore_location.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":24,"context_line":"CONF \u003d cfg.CONF"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":"MONGODB_DBPATH \u003d CONF.get(\u0027mongodb\u0027).mount_point"},{"line_number":28,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":29,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR98%3D","line":27,"in_reply_to":"AAAAXH%2F%2FSoQ%3D","updated":"2014-04-22 19:27:37.000000000","message":"agreed","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"02d9c0854fc97b8d6ab28d31d44658ded0611a31","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027sudo mkdir -p \u0027 + MONGO_DUMP_DIR,"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \u0027sudo mongodump --journal --dbpath \u0027 + MONGODB_DBPATH +"},{"line_number":44,"context_line":"        \u0027 --out \u0027 + MONGO_DUMP_DIR,"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        \u0027sudo chown -R mongodb:mongodb \u0027 + MONGO_DUMP_DIR,"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FcHs%3D","line":44,"updated":"2014-04-21 19:27:55.000000000","message":"I agree with Robert Myers. It may also be unwise to attempt to dump to the data volume (space considerations). streaming stdout is a better solution.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":6268,"name":"Robert Myers","email":"myer0052@gmail.com","username":"rmyers"},"change_message_id":"ebb8574664f58eb7d6dfe41f455d7e8a6270ddfb","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027sudo mkdir -p \u0027 + MONGO_DUMP_DIR,"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \u0027sudo mongodump --journal --dbpath \u0027 + MONGODB_DBPATH +"},{"line_number":44,"context_line":"        \u0027 --out \u0027 + MONGO_DUMP_DIR,"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        \u0027sudo chown -R mongodb:mongodb \u0027 + MONGO_DUMP_DIR,"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2Fc3E%3D","line":44,"updated":"2014-04-21 17:12:52.000000000","message":"I don\u0027t think the dump dir is needed, you should use \u0027-\u0027 as the out directory to stream the dump to stdout.\n\nsee: http://docs.mongodb.org/manual/reference/program/mongodump/#cmdoption--out","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"33c8f16b178e077110dff0d40835d6e44f6924e6","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027sudo mkdir -p \u0027 + MONGO_DUMP_DIR,"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \u0027sudo mongodump --journal --dbpath \u0027 + MONGODB_DBPATH +"},{"line_number":44,"context_line":"        \u0027 --out \u0027 + MONGO_DUMP_DIR,"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        \u0027sudo chown -R mongodb:mongodb \u0027 + MONGO_DUMP_DIR,"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSes%3D","line":44,"updated":"2014-04-22 18:28:25.000000000","message":"I think this will be taken care of when this is converted to streaming but, in general, the backup is taking place in \"pre backup.\" I\u0027d ask if the superclass is generic enough so that we don\u0027t have to do such a thing.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027sudo mkdir -p \u0027 + MONGO_DUMP_DIR,"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \u0027sudo mongodump --journal --dbpath \u0027 + MONGODB_DBPATH +"},{"line_number":44,"context_line":"        \u0027 --out \u0027 + MONGO_DUMP_DIR,"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        \u0027sudo chown -R mongodb:mongodb \u0027 + MONGO_DUMP_DIR,"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR9g%3D","line":44,"in_reply_to":"AAAAXH%2F%2Fa28%3D","updated":"2014-04-22 19:27:37.000000000","message":"agreed","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"9f9b1899daf9efcec8c980fc37cb71d3578c10b1","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027sudo mkdir -p \u0027 + MONGO_DUMP_DIR,"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \u0027sudo mongodump --journal --dbpath \u0027 + MONGODB_DBPATH +"},{"line_number":44,"context_line":"        \u0027 --out \u0027 + MONGO_DUMP_DIR,"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        \u0027sudo chown -R mongodb:mongodb \u0027 + MONGO_DUMP_DIR,"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2Fa28%3D","line":44,"in_reply_to":"AAAAXH%2F%2FbAE%3D","updated":"2014-04-21 23:10:48.000000000","message":"viswa: the difference though is that for a restore, it\u0027s going to a brand new vm and sizing checks will be done (https://review.openstack.org/#/c/86300/). therefore it\u0027s not symmetric.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"34ced95a24cdd5b57c348600214ad4b3e23fa4eb","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027sudo mkdir -p \u0027 + MONGO_DUMP_DIR,"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \u0027sudo mongodump --journal --dbpath \u0027 + MONGODB_DBPATH +"},{"line_number":44,"context_line":"        \u0027 --out \u0027 + MONGO_DUMP_DIR,"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        \u0027sudo chown -R mongodb:mongodb \u0027 + MONGO_DUMP_DIR,"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FbAE%3D","line":44,"in_reply_to":"AAAAXH%2F%2FcHs%3D","updated":"2014-04-21 22:31:22.000000000","message":"The problem is that mongorestore does not have an equivalent \u0027read from stdin\u0027 option. So for restore you would have to restore from swift to a dump dir anyway. So volume space considerations will be an issue (that needs to be taken into account) externally anyway. \n\nSo to keep the situation symmetric, the mongodump command is also dumping to a dump dir first before tarring and exporting that data to swift. So that if there are any space constraints considerations, that will show up during backup itself. \n\nAlso as per documentation, mongodump to stdout does not generate metadata json file. That gets generated only when dumping to a dir. Not being an expert in mongo, I am not completely sure what the implications are. Hence chose the safe path.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027sudo mkdir -p \u0027 + MONGO_DUMP_DIR,"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \u0027sudo mongodump --journal --dbpath \u0027 + MONGODB_DBPATH +"},{"line_number":44,"context_line":"        \u0027 --out \u0027 + MONGO_DUMP_DIR,"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        \u0027sudo chown -R mongodb:mongodb \u0027 + MONGO_DUMP_DIR,"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR9o%3D","line":44,"in_reply_to":"AAAAXH%2F%2FcHs%3D","updated":"2014-04-22 19:27:37.000000000","message":"agreed","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"a59a78a350742dfcd5e0b5fbb947be5d7dbdd094","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        the stdout"},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        try:"},{"line_number":59,"context_line":"            for cmd in self.backup_commands:"},{"line_number":60,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":61,"context_line":"            cmd \u003d \u0027sudo tar cPf - \u0027 + MONGO_DUMP_DIR"},{"line_number":62,"context_line":"            return cmd + self.zip_cmd + self.encrypt_cmd"}],"source_content_type":"text/x-python","patch_set":12,"id":"5adbc538_660a1fd4","line":59,"updated":"2014-05-25 08:12:54.000000000","message":"This should be done in _pre_backup","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"474ac2ae766fe3b923ae55416be84ebc5af44743","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self._run_post_backup()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_7b260db9","line":53,"updated":"2014-05-28 07:46:02.000000000","message":"No need to use subprocess  directly, please. Use exec from utils","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"2012fdad77815e3d718fd3a478c27a2ed3429fb7","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self._run_post_backup()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_495ed913","line":53,"in_reply_to":"3ae8d1ca_7b260db9","updated":"2014-05-28 16:48:54.000000000","message":"using subprocess.call allows the commands to called within subprocess to complete so pre_backup has to complete before backup is called. exec from utils uses greenlet which allows for a yield during subprocess command execution.","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"474ac2ae766fe3b923ae55416be84ebc5af44743","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self._run_post_backup()"},{"line_number":57,"context_line":"            raise e"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_bbac15ef","line":56,"updated":"2014-05-28 07:46:02.000000000","message":"Post backup was designed as clean-up method that is being called when backup streaming was finished","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"54ade20bae2530b5fb80c58ac1273d777a511d98","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self._run_post_backup()"},{"line_number":57,"context_line":"            raise e"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":14,"id":"1ae5cdf2_fa25b2ae","line":56,"in_reply_to":"3ae8d1ca_4ee17f99","updated":"2014-06-09 15:48:48.000000000","message":"Myabe add a comment to that effect?","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"2012fdad77815e3d718fd3a478c27a2ed3429fb7","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self._run_post_backup()"},{"line_number":57,"context_line":"            raise e"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_4ee17f99","line":56,"in_reply_to":"3ae8d1ca_bbac15ef","updated":"2014-05-28 16:48:54.000000000","message":"Since _run_post_backup is essentially housekeeping(cleanup) of sorts, it also needs to be called here in order to not have the database being backed up to go into shutdown state as a result of a backup going awry.","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"474ac2ae766fe3b923ae55416be84ebc5af44743","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _run_post_backup(self):"},{"line_number":68,"context_line":"        utils.execute_with_timeout(\u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR, shell\u003dTrue)"},{"line_number":69,"context_line":"        self.app.start_db()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_1bea690f","line":68,"updated":"2014-05-28 07:46:02.000000000","message":"Try:except block is required to prevent errors that can happen during exec","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"2012fdad77815e3d718fd3a478c27a2ed3429fb7","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _run_post_backup(self):"},{"line_number":68,"context_line":"        utils.execute_with_timeout(\u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR, shell\u003dTrue)"},{"line_number":69,"context_line":"        self.app.start_db()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_498c1980","line":68,"in_reply_to":"3ae8d1ca_1bea690f","updated":"2014-05-28 16:48:54.000000000","message":"a try except block here would be superfluous since the backup agent already catches any exceptions thrown to change backup status. Please explain the point of having it here","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"b84a05ec7af1d52cd0876fd0b02ef75317ab28ee","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 eBay, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_8bcb2471","line":1,"updated":"2014-07-18 22:11:30.000000000","message":"Change to:\n\n\t# Copyright (c) 2014 eBay Software Foundation","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"323049219a200ac63705133b4bff5d066f67a4fa","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 eBay, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_c43d0abd","line":1,"in_reply_to":"baada198_8bcb2471","updated":"2014-07-21 13:14:29.000000000","message":"Done","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"b84a05ec7af1d52cd0876fd0b02ef75317ab28ee","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from trove.common import utils as utils"},{"line_number":20,"context_line":"from trove.common import cfg"},{"line_number":21,"context_line":"from trove.guestagent.datastore.mongodb import service as mongo_service"},{"line_number":22,"context_line":"from trove.guestagent.strategies.backup import base"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_2b32185e","line":19,"updated":"2014-07-18 22:11:30.000000000","message":"I think you can remove the \"as utils\" here.","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"323049219a200ac63705133b4bff5d066f67a4fa","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from trove.common import utils as utils"},{"line_number":20,"context_line":"from trove.common import cfg"},{"line_number":21,"context_line":"from trove.guestagent.datastore.mongodb import service as mongo_service"},{"line_number":22,"context_line":"from trove.guestagent.strategies.backup import base"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_a412d655","line":19,"in_reply_to":"baada198_2b32185e","updated":"2014-07-21 13:14:29.000000000","message":"ok","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"b84a05ec7af1d52cd0876fd0b02ef75317ab28ee","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from trove.common import utils as utils"},{"line_number":20,"context_line":"from trove.common import cfg"},{"line_number":21,"context_line":"from trove.guestagent.datastore.mongodb import service as mongo_service"},{"line_number":22,"context_line":"from trove.guestagent.strategies.backup import base"},{"line_number":23,"context_line":"from trove.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_4b84ac0a","line":20,"updated":"2014-07-18 22:11:30.000000000","message":"Can you put this before \"from trove.common import utils as utils\"?\n\nAccording to hacking guidelines: http://docs.openstack.org/developer/hacking/","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"323049219a200ac63705133b4bff5d066f67a4fa","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from trove.common import utils as utils"},{"line_number":20,"context_line":"from trove.common import cfg"},{"line_number":21,"context_line":"from trove.guestagent.datastore.mongodb import service as mongo_service"},{"line_number":22,"context_line":"from trove.guestagent.strategies.backup import base"},{"line_number":23,"context_line":"from trove.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_c40fca2c","line":20,"in_reply_to":"baada198_4b84ac0a","updated":"2014-07-21 13:14:29.000000000","message":"ok","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"b84a05ec7af1d52cd0876fd0b02ef75317ab28ee","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_6ba3309e","line":53,"updated":"2014-07-18 22:11:30.000000000","message":"Just curious on why you choose to use subprocess.call instead of utils.execute_with_timeout?","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"323049219a200ac63705133b4bff5d066f67a4fa","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_97c07b7d","line":53,"in_reply_to":"baada198_6ba3309e","updated":"2014-07-21 13:14:29.000000000","message":"ensures call completion for mongodump, instead of having to set a timeout which may be too high or too low","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"227e5441ed1a63301c87efb51ec58f24ddc6599e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_026b39f1","line":53,"in_reply_to":"baada198_97c07b7d","updated":"2014-07-21 20:08:33.000000000","message":"Ah, ok.","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5963d014cafe7ae1d37f0e26b58534370154c22f","unresolved":false,"context_lines":[{"line_number":25,"context_line":"CONF \u003d cfg.CONF"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":"MONGODB_DBPATH \u003d CONF.get(\u0027mongodb\u0027).mount_point"},{"line_number":29,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_0dc1bee3","line":28,"updated":"2014-07-21 14:17:10.000000000","message":"MONGODB_DBPATH \u003d CONF.mongodb.mount_point","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":25,"context_line":"CONF \u003d cfg.CONF"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":"MONGODB_DBPATH \u003d CONF.get(\u0027mongodb\u0027).mount_point"},{"line_number":29,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_a5646222","line":28,"in_reply_to":"baada198_0dc1bee3","updated":"2014-07-21 17:21:23.000000000","message":"Done","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5963d014cafe7ae1d37f0e26b58534370154c22f","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_4db73685","line":53,"updated":"2014-07-21 14:17:10.000000000","message":"please use exec method from trove/common/utils.py","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"603065a273aa033af2078bcf85d0715efafc14bd","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_61b5e1eb","line":53,"in_reply_to":"baada198_4db73685","updated":"2014-07-21 15:42:17.000000000","message":"+1","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_65032a10","line":53,"in_reply_to":"baada198_61b5e1eb","updated":"2014-07-21 17:21:23.000000000","message":"Done","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"603065a273aa033af2078bcf85d0715efafc14bd","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self.cleanup_and_restart()"},{"line_number":57,"context_line":"            raise e"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_c1c5cd5c","line":55,"updated":"2014-07-21 15:42:17.000000000","message":"Why not log the actual exception?","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                subprocess.call(cmd, shell\u003dTrue)"},{"line_number":54,"context_line":"        except Exception as e:"},{"line_number":55,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":56,"context_line":"            self.cleanup_and_restart()"},{"line_number":57,"context_line":"            raise e"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_c5f2366e","line":55,"in_reply_to":"baada198_c1c5cd5c","updated":"2014-07-21 17:21:23.000000000","message":"Actual exception does get logged eventually (re-raised here)","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5963d014cafe7ae1d37f0e26b58534370154c22f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.app.start_db()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _run_post_backup(self):"},{"line_number":72,"context_line":"        self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_cd7986c6","line":72,"updated":"2014-07-21 14:17:10.000000000","message":"please merge this two methods","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.app.start_db()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _run_post_backup(self):"},{"line_number":72,"context_line":"        self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_c8032d0b","line":72,"in_reply_to":"baada198_0107c5ca","updated":"2014-07-21 17:21:23.000000000","message":"Denis, agree with Mat","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"603065a273aa033af2078bcf85d0715efafc14bd","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.app.start_db()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _run_post_backup(self):"},{"line_number":72,"context_line":"        self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_0107c5ca","line":72,"in_reply_to":"baada198_cd7986c6","updated":"2014-07-21 15:42:17.000000000","message":"Denis, this is also called on exception in _run_pre_backup.","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"77b96b44da193bfb170811079c3e711fdab0d43c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # mongodump can takeup a lot of time"},{"line_number":54,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue,"},{"line_number":55,"context_line":"                                           timeout\u003dLARGE_TIMEOUT)"},{"line_number":56,"context_line":"        except Exception as e:"},{"line_number":57,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":58,"context_line":"            self.cleanup_and_restart()"},{"line_number":59,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_766f5e28","line":56,"updated":"2014-07-21 17:36:26.000000000","message":"please do not use Exception class. You know that at this stage only one exception could appear - ProcessExecutionError, you should expect only this type.","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"9b42648f527c54b4618d7003403261da7ffacb8f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # mongodump can takeup a lot of time"},{"line_number":54,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue,"},{"line_number":55,"context_line":"                                           timeout\u003dLARGE_TIMEOUT)"},{"line_number":56,"context_line":"        except Exception as e:"},{"line_number":57,"context_line":"            LOG.debug(\"Caught exception when creating the dump\")"},{"line_number":58,"context_line":"            self.cleanup_and_restart()"},{"line_number":59,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_7c79ffc3","line":56,"in_reply_to":"baada198_766f5e28","updated":"2014-07-21 18:29:02.000000000","message":"Done","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"77b96b44da193bfb170811079c3e711fdab0d43c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        utils.execute_with_timeout(\u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR, shell\u003dTrue)"},{"line_number":71,"context_line":"        self.app.start_db()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _run_post_backup(self):"},{"line_number":74,"context_line":"        self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_d6ce6a2c","line":73,"updated":"2014-07-21 17:36:26.000000000","message":"def _run_post_backup(self):        \n     utils.execute_with_timeout(\u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR, shell\u003dTrue)\n     self.app.start_db()\n\n\nmethod cleanup_and_restart is redundant, completely","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"9b42648f527c54b4618d7003403261da7ffacb8f","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        utils.execute_with_timeout(\u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR, shell\u003dTrue)"},{"line_number":71,"context_line":"        self.app.start_db()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _run_post_backup(self):"},{"line_number":74,"context_line":"        self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_17145c42","line":73,"in_reply_to":"baada198_1178ecc2","updated":"2014-07-21 18:29:02.000000000","message":"agree with Mat. No point in duplicating code.","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"4e896569a14f564543719a4f090652bdd3b7cfcc","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        utils.execute_with_timeout(\u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR, shell\u003dTrue)"},{"line_number":71,"context_line":"        self.app.start_db()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _run_post_backup(self):"},{"line_number":74,"context_line":"        self.cleanup_and_restart()"}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_1178ecc2","line":73,"in_reply_to":"baada198_d6ce6a2c","updated":"2014-07-21 17:56:36.000000000","message":"It\u0027s used on line 58 and 74. Makes sense to me to have a method.","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"5454345f37acb728432bc14f5db78f6176fadac6","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":"MONGODB_DBPATH \u003d CONF.mongodb.mount_point"},{"line_number":28,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":29,"context_line":"LARGE_TIMEOUT \u003d 600"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class MongoDump(base.BackupRunner):"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_d7831902","line":29,"updated":"2014-10-23 03:53:35.000000000","message":"agree with robertmyers, this should be a conf.","commit_id":"b73e384f1ac59f13b85bde8c8674001f47c7c4fb"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"5454345f37acb728432bc14f5db78f6176fadac6","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    backup_commands \u003d ["},{"line_number":37,"context_line":"        \u0027sudo mkdir -p \u0027 + MONGO_DUMP_DIR,"},{"line_number":38,"context_line":"        \u0027sudo chown -R mongodb:mongodb \u0027 + MONGO_DUMP_DIR,"},{"line_number":39,"context_line":"        \u0027sudo mongodump --journal --dbpath \u0027 + MONGODB_DBPATH +"},{"line_number":40,"context_line":"        \u0027 --out \u0027 + MONGO_DUMP_DIR,"},{"line_number":41,"context_line":"    ]"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_d7acf9a2","line":39,"updated":"2014-10-23 03:53:35.000000000","message":"according to http://docs.mongodb.org/manual/tutorial/backup-with-mongodump/#basic-mongodump-operations, you\u0027ll want to remove the \"--journal and --dbpath\" arguments since we\u0027re going to make this work against a live/running database. see my comment below about not stop_db\u0027ing anymore either.","commit_id":"b73e384f1ac59f13b85bde8c8674001f47c7c4fb"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"5454345f37acb728432bc14f5db78f6176fadac6","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _run_pre_backup(self):"},{"line_number":49,"context_line":"        \"\"\"Create archival contents in dump dir\"\"\""},{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                # setting really high timeout here since"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_f7af3d92","line":50,"updated":"2014-10-23 03:53:35.000000000","message":"it\u0027s not necessary to stop the database to take a mongodump. a mongodump can be taken against a live/running database, see http://docs.mongodb.org/manual/tutorial/backup-with-mongodump/#basic-mongodump-operations.\n\nwith larger datasets, turning off the database for minutes to take a backup is unacceptable.","commit_id":"b73e384f1ac59f13b85bde8c8674001f47c7c4fb"},{"author":{"_account_id":6268,"name":"Robert Myers","email":"myer0052@gmail.com","username":"rmyers"},"change_message_id":"04d5996f4691219e9e40f829bcbe52c54a8a8563","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                # setting really high timeout here since"},{"line_number":54,"context_line":"                # mongodump can takeup a lot of time"},{"line_number":55,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue,"},{"line_number":56,"context_line":"                                           timeout\u003dLARGE_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_be208e9c","line":53,"updated":"2014-10-20 14:05:40.000000000","message":"If you are worried about timeout issues, this should *really* be a config option. I don\u0027t think a hard coded value could possibly work for all deployments. Please make this a config option in the mongodb section of the config.","commit_id":"b73e384f1ac59f13b85bde8c8674001f47c7c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"8c1f9a07ad2753aa34497eead118654842b50f26","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app.stop_db()"},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            for cmd in self.backup_commands:"},{"line_number":53,"context_line":"                # setting really high timeout here since"},{"line_number":54,"context_line":"                # mongodump can takeup a lot of time"},{"line_number":55,"context_line":"                utils.execute_with_timeout(cmd, shell\u003dTrue,"},{"line_number":56,"context_line":"                                           timeout\u003dLARGE_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_8f7e36e3","line":53,"in_reply_to":"9aa7fdbe_be208e9c","updated":"2014-10-20 15:40:04.000000000","message":"to be clear, we hardcode this kind of timeout in other places; this isn\u0027t something different.\n\nShould we instead consider all of these timeouts as parameters in an independent change?","commit_id":"b73e384f1ac59f13b85bde8c8674001f47c7c4fb"}],"trove/guestagent/strategies/restore/base.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"a59a78a350742dfcd5e0b5fbb947be5d7dbdd094","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        utils.raise_if_process_errored(process, RestoreError)"},{"line_number":102,"context_line":"        LOG.info(_(\"Restored %s bytes from stream.\") % content_length)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        return content_length"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @property"},{"line_number":107,"context_line":"    def decrypt_cmd(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5adbc538_a61427f6","side":"PARENT","line":104,"updated":"2014-05-25 08:12:54.000000000","message":"Any reason for removing empty line?","commit_id":"207adcd36c294cde92c9695f387d8b7a17146ea9"}],"trove/guestagent/strategies/restore/mongo_impl.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.openstack.common import log as logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"MONGODB_DBPATH \u003d \"/var/lib/mongodb\""},{"line_number":24,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":25,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8O4%3D","line":23,"updated":"2014-03-12 19:41:13.000000000","message":"should be retrieved from CONF","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _run_prepare(self):"},{"line_number":44,"context_line":"        LOG.info(\"Running mongorestore prepare: %s\" % self.prepare_cmd)"},{"line_number":45,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":46,"context_line":"        LOG.info(\"mongorestore prepare finished successfully\")"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8PQ%3D","line":44,"updated":"2014-03-12 19:41:13.000000000","message":"_()","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def _run_prepare(self):"},{"line_number":44,"context_line":"        LOG.info(\"Running mongorestore prepare: %s\" % self.prepare_cmd)"},{"line_number":45,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":46,"context_line":"        LOG.info(\"mongorestore prepare finished successfully\")"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def post_restore(self):"},{"line_number":49,"context_line":"        self._run_prepare()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8PM%3D","line":46,"updated":"2014-03-12 19:41:13.000000000","message":"_()","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        #service mongodb stop"},{"line_number":52,"context_line":"        utils.execute_with_timeout(\u0027service\u0027, \u0027mongodb\u0027, \u0027stop\u0027,"},{"line_number":53,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        #mongorestore --host IP --journal --drop --dbpath"},{"line_number":56,"context_line":"        # /var/lib/mongodb $MONGO_DUMP_DIR"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8Pk%3D","line":53,"updated":"2014-03-12 19:41:13.000000000","message":"please add exception handling","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"17b2a4da45ae2ba38500d429a738a5d8b73b60de","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.openstack.common import log as logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"MONGODB_DBPATH \u003d \"/var/lib/mongodb\""},{"line_number":24,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":25,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2FhjY%3D","line":23,"updated":"2014-04-20 13:34:13.000000000","message":"OK, this path is also in the corresponding backup impl ;) Shouldn\u0027t we find a way in which we don\u0027t have this definition in two places?","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.openstack.common import log as logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"MONGODB_DBPATH \u003d \"/var/lib/mongodb\""},{"line_number":24,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":25,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_2b3858ed","line":23,"in_reply_to":"AAAAXH%2F%2FddA%3D","updated":"2014-07-18 22:19:31.000000000","message":"datadir should be retrived from mongodb conf file.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"e91c86d8c58074051ba656c46c58aa3830794e57","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.openstack.common import log as logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"MONGODB_DBPATH \u003d \"/var/lib/mongodb\""},{"line_number":24,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":25,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2FddA%3D","line":23,"in_reply_to":"AAAAXH%2F%2FhjY%3D","updated":"2014-04-21 15:48:08.000000000","message":"Agreed and addressed in patchset 10.","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"d4fca39b271ef6b465fe722cde0c349fd1609f7f","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.openstack.common import log as logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"MONGODB_DBPATH \u003d \"/var/lib/mongodb\""},{"line_number":24,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":25,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2Fhgo%3D","line":23,"in_reply_to":"AAAAXH%2F%2FhjY%3D","updated":"2014-04-20 13:48:46.000000000","message":"agreed","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _run_prepare(self):"},{"line_number":44,"context_line":"        LOG.info(\"Running mongorestore prepare: %s\" % self.prepare_cmd)"},{"line_number":45,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":46,"context_line":"        LOG.info(\"mongorestore prepare finished successfully\")"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_e62695b9","line":44,"updated":"2014-07-18 22:19:31.000000000","message":"INFO level should be wrapped with _()","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def _run_prepare(self):"},{"line_number":44,"context_line":"        LOG.info(\"Running mongorestore prepare: %s\" % self.prepare_cmd)"},{"line_number":45,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":46,"context_line":"        LOG.info(\"mongorestore prepare finished successfully\")"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def post_restore(self):"},{"line_number":49,"context_line":"        self._run_prepare()"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_062c6998","line":46,"updated":"2014-07-18 22:19:31.000000000","message":"same","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"fd9b96ef670b7eb2fe333a244d3073f3a7909e8b","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        self._run_prepare()"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        #service mongodb stop"},{"line_number":52,"context_line":"        utils.execute_with_timeout(\u0027service\u0027, \u0027mongodb\u0027, \u0027stop\u0027,"},{"line_number":53,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        #mongorestore --host IP --journal --drop --dbpath"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_8b096433","line":52,"updated":"2014-07-18 22:19:31.000000000","message":"Please wrap this calls(line #51-#74) with try:except block","commit_id":"b19816642d63d9c3a6d011ec024b5c2193d2d7ce"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"02d9c0854fc97b8d6ab28d31d44658ded0611a31","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class MongoDump(base.RestoreRunner):"},{"line_number":31,"context_line":"    __strategy_name__ \u003d \u0027mongodump\u0027"},{"line_number":32,"context_line":"    base_prepare_cmd \u003d \u0027\u0027"},{"line_number":33,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xPf -\u0027"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FcHU%3D","line":31,"updated":"2014-04-21 19:27:55.000000000","message":"cfg.py had MongoDump; not sure whether case matters.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"9f9b1899daf9efcec8c980fc37cb71d3578c10b1","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class MongoDump(base.RestoreRunner):"},{"line_number":31,"context_line":"    __strategy_name__ \u003d \u0027mongodump\u0027"},{"line_number":32,"context_line":"    base_prepare_cmd \u003d \u0027\u0027"},{"line_number":33,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xPf -\u0027"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2Fa0E%3D","line":31,"in_reply_to":"AAAAXH%2F%2FcHU%3D","updated":"2014-04-21 23:10:48.000000000","message":"should be fine.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class MongoDump(base.RestoreRunner):"},{"line_number":31,"context_line":"    __strategy_name__ \u003d \u0027mongodump\u0027"},{"line_number":32,"context_line":"    base_prepare_cmd \u003d \u0027\u0027"},{"line_number":33,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xPf -\u0027"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR9Q%3D","line":31,"in_reply_to":"AAAAXH%2F%2FcHU%3D","updated":"2014-04-22 19:27:37.000000000","message":"this is a case insensetive attribute","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"33c8f16b178e077110dff0d40835d6e44f6924e6","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":36,"context_line":"        super(MongoDump, self).__init__(*args, **kwargs)"},{"line_number":37,"context_line":"        self.prepare_cmd \u003d self.base_prepare_cmd % kwargs"},{"line_number":38,"context_line":"        self.prep_retcode \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def pre_restore(self):"},{"line_number":41,"context_line":"        #rm -fr /var/lib/mongodb/dump"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSeU%3D","line":38,"updated":"2014-04-22 18:28:25.000000000","message":"I don\u0027t see this ever being used.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"356d1df46b680a3839a1db447291a16308683e98","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":36,"context_line":"        super(MongoDump, self).__init__(*args, **kwargs)"},{"line_number":37,"context_line":"        self.prepare_cmd \u003d self.base_prepare_cmd % kwargs"},{"line_number":38,"context_line":"        self.prep_retcode \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def pre_restore(self):"},{"line_number":41,"context_line":"        #rm -fr /var/lib/mongodb/dump"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSLo%3D","line":38,"in_reply_to":"AAAAXH%2F%2FSeU%3D","updated":"2014-04-22 18:51:41.000000000","message":"used in line 47","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def pre_restore(self):"},{"line_number":41,"context_line":"        #rm -fr /var/lib/mongodb/dump"},{"line_number":42,"context_line":"        utils.execute_with_timeout(\"rm\", \"-fr\", MONGO_DUMP_DIR,"},{"line_number":43,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _run_prepare(self):"},{"line_number":46,"context_line":"        LOG.info(\"Running mongorestore prepare: %s\" % self.prepare_cmd)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR8M%3D","line":43,"updated":"2014-04-22 19:27:37.000000000","message":"try except required","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _run_prepare(self):"},{"line_number":46,"context_line":"        LOG.info(\"Running mongorestore prepare: %s\" % self.prepare_cmd)"},{"line_number":47,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":48,"context_line":"        LOG.info(\"mongorestore prepare finished successfully\")"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR8g%3D","line":46,"updated":"2014-04-22 19:27:37.000000000","message":"localiztion missing","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"33c8f16b178e077110dff0d40835d6e44f6924e6","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _run_prepare(self):"},{"line_number":46,"context_line":"        LOG.info(\"Running mongorestore prepare: %s\" % self.prepare_cmd)"},{"line_number":47,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":48,"context_line":"        LOG.info(\"mongorestore prepare finished successfully\")"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def post_restore(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSdA%3D","line":47,"updated":"2014-04-22 18:28:25.000000000","message":"Why is this line here? base_prepare_cmd, from which it is derived, is empty.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"356d1df46b680a3839a1db447291a16308683e98","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _run_prepare(self):"},{"line_number":46,"context_line":"        LOG.info(\"Running mongorestore prepare: %s\" % self.prepare_cmd)"},{"line_number":47,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":48,"context_line":"        LOG.info(\"mongorestore prepare finished successfully\")"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def post_restore(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSLY%3D","line":47,"in_reply_to":"AAAAXH%2F%2FSdA%3D","updated":"2014-04-22 18:51:41.000000000","message":"Just a place holder in case future versions of mongo require some preparatory stuff to be done. Also base class requires it I think. Since prepare_cmd is empty currently, can simply skip executing it for now, yes.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"33c8f16b178e077110dff0d40835d6e44f6924e6","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":48,"context_line":"        LOG.info(\"mongorestore prepare finished successfully\")"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def post_restore(self):"},{"line_number":51,"context_line":"        self._run_prepare()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        #service mongodb stop"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSac%3D","line":50,"updated":"2014-04-22 18:28:25.000000000","message":"This is doing the actual restore in post_restore. This is not intuitive to me. Is the superclass not generic enough?","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"356d1df46b680a3839a1db447291a16308683e98","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.prep_retcode \u003d utils.execute(self.prepare_cmd, shell\u003dTrue)"},{"line_number":48,"context_line":"        LOG.info(\"mongorestore prepare finished successfully\")"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def post_restore(self):"},{"line_number":51,"context_line":"        self._run_prepare()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        #service mongodb stop"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSM0%3D","line":50,"in_reply_to":"AAAAXH%2F%2FSac%3D","updated":"2014-04-22 18:51:41.000000000","message":"\u0027restore()\u0027 call itself only \u0027downloads\u0027 the content from storage to the staging/dump area. There is a precendence in how other datastores (cassandra etc) also handle this. This is due to the decoupled nature of the backup/restore tools for these datastores (mongodump and mongorestore) which work off of a intermediate dump dir. The restore command should be ideally \n\n\u003cdatastore specific restore cmd\u003e   \u003csource of backup\u003e \u003cdestination db location\u003e  ... \nIf that was the case, then ideally everything could be done within restore() cmd. Since it is not, and it is a multi step process, you have to make a choice where you run the steps. I picked this way based on how other datastores did it. \n\nYou can have one complex monolithic cmd , for example that does something like \"sudo tar .. \u0026\u0026 sudo stop mongo... \u0026\u0026 sudo mongo restore ... \u0026\u0026 sudo rm -fr dump dir \"   and do it all in restore(). But I thought this was cleaner.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"02d9c0854fc97b8d6ab28d31d44658ded0611a31","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        #service mongodb stop"},{"line_number":54,"context_line":"        utils.execute_with_timeout(\u0027service\u0027, \u0027mongodb\u0027, \u0027stop\u0027,"},{"line_number":55,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        #mongorestore --host IP --journal --drop --dbpath"},{"line_number":58,"context_line":"        # /var/lib/mongodb $MONGO_DUMP_DIR"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FcHE%3D","line":55,"updated":"2014-04-21 19:27:55.000000000","message":"what if it didn\u0027t?","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        #service mongodb stop"},{"line_number":54,"context_line":"        utils.execute_with_timeout(\u0027service\u0027, \u0027mongodb\u0027, \u0027stop\u0027,"},{"line_number":55,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        #mongorestore --host IP --journal --drop --dbpath"},{"line_number":58,"context_line":"        # /var/lib/mongodb $MONGO_DUMP_DIR"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR8k%3D","line":55,"in_reply_to":"AAAAXH%2F%2FcHE%3D","updated":"2014-04-22 19:27:37.000000000","message":"Also, please do not duplicate the actual code, instantiate the mongo application and use app.stop()","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        #mongorestore --host IP --journal --drop --dbpath"},{"line_number":58,"context_line":"        # /var/lib/mongodb $MONGO_DUMP_DIR"},{"line_number":59,"context_line":"        utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP, \"--journal\","},{"line_number":60,"context_line":"                                   \"--drop\", \"--dbpath\", MONGODB_DBPATH,"},{"line_number":61,"context_line":"                                   MONGO_DUMP_DIR, run_as_root\u003dTrue,"},{"line_number":62,"context_line":"                                   root_helper\u003d\"sudo\", timeout\u003d300)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR78%3D","line":59,"updated":"2014-04-22 19:27:37.000000000","message":"try except required","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"d21623adde43c500f3f1977b08609612a45000c8","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP, \"--journal\","},{"line_number":60,"context_line":"                                   \"--drop\", \"--dbpath\", MONGODB_DBPATH,"},{"line_number":61,"context_line":"                                   MONGO_DUMP_DIR, run_as_root\u003dTrue,"},{"line_number":62,"context_line":"                                   root_helper\u003d\"sudo\", timeout\u003d300)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        #rm -fr /var/lib/mongodb/dump"},{"line_number":65,"context_line":"        utils.execute_with_timeout(\"rm\", \"-fr\", MONGO_DUMP_DIR,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FcNE%3D","line":62,"updated":"2014-04-21 19:06:13.000000000","message":"Is 300 seconds really enough to restore a large db?  Should this maybe be a CFG option?","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"02d9c0854fc97b8d6ab28d31d44658ded0611a31","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP, \"--journal\","},{"line_number":60,"context_line":"                                   \"--drop\", \"--dbpath\", MONGODB_DBPATH,"},{"line_number":61,"context_line":"                                   MONGO_DUMP_DIR, run_as_root\u003dTrue,"},{"line_number":62,"context_line":"                                   root_helper\u003d\"sudo\", timeout\u003d300)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        #rm -fr /var/lib/mongodb/dump"},{"line_number":65,"context_line":"        utils.execute_with_timeout(\"rm\", \"-fr\", MONGO_DUMP_DIR,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FcG0%3D","line":62,"updated":"2014-04-21 19:27:55.000000000","message":"whatever timeout you choose, hitting it is not a good thing. Not having a timeout is also problematic. Is there some way to check whether the command worked? documentation seems to imply command status is set.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"9f9b1899daf9efcec8c980fc37cb71d3578c10b1","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP, \"--journal\","},{"line_number":60,"context_line":"                                   \"--drop\", \"--dbpath\", MONGODB_DBPATH,"},{"line_number":61,"context_line":"                                   MONGO_DUMP_DIR, run_as_root\u003dTrue,"},{"line_number":62,"context_line":"                                   root_helper\u003d\"sudo\", timeout\u003d300)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        #rm -fr /var/lib/mongodb/dump"},{"line_number":65,"context_line":"        utils.execute_with_timeout(\"rm\", \"-fr\", MONGO_DUMP_DIR,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2Fa2U%3D","line":62,"in_reply_to":"AAAAXH%2F%2FcG0%3D","updated":"2014-04-21 23:10:48.000000000","message":"agreed that 300 is likely not enough. since a restore is to a new vm, i don\u0027t see that much harm in leaving it unbounded.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        #rm -fr /var/lib/mongodb/dump"},{"line_number":65,"context_line":"        utils.execute_with_timeout(\"rm\", \"-fr\", MONGO_DUMP_DIR,"},{"line_number":66,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        #chown -R mongodb:mongodb MONGODB_DBPATH"},{"line_number":69,"context_line":"        utils.execute_with_timeout(\"chown\", \"-R\", \"mongodb:nogroup\","}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR7g%3D","line":66,"updated":"2014-04-22 19:27:37.000000000","message":"code duplication, lines 40-43","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"33c8f16b178e077110dff0d40835d6e44f6924e6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        #chown -R mongodb:mongodb MONGODB_DBPATH"},{"line_number":69,"context_line":"        utils.execute_with_timeout(\"chown\", \"-R\", \"mongodb:nogroup\","},{"line_number":70,"context_line":"                                   MONGODB_DBPATH, run_as_root\u003dTrue,"},{"line_number":71,"context_line":"                                   root_helper\u003d\"sudo\")"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSWQ%3D","line":69,"updated":"2014-04-22 18:28:25.000000000","message":"Comment doesn\u0027t match code. Which group is right?","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8136,"name":"Viswa Vutharkar","email":"vpvutharkar@ebaysf.com","username":"vvutharkar"},"change_message_id":"356d1df46b680a3839a1db447291a16308683e98","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        #chown -R mongodb:mongodb MONGODB_DBPATH"},{"line_number":69,"context_line":"        utils.execute_with_timeout(\"chown\", \"-R\", \"mongodb:nogroup\","},{"line_number":70,"context_line":"                                   MONGODB_DBPATH, run_as_root\u003dTrue,"},{"line_number":71,"context_line":"                                   root_helper\u003d\"sudo\")"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FSQc%3D","line":69,"in_reply_to":"AAAAXH%2F%2FSWQ%3D","updated":"2014-04-22 18:51:41.000000000","message":"comment is incorrect.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                                   MONGODB_DBPATH, run_as_root\u003dTrue,"},{"line_number":71,"context_line":"                                   root_helper\u003d\"sudo\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        #service mongodb stop"},{"line_number":74,"context_line":"        utils.execute_with_timeout(\u0027service\u0027, \u0027mongodb\u0027, \u0027start\u0027,"},{"line_number":75,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR7Y%3D","line":73,"updated":"2014-04-22 19:27:37.000000000","message":"#service mongodb start","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"02d9c0854fc97b8d6ab28d31d44658ded0611a31","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                                   root_helper\u003d\"sudo\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        #service mongodb stop"},{"line_number":74,"context_line":"        utils.execute_with_timeout(\u0027service\u0027, \u0027mongodb\u0027, \u0027start\u0027,"},{"line_number":75,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FcG4%3D","line":74,"updated":"2014-04-21 19:27:55.000000000","message":"comment and code are inconsistent. Also, what if it won\u0027t start?","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"305fcc4003166011fb1757802af27bac2aca4897","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                                   root_helper\u003d\"sudo\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        #service mongodb stop"},{"line_number":74,"context_line":"        utils.execute_with_timeout(\u0027service\u0027, \u0027mongodb\u0027, \u0027start\u0027,"},{"line_number":75,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2FR7Q%3D","line":74,"in_reply_to":"AAAAXH%2F%2Fa2E%3D","updated":"2014-04-22 19:27:37.000000000","message":"agreed\nAlso, please do not duplicate the actual code, instantiate the mongo application and use app.start()","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"9f9b1899daf9efcec8c980fc37cb71d3578c10b1","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                                   root_helper\u003d\"sudo\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        #service mongodb stop"},{"line_number":74,"context_line":"        utils.execute_with_timeout(\u0027service\u0027, \u0027mongodb\u0027, \u0027start\u0027,"},{"line_number":75,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2Fa2E%3D","line":74,"in_reply_to":"AAAAXH%2F%2FcG4%3D","updated":"2014-04-21 23:10:48.000000000","message":"agreed on the inconsistency. the comment itself is fairly useless since it\u0027s simply restating the command as it exists below, so i\u0027d ask to remove it altogether.\n\ni\u0027d ask that the similar unhelpful comments above this also be removed; they don\u0027t add context and only have the chance of drift.","commit_id":"821a6182bbe5bee0237df25dc3e97848196a8bae"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"f58494e64c9018d1722f70fc9c4921a47c6e5e4f","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class MongoDump(base.RestoreRunner):"},{"line_number":33,"context_line":"    __strategy_name__ \u003d \u0027mongodump\u0027"},{"line_number":34,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xPf -\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    cleanup_commands \u003d ["},{"line_number":37,"context_line":"        \u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9ad9bd40_0a9d3abc","line":34,"updated":"2014-05-06 20:06:17.000000000","message":"it looks like the base class has a \"base_unzip_cmd\" - why not use that for this?","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"317d2d464c545cf315a3ef5d2e39067218dfb43c","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class MongoDump(base.RestoreRunner):"},{"line_number":33,"context_line":"    __strategy_name__ \u003d \u0027mongodump\u0027"},{"line_number":34,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xPf -\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    cleanup_commands \u003d ["},{"line_number":37,"context_line":"        \u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9ad9bd40_0adffa0d","line":34,"in_reply_to":"9ad9bd40_0a9d3abc","updated":"2014-05-06 20:31:41.000000000","message":"If you see the __init_ function for base class you will find unzip command is already being used in addition to the the base_restore_command.","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"e86bf6bfd600b9c69dc76e47597e1e1b8835bd4c","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class MongoDump(base.RestoreRunner):"},{"line_number":33,"context_line":"    __strategy_name__ \u003d \u0027mongodump\u0027"},{"line_number":34,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xPf -\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    cleanup_commands \u003d ["},{"line_number":37,"context_line":"        \u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9ad9bd40_52536c38","line":34,"in_reply_to":"9ad9bd40_0adffa0d","updated":"2014-05-07 11:08:10.000000000","message":"Maybe a comment would help to explain this?","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"f58494e64c9018d1722f70fc9c4921a47c6e5e4f","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def post_restore(self):"},{"line_number":54,"context_line":"        try:"},{"line_number":55,"context_line":"            utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP,"},{"line_number":56,"context_line":"                                       \"--journal\", \"--drop\", \"--dbpath\","},{"line_number":57,"context_line":"                                       MONGODB_DBPATH, MONGO_DUMP_DIR,"},{"line_number":58,"context_line":"                                       run_as_root\u003dTrue, root_helper\u003d\"sudo\","}],"source_content_type":"text/x-python","patch_set":12,"id":"9ad9bd40_cab6f23d","line":55,"updated":"2014-05-06 20:06:17.000000000","message":"Shouldn\u0027t this be the base_restore_cmd? Seems odd to have the actual restore run in the post restore step.","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"e86bf6bfd600b9c69dc76e47597e1e1b8835bd4c","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def post_restore(self):"},{"line_number":54,"context_line":"        try:"},{"line_number":55,"context_line":"            utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP,"},{"line_number":56,"context_line":"                                       \"--journal\", \"--drop\", \"--dbpath\","},{"line_number":57,"context_line":"                                       MONGODB_DBPATH, MONGO_DUMP_DIR,"},{"line_number":58,"context_line":"                                       run_as_root\u003dTrue, root_helper\u003d\"sudo\","}],"source_content_type":"text/x-python","patch_set":12,"id":"9ad9bd40_f25f203f","line":55,"in_reply_to":"9ad9bd40_8ab14a91","updated":"2014-05-07 11:08:10.000000000","message":"Maybe add that information as a comment?","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"17756457224d1f5711884fab8e1757e322493c56","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def post_restore(self):"},{"line_number":54,"context_line":"        try:"},{"line_number":55,"context_line":"            utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP,"},{"line_number":56,"context_line":"                                       \"--journal\", \"--drop\", \"--dbpath\","},{"line_number":57,"context_line":"                                       MONGODB_DBPATH, MONGO_DUMP_DIR,"},{"line_number":58,"context_line":"                                       run_as_root\u003dTrue, root_helper\u003d\"sudo\","}],"source_content_type":"text/x-python","patch_set":12,"id":"9ad9bd40_e6e845e4","line":55,"in_reply_to":"9ad9bd40_cab6f23d","updated":"2014-05-07 11:45:18.000000000","message":"actual restore command is the command that streams data.\n\nthis command creates FS object type entity that will be streamed to Storage","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"317d2d464c545cf315a3ef5d2e39067218dfb43c","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def post_restore(self):"},{"line_number":54,"context_line":"        try:"},{"line_number":55,"context_line":"            utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP,"},{"line_number":56,"context_line":"                                       \"--journal\", \"--drop\", \"--dbpath\","},{"line_number":57,"context_line":"                                       MONGODB_DBPATH, MONGO_DUMP_DIR,"},{"line_number":58,"context_line":"                                       run_as_root\u003dTrue, root_helper\u003d\"sudo\","}],"source_content_type":"text/x-python","patch_set":12,"id":"9ad9bd40_8ab14a91","line":55,"in_reply_to":"9ad9bd40_cab6f23d","updated":"2014-05-06 20:31:41.000000000","message":"mongorestore cannot read from stdin. As such I thought this way was more readable","commit_id":"b208563f4602d32901ef3ed5eac1375ed99421d2"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"0229d54c3156ed73d202ea92055589eef567b974","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    cleanup_commands \u003d ["},{"line_number":37,"context_line":"        \u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR,"},{"line_number":38,"context_line":"        \u0027sudo chown -R mongodb:nogroup \u0027 + MONGODB_DBPATH"},{"line_number":39,"context_line":"    ]"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ae8d1ca_1af6f8d7","line":38,"updated":"2014-05-27 18:45:20.000000000","message":"Why is this needed?","commit_id":"edcd59c65e0322f4ec860b3219e1e5fa6c617d11"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"9cbcf3caef1e730f19fd8641b0a7c2bc44e614a2","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    cleanup_commands \u003d ["},{"line_number":37,"context_line":"        \u0027sudo rm -fr \u0027 + MONGO_DUMP_DIR,"},{"line_number":38,"context_line":"        \u0027sudo chown -R mongodb:nogroup \u0027 + MONGODB_DBPATH"},{"line_number":39,"context_line":"    ]"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3ae8d1ca_faa22c99","line":38,"in_reply_to":"3ae8d1ca_1af6f8d7","updated":"2014-05-27 19:00:23.000000000","message":"Since the dbpath contents during mongorestore are written as root, the ownership needs to change back to mongodb","commit_id":"edcd59c65e0322f4ec860b3219e1e5fa6c617d11"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"474ac2ae766fe3b923ae55416be84ebc5af44743","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.app.stop_db()"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def post_restore(self):"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        Actual restore command streams the archive data from the object store"},{"line_number":52,"context_line":"        This command creates DB FS object xtype from the storage archive"},{"line_number":53,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_fbbbfd0b","line":50,"updated":"2014-05-28 07:46:02.000000000","message":"Try:except block is required for each exec","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"2012fdad77815e3d718fd3a478c27a2ed3429fb7","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.app.stop_db()"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def post_restore(self):"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        Actual restore command streams the archive data from the object store"},{"line_number":52,"context_line":"        This command creates DB FS object xtype from the storage archive"},{"line_number":53,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"3ae8d1ca_e9dde571","line":50,"in_reply_to":"3ae8d1ca_fbbbfd0b","updated":"2014-05-28 16:48:54.000000000","message":"backup agent already catches this. No point of having try except here","commit_id":"68104327bd2a06d57a121e3a19537ddc62f9d4ef"},{"author":{"_account_id":9895,"name":"Michael Yu","email":"michayu@ebaysf.com","username":"michayu"},"change_message_id":"b84a05ec7af1d52cd0876fd0b02ef75317ab28ee","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 eBay, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_4b002c66","line":1,"updated":"2014-07-18 22:11:30.000000000","message":"Change to:\n\t# Copyright (c) 2014 eBay Software Foundation","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"323049219a200ac63705133b4bff5d066f67a4fa","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 eBay, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_84587232","line":1,"in_reply_to":"baada198_4b002c66","updated":"2014-07-21 13:14:29.000000000","message":"Done","commit_id":"ae69fc055eb708fc748f9950fc8ac83a0b9d692f"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"603065a273aa033af2078bcf85d0715efafc14bd","unresolved":false,"context_lines":[{"line_number":24,"context_line":"CONF \u003d cfg.CONF"},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":27,"context_line":"LARGE_TIMEOUT \u003d 36000"},{"line_number":28,"context_line":"MONGODB_DBPATH \u003d CONF.get(\u0027mongodb\u0027).mount_point"},{"line_number":29,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_c146adbf","line":27,"updated":"2014-07-21 15:42:17.000000000","message":"I think this is 10 hours.","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"CONF \u003d cfg.CONF"},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":27,"context_line":"LARGE_TIMEOUT \u003d 36000"},{"line_number":28,"context_line":"MONGODB_DBPATH \u003d CONF.get(\u0027mongodb\u0027).mount_point"},{"line_number":29,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_68c5c15a","line":27,"in_reply_to":"baada198_c146adbf","updated":"2014-07-21 17:21:23.000000000","message":"Changing it to 10 minutes.","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"603065a273aa033af2078bcf85d0715efafc14bd","unresolved":false,"context_lines":[{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":27,"context_line":"LARGE_TIMEOUT \u003d 36000"},{"line_number":28,"context_line":"MONGODB_DBPATH \u003d CONF.get(\u0027mongodb\u0027).mount_point"},{"line_number":29,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_e1a5719f","line":28,"updated":"2014-07-21 15:42:17.000000000","message":"Might want to change for consistency with Denis\u0027 comment on other file.","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"e0fdd1e3751bf6302115aa8f4381b2549fc2830e","unresolved":false,"context_lines":[{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":"IP \u003d operating_system.get_ip_address()"},{"line_number":27,"context_line":"LARGE_TIMEOUT \u003d 36000"},{"line_number":28,"context_line":"MONGODB_DBPATH \u003d CONF.get(\u0027mongodb\u0027).mount_point"},{"line_number":29,"context_line":"MONGO_DUMP_DIR \u003d MONGODB_DBPATH + \"/dump\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_48f55dc9","line":28,"in_reply_to":"baada198_e1a5719f","updated":"2014-07-21 17:21:23.000000000","message":"Done","commit_id":"b89109dd851b981ffc066302ec81d69325c837e2"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"77b96b44da193bfb170811079c3e711fdab0d43c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        Actual restore command streams the archive data from the object store"},{"line_number":52,"context_line":"        This command creates DB FS object xtype from the storage archive"},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP,"},{"line_number":55,"context_line":"                                   \"--journal\", \"--drop\", \"--dbpath\","},{"line_number":56,"context_line":"                                   MONGODB_DBPATH, MONGO_DUMP_DIR,"},{"line_number":57,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\","}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_9696b2ee","line":54,"updated":"2014-07-21 17:36:26.000000000","message":"shouldn\u0027t be this exec wrapped with try:except block ?","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"9b42648f527c54b4618d7003403261da7ffacb8f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        Actual restore command streams the archive data from the object store"},{"line_number":52,"context_line":"        This command creates DB FS object xtype from the storage archive"},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        utils.execute_with_timeout(\"mongorestore\", \u0027--host\u0027, IP,"},{"line_number":55,"context_line":"                                   \"--journal\", \"--drop\", \"--dbpath\","},{"line_number":56,"context_line":"                                   MONGODB_DBPATH, MONGO_DUMP_DIR,"},{"line_number":57,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\"sudo\","}],"source_content_type":"text/x-python","patch_set":18,"id":"baada198_d75584c2","line":54,"in_reply_to":"baada198_9696b2ee","updated":"2014-07-21 18:29:02.000000000","message":"Not really. Any exceptions are caught by the mongodb manager in _perform_restore","commit_id":"540494c6761d3e8af0f90e19845f0dd5d0d8c620"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"1fe31e5b494afce86cacd9ba466c0920270aea58","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        for cmd in self.cleanup_commands:"},{"line_number":62,"context_line":"            utils.execute_with_timeout(cmd, shell\u003dTrue)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self.app.start_db()"}],"source_content_type":"text/x-python","patch_set":26,"id":"9aa7fdbe_2ff1cacd","line":64,"updated":"2014-10-20 15:34:47.000000000","message":"Might be a good idea to wrap this block in a try-except statement. Thanks","commit_id":"b73e384f1ac59f13b85bde8c8674001f47c7c4fb"}],"trove/tests/unittests/backup/test_backupagent.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"01bddcd3c3f2857cd1252d1c976a2864173e6237","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def test_backup_impl_MongoDump(self):"},{"line_number":211,"context_line":"        operating_system.get_ip_address \u003d Mock(return_value\u003d\"1.1.1.1\")"},{"line_number":212,"context_line":"        mongodump \u003d mongo_impl.MongoDump(\u0027mongodump\u0027, extra_opts\u003d\u0027\u0027)"},{"line_number":213,"context_line":"        self.assertIsNotNone(mongodump)"},{"line_number":214,"context_line":"        str_mongodump_cmd \u003d (\"{ { sudo service mongodb stop 1\u003e/dev/null 2\u003e\u00261 \""},{"line_number":215,"context_line":"                             \"|| true; } \u0026\u0026 sudo rm -fr /var/lib/mongodb/dump\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2F8Oo%3D","line":212,"updated":"2014-03-12 19:41:13.000000000","message":"execute_with_timeout method should be mocked to avoid errors of running command on real jenkins slave:\n\n\n2014-03-11 05:00:33.318 | + .tox/py26/bin/subunit-1to2\n2014-03-11 05:00:33.572 | + .tox/py26/bin/python /usr/local/jenkins/slave_scripts/subunit2html.py ./subunit_log.txt testr_results.html\n2014-03-11 05:00:33.792 | + gzip -9 ./subunit_log.txt\n2014-03-11 05:00:33.801 | + gzip -9 ./testr_results.html\n2014-03-11 05:00:33.814 | + export PYTHON\u003d.tox/py26/bin/python\n2014-03-11 05:00:33.814 | + PYTHON\u003d.tox/py26/bin/python\n2014-03-11 05:00:33.814 | ++ .tox/py26/bin/testr last\n2014-03-11 05:00:33.815 | ++ sed -ne \u0027s/Ran \\([0-9]\\+\\).*tests in.*/\\1/p\u0027\n2014-03-11 05:00:34.054 | + rancount\u003d644\n2014-03-11 05:00:34.054 | + \u0027[\u0027 644 -eq 0 \u0027]\u0027\n2014-03-11 05:00:34.054 | + sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh post\n2014-03-11 05:00:34.142 | ls: cannot access /var/log/secure-*: No such file or directory\n2014-03-11 05:00:34.145 | stat: missing operand\n2014-03-11 05:00:34.145 | Try `stat --help\u0027 for more information.\n2014-03-11 05:00:34.150 | + sudoresult\u003d0\n2014-03-11 05:00:34.150 | + \u0027[\u0027 0 -ne 0 \u0027]\u0027\n2014-03-11 05:00:34.150 | + /usr/local/jenkins/slave_scripts/jenkins-oom-grep.sh post\n2014-03-11 05:00:34.155 | + oomresult\u003d0\n2014-03-11 05:00:34.155 | + \u0027[\u0027 0 -ne 0 \u0027]\u0027\n2014-03-11 05:00:34.156 | ++ find . -name nose_results.html\n2014-03-11 05:00:34.172 | + htmlreport\u003d\n2014-03-11 05:00:34.172 | + \u0027[\u0027 -f \u0027\u0027 \u0027]\u0027","commit_id":"e4e0b0128d74fa2f36de85c6b4d8172935163165"}],"trove/tests/unittests/guestagent/test_mongodb_manager.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"aec1fc0a486211bf9d61c3e561f3acf888052e26","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from trove.guestagent.datastore.mongodb import service as mongo_service"},{"line_number":22,"context_line":"from trove.guestagent.datastore.mongodb import manager as mongo_manager"},{"line_number":23,"context_line":"from trove.guestagent.volume import VolumeDevice"},{"line_number":24,"context_line":"from trove.guestagent import backup"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class GuestAgentMongoDBManagerTest(testtools.TestCase):"}],"source_content_type":"text/x-python","patch_set":20,"id":"baada198_df1868d0","line":24,"updated":"2014-08-10 12:34:04.000000000","message":"please move this import according to alphabetic order","commit_id":"fe1f13f124146e5e61da08702dbba37962ef80bb"},{"author":{"_account_id":5293,"name":"Nikhil","email":"SlickNik@gmail.com","username":"slicknik"},"change_message_id":"9dd878db3710c4b37834789d042d2859c9f57794","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        volume.VolumeDevice.migrate_data \u003d MagicMock(return_value\u003dNone)"},{"line_number":83,"context_line":"        volume.VolumeDevice.mount \u003d MagicMock(return_value\u003dNone)"},{"line_number":84,"context_line":"        volume.VolumeDevice.mount_points \u003d MagicMock(return_value\u003d[])"},{"line_number":85,"context_line":"        backup.restore \u003d MagicMock(return_value\u003dNone)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        mock_app.stop_db \u003d MagicMock(return_value\u003dNone)"},{"line_number":88,"context_line":"        mock_app.start_db \u003d MagicMock(return_value\u003dNone)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_c0357147","line":85,"updated":"2014-09-01 08:28:02.000000000","message":"This method in the backup module is being mocked, but not unmocked after the tests are run. \n\nThis can potentially cause issues in later unit tests.","commit_id":"47673f358aa24a6ea9f7c90982f1fbe1b1dc06dd"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"1e3ad9c43f5321ce4652ff67a401f426e8724e55","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        volume.VolumeDevice.migrate_data \u003d MagicMock(return_value\u003dNone)"},{"line_number":83,"context_line":"        volume.VolumeDevice.mount \u003d MagicMock(return_value\u003dNone)"},{"line_number":84,"context_line":"        volume.VolumeDevice.mount_points \u003d MagicMock(return_value\u003d[])"},{"line_number":85,"context_line":"        backup.restore \u003d MagicMock(return_value\u003dNone)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        mock_app.stop_db \u003d MagicMock(return_value\u003dNone)"},{"line_number":88,"context_line":"        mock_app.start_db \u003d MagicMock(return_value\u003dNone)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_8d8159c5","line":85,"in_reply_to":"fa98f980_c0357147","updated":"2014-09-03 18:26:29.000000000","message":"Fixed. thanks!","commit_id":"47673f358aa24a6ea9f7c90982f1fbe1b1dc06dd"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"b90892f8f3635657eff69d8838c43fda103a2641","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        mock_app.clear_storage \u003d MagicMock(return_value\u003dNone)"},{"line_number":90,"context_line":"        os.path.exists \u003d MagicMock(return_value\u003dis_db_installed)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        with patch.object(utils, \u0027execute_with_timeout\u0027):"},{"line_number":93,"context_line":"            # invocation"},{"line_number":94,"context_line":"            self.manager.prepare(context\u003dself.context, databases\u003dNone,"},{"line_number":95,"context_line":"                                 packages\u003d[\u0027package\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"1abeadc6_6ddd02e0","line":92,"updated":"2014-08-21 04:06:01.000000000","message":"Is both the patch.object and the setUp and tearDown swapping necessary? My understanding is that these are doing the same thing.","commit_id":"47673f358aa24a6ea9f7c90982f1fbe1b1dc06dd"},{"author":{"_account_id":10139,"name":"Ramashri Umale","email":"rumale@ebaysf.com","username":"rumale"},"change_message_id":"1e3ad9c43f5321ce4652ff67a401f426e8724e55","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        mock_app.clear_storage \u003d MagicMock(return_value\u003dNone)"},{"line_number":90,"context_line":"        os.path.exists \u003d MagicMock(return_value\u003dis_db_installed)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        with patch.object(utils, \u0027execute_with_timeout\u0027):"},{"line_number":93,"context_line":"            # invocation"},{"line_number":94,"context_line":"            self.manager.prepare(context\u003dself.context, databases\u003dNone,"},{"line_number":95,"context_line":"                                 packages\u003d[\u0027package\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_6d80b5c0","line":92,"in_reply_to":"1abeadc6_6ddd02e0","updated":"2014-09-03 18:26:29.000000000","message":"Fixed. thanks!","commit_id":"47673f358aa24a6ea9f7c90982f1fbe1b1dc06dd"}]}
