)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"9d5f306aeb755bd89cb9e96791c37d1acd93e874","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Note:"},{"line_number":28,"context_line":"-----"},{"line_number":29,"context_line":"1. Store with priority 200 has precedence over store with priority 100"},{"line_number":30,"context_line":"2. If no priority is specified, default priority \u00270\u0027 is associated with it."},{"line_number":31,"context_line":"3. If two filesystem stores have same priority store with maximum free space"},{"line_number":32,"context_line":"will be chosen to store the image."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F%2BIEY%3D","line":29,"updated":"2013-12-02 10:11:58.000000000","message":"Do you think we can do this simply by using directory\u0027s nature order in the list as its priority/weight directly? thanks.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"b17552d533ee2b9cdf11099cebf325cabdd5d099","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Note:"},{"line_number":28,"context_line":"-----"},{"line_number":29,"context_line":"1. Store with priority 200 has precedence over store with priority 100"},{"line_number":30,"context_line":"2. If no priority is specified, default priority \u00270\u0027 is associated with it."},{"line_number":31,"context_line":"3. If two filesystem stores have same priority store with maximum free space"},{"line_number":32,"context_line":"will be chosen to store the image."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F9kP4%3D","line":29,"in_reply_to":"AAAATn%2F%2BIEY%3D","updated":"2013-12-10 06:33:31.000000000","message":"Priority logic is meant to balance the disk usages. As a service provider you can simply list the store directory names without priority.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ea8f7bd01cd36f76842450faa386684df0b788e4","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Note:"},{"line_number":28,"context_line":"-----"},{"line_number":29,"context_line":"1. Store with priority 200 has precedence over store with priority 100"},{"line_number":30,"context_line":"2. If no priority is specified, default priority \u00270\u0027 is associated with it."},{"line_number":31,"context_line":"3. If two filesystem stores have same priority store with maximum free space"},{"line_number":32,"context_line":"will be chosen to store the image."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F9RVc%3D","line":29,"in_reply_to":"AAAATn%2F9dnY%3D","updated":"2013-12-13 09:01:57.000000000","message":"I agree with Aswad. Paths need to be weighted somehow.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"df0886d19521d2cd70576974525512a5f08256c1","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Note:"},{"line_number":28,"context_line":"-----"},{"line_number":29,"context_line":"1. Store with priority 200 has precedence over store with priority 100"},{"line_number":30,"context_line":"2. If no priority is specified, default priority \u00270\u0027 is associated with it."},{"line_number":31,"context_line":"3. If two filesystem stores have same priority store with maximum free space"},{"line_number":32,"context_line":"will be chosen to store the image."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F9dnY%3D","line":29,"in_reply_to":"AAAATn%2F9kKw%3D","updated":"2013-12-11 09:04:05.000000000","message":"Hi Zhi Yan Liu,\n\nConsider 3 nfs servers nfs1, nfs2, nfs3 having 100 GB storing capacity each. \nIf priority is not given then it will consume all the space of nfs1 for storing images first and then will go for nfs2 and so on.\nAs a service provider we want to balance the disk usage so if same priority is given to nfs1, nfs2, nfs3 then there will be fair distribution amongst them based on free space available.\n\nFair distribution will be possible only if we provide priority to the store directories.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"dbbdb21f56f0503ebffa9591eb5afe568a322844","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Note:"},{"line_number":28,"context_line":"-----"},{"line_number":29,"context_line":"1. Store with priority 200 has precedence over store with priority 100"},{"line_number":30,"context_line":"2. If no priority is specified, default priority \u00270\u0027 is associated with it."},{"line_number":31,"context_line":"3. If two filesystem stores have same priority store with maximum free space"},{"line_number":32,"context_line":"will be chosen to store the image."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F9kKw%3D","line":29,"in_reply_to":"AAAATn%2F9kP4%3D","updated":"2013-12-10 07:04:06.000000000","message":"make priority supporting is make sense to me, but what i\u0027m saying here is that using the dir item\u0027s order of list option as an implicit dir priority is a good choice, why we need end user give a explicit priority number here? imo each dir\u0027s order just is a  priority.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"3. If no priority is specified, default priority \u00270\u0027 is associated with it."},{"line_number":35,"context_line":"4. If two filesystem stores have same priority store with maximum free space"},{"line_number":36,"context_line":"will be chosen to store the image."},{"line_number":37,"context_line":"5. If same store is specified multiple times with same/different priority"},{"line_number":38,"context_line":"then priority of first occurence of store in configuration is used."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"blueprint: glance-multifilesystem-store"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FIwI%3D","line":37,"updated":"2014-01-17 04:51:44.000000000","message":"I consider raising an exception out for this case will make more sense to me/admin.","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":34,"context_line":"3. If no priority is specified, default priority \u00270\u0027 is associated with it."},{"line_number":35,"context_line":"4. If two filesystem stores have same priority store with maximum free space"},{"line_number":36,"context_line":"will be chosen to store the image."},{"line_number":37,"context_line":"5. If same store is specified multiple times with same/different priority"},{"line_number":38,"context_line":"then priority of first occurence of store in configuration is used."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"blueprint: glance-multifilesystem-store"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FHyw%3D","line":37,"in_reply_to":"AAAAUH%2F%2FIwI%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":35,"context_line":"4. If two filesystem stores have same priority store with maximum free space"},{"line_number":36,"context_line":"will be chosen to store the image."},{"line_number":37,"context_line":"5. If same store is specified multiple times with same/different priority"},{"line_number":38,"context_line":"then priority of first occurence of store in configuration is used."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"blueprint: glance-multifilesystem-store"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FIvQ%3D","line":38,"updated":"2014-01-17 04:51:44.000000000","message":"typo: occurence \u003d\u003e occurrence","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":35,"context_line":"4. If two filesystem stores have same priority store with maximum free space"},{"line_number":36,"context_line":"will be chosen to store the image."},{"line_number":37,"context_line":"5. If same store is specified multiple times with same/different priority"},{"line_number":38,"context_line":"then priority of first occurence of store in configuration is used."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"blueprint: glance-multifilesystem-store"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F%2FHys%3D","line":38,"in_reply_to":"AAAAUH%2F%2FIvQ%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"}],"doc/source/configuring.rst":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":442,"context_line":"* If no priority is specified, default priority \u00270\u0027 is associated with it."},{"line_number":443,"context_line":"* If two filesystem stores have same priority store with maximum free space"},{"line_number":444,"context_line":"  will be chosen to store the image."},{"line_number":445,"context_line":"* If same store is specified multiple times with same/different priority"},{"line_number":446,"context_line":"  then priority of first occurrence of store in configuration is used."},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"Configuring the Swift Storage Backend"}],"source_content_type":"text/x-rst","patch_set":7,"id":"AAAAUH%2F%2FIwE%3D","line":445,"updated":"2014-01-17 04:51:44.000000000","message":"ditto","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":442,"context_line":"* If no priority is specified, default priority \u00270\u0027 is associated with it."},{"line_number":443,"context_line":"* If two filesystem stores have same priority store with maximum free space"},{"line_number":444,"context_line":"  will be chosen to store the image."},{"line_number":445,"context_line":"* If same store is specified multiple times with same/different priority"},{"line_number":446,"context_line":"  then priority of first occurrence of store in configuration is used."},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"Configuring the Swift Storage Backend"}],"source_content_type":"text/x-rst","patch_set":7,"id":"AAAAUH%2F%2FHRk%3D","line":445,"in_reply_to":"AAAAUH%2F%2FIwE%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"}],"etc/glance-api.conf":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"7f5d96ba6cf0541d93b1cd320dbd325d4d4dab1f","unresolved":false,"context_lines":[{"line_number":275,"context_line":"# Directory that the Filesystem backend store"},{"line_number":276,"context_line":"# writes image data to"},{"line_number":277,"context_line":"filesystem_store_datadir \u003d /var/lib/glance/images/"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"# Multiple directories along with its priorities that the"},{"line_number":280,"context_line":"# Filesystem backend store can writes image data to"},{"line_number":281,"context_line":"#filesystem_store_datadirs \u003d /var/lib/glance/images/:1"}],"source_content_type":"text/plain","patch_set":6,"id":"AAAAUH%2F%2FWG4%3D","line":278,"updated":"2014-01-14 20:38:59.000000000","message":"I think we ought to add a little bit more info here. You have explained this very well in the commit message, and we can pull some items from there. A few things we need to mention:\n\n* option can be specified multiple times for multiple directories\n* this conflicts with filesystem store datadir\n* the priority and the directory name are separated by a \u0027:\u0027\n* higher priority wins, and that if priorities are equal, most available space is preferred\n* no priority \u003d lowest priority\n\n\nMaybe something like\n\n  A list of directories where image data can be stored.\n  This option may be specified multiple times, and if\n  specified at all will override filesystem_store_datadir.\n  A priority number may be given after each directory entry, \n  separated by a \":\". When adding an image, the highest priority \n  directory will be selected, unless there is not enough space \n  available in cases where the image size is already known. If no \n  priority is given, it is assumed to be zero and the directory will \n  be considered for selection last. If multiple directories have the \n  same priority, then the one with the most free space available \n  is selected.","commit_id":"65e1992a2f0b71aca4c505efb5ae580a956a589f"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"3431469e72d5fdb08bd3e855387f54aae95f04ce","unresolved":false,"context_lines":[{"line_number":275,"context_line":"# Directory that the Filesystem backend store"},{"line_number":276,"context_line":"# writes image data to"},{"line_number":277,"context_line":"filesystem_store_datadir \u003d /var/lib/glance/images/"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"# Multiple directories along with its priorities that the"},{"line_number":280,"context_line":"# Filesystem backend store can writes image data to"},{"line_number":281,"context_line":"#filesystem_store_datadirs \u003d /var/lib/glance/images/:1"}],"source_content_type":"text/plain","patch_set":6,"id":"AAAAUH%2F%2FTyw%3D","line":278,"in_reply_to":"AAAAUH%2F%2FWG4%3D","updated":"2014-01-15 07:37:27.000000000","message":"I will fix this in next patch","commit_id":"65e1992a2f0b71aca4c505efb5ae580a956a589f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":285,"context_line":"# there is not enough space available in cases where the image size is already"},{"line_number":286,"context_line":"# known. If no priority is given, it is assumed to be zero and the directory"},{"line_number":287,"context_line":"# will be considered for selection last. If multiple directories have the same"},{"line_number":288,"context_line":"# priority, then the one with the most free space available is selected."},{"line_number":289,"context_line":"#filesystem_store_datadirs \u003d /var/lib/glance/images/:1"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"# A path to a JSON file that contains metadata describing the storage"}],"source_content_type":"text/plain","patch_set":7,"id":"AAAAUH%2F%2FIvc%3D","line":288,"updated":"2014-01-17 04:51:44.000000000","message":"I think it can help admin if you put your point #5 here also:\n\n\"If same store is specified multiple times with same/different priority then priority of first occurrence of store in configuration is used.\"","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":285,"context_line":"# there is not enough space available in cases where the image size is already"},{"line_number":286,"context_line":"# known. If no priority is given, it is assumed to be zero and the directory"},{"line_number":287,"context_line":"# will be considered for selection last. If multiple directories have the same"},{"line_number":288,"context_line":"# priority, then the one with the most free space available is selected."},{"line_number":289,"context_line":"#filesystem_store_datadirs \u003d /var/lib/glance/images/:1"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"# A path to a JSON file that contains metadata describing the storage"}],"source_content_type":"text/plain","patch_set":7,"id":"AAAAUH%2F%2FHxc%3D","line":288,"in_reply_to":"AAAAUH%2F%2FIvc%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"}],"glance/store/filesystem.py":[{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"868a4edde38adaadc4527e635f40cce83cad1c80","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            self.multiple_datadirs \u003d False"},{"line_number":164,"context_line":"            self.datadir \u003d CONF.filesystem_store_datadir[0]"},{"line_number":165,"context_line":"            directory_paths.add(self.datadir)"},{"line_number":166,"context_line":"        else:"},{"line_number":167,"context_line":"            self.multiple_datadirs \u003d True"},{"line_number":168,"context_line":"            self.priority_data_map \u003d {}"},{"line_number":169,"context_line":"            for datadir in CONF.filesystem_store_datadir:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8%2FNs%3D","line":166,"updated":"2013-12-18 01:45:49.000000000","message":"I would add a check/test where the user provides several times the same directory with same/different priorities.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ea8f7bd01cd36f76842450faa386684df0b788e4","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        else:"},{"line_number":279,"context_line":"            raise exception.NotFound(_(\"Image file %s does not exist\") % fn)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def _get_capacity_info(self, mount_point):"},{"line_number":282,"context_line":"        \"\"\"Calculate free space on store.\"\"\""},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        #Calculate total space"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9RXA%3D","line":281,"updated":"2013-12-13 09:01:57.000000000","message":"I\u0027m a bit worried about this method. The 2 commands executed here could take long to complete in some scenarios.\n\nI haven\u0027t thought on a different way to do this but I\u0027d like you - and other folks - to share opinions about this. If you already considered other options, could you please share them here?","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"e36824d5046c806ae78e959b7fb69212c6efd72a","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        else:"},{"line_number":279,"context_line":"            raise exception.NotFound(_(\"Image file %s does not exist\") % fn)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def _get_capacity_info(self, mount_point):"},{"line_number":282,"context_line":"        \"\"\"Calculate free space on store.\"\"\""},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        #Calculate total space"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F89eg%3D","line":281,"in_reply_to":"AAAATn%2F8%2FPk%3D","updated":"2013-12-18 11:33:16.000000000","message":"Instead of using \u0027df -a\u0027, it is preferable  to use \u0027df --block-size\u003d1k\u0027. Because for different linux flavors df command shows different output (size in MB for some flavors and size in GB for some flavors). But if we use \u0027df --block-size\u003d1k\u0027 it gives same output. \nPlease let me know your thoughts on this.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"665763388ab5d646f27cf368f25037f6858269f3","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        else:"},{"line_number":279,"context_line":"            raise exception.NotFound(_(\"Image file %s does not exist\") % fn)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def _get_capacity_info(self, mount_point):"},{"line_number":282,"context_line":"        \"\"\"Calculate free space on store.\"\"\""},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        #Calculate total space"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F89dU%3D","line":281,"in_reply_to":"AAAATn%2F89eg%3D","updated":"2013-12-18 11:36:56.000000000","message":"I\u0027m ok, they are same thing to me.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"868a4edde38adaadc4527e635f40cce83cad1c80","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        else:"},{"line_number":279,"context_line":"            raise exception.NotFound(_(\"Image file %s does not exist\") % fn)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def _get_capacity_info(self, mount_point):"},{"line_number":282,"context_line":"        \"\"\"Calculate free space on store.\"\"\""},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        #Calculate total space"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8%2FPk%3D","line":281,"in_reply_to":"AAAATn%2F9D%2Fo%3D","updated":"2013-12-18 01:45:49.000000000","message":"+1: df -a would be much better","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"23e6876f49b6085bbbd16e2a9100118a0d42658b","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        else:"},{"line_number":279,"context_line":"            raise exception.NotFound(_(\"Image file %s does not exist\") % fn)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def _get_capacity_info(self, mount_point):"},{"line_number":282,"context_line":"        \"\"\"Calculate free space on store.\"\"\""},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        #Calculate total space"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9D%2Fo%3D","line":281,"in_reply_to":"AAAATn%2F9Jx4%3D","updated":"2013-12-17 06:25:59.000000000","message":"IMO in the code we can use \"df -a\" to get all mount points information and do the string matching base on mount point path, just like \"df -a | grep \u003cmount_point\u003e\", and get available size value finally.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"1678aed3a2d7191b80d05509550b1786172fb893","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        else:"},{"line_number":279,"context_line":"            raise exception.NotFound(_(\"Image file %s does not exist\") % fn)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def _get_capacity_info(self, mount_point):"},{"line_number":282,"context_line":"        \"\"\"Calculate free space on store.\"\"\""},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        #Calculate total space"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9Jx4%3D","line":281,"in_reply_to":"AAAATn%2F9Q2E%3D","updated":"2013-12-16 09:08:59.000000000","message":"Hi Zhi Yan Liu,\n\nI have verified that apart from ubuntu, df command is working for centos, redhat \u0026 fedora.\nAs user can specify multiple directories, user can mount it to different filesystems. \nSo user need to mention type of a filesystem for each of the directory along with the priority in glance-api.conf.","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ee9827905bc6b7a90fc3e370bc98c3d2b8ed5ddd","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        else:"},{"line_number":279,"context_line":"            raise exception.NotFound(_(\"Image file %s does not exist\") % fn)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def _get_capacity_info(self, mount_point):"},{"line_number":282,"context_line":"        \"\"\"Calculate free space on store.\"\"\""},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        #Calculate total space"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9Q2E%3D","line":281,"in_reply_to":"AAAATn%2F9RXA%3D","updated":"2013-12-13 11:03:14.000000000","message":"+1\nin my ubuntu dev host, I can use \"df\" comment to know nfs mount point\u0027s available size:\n\n~$ cat /proc/mounts | grep \u0027192.168\u0027\n\n192.168.0.141:/mnt /mnt nfs4 rw,relatime,vers\u003d4,rsize\u003d524288,wsize\u003d524288,namlen\u003d255,hard,proto\u003dtcp,port\u003d0,timeo\u003d600,retrans\u003d2,sec\u003dsys,clientaddr\u003d192.168.0.146,minorversion\u003d0,local_lock\u003dnone,addr\u003d192.168.0.141 0 0\n\n\n~$ df -t nfs\n\nFilesystem         1K-blocks    Used Available Use% Mounted on\n\n192.168.0.141:/mnt  48060416 9916416  35702272  22% /mnt","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"48e6e0ad4507290de2bf9c9a2b3ed8e982d2c32b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"filesystem_opts \u003d ["},{"line_number":41,"context_line":"    cfg.ListOpt(\u0027filesystem_store_datadir\u0027, default\u003d[],"},{"line_number":42,"context_line":"                help\u003d_(\u0027List of directories to which the Filesystem backend \u0027"},{"line_number":43,"context_line":"                       \u0027store writes images.\u0027)),"},{"line_number":44,"context_line":"    cfg.StrOpt(\u0027filesystem_store_metadata_file\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FvpY%3D","line":41,"updated":"2014-01-09 02:01:53.000000000","message":"I think this option change may technically be backwards incompatible.\nIts valid to include commas in directory names and so it would formerly be possible to have a datadir that is something like \"foo,bar\". \n\nI think its probably better to add a new option called filesystem_store_datadirs and make it raise an error if both datadir and datadirs are specified.","commit_id":"30e3817b582d5aca86c71c940a1bbf144cd1af48"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"4f0f3044e618a7fe1e1c99ddbce15c1e5bab0bcf","unresolved":false,"context_lines":[{"line_number":38,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"filesystem_opts \u003d ["},{"line_number":41,"context_line":"    cfg.ListOpt(\u0027filesystem_store_datadir\u0027, default\u003d[],"},{"line_number":42,"context_line":"                help\u003d_(\u0027List of directories to which the Filesystem backend \u0027"},{"line_number":43,"context_line":"                       \u0027store writes images.\u0027)),"},{"line_number":44,"context_line":"    cfg.StrOpt(\u0027filesystem_store_metadata_file\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FoPg%3D","line":41,"in_reply_to":"AAAAUH%2F%2FvpY%3D","updated":"2014-01-10 10:34:43.000000000","message":"Using \";\" as delimiter to separate filesystem_store_datadir paths instead of \",\" could solve this problem instead of adding extra parameter.","commit_id":"30e3817b582d5aca86c71c940a1bbf144cd1af48"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"48e6e0ad4507290de2bf9c9a2b3ed8e982d2c32b","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                    continue"},{"line_number":179,"context_line":"                if len(parts) \u003d\u003d 2 and parts[1]:"},{"line_number":180,"context_line":"                    priority \u003d parts[1]"},{"line_number":181,"context_line":"                    if not priority.isdigit():"},{"line_number":182,"context_line":"                        msg \u003d (_(\"Invalid priority value %s in %s \""},{"line_number":183,"context_line":"                                 \"configuration\") % (priority, \"filesystem\"))"},{"line_number":184,"context_line":"                        LOG.warn(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FvU8%3D","line":181,"updated":"2014-01-09 02:01:53.000000000","message":"I\u0027m not a big fan of including the priority on the directory name itself. I\u0027m trying to come up with an alternate proposal using existing configuration mechanisms.","commit_id":"30e3817b582d5aca86c71c940a1bbf144cd1af48"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"4f0f3044e618a7fe1e1c99ddbce15c1e5bab0bcf","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                    continue"},{"line_number":179,"context_line":"                if len(parts) \u003d\u003d 2 and parts[1]:"},{"line_number":180,"context_line":"                    priority \u003d parts[1]"},{"line_number":181,"context_line":"                    if not priority.isdigit():"},{"line_number":182,"context_line":"                        msg \u003d (_(\"Invalid priority value %s in %s \""},{"line_number":183,"context_line":"                                 \"configuration\") % (priority, \"filesystem\"))"},{"line_number":184,"context_line":"                        LOG.warn(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FoPE%3D","line":181,"in_reply_to":"AAAAUH%2F%2FvU8%3D","updated":"2014-01-10 10:34:43.000000000","message":"please refer to comments on https://review.openstack.org/#/c/58997/2//COMMIT_MSG \n\nAllocating priority to glance store datadirs will help balancing the disk usage depending on free space.","commit_id":"30e3817b582d5aca86c71c940a1bbf144cd1af48"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"48e6e0ad4507290de2bf9c9a2b3ed8e982d2c32b","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        return max(0, total_available_space)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def _find_best_datadir(self, image_size):"},{"line_number":301,"context_line":"        \"\"\"Finds best datadir based on free space available."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        Traverses all glance datadirs based in order of their priority"},{"line_number":304,"context_line":"        and return datadir that has maximum free space to accomodate an image."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FvGM%3D","line":301,"updated":"2014-01-09 02:01:53.000000000","message":"This docstring is a bit confusing. It leaves me a bit confused about how priority comes in to play. I suggest we try something like\n\n  Finds the best datadir by priority and free space.\n\n  Traverse directories returning the first one that has sufficient\n  free space, in priority order. If two suitable directories have\n  the same priority, choose the one with the most free space\n  available.","commit_id":"30e3817b582d5aca86c71c940a1bbf144cd1af48"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"4f0f3044e618a7fe1e1c99ddbce15c1e5bab0bcf","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        return max(0, total_available_space)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def _find_best_datadir(self, image_size):"},{"line_number":301,"context_line":"        \"\"\"Finds best datadir based on free space available."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        Traverses all glance datadirs based in order of their priority"},{"line_number":304,"context_line":"        and return datadir that has maximum free space to accomodate an image."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FoOs%3D","line":301,"in_reply_to":"AAAAUH%2F%2FvGM%3D","updated":"2014-01-10 10:34:43.000000000","message":"I will fix this in next patch","commit_id":"30e3817b582d5aca86c71c940a1bbf144cd1af48"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"48e6e0ad4507290de2bf9c9a2b3ed8e982d2c32b","unresolved":false,"context_lines":[{"line_number":353,"context_line":"              the filesystem_store_datadir configuration option and \u003cID\u003e"},{"line_number":354,"context_line":"              is the supplied image ID."},{"line_number":355,"context_line":"        \"\"\""},{"line_number":356,"context_line":"        datadir \u003d self._find_best_datadir(image_size)"},{"line_number":357,"context_line":"        filepath \u003d os.path.join(datadir, str(image_id))"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        if os.path.exists(filepath):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FvFE%3D","line":356,"updated":"2014-01-09 02:01:53.000000000","message":"You might hit a snag here, because I believe it is possible for image_size to be None, if the size is not yet known.","commit_id":"30e3817b582d5aca86c71c940a1bbf144cd1af48"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"4f0f3044e618a7fe1e1c99ddbce15c1e5bab0bcf","unresolved":false,"context_lines":[{"line_number":353,"context_line":"              the filesystem_store_datadir configuration option and \u003cID\u003e"},{"line_number":354,"context_line":"              is the supplied image ID."},{"line_number":355,"context_line":"        \"\"\""},{"line_number":356,"context_line":"        datadir \u003d self._find_best_datadir(image_size)"},{"line_number":357,"context_line":"        filepath \u003d os.path.join(datadir, str(image_id))"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        if os.path.exists(filepath):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FoOA%3D","line":356,"in_reply_to":"AAAAUH%2F%2FvFE%3D","updated":"2014-01-10 10:34:43.000000000","message":"I have tried sending blank file and also without attaching a file in request body using v1 and v2 api.\n\nFor v1 create-image api, if no image is given, add() of store is not called. Also, image_size\u003dNone is not a problem if \"--location\" and \"--copy-from\" is used.\n\nIn case of v2 create-image api, image_size\u003d0 (not None) in both cases. Please refer the url below to support this.\nhttps://github.com/openstack/glance/blob/master/glance/store/__init__.py#L663\n\nPlease let me know if I am missing any scenario.","commit_id":"30e3817b582d5aca86c71c940a1bbf144cd1af48"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"7f5d96ba6cf0541d93b1cd320dbd325d4d4dab1f","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            self.priority_data_map \u003d {}"},{"line_number":180,"context_line":"            for datadir in CONF.filesystem_store_datadirs:"},{"line_number":181,"context_line":"                priority \u003d 0"},{"line_number":182,"context_line":"                parts \u003d map(lambda x: x.strip(), datadir.split(\":\"))"},{"line_number":183,"context_line":"                datadir_path \u003d parts[0]"},{"line_number":184,"context_line":"                if datadir_path in directory_paths:"},{"line_number":185,"context_line":"                    LOG.warning(_(\"Skipping %s directory as it is specified \""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FWIY%3D","line":182,"updated":"2014-01-14 20:38:59.000000000","message":"I think you should do datadir.rsplit(\u0027:\u0027, 1) for this, because it is also possible to have \u0027:\u0027 in a directory name. With rsplit we only take off the last colon-delimited section.","commit_id":"65e1992a2f0b71aca4c505efb5ae580a956a589f"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"3431469e72d5fdb08bd3e855387f54aae95f04ce","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            self.priority_data_map \u003d {}"},{"line_number":180,"context_line":"            for datadir in CONF.filesystem_store_datadirs:"},{"line_number":181,"context_line":"                priority \u003d 0"},{"line_number":182,"context_line":"                parts \u003d map(lambda x: x.strip(), datadir.split(\":\"))"},{"line_number":183,"context_line":"                datadir_path \u003d parts[0]"},{"line_number":184,"context_line":"                if datadir_path in directory_paths:"},{"line_number":185,"context_line":"                    LOG.warning(_(\"Skipping %s directory as it is specified \""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FUZI%3D","line":182,"in_reply_to":"AAAAUH%2F%2FWIY%3D","updated":"2014-01-15 07:37:27.000000000","message":"I will fix this in next patch","commit_id":"65e1992a2f0b71aca4c505efb5ae580a956a589f"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"7f5d96ba6cf0541d93b1cd320dbd325d4d4dab1f","unresolved":false,"context_lines":[{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        return max(0, total_available_space)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    def _find_best_datadir(self, image_size):"},{"line_number":312,"context_line":"        \"\"\"Finds the best datadir by priority and free space."},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        Traverse directories returning the first one that has sufficient"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FWH4%3D","line":311,"updated":"2014-01-14 20:38:59.000000000","message":"You are right that image_size \u003d 0 (and not None) indicates unknown size. As long as you are okay with unknown sizes being directed towards the highest priority store, this is fine by me. And I think its consistent with current (lack) of guarantees about handling images that exceed available space.","commit_id":"65e1992a2f0b71aca4c505efb5ae580a956a589f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        :raise BadStoreConfiguration exception if creating a directory fails."},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":"        for datadir in directory_paths:"},{"line_number":132,"context_line":"            if not os.path.exists(datadir):"},{"line_number":133,"context_line":"                msg \u003d _(\"Directory to write image files does not exist \""},{"line_number":134,"context_line":"                        \"(%s). Creating.\") % datadir"},{"line_number":135,"context_line":"                LOG.info(msg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FImg%3D","line":132,"updated":"2014-01-17 04:51:44.000000000","message":"IMO we need to check \"datadir_path\" is a writable directory also. Maybe we can/should do that in configure_add() (block at line #199?)","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        :raise BadStoreConfiguration exception if creating a directory fails."},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":"        for datadir in directory_paths:"},{"line_number":132,"context_line":"            if not os.path.exists(datadir):"},{"line_number":133,"context_line":"                msg \u003d _(\"Directory to write image files does not exist \""},{"line_number":134,"context_line":"                        \"(%s). Creating.\") % datadir"},{"line_number":135,"context_line":"                LOG.info(msg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FHVc%3D","line":132,"in_reply_to":"AAAAUH%2F%2FImg%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                    if os.path.exists(datadir):"},{"line_number":140,"context_line":"                        # NOTE(markwash): If the path now exists, some other"},{"line_number":141,"context_line":"                        # process must have beat us in the race condition."},{"line_number":142,"context_line":"                        # But it doesn\u0027t hurt, so we can safely ignore"},{"line_number":143,"context_line":"                        # the error."},{"line_number":144,"context_line":"                        continue"},{"line_number":145,"context_line":"                    reason \u003d _(\"Unable to create datadir: %s\") % datadir"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FImU%3D","line":142,"updated":"2014-01-17 04:51:44.000000000","message":"but we\u0027d better make sure it is writable also.","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"82cda38420b0a95e4bda2a07febf301ca3cd36e4","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                    if os.path.exists(datadir):"},{"line_number":140,"context_line":"                        # NOTE(markwash): If the path now exists, some other"},{"line_number":141,"context_line":"                        # process must have beat us in the race condition."},{"line_number":142,"context_line":"                        # But it doesn\u0027t hurt, so we can safely ignore"},{"line_number":143,"context_line":"                        # the error."},{"line_number":144,"context_line":"                        continue"},{"line_number":145,"context_line":"                    reason \u003d _(\"Unable to create datadir: %s\") % datadir"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FGnk%3D","line":142,"in_reply_to":"AAAAUH%2F%2FHVY%3D","updated":"2014-01-17 12:19:39.000000000","message":"Seems you miss this fix in your latest PS (#8)?","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                    if os.path.exists(datadir):"},{"line_number":140,"context_line":"                        # NOTE(markwash): If the path now exists, some other"},{"line_number":141,"context_line":"                        # process must have beat us in the race condition."},{"line_number":142,"context_line":"                        # But it doesn\u0027t hurt, so we can safely ignore"},{"line_number":143,"context_line":"                        # the error."},{"line_number":144,"context_line":"                        continue"},{"line_number":145,"context_line":"                    reason \u003d _(\"Unable to create datadir: %s\") % datadir"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FHVY%3D","line":142,"in_reply_to":"AAAAUH%2F%2FImU%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        \"\"\""},{"line_number":157,"context_line":"        if not (CONF.filesystem_store_datadir"},{"line_number":158,"context_line":"                or CONF.filesystem_store_datadirs):"},{"line_number":159,"context_line":"            reason \u003d (_(\"Specify atleast \u0027filesystem_store_datadir\u0027 or \""},{"line_number":160,"context_line":"                        \"\u0027filesystem_store_datadirs\u0027 option\"))"},{"line_number":161,"context_line":"            LOG.error(reason)"},{"line_number":162,"context_line":"            raise exception.BadStoreConfiguration(store_name\u003d\"filesystem\","}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FIqE%3D","line":159,"updated":"2014-01-17 04:51:44.000000000","message":"typo: atleast \u003d\u003e at least","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        \"\"\""},{"line_number":157,"context_line":"        if not (CONF.filesystem_store_datadir"},{"line_number":158,"context_line":"                or CONF.filesystem_store_datadirs):"},{"line_number":159,"context_line":"            reason \u003d (_(\"Specify atleast \u0027filesystem_store_datadir\u0027 or \""},{"line_number":160,"context_line":"                        \"\u0027filesystem_store_datadirs\u0027 option\"))"},{"line_number":161,"context_line":"            LOG.error(reason)"},{"line_number":162,"context_line":"            raise exception.BadStoreConfiguration(store_name\u003d\"filesystem\","}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FIDU%3D","line":159,"in_reply_to":"AAAAUH%2F%2FIqE%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                datadir_path \u003d parts[0]"},{"line_number":184,"context_line":"                if datadir_path in directory_paths:"},{"line_number":185,"context_line":"                    LOG.warning(_(\"Skipping %s directory as it is specified \""},{"line_number":186,"context_line":"                                  \"multiple times in filesystem_store_datadir\""},{"line_number":187,"context_line":"                                  \" property of configuration.\")"},{"line_number":188,"context_line":"                                % (datadir_path,))"},{"line_number":189,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FIpo%3D","line":186,"updated":"2014-01-17 04:51:44.000000000","message":"filesystem_store_datadir \u003d\u003e filesystem_store_datadis","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                datadir_path \u003d parts[0]"},{"line_number":184,"context_line":"                if datadir_path in directory_paths:"},{"line_number":185,"context_line":"                    LOG.warning(_(\"Skipping %s directory as it is specified \""},{"line_number":186,"context_line":"                                  \"multiple times in filesystem_store_datadir\""},{"line_number":187,"context_line":"                                  \" property of configuration.\")"},{"line_number":188,"context_line":"                                % (datadir_path,))"},{"line_number":189,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FHVg%3D","line":186,"in_reply_to":"AAAAUH%2F%2FIpo%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                    priority \u003d parts[1]"},{"line_number":192,"context_line":"                    if not priority.isdigit():"},{"line_number":193,"context_line":"                        msg \u003d (_(\"Invalid priority value %s in %s \""},{"line_number":194,"context_line":"                                 \"configuration\") % (priority, \"filesystem\"))"},{"line_number":195,"context_line":"                        LOG.warn(msg)"},{"line_number":196,"context_line":"                        raise exception.BadStoreConfiguration("},{"line_number":197,"context_line":"                            store_name\u003d\"filesystem\", reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FInk%3D","line":194,"updated":"2014-01-17 04:51:44.000000000","message":"nit: what about to use named parameter formation and pass a dict in.","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                    priority \u003d parts[1]"},{"line_number":192,"context_line":"                    if not priority.isdigit():"},{"line_number":193,"context_line":"                        msg \u003d (_(\"Invalid priority value %s in %s \""},{"line_number":194,"context_line":"                                 \"configuration\") % (priority, \"filesystem\"))"},{"line_number":195,"context_line":"                        LOG.warn(msg)"},{"line_number":196,"context_line":"                        raise exception.BadStoreConfiguration("},{"line_number":197,"context_line":"                            store_name\u003d\"filesystem\", reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FIAk%3D","line":194,"in_reply_to":"AAAAUH%2F%2FInk%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                    if not priority.isdigit():"},{"line_number":193,"context_line":"                        msg \u003d (_(\"Invalid priority value %s in %s \""},{"line_number":194,"context_line":"                                 \"configuration\") % (priority, \"filesystem\"))"},{"line_number":195,"context_line":"                        LOG.warn(msg)"},{"line_number":196,"context_line":"                        raise exception.BadStoreConfiguration("},{"line_number":197,"context_line":"                            store_name\u003d\"filesystem\", reason\u003dmsg)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FIoE%3D","line":195,"updated":"2014-01-17 04:51:44.000000000","message":"So IMO it will be better if we log this in exception level","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                    if not priority.isdigit():"},{"line_number":193,"context_line":"                        msg \u003d (_(\"Invalid priority value %s in %s \""},{"line_number":194,"context_line":"                                 \"configuration\") % (priority, \"filesystem\"))"},{"line_number":195,"context_line":"                        LOG.warn(msg)"},{"line_number":196,"context_line":"                        raise exception.BadStoreConfiguration("},{"line_number":197,"context_line":"                            store_name\u003d\"filesystem\", reason\u003dmsg)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FIAQ%3D","line":195,"in_reply_to":"AAAAUH%2F%2FIoE%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                        raise exception.BadStoreConfiguration("},{"line_number":197,"context_line":"                            store_name\u003d\"filesystem\", reason\u003dmsg)"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"                if datadir_path:"},{"line_number":200,"context_line":"                    directory_paths.add(datadir_path)"},{"line_number":201,"context_line":"                    self.priority_data_map.setdefault(int(priority),"},{"line_number":202,"context_line":"                                                      []).append(datadir_path)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FIn4%3D","line":199,"updated":"2014-01-17 04:51:44.000000000","message":"IMO we\u0027d better also check if \"datadir_path\" is empty, and if invalid we need to raise an exception.BadStoreConfiguration as same as above logic on \"priority\" part.","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                        raise exception.BadStoreConfiguration("},{"line_number":197,"context_line":"                            store_name\u003d\"filesystem\", reason\u003dmsg)"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"                if datadir_path:"},{"line_number":200,"context_line":"                    directory_paths.add(datadir_path)"},{"line_number":201,"context_line":"                    self.priority_data_map.setdefault(int(priority),"},{"line_number":202,"context_line":"                                                      []).append(datadir_path)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FHVU%3D","line":199,"in_reply_to":"AAAAUH%2F%2FIn4%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff9561f137b686e4ed79e45cb03987f5cb1c221e","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        else:"},{"line_number":341,"context_line":"            msg \u003d (_(\"There is no enough disk space left on the image \""},{"line_number":342,"context_line":"                     \"storage media. requested\u003d%s\") % image_size)"},{"line_number":343,"context_line":"            LOG.warn(msg)"},{"line_number":344,"context_line":"            raise exception.StorageFull(message\u003dmsg)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        return best_datadir"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FIlE%3D","line":343,"updated":"2014-01-17 04:51:44.000000000","message":"I\u0027m not sure using warn level log is a good idea","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"d19858d1a13f003d3d3aa57cc5c953b6d958d301","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        else:"},{"line_number":341,"context_line":"            msg \u003d (_(\"There is no enough disk space left on the image \""},{"line_number":342,"context_line":"                     \"storage media. requested\u003d%s\") % image_size)"},{"line_number":343,"context_line":"            LOG.warn(msg)"},{"line_number":344,"context_line":"            raise exception.StorageFull(message\u003dmsg)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        return best_datadir"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FHVQ%3D","line":343,"in_reply_to":"AAAAUH%2F%2FIlE%3D","updated":"2014-01-17 11:54:10.000000000","message":"Done","commit_id":"19091f08ac9d9954aa06ae1f772d4a9dfe68b1f5"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"f4d425159b63477dd2bad15320f672def9ab8902","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            self.priority_list \u003d sorted(self.priority_data_map,"},{"line_number":222,"context_line":"                                        reverse\u003dTrue)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        self._create_image_directories(directory_paths)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @staticmethod"},{"line_number":227,"context_line":"    def _resolve_location(location):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FGmY%3D","line":224,"updated":"2014-01-17 12:19:44.000000000","message":"I prefer add a \"tab\" at this line start, to put this call into the \"else\" block which begin at line 175. It make more reasonable when we look at this next time.","commit_id":"7acc717e5d397c36f9a2c138899cdda0ebe4b2a3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"310804edd5bfb9620790367bb8cbf78e3680e890","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            self.priority_list \u003d sorted(self.priority_data_map,"},{"line_number":222,"context_line":"                                        reverse\u003dTrue)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        self._create_image_directories(directory_paths)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @staticmethod"},{"line_number":227,"context_line":"    def _resolve_location(location):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FEho%3D","line":224,"in_reply_to":"AAAAUH%2F%2FGMA%3D","updated":"2014-01-17 18:18:37.000000000","message":"Hi Aswad Rangnekar,\n\nOK, pls keep this code and ignore my above comments, sorry. And if so I prefer also do an accessible checking for \"CONF.filesystem_store_datadir\" also at line #174 like what you did at line #210~215.","commit_id":"7acc717e5d397c36f9a2c138899cdda0ebe4b2a3"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"1bf66e07935c727d6ca9fc1cf910ea6038e24776","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            self.priority_list \u003d sorted(self.priority_data_map,"},{"line_number":222,"context_line":"                                        reverse\u003dTrue)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        self._create_image_directories(directory_paths)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @staticmethod"},{"line_number":227,"context_line":"    def _resolve_location(location):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FGMA%3D","line":224,"in_reply_to":"AAAAUH%2F%2FGmY%3D","updated":"2014-01-17 13:50:39.000000000","message":"Hi Zhi Yan Liu,\n\nIf the call self._create_image_directories(directory_paths) is moved into else block then, the _create_image_directories() will not get called for single directory.\nAre you suggesting to add self._create_image_directories(directory_paths) after line #174 and also at line #224?","commit_id":"7acc717e5d397c36f9a2c138899cdda0ebe4b2a3"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"8a5702cdeccec01384cd7f3bb7d479c5f97a4726","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            self.multiple_datadirs \u003d True"},{"line_number":195,"context_line":"            self.priority_data_map \u003d {}"},{"line_number":196,"context_line":"            for datadir in CONF.filesystem_store_datadirs:"},{"line_number":197,"context_line":"                priority \u003d 0"},{"line_number":198,"context_line":"                parts \u003d map(lambda x: x.strip(), datadir.rsplit(\":\", 1))"},{"line_number":199,"context_line":"                datadir_path \u003d parts[0]"},{"line_number":200,"context_line":"                if datadir_path in directory_paths:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2B4Ec%3D","line":197,"updated":"2014-01-21 07:17:04.000000000","message":"Unfortunately, this function is becoming too long.\n\nCan you make all of the logic for extracting the datadir_path and priority a separate function? I think it should include (just) the logic in lines 197-199 and 209-225.\n\nWhile you\u0027re at it, I think you could also have a function\n\n  def _add_datadir(self, path, priority)\n\nthat would encompass the logic in 200-208 and 226-229 (and maybe 231-232.\n\nOr maybe you\u0027ll think of another scheme for making this function smaller.\n\nThanks!","commit_id":"ef6888bc19eca707cd51dcef898f74bac197616e"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"710fcae9b01c29308d38bd9a34bbde9333164897","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            self.multiple_datadirs \u003d True"},{"line_number":195,"context_line":"            self.priority_data_map \u003d {}"},{"line_number":196,"context_line":"            for datadir in CONF.filesystem_store_datadirs:"},{"line_number":197,"context_line":"                priority \u003d 0"},{"line_number":198,"context_line":"                parts \u003d map(lambda x: x.strip(), datadir.rsplit(\":\", 1))"},{"line_number":199,"context_line":"                datadir_path \u003d parts[0]"},{"line_number":200,"context_line":"                if datadir_path in directory_paths:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2B2iA%3D","line":197,"in_reply_to":"AAAAUH%2F%2B4Ec%3D","updated":"2014-01-21 12:34:00.000000000","message":"Done","commit_id":"ef6888bc19eca707cd51dcef898f74bac197616e"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"40bde3bef07053b87bff597074cec5d2ea8410b9","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        self.priority_data_map.setdefault(int(priority),"},{"line_number":224,"context_line":"                                          []).append(datadir_path)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        self.priority_list \u003d sorted(self.priority_data_map,"},{"line_number":227,"context_line":"                                    reverse\u003dTrue)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _get_datadir_path_and_priority(self, datadir):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F%2By%2FU%3D","line":226,"updated":"2014-01-22 02:25:43.000000000","message":"IMO move this sorting to Line #200 can improve performance, there are some unused sorting calls in the loop at Line #196. If I miss anything pls let me know.","commit_id":"33050f319688b20002336b0386fa3730d3237979"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"a6d76339a48b3d2fa9f926d6e2d8dbe99f4eb613","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        self.priority_data_map.setdefault(int(priority),"},{"line_number":224,"context_line":"                                          []).append(datadir_path)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        self.priority_list \u003d sorted(self.priority_data_map,"},{"line_number":227,"context_line":"                                    reverse\u003dTrue)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _get_datadir_path_and_priority(self, datadir):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F%2BvB8%3D","line":226,"in_reply_to":"AAAAUH%2F%2By%2FU%3D","updated":"2014-01-22 17:22:57.000000000","message":"Done","commit_id":"33050f319688b20002336b0386fa3730d3237979"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"550020b479b41c8e09d253d64b418f60d0764ac4","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        self.priority_data_map.setdefault(int(priority),"},{"line_number":224,"context_line":"                                          []).append(datadir_path)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        self.priority_list \u003d sorted(self.priority_data_map,"},{"line_number":227,"context_line":"                                    reverse\u003dTrue)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _get_datadir_path_and_priority(self, datadir):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F%2ByQ8%3D","line":226,"in_reply_to":"AAAAUH%2F%2By%2FU%3D","updated":"2014-01-22 06:25:16.000000000","message":"configure_add is called only once, and the number of directories is probably quite small. Perhaps we can let it slide?\n\nAlternately, the python \"bisect\" module is a good way to insert into sorted list to maintain sort order, if we need performance here.\n\nCheers!","commit_id":"33050f319688b20002336b0386fa3730d3237979"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"827297ebcbbbd9c9abaac07c5e465b85c99108c2","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        self.priority_data_map.setdefault(int(priority),"},{"line_number":224,"context_line":"                                          []).append(datadir_path)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        self.priority_list \u003d sorted(self.priority_data_map,"},{"line_number":227,"context_line":"                                    reverse\u003dTrue)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _get_datadir_path_and_priority(self, datadir):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F%2ByJs%3D","line":226,"in_reply_to":"AAAAUH%2F%2ByQ8%3D","updated":"2014-01-22 07:00:38.000000000","message":"Actually store driver will be instanced more then one time, a lot of api calls can trigger driver object creation, since current Glance has not a store driver instance reuse mechanism, so configure_add() and configure() will be called more then one time.\n\nBut, I respect your suggestion Mark as our lead.","commit_id":"33050f319688b20002336b0386fa3730d3237979"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fe3fdea2727e2bcbc4ddd36def733ac4895216d5","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                     \"multiple times in filesystem_store_datadirs \""},{"line_number":221,"context_line":"                     \"option of %(filesystem)s configuration\") %"},{"line_number":222,"context_line":"                   {\u0027datadir_path\u0027: datadir_path,"},{"line_number":223,"context_line":"                    \u0027filesystem\u0027: \u0027filesystem\u0027})"},{"line_number":224,"context_line":"            LOG.exception(msg)"},{"line_number":225,"context_line":"            raise exception.BadStoreConfiguration("},{"line_number":226,"context_line":"                store_name\u003d\"filesystem\", reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Bu%2Fs%3D","line":223,"updated":"2014-01-22 17:53:51.000000000","message":"nit: if it is a fixed value \"filesystem\", why we need a variable replacement.","commit_id":"54030b03f5cbd91f1c13fd1ed1a739d0550d77e3"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"cfa16cc5da30244280b288ca450943be008931fa","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                     \"multiple times in filesystem_store_datadirs \""},{"line_number":221,"context_line":"                     \"option of %(filesystem)s configuration\") %"},{"line_number":222,"context_line":"                   {\u0027datadir_path\u0027: datadir_path,"},{"line_number":223,"context_line":"                    \u0027filesystem\u0027: \u0027filesystem\u0027})"},{"line_number":224,"context_line":"            LOG.exception(msg)"},{"line_number":225,"context_line":"            raise exception.BadStoreConfiguration("},{"line_number":226,"context_line":"                store_name\u003d\"filesystem\", reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Btaw%3D","line":223,"in_reply_to":"AAAAUH%2F%2Bu%2Fs%3D","updated":"2014-01-22 23:04:31.000000000","message":"Done","commit_id":"54030b03f5cbd91f1c13fd1ed1a739d0550d77e3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fe3fdea2727e2bcbc4ddd36def733ac4895216d5","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                msg \u003d (_(\"Invalid priority value %(priority)s in \""},{"line_number":246,"context_line":"                         \"%(filesystem)s configuration\") %"},{"line_number":247,"context_line":"                       {\u0027priority\u0027: priority,"},{"line_number":248,"context_line":"                        \u0027filesystem\u0027: \u0027filesystem\u0027})"},{"line_number":249,"context_line":"                LOG.exception(msg)"},{"line_number":250,"context_line":"                raise exception.BadStoreConfiguration("},{"line_number":251,"context_line":"                    store_name\u003d\"filesystem\", reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Bu%2Fg%3D","line":248,"updated":"2014-01-22 17:53:51.000000000","message":"ditto","commit_id":"54030b03f5cbd91f1c13fd1ed1a739d0550d77e3"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"cfa16cc5da30244280b288ca450943be008931fa","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                msg \u003d (_(\"Invalid priority value %(priority)s in \""},{"line_number":246,"context_line":"                         \"%(filesystem)s configuration\") %"},{"line_number":247,"context_line":"                       {\u0027priority\u0027: priority,"},{"line_number":248,"context_line":"                        \u0027filesystem\u0027: \u0027filesystem\u0027})"},{"line_number":249,"context_line":"                LOG.exception(msg)"},{"line_number":250,"context_line":"                raise exception.BadStoreConfiguration("},{"line_number":251,"context_line":"                    store_name\u003d\"filesystem\", reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Btao%3D","line":248,"in_reply_to":"AAAAUH%2F%2Bu%2Fg%3D","updated":"2014-01-22 23:04:31.000000000","message":"Done","commit_id":"54030b03f5cbd91f1c13fd1ed1a739d0550d77e3"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fe3fdea2727e2bcbc4ddd36def733ac4895216d5","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        if not datadir_path:"},{"line_number":254,"context_line":"            msg \u003d (_(\"Invalid directory specified in \""},{"line_number":255,"context_line":"                     \"%s configuration\") % \u0027filesystem\u0027)"},{"line_number":256,"context_line":"            LOG.exception(msg)"},{"line_number":257,"context_line":"            raise exception.BadStoreConfiguration("},{"line_number":258,"context_line":"                store_name\u003d\"filesystem\", reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Bu%2Fc%3D","line":255,"updated":"2014-01-22 17:53:51.000000000","message":"ditto","commit_id":"54030b03f5cbd91f1c13fd1ed1a739d0550d77e3"},{"author":{"_account_id":6536,"name":"Aswad Rangnekar","email":"aswad.rangnekar@gmail.com","username":"Aswad"},"change_message_id":"cfa16cc5da30244280b288ca450943be008931fa","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        if not datadir_path:"},{"line_number":254,"context_line":"            msg \u003d (_(\"Invalid directory specified in \""},{"line_number":255,"context_line":"                     \"%s configuration\") % \u0027filesystem\u0027)"},{"line_number":256,"context_line":"            LOG.exception(msg)"},{"line_number":257,"context_line":"            raise exception.BadStoreConfiguration("},{"line_number":258,"context_line":"                store_name\u003d\"filesystem\", reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2Btak%3D","line":255,"in_reply_to":"AAAAUH%2F%2Bu%2Fc%3D","updated":"2014-01-22 23:04:31.000000000","message":"Done","commit_id":"54030b03f5cbd91f1c13fd1ed1a739d0550d77e3"}],"glance/tests/unit/test_filesystem_store.py":[{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"868a4edde38adaadc4527e635f40cce83cad1c80","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def test_configure_add(self):"},{"line_number":56,"context_line":"        \"\"\""},{"line_number":57,"context_line":"        Tests miltiple filesystem specified by filesystem_store_datadir"},{"line_number":58,"context_line":"        are parsed correctly."},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        store_map \u003d [self.useFixture(fixtures.TempDir()).path,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8%2FOo%3D","line":57,"updated":"2013-12-18 01:45:49.000000000","message":"typo: multiple","commit_id":"53ca991fcff0ae67ed7d3a25406e789aa7d7d4d3"}]}
