)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":27078,"name":"Manik Bindlish","email":"manikbindlish19@gmail.com","username":"manik"},"change_message_id":"5be4f1f99b80eef7e5fb2f9ff2b70398a40de2ec","unresolved":false,"context_lines":[{"line_number":15,"context_line":"References:"},{"line_number":16,"context_line":"https://review.openstack.org/#/c/509206"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: I19861b2832f140eac0ad5397091a6333e2f40618"},{"line_number":19,"context_line":"Change-Id: Icd227b807a78bd37a77fa547880780ff9edad1e8"},{"line_number":20,"context_line":"Closes-Bug: #1782539"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f79a3b5_61c25d8a","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":53},"updated":"2018-11-28 09:16:39.000000000","message":"I think \"Depends-On: \" should be remove from here and it should be on tempest side as tempest patch set depends on nova\u0027s patch","commit_id":"951172f5c78988e9de5ef92b982066c9c7202ff7"}],"nova/compute/api.py":[{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"2454caeffdf63dfae853bc2ede2ca4135c8b1dd8","unresolved":false,"context_lines":[{"line_number":5396,"context_line":"            phase\u003dfields_obj.NotificationPhase.START)"},{"line_number":5397,"context_line":""},{"line_number":5398,"context_line":"        host_aggregates \u003d objects.AggregateList.get_by_host(context, host_name)"},{"line_number":5399,"context_line":"        # Host_aggregates\u0027 length equals to 1 means the host is moving from"},{"line_number":5400,"context_line":"        # aggregate\u0027s az to default_availability_zone."},{"line_number":5401,"context_line":"        if len(host_aggregates) \u003d\u003d 1:"},{"line_number":5402,"context_line":"            instance_count_by_cell \u003d \\"},{"line_number":5403,"context_line":"                nova_context.scatter_gather_skip_cell0("}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_b312c454","line":5400,"range":{"start_line":5399,"start_character":8,"end_line":5400,"end_character":54},"updated":"2018-11-01 13:09:04.000000000","message":"I get it when you remove host from an aggregate, the host\u0027s az will probably get changed, to the default az. But I have two concerns here:\n1 What if the aggregate does have an AZ configured, or its AZ has the same as the default one? Do we still disallow the removal request?\n2 Honestly, it does not feel right to me to stop an admin from removing a host from an aggregate just because it has instances on it. This argument was made already on this patch\nhttps://review.openstack.org/#/c/509206/3/nova/compute/api.py","commit_id":"7db7f4fea0992639e38428505d63941050f476ad"},{"author":{"_account_id":26286,"name":"huanhongda","email":"hongda.xun@easystack.cn","username":"huanhongda"},"change_message_id":"e8f60a070d155cffa51e8826ab1bb06e48725074","unresolved":false,"context_lines":[{"line_number":5253,"context_line":"            # Hosts is none means this is not an add host action."},{"line_number":5254,"context_line":"            # Host_aggregates is [] means a host is moving from"},{"line_number":5255,"context_line":"            # default_availability_zone to aggregate\u0027s az."},{"line_number":5256,"context_line":"            if not hosts or not host_aggregates:"},{"line_number":5257,"context_line":"                instance_count_by_cell \u003d \\"},{"line_number":5258,"context_line":"                    nova_context.scatter_gather_skip_cell0("},{"line_number":5259,"context_line":"                        context, objects.InstanceList.get_count_by_hosts,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_43910d9b","line":5256,"range":{"start_line":5256,"start_character":32,"end_line":5256,"end_character":47},"updated":"2018-11-02 09:27:59.000000000","message":"@Zhenyu Zheng\nIf add a host to the same az, this \u0027host_aggregates\u0027 will not be none. And it will not check instance count anymore.\n\nIf add a host to the different az, the code will raise exception (_raise_invalid_aggregate_exc) in line 5250.","commit_id":"b02832ad2c76c41957a86f501e34f08f7e872084"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"7e59d8503540f9fc2a3c02caf01c88affe4ecc0c","unresolved":false,"context_lines":[{"line_number":5249,"context_line":"                        \"%s\") % conflicting_azs"},{"line_number":5250,"context_line":"                self._raise_invalid_aggregate_exc(action_name, aggregate.id,"},{"line_number":5251,"context_line":"                                                  msg)"},{"line_number":5252,"context_line":""},{"line_number":5253,"context_line":"            # Hosts is none means this is not an add host action."},{"line_number":5254,"context_line":"            # Host_aggregates is [] means a host is moving from"},{"line_number":5255,"context_line":"            # default_availability_zone to aggregate\u0027s az."},{"line_number":5256,"context_line":"            if not hosts or not host_aggregates:"},{"line_number":5257,"context_line":"                instance_count_by_cell \u003d \\"},{"line_number":5258,"context_line":"                    nova_context.scatter_gather_skip_cell0("},{"line_number":5259,"context_line":"                        context, objects.InstanceList.get_count_by_hosts,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_b9233357","line":5256,"range":{"start_line":5252,"start_character":0,"end_line":5256,"end_character":48},"updated":"2018-11-06 07:23:32.000000000","message":"This seems wrong, you mentioned that, if host is none, then this is not an add host action, and seems the purpose of this patch is to do this check for add host action, but your condition is \"if not hosts\", means the below logic will run if it is not an add host action. This should be \"if (hosts and not host_aggregates)\"?","commit_id":"b02832ad2c76c41957a86f501e34f08f7e872084"}],"nova/objects/instance.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"494190daa51a3caa1d30959a9de18eebec4966da","unresolved":false,"context_lines":[{"line_number":1552,"context_line":"        \"\"\""},{"line_number":1553,"context_line":"        return cls._get_counts_in_db(context, project_id, user_id\u003duser_id)"},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"    @staticmethod"},{"line_number":1556,"context_line":"    @db_api.pick_context_manager_reader"},{"line_number":1557,"context_line":"    def _get_count_by_hosts(context, hosts):"},{"line_number":1558,"context_line":"        return context.session.query(models.Instance). \\"},{"line_number":1559,"context_line":"            filter_by(deleted\u003d0). \\"},{"line_number":1560,"context_line":"            filter(models.Instance.host.in_(hosts)).count()"},{"line_number":1561,"context_line":""},{"line_number":1562,"context_line":"    @base.remotable_classmethod"},{"line_number":1563,"context_line":"    def get_count_by_hosts(cls, context, hosts):"},{"line_number":1564,"context_line":"        return cls._get_count_by_hosts(context, hosts)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_df2cc501","line":1564,"range":{"start_line":1555,"start_character":0,"end_line":1564,"end_character":54},"updated":"2018-10-24 09:14:45.000000000","message":"this caused has value changed, should update the obj hash","commit_id":"1f308b3327786d8c8534802b27baa9768bb12841"},{"author":{"_account_id":26286,"name":"huanhongda","email":"hongda.xun@easystack.cn","username":"huanhongda"},"change_message_id":"537d68de55d401b722edcfa4f5e1e4cdbf20997c","unresolved":false,"context_lines":[{"line_number":1552,"context_line":"        \"\"\""},{"line_number":1553,"context_line":"        return cls._get_counts_in_db(context, project_id, user_id\u003duser_id)"},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"    @staticmethod"},{"line_number":1556,"context_line":"    @db_api.pick_context_manager_reader"},{"line_number":1557,"context_line":"    def _get_count_by_hosts(context, hosts):"},{"line_number":1558,"context_line":"        return context.session.query(models.Instance). \\"},{"line_number":1559,"context_line":"            filter_by(deleted\u003d0). \\"},{"line_number":1560,"context_line":"            filter(models.Instance.host.in_(hosts)).count()"},{"line_number":1561,"context_line":""},{"line_number":1562,"context_line":"    @base.remotable_classmethod"},{"line_number":1563,"context_line":"    def get_count_by_hosts(cls, context, hosts):"},{"line_number":1564,"context_line":"        return cls._get_count_by_hosts(context, hosts)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_3a030714","line":1564,"range":{"start_line":1555,"start_character":0,"end_line":1564,"end_character":54},"in_reply_to":"3f79a3b5_df2cc501","updated":"2018-10-31 06:19:20.000000000","message":"Done. Thanks.","commit_id":"1f308b3327786d8c8534802b27baa9768bb12841"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e8b30f1ac34cc0e12f5787bc635a03491abb23f","unresolved":false,"context_lines":[{"line_number":1556,"context_line":"    @staticmethod"},{"line_number":1557,"context_line":"    @db_api.pick_context_manager_reader"},{"line_number":1558,"context_line":"    def _get_count_by_hosts(context, hosts):"},{"line_number":1559,"context_line":"        return context.session.query(models.Instance). \\"},{"line_number":1560,"context_line":"            filter_by(deleted\u003d0). \\"},{"line_number":1561,"context_line":"            filter(models.Instance.host.in_(hosts)).count()"},{"line_number":1562,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_3159ba5b","line":1559,"range":{"start_line":1559,"start_character":54,"end_line":1559,"end_character":56},"updated":"2018-11-02 09:11:02.000000000","message":"seems there is one extra space, wonder why it didn\u0027t trigger test failure","commit_id":"b02832ad2c76c41957a86f501e34f08f7e872084"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e8b30f1ac34cc0e12f5787bc635a03491abb23f","unresolved":false,"context_lines":[{"line_number":1557,"context_line":"    @db_api.pick_context_manager_reader"},{"line_number":1558,"context_line":"    def _get_count_by_hosts(context, hosts):"},{"line_number":1559,"context_line":"        return context.session.query(models.Instance). \\"},{"line_number":1560,"context_line":"            filter_by(deleted\u003d0). \\"},{"line_number":1561,"context_line":"            filter(models.Instance.host.in_(hosts)).count()"},{"line_number":1562,"context_line":""},{"line_number":1563,"context_line":"    @base.remotable_classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_51547623","line":1560,"range":{"start_line":1560,"start_character":33,"end_line":1560,"end_character":35},"updated":"2018-11-02 09:11:02.000000000","message":"ditto","commit_id":"b02832ad2c76c41957a86f501e34f08f7e872084"}]}
