)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16308,"name":"Sheel Rana","email":"ranasheel2000@gmail.com","username":"sheel.rana"},"change_message_id":"578ddaa4c146ab6ccd88678c63cdd064b69b013b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     YaoZheng \u003czheng.yao1@zte.com.cn\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-04-27 10:04:03 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"After pool is introduced, cinder should support compatible"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After pool is introduced in the BP \"pool-aware-cinder-scheduler\","},{"line_number":10,"context_line":"if the driver has not supported it, In the process, the backend"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a122d0e_5a6688bb","line":7,"updated":"2016-04-27 14:27:21.000000000","message":"Please incorporate title within 50 characters.\nAlsoo title seems incomplete.\n\nFor ex, we can change it to:\nFixed pool incopatibity for existing volume","commit_id":"27877382ace5b9b10d15e3062bb4acd6a5d6f521"},{"author":{"_account_id":16308,"name":"Sheel Rana","email":"ranasheel2000@gmail.com","username":"sheel.rana"},"change_message_id":"578ddaa4c146ab6ccd88678c63cdd064b69b013b","unresolved":false,"context_lines":[{"line_number":14,"context_line":"volumes by the host, then extract pool information from"},{"line_number":15,"context_line":"volume\u0027s host. If the pool is None or volume_backend_name,"},{"line_number":16,"context_line":"we call get_pool query the pool_name from driver, then"},{"line_number":17,"context_line":"modify the volume\u0027s host information."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: #1574503"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a122d0e_dab1f8e1","line":17,"updated":"2016-04-27 14:27:21.000000000","message":"I would suggest to depict problem and solution in brief in seperate short paragraphs. \n\nI am giving my suggestion:\n\nBackend name is used as pool for volumes if driver does not support pool concepts as per BP \"pool-aware-cinder-scheduler\".\nBut if driver later implements it, pool name is reported by backend driver.\nThis may create problem for existing volume as pool name changes.\n\nThis patchset fixes this issue by extracting pool name from backend driver during service start if pool name is None or volume_backend_name.\nThis pool information(using get_pool query) can be used to update volume host information.","commit_id":"27877382ace5b9b10d15e3062bb4acd6a5d6f521"}],"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"c97e3601a4a3b9ba8df2db6d4503ac155048f215","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        CONF.set_override(\"volume_backend_name\", \"lvmdriver\")"},{"line_number":418,"context_line":"        self.volume.init_host()"},{"line_number":419,"context_line":"        stats \u003d self.volume.stats"},{"line_number":420,"context_line":"        self.assertEqual(2120, stats[\u0027allocated_capacity_gb\u0027])"},{"line_number":421,"context_line":"        self.assertEqual("},{"line_number":422,"context_line":"            384, stats[\u0027pools\u0027][\u0027pool0\u0027][\u0027allocated_capacity_gb\u0027])"},{"line_number":423,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_06aef1e6","line":420,"range":{"start_line":420,"start_character":8,"end_line":420,"end_character":62},"updated":"2016-05-03 13:14:41.000000000","message":"Just a thought, but I think it would be cleaner to pull out the part you are testing here into its own test since this one is starting to get overloaded.","commit_id":"27877382ace5b9b10d15e3062bb4acd6a5d6f521"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"c97e3601a4a3b9ba8df2db6d4503ac155048f215","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        vol0 \u003d db.volume_get(context.get_admin_context(), vol0[\u0027id\u0027])"},{"line_number":436,"context_line":"        self.assertEqual(volutils.append_host(CONF.host, \u0027LVM\u0027),"},{"line_number":437,"context_line":"                         vol0[\u0027host\u0027])"},{"line_number":438,"context_line":"        vol5 \u003d db.volume_get(context.get_admin_context(), vol5[\u0027id\u0027])"},{"line_number":439,"context_line":"        self.assertEqual(volutils.append_host(CONF.host, \u0027LVM\u0027),"},{"line_number":440,"context_line":"                         vol5[\u0027host\u0027])"},{"line_number":441,"context_line":"        self.volume.delete_volume(self.context, vol0[\u0027id\u0027])"},{"line_number":442,"context_line":"        self.volume.delete_volume(self.context, vol1[\u0027id\u0027])"},{"line_number":443,"context_line":"        self.volume.delete_volume(self.context, vol2[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_c6f19903","line":440,"range":{"start_line":438,"start_character":6,"end_line":440,"end_character":38},"updated":"2016-05-03 13:14:41.000000000","message":"This could go in that new test too.","commit_id":"27877382ace5b9b10d15e3062bb4acd6a5d6f521"}],"cinder/volume/manager.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"7331b38c5d66fd16414c2f6f02bbdeb4aa29ab36","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                pool \u003d (self.driver.configuration.safe_get("},{"line_number":349,"context_line":"                    \u0027volume_backend_name\u0027) or vol_utils.extract_host("},{"line_number":350,"context_line":"                    volume[\u0027host\u0027], \u0027pool\u0027, True))"},{"line_number":351,"context_line":"        elif pool and pool \u003d\u003d backend_name:"},{"line_number":352,"context_line":"            # has pool name encoded in host, but this is a legacy"},{"line_number":353,"context_line":"            # volume created before pool is introduced, ask"},{"line_number":354,"context_line":"            # driver to provide pool info if it has such"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_558dbbd1","line":351,"updated":"2016-04-27 14:58:00.000000000","message":"looks like the only case pool name equals backend_name is that somehow cinder was configured to use a backend_name in cinder.conf that is \u0027backend_name#backend_name\u0027.  Is it a valid case?","commit_id":"27877382ace5b9b10d15e3062bb4acd6a5d6f521"},{"author":{"_account_id":16308,"name":"Sheel Rana","email":"ranasheel2000@gmail.com","username":"sheel.rana"},"change_message_id":"578ddaa4c146ab6ccd88678c63cdd064b69b013b","unresolved":false,"context_lines":[{"line_number":359,"context_line":"                LOG.exception(_LE(\u0027Fetch volume pool name failed.\u0027),"},{"line_number":360,"context_line":"                              resource\u003dvolume)"},{"line_number":361,"context_line":"                return"},{"line_number":362,"context_line":"            if pool and pool !\u003d backend_name:"},{"line_number":363,"context_line":"                new_host \u003d vol_utils.append_host(volume[\u0027host\u0027].split(\u0027#\u0027)[0],"},{"line_number":364,"context_line":"                                                 pool)"},{"line_number":365,"context_line":"                self.db.volume_update(ctxt, volume[\u0027id\u0027],"},{"line_number":366,"context_line":"                                      {\u0027host\u0027: new_host})"},{"line_number":367,"context_line":"            elif not pool:"},{"line_number":368,"context_line":"                pool \u003d backend_name"},{"line_number":369,"context_line":"        try:"},{"line_number":370,"context_line":"            pool_stat \u003d self.stats[\u0027pools\u0027][pool]"},{"line_number":371,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_5a8de8d1","line":368,"range":{"start_line":362,"start_character":12,"end_line":368,"end_character":35},"updated":"2016-04-27 14:27:21.000000000","message":"Very trivial but we can save one inner comparision by swaping if and elif conditions:\n\nif not pool:\n    pool \u003d backend_name\nelif pool !\u003d backend_name:\n    new_host \u003d vol_utils.append_host(volume[\u0027host\u0027].split(\u0027#\u0027)[0],\n                                                 pool)\n    self.db.volume_update(ctxt, volume[\u0027id\u0027],\n                          {\u0027host\u0027: new_host})","commit_id":"27877382ace5b9b10d15e3062bb4acd6a5d6f521"}]}
