)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e7a6c0e35283a02a4b647e966ec84d2ee9800b5e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use less restrictive permission for recon cache"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixies this problem:"},{"line_number":10,"context_line":"* swift-drive-recon needs to be run by root, because only root have \"umount\" permission"},{"line_number":11,"context_line":"* swift-object servers typically runs as user swift"},{"line_number":12,"context_line":"* if swift-drive-recon is run by root, /var/cache/swift/drive.recon is owned by root, with 0o600"},{"line_number":13,"context_line":"* recon middleware (inside swift-object-server) can\u0027t read this cache file:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa6399be_ab47164a","line":10,"updated":"2016-10-17 18:41:17.000000000","message":"swift-drive-audit surely?","commit_id":"061f915ab56262ad3644753b957f5f72dd775d4d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b1bb2ec1ae89fb2da664b39375ad7e85b48a5dc2","unresolved":false,"context_lines":[{"line_number":13,"context_line":"* recon middleware (inside swift-object-server) can\u0027t read this cache file:"},{"line_number":14,"context_line":"  swift-object: Error reading recon cache file:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch add \"user\" option to drive-audit config file. Recon cache is chowned to this user."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ibf20543ee690b7c5a37fabd1540fd5c0c7b638c9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa6399be_f7f1ec6b","line":16,"updated":"2016-10-17 22:08:16.000000000","message":"I think the width here is a bit long for recommended style of 72 chars\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"802c143957961d6ecef5ba017a6c27bde592e957"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"e31355836002e504a53fc8b89da9da0f30b050d8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"* recon middleware (inside swift-object-server) can\u0027t read this cache file:"},{"line_number":14,"context_line":"  swift-object: Error reading recon cache file:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch add \"user\" option to drive-audit config file. Recon cache is chowned to this user."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ibf20543ee690b7c5a37fabd1540fd5c0c7b638c9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa6399be_fc1f05b5","line":16,"in_reply_to":"fa6399be_f7f1ec6b","updated":"2016-10-18 08:33:17.000000000","message":"Done","commit_id":"802c143957961d6ecef5ba017a6c27bde592e957"},{"author":{"_account_id":20508,"name":"Mohit Motiani","email":"mohit.motiani@intel.com","username":"mohit.motiani"},"change_message_id":"aeb8ead2c303c9e02bd172e74bc9a8106fbc8b08","unresolved":false,"context_lines":[{"line_number":15,"context_line":"* recon middleware (inside swift-object-server) can\u0027t read this cache"},{"line_number":16,"context_line":"  file: swift-object: Error reading recon cache file"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This patch add \"user\" option to drive-audit config file. Recon cache"},{"line_number":19,"context_line":"is chowned to this user."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Ibf20543ee690b7c5a37fabd1540fd5c0c7b638c9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa6399be_0e1d460f","line":18,"updated":"2016-10-18 16:50:00.000000000","message":"s/add/adds","commit_id":"95d666f281d652e0052a51ea830c891c83f1231b"}],"doc/source/admin_guide.rst":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b1bb2ec1ae89fb2da664b39375ad7e85b48a5dc2","unresolved":false,"context_lines":[{"line_number":264,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":265,"context_line":"Option              Default         Description"},{"line_number":266,"context_line":"------------------  --------------  -------------------------------------------"},{"line_number":267,"context_line":"user                swift           Onwer of recon cache file"},{"line_number":268,"context_line":"log_facility        LOG_LOCAL0      Syslog log facility"},{"line_number":269,"context_line":"log_level           INFO            Log level"},{"line_number":270,"context_line":"device_dir          /srv/node       Directory devices are mounted under"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_d7778806","line":267,"updated":"2016-10-17 22:08:16.000000000","message":"s/Onwer/Owner\n\nThere maybe a more useful description of this option that ends up being more helpful in the long run... I\u0027m assuming that anything this script does besides the stuff it requires to do as root should effectively be done by this user.\n\nBut I suppose that may be corollary.","commit_id":"802c143957961d6ecef5ba017a6c27bde592e957"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"e31355836002e504a53fc8b89da9da0f30b050d8","unresolved":false,"context_lines":[{"line_number":264,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":265,"context_line":"Option              Default         Description"},{"line_number":266,"context_line":"------------------  --------------  -------------------------------------------"},{"line_number":267,"context_line":"user                swift           Onwer of recon cache file"},{"line_number":268,"context_line":"log_facility        LOG_LOCAL0      Syslog log facility"},{"line_number":269,"context_line":"log_level           INFO            Log level"},{"line_number":270,"context_line":"device_dir          /srv/node       Directory devices are mounted under"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_3c789df8","line":267,"in_reply_to":"fa6399be_d7778806","updated":"2016-10-18 08:33:17.000000000","message":"Done","commit_id":"802c143957961d6ecef5ba017a6c27bde592e957"},{"author":{"_account_id":20508,"name":"Mohit Motiani","email":"mohit.motiani@intel.com","username":"mohit.motiani"},"change_message_id":"aeb8ead2c303c9e02bd172e74bc9a8106fbc8b08","unresolved":false,"context_lines":[{"line_number":265,"context_line":"Option              Default         Description"},{"line_number":266,"context_line":"------------------  --------------  -------------------------------------------"},{"line_number":267,"context_line":"user                swift           Drop privileges to this user for non-root"},{"line_number":268,"context_line":"                                    tasks"},{"line_number":269,"context_line":"log_facility        LOG_LOCAL0      Syslog log facility"},{"line_number":270,"context_line":"log_level           INFO            Log level"},{"line_number":271,"context_line":"device_dir          /srv/node       Directory devices are mounted under"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa6399be_0b929857","line":268,"updated":"2016-10-18 16:50:00.000000000","message":"could be framed like this:\nDrop privileges to \u0027user\u0027 for non-root tasks.","commit_id":"95d666f281d652e0052a51ea830c891c83f1231b"}],"etc/drive-audit.conf-sample":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b1bb2ec1ae89fb2da664b39375ad7e85b48a5dc2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[drive-audit]"},{"line_number":2,"context_line":"# user \u003d swift"},{"line_number":3,"context_line":"# device_dir \u003d /srv/node"},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"# You can specify default log routing here if you want:"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"fa6399be_37b444d0","line":2,"updated":"2016-10-17 22:08:16.000000000","message":"interesting, I didn\u0027t realize this utilities configuration didn\u0027t already have [DEFAULT] section that mirrored all the other daemons","commit_id":"802c143957961d6ecef5ba017a6c27bde592e957"}],"swift/common/utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b1bb2ec1ae89fb2da664b39375ad7e85b48a5dc2","unresolved":false,"context_lines":[{"line_number":3065,"context_line":"                                        delete\u003dFalse) as tf:"},{"line_number":3066,"context_line":"                    tf.write(json.dumps(cache_entry) + \u0027\\n\u0027)"},{"line_number":3067,"context_line":"                if set_owner:"},{"line_number":3068,"context_line":"                    os.chown(tf.name, pwd.getpwnam(set_owner).pw_uid, -1)"},{"line_number":3069,"context_line":"                renamer(tf.name, cache_file, fsync\u003dFalse)"},{"line_number":3070,"context_line":"            finally:"},{"line_number":3071,"context_line":"                if tf is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_971fd0b6","line":3068,"updated":"2016-10-17 22:08:16.000000000","message":"when swift-drive-audit creates this file owned by root:root - is it reasonable to change the ownership to swift:root until one of the other recon daemons comes along and changes the file to swift:swift - then later again drive audit as swift:root again and again ad nauseum?  idk, i guess it\u0027s fine.","commit_id":"802c143957961d6ecef5ba017a6c27bde592e957"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"e31355836002e504a53fc8b89da9da0f30b050d8","unresolved":false,"context_lines":[{"line_number":3065,"context_line":"                                        delete\u003dFalse) as tf:"},{"line_number":3066,"context_line":"                    tf.write(json.dumps(cache_entry) + \u0027\\n\u0027)"},{"line_number":3067,"context_line":"                if set_owner:"},{"line_number":3068,"context_line":"                    os.chown(tf.name, pwd.getpwnam(set_owner).pw_uid, -1)"},{"line_number":3069,"context_line":"                renamer(tf.name, cache_file, fsync\u003dFalse)"},{"line_number":3070,"context_line":"            finally:"},{"line_number":3071,"context_line":"                if tf is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_5ccb911e","line":3068,"in_reply_to":"fa6399be_971fd0b6","updated":"2016-10-18 08:33:17.000000000","message":"dump_recon_cache is called by root only from drive-audit, which is only producer of drive-audit.recon. So this problem will not happen.","commit_id":"802c143957961d6ecef5ba017a6c27bde592e957"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b1bb2ec1ae89fb2da664b39375ad7e85b48a5dc2","unresolved":false,"context_lines":[{"line_number":1390,"context_line":"            _mock_chown \u003d mock.Mock()"},{"line_number":1391,"context_line":""},{"line_number":1392,"context_line":"            with patch(\u0027os.chown\u0027, _mock_chown):"},{"line_number":1393,"context_line":"                with patch(\u0027pwd.getpwnam\u0027, _mock_getpwnam):"},{"line_number":1394,"context_line":"                    utils.dump_recon_cache(submit_dict, testcache_file,"},{"line_number":1395,"context_line":"                                           logger, set_owner\u003d\"swift\")"},{"line_number":1396,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_37d524b9","line":1393,"updated":"2016-10-17 22:08:16.000000000","message":"nit, FYI, python 2.7 recommends with statements joined up with , \\\n\nhttps://docs.python.org/3/reference/compound_stmts.html#the-with-statement","commit_id":"802c143957961d6ecef5ba017a6c27bde592e957"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"e31355836002e504a53fc8b89da9da0f30b050d8","unresolved":false,"context_lines":[{"line_number":1390,"context_line":"            _mock_chown \u003d mock.Mock()"},{"line_number":1391,"context_line":""},{"line_number":1392,"context_line":"            with patch(\u0027os.chown\u0027, _mock_chown):"},{"line_number":1393,"context_line":"                with patch(\u0027pwd.getpwnam\u0027, _mock_getpwnam):"},{"line_number":1394,"context_line":"                    utils.dump_recon_cache(submit_dict, testcache_file,"},{"line_number":1395,"context_line":"                                           logger, set_owner\u003d\"swift\")"},{"line_number":1396,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_7cd055ca","line":1393,"in_reply_to":"fa6399be_37d524b9","updated":"2016-10-18 08:33:17.000000000","message":"Done","commit_id":"802c143957961d6ecef5ba017a6c27bde592e957"}]}
