)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"80331f08594cb218b9866154232e15b0fcd99711","unresolved":false,"context_lines":[{"line_number":11,"context_line":"of related VMs that are scheduled on the same host."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"APIImpact"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I2b71f27ce11f21aaa5eb4895c0fa57fb6829a705"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa0c359_1f751532","line":14,"updated":"2018-02-23 15:27:38.000000000","message":"Spec for blueprint complex-soft-anti-affinity-policies","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9fdcc8acd6112f84bb6159170136186b9e3001e8","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the last of these by limiting the proportion of a group"},{"line_number":11,"context_line":"of related VMs that are scheduled on the same host."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"APIImpact"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I2b71f27ce11f21aaa5eb4895c0fa57fb6829a705"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"df7087c5_46b5217d","line":13,"updated":"2018-03-26 19:07:20.000000000","message":"The commit message should include:\n\nbluprint: complex-anti-affinity-policies","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"5ca1baacb3e7a7d244f7724af418752c99b975ac","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the last of these by limiting the proportion of a group"},{"line_number":11,"context_line":"of related VMs that are scheduled on the same host."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"APIImpact"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I2b71f27ce11f21aaa5eb4895c0fa57fb6829a705"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_80863edb","line":13,"in_reply_to":"df7087c5_46b5217d","updated":"2018-03-27 01:34:44.000000000","message":"Done","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"}],"specs/rocky/approved/allow-specifying-limit-for-affrinity-group.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5b1be7f02ea87e7c323ccb59841de8e6aaf58680","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Allow Specifying Limit For Soft (Anti-)Affinity Groups"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/complex-soft-anti-affinity-policies"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint proposes to add support to allow user to specify tolerance for"},{"line_number":14,"context_line":"the number of instances that can be placed on the same host in a soft"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_4ae8bde0","line":11,"range":{"start_line":11,"start_character":44,"end_line":11,"end_character":79},"updated":"2018-02-23 16:10:03.000000000","message":"You need to rename the spec filename to match the blueprint name, so complex-soft-anti-affinity-policies.rst.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8d996f436c4a86c10c57d8d94c70b65a80928745","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Allow Specifying Limit For Soft (Anti-)Affinity Groups"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/complex-soft-anti-affinity-policies"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint proposes to add support to allow user to specify tolerance for"},{"line_number":14,"context_line":"the number of instances that can be placed on the same host in a soft"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_bdd9d9f3","line":11,"range":{"start_line":11,"start_character":44,"end_line":11,"end_character":79},"in_reply_to":"3fa0c359_4ae8bde0","updated":"2018-03-13 12:47:28.000000000","message":"After PTG discussion, it seems we need submit a new bp, because we need add limit on hard anti affinity policy, right?","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d53681da0ea53657ff0763b20d00f132b008fae","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Allow Specifying Limit For Soft (Anti-)Affinity Groups"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/complex-soft-anti-affinity-policies"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint proposes to add support to allow user to specify tolerance for"},{"line_number":14,"context_line":"the number of instances that can be placed on the same host in a soft"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_064f526b","line":11,"range":{"start_line":11,"start_character":44,"end_line":11,"end_character":79},"in_reply_to":"df7087c5_bdd9d9f3","updated":"2018-03-13 13:39:10.000000000","message":"Or just rename the existing blueprint.\n\nBut yes, need to remove the \u0027soft\u0027 part from the name since the soft affinity policies are enforced via weigher, and what you\u0027d be implementing is essentially a hard limit on the affinity filters, so we don\u0027t want to confuse the soft weigher with the hard filter.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7250ede5a0edc606f76f97e70751dc8d888d9030","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint proposes to add support to allow user to specify tolerance for"},{"line_number":14,"context_line":"the number of instances that can be placed on the same host in a soft"},{"line_number":15,"context_line":"(anti-)affinity policy group."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_ea88a971","line":15,"updated":"2018-02-23 16:00:19.000000000","message":"You can\u0027t do this. The soft policy is purely weight-based. We hope to choose a host without any of our co-grouped instances on it. But it\u0027s just an ordering preference.\n\nWhat you can do, and what you\u0027re actually proposing here, is have a hard policy group, where the maximum overlap is greater than zero (up to your max).\n\nHowever, as I\u0027ve said below, I think what most people want is to be able to define a minimum amount of redundancy in the group and only allow doubling up instances on hosts once you have that level of redundancy. For example, if you require three instances for quorum, then you want a minimum of four hosts to be used before you start to co-schedule instances.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8d996f436c4a86c10c57d8d94c70b65a80928745","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint proposes to add support to allow user to specify tolerance for"},{"line_number":14,"context_line":"the number of instances that can be placed on the same host in a soft"},{"line_number":15,"context_line":"(anti-)affinity policy group."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_7de1012a","line":15,"in_reply_to":"3fa0c359_ea88a971","updated":"2018-03-13 12:47:28.000000000","message":"OK,Thanks for your reminder, I will update soon.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e9aa365e370b835750948a80d599e4519b157691","unresolved":false,"context_lines":[{"line_number":26,"context_line":"are available, even one host are crashed."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"A typical case from Virtual IMS Core [1]_:"},{"line_number":29,"context_line":"To meet typical SLAs, it is necessary that the failure of any given host cannot"},{"line_number":30,"context_line":"take down more than k VMs in each N+k pool. More precisely, given that those pools"},{"line_number":31,"context_line":"are dynamically scaled, it is a requirement that at no time is there more than a"},{"line_number":32,"context_line":"certain proportion of any pool instantiated on the same host."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"So, the scheduler needs to provide some mechanism to control the last of these"},{"line_number":35,"context_line":"by limiting the proportion of a group of related VMs that are scheduled on the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_ff7dc9e6","line":32,"range":{"start_line":29,"start_character":0,"end_line":32,"end_character":61},"updated":"2018-02-23 15:40:37.000000000","message":"I\u0027m having a really hard time wrapping my head around this, and what N+k is. Also, what you are proposing here does not control proportions at all. If your group has ten instances, the you have 30% on each host. If your group has 100 instances, then you have 3% on each host. Do you care about the proportion or the maximum value? Or are you expecting to dynamically change the extra_spec of the group as well? Because allowing that would be broken, as reducing the number would not cause a reschedule of all the instances to meet the new policy, and thus the group would appear to be in violation of its policy.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8d996f436c4a86c10c57d8d94c70b65a80928745","unresolved":false,"context_lines":[{"line_number":26,"context_line":"are available, even one host are crashed."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"A typical case from Virtual IMS Core [1]_:"},{"line_number":29,"context_line":"To meet typical SLAs, it is necessary that the failure of any given host cannot"},{"line_number":30,"context_line":"take down more than k VMs in each N+k pool. More precisely, given that those pools"},{"line_number":31,"context_line":"are dynamically scaled, it is a requirement that at no time is there more than a"},{"line_number":32,"context_line":"certain proportion of any pool instantiated on the same host."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"So, the scheduler needs to provide some mechanism to control the last of these"},{"line_number":35,"context_line":"by limiting the proportion of a group of related VMs that are scheduled on the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_3d0ce9eb","line":32,"range":{"start_line":29,"start_character":0,"end_line":32,"end_character":61},"in_reply_to":"3fa0c359_ff7dc9e6","updated":"2018-03-13 12:47:28.000000000","message":"Sorry, the description of N+k was unclear. I will update soon.\n\nDo you care about the proportion or the maximum value?\nI thought we only care about maximum value. :)\n\nOr are you expecting to dynamically change the extra_spec of the group as well?\nNow, I prefer to set limit when policy create, and the can\u0027t change the existing limit.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d53681da0ea53657ff0763b20d00f132b008fae","unresolved":false,"context_lines":[{"line_number":26,"context_line":"are available, even one host are crashed."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"A typical case from Virtual IMS Core [1]_:"},{"line_number":29,"context_line":"To meet typical SLAs, it is necessary that the failure of any given host cannot"},{"line_number":30,"context_line":"take down more than k VMs in each N+k pool. More precisely, given that those pools"},{"line_number":31,"context_line":"are dynamically scaled, it is a requirement that at no time is there more than a"},{"line_number":32,"context_line":"certain proportion of any pool instantiated on the same host."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"So, the scheduler needs to provide some mechanism to control the last of these"},{"line_number":35,"context_line":"by limiting the proportion of a group of related VMs that are scheduled on the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_a63f86b2","line":32,"range":{"start_line":29,"start_character":0,"end_line":32,"end_character":61},"in_reply_to":"df7087c5_3d0ce9eb","updated":"2018-03-13 13:39:10.000000000","message":"No we can\u0027t update the limit on an existing group, since that would require re-scheduling and automatically moving servers around to fit the updated policy rules, which is something we aren\u0027t doing in this spec.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"This spec propose to:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_9f7b6579","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":20},"updated":"2018-02-23 15:27:25.000000000","message":"``limit``?\n\nExtra specs are things on flavors, so calling it extra spec on an instance group would be confusing. I think it\u0027s just a per-host limit for the VMs in the group.\n\nI\u0027m not sure if \"limit\" is the best name either, since that could be confused as the limit for the number of members in the group, but really it\u0027s the number of members in the group per host.  So maybe call it \"host_limit\"?","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8d996f436c4a86c10c57d8d94c70b65a80928745","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"This spec propose to:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_e06d66cc","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":20},"in_reply_to":"3fa0c359_9f7b6579","updated":"2018-03-13 12:47:28.000000000","message":"Yes, extra specs are not too well in here, now I think maybe we can add limit field on policy table. :)","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3b849c458e216077f0c72812d7a7c6ccad213574","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"This spec propose to:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_07be1efe","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":20},"in_reply_to":"df7087c5_33429aac","updated":"2018-03-15 23:20:36.000000000","message":"If I had to pick from those three I\u0027d say option 3.\n\nWe don\u0027t want to build on the policies field being a list, since you can\u0027t have multiple policies on a single server group, see blueprint change-validation-in-creating-server-group.\n\nRegarding your concern:\n\n\u003eBut I still worry about that if later somebody adds a policy that can be mixed with the existing ones, we also need to change our schema to the Alternative 2 schema, right?\n\nI\u0027m not following. The internal object modeling would need to be able to handle the old and new data format, but either way we\u0027ll have a single policy per group with a single name, and then the policy specs (I think the specs would tie to the policy resource here in the data model, not the group as you said) are a separate json blob in the policies table. For existing server groups, when we load those up they just wouldn\u0027t have specs. And you can only define specs on a policy with the new microversion, so I don\u0027t see a problem.\n\nIf you\u0027re concerned about the schema in the REST API validation, that is per-microversion, so users have to opt-in to the new format and schema, and will have to adjust their tooling accordingly, but that\u0027s why we have microversions, so it\u0027s not forced on API users and we\u0027re not stuck with old data formats forever.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6082bf761ca5409f69de2e13f69f19a38e10632f","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"This spec propose to:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_711ccac0","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":20},"in_reply_to":"df7087c5_46aa2a71","updated":"2018-03-13 14:07:20.000000000","message":"Oh, thanks for the recap, I forgot your 3rd way when discuss with Yikun today, actually I prefer 3rd way. As we are discussing today, we realized \"limit\" might be only working for anti-affinity filter, it will be useless for other policies, it seems too expensive to add one column just for one policy, maybe the 3rd way can be more genaric for future usages, but if it is a JSON blob, will it lead to performance problem in scheduling?","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e0f8061ef85fc8d565370b1ba856c17560b7a974","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"This spec propose to:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_a030c9e9","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":20},"in_reply_to":"df7087c5_711ccac0","updated":"2018-03-13 14:54:16.000000000","message":"\u003e but if it is a JSON blob, will it lead to performance problem in scheduling?\n\nNo, because when we load the instance group object along with it\u0027s policies, we\u0027d also load the policy params/specs and deserialize them, like we do for flavor extra specs and really anything that is stored in the instance_extras table today.\n\nSince we don\u0027t need to query these values, there is no need to add a new key/value table for policies.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"dc5af5e47c3697719d6c1a8938523aa47027d9a4","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"This spec propose to:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_33429aac","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":20},"in_reply_to":"df7087c5_a030c9e9","updated":"2018-03-15 12:38:18.000000000","message":"I also prefer the 3rd way. : ) and I think there are 3 alternative way to model this in API:\n\n\n### Alternative 1: Add specs in the server_group\n{\n    \"server_group\": {\n        \"name\": \"group1\",\n        \"specs\": {\n            \"host_limit\": 3\n        },\n        \"policies\": [\"anti-affinity\"]\n    }\n}\nBy this way, spec like a field of group, I think it would make the user confused.\n\n\n### Alternative 2: Add specs in the policy item of the policies array.\n{\n    \"server_group\": {\n        \"name\": \"group1\",\n        \"policies\": [\n            {\n                \"policy\": \"anti-affinity\",\n                \"specs\": {\n                    \"host_limit\": 3\n                }\n            }\n        ]\n    }\n}\nThe ``specs`` is the field of ``policy``, so put policy name and poilcy spec together.\n\n\n### Alternative 3: Change policies array to policy dict, and add specs in the policy.\n{\n    \"server_group\": {\n        \"name\": \"group1\",\n        \"policy\": {\n            \"type/name\": \"anti-affinity\",\n            \"specs\": {\n                \"host_limit\": 3\n            }\n        }\n    }\n}\nAlso, I notice the note on the server group schema[1].\n\n[1] https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/server_groups.py#L29-L33\n\nI think maybe it\u0027s time to cleanup this legacy code? But I still worry about that if later somebody adds a policy that can be mixed with the existing ones, we also need to change our schema to the Alternative 2 schema, right?\n\nIMHO, I prefer the alternative 2 or 3, and 2nd way is more common, any idea from others? : )","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d53681da0ea53657ff0763b20d00f132b008fae","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"This spec propose to:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_46aa2a71","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":20},"in_reply_to":"df7087c5_e06d66cc","updated":"2018-03-13 13:39:10.000000000","message":"There were a few ideas discussed at the PTG about how to model this:\n\n1. Encode the limit into the name of the policy. I don\u0027t like this since I think it will be confusing for users.\n\n2. Add a specific \"limit\" attribute which is validated in jsonschema. This isn\u0027t terrible, but the validation gets confusing since the limit parameter only applies to certain types of policies. And if we set a precedent with this then we could have an explosion of parameters for various policies (granted, since this is the first of its kind in many years I doubt there would be an \"explosion\" of parameters).\n\n3. Add a generic \"params\" or \"specs\" field which is a dict, applied to the policy, but is also validated with jsonschema, so we\u0027d just allow a single \u0027limit\u0027 entry today with an int value \u003e\u003d 1.\n\n--\n\nI think 2 or 3 are better than 1 as far as usability.\n\nStoring 2 or 3 in the data model, in the instance_group_policy table, should be OK (2 would be a new column, 3 would be a serialized json blob).\n\nIf we do option 3, then we need to be clear that it\u0027s a strictly enforced set of allowed key/value pairs, not like the free-form case we have with flavor extra specs today.\n\nWould be be good to get other opinions on how they\u0027d like to see this modeled in the API. Maybe ask Alex and/or Ghanshyam?","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."},{"line_number":53,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":54,"context_line":"  the limit. This filter get the limit from policy extra_spec of specific"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_1fe4353b","line":51,"range":{"start_line":51,"start_character":25,"end_line":51,"end_character":30},"updated":"2018-02-23 15:27:25.000000000","message":"s/group/host/?\n\nThe group can have 3 or 6 or x VMs. The limit is to define the number of VMs in that group on a given host, correct?\n\nSo if I have a soft-anti-affinity policy with 9 instances and I say my per-host limit is 3, that means the scheduler must place at most 3 VMs from the group on the same host. If there are only 2 hosts available to fit the 9 VMs, then the scheduler must fail.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8d996f436c4a86c10c57d8d94c70b65a80928745","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."},{"line_number":53,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":54,"context_line":"  the limit. This filter get the limit from policy extra_spec of specific"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_60bdd600","line":51,"range":{"start_line":51,"start_character":25,"end_line":51,"end_character":30},"in_reply_to":"3fa0c359_1fe4353b","updated":"2018-03-13 12:47:28.000000000","message":"Yes, correct. I will update in next patch.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."},{"line_number":53,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":54,"context_line":"  the limit. This filter get the limit from policy extra_spec of specific"},{"line_number":55,"context_line":"  server group, and compare it with the instances number of same server group"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_9fc925ad","line":52,"range":{"start_line":52,"start_character":6,"end_line":52,"end_character":25},"updated":"2018-02-23 15:27:25.000000000","message":"OK I see, this is your proposed group attribute name. It\u0027s OK. I\u0027m not sure if we want to introduce a kind of extra spec to server groups though, although if it were an attribute, it wouldn\u0027t make sense for a non-soft (anti-)affinity group, since those policies are strict so that attribute wouldn\u0027t apply.\n\nWhether or not we have extra specs or attributes on the group is something I can bring up at the PTG.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e9aa365e370b835750948a80d599e4519b157691","unresolved":false,"context_lines":[{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."},{"line_number":53,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":54,"context_line":"  the limit. This filter get the limit from policy extra_spec of specific"},{"line_number":55,"context_line":"  server group, and compare it with the instances number of same server group"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_5f571d59","line":52,"updated":"2018-02-23 15:40:37.000000000","message":"Personally, I think this is a bad way to model the thing you want, or at least thing I would want, because it requires you to know how large the group will be in order to calculate this.\n\nA better option, IMHO, would be to have a setting for the max spread before the scheduler would consider doubling up. If you say \"this must spread across at least three hosts, then if you boot three, you get one on each host. If you boot ten, you get at least three hosts. If you boot a hundred, you get at last three hosts. That lets you define how much redundancy you want at a minimum regardless of how many instances are in the group.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"da7eb8b7c965d0d8f2787669db058f16d3b25177","unresolved":false,"context_lines":[{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."},{"line_number":53,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":54,"context_line":"  the limit. This filter get the limit from policy extra_spec of specific"},{"line_number":55,"context_line":"  server group, and compare it with the instances number of same server group"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1f9dbf25_c2679225","line":52,"in_reply_to":"3fa0c359_2579e2c3","updated":"2018-02-28 12:42:06.000000000","message":"Seems reasonable, the user have to do a calculation before sending the request. But will it be a hard fail if the scheduling results are can not be fulfilled?","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3c033ca4c7f6e282c20cc6f0f4384b6e2aed7b91","unresolved":false,"context_lines":[{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."},{"line_number":53,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":54,"context_line":"  the limit. This filter get the limit from policy extra_spec of specific"},{"line_number":55,"context_line":"  server group, and compare it with the instances number of same server group"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_2579e2c3","line":52,"in_reply_to":"3fa0c359_4acd1d64","updated":"2018-02-23 17:05:08.000000000","message":"The operator? It\u0027s the end user that cares about this, not the admin/operator.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b4cc18751623c21d2ebfefa64c76405032e18994","unresolved":false,"context_lines":[{"line_number":49,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":50,"context_line":"  For example, If the user want to add the limit like \"no host can contains"},{"line_number":51,"context_line":"  over than 3 vms in our group\", the user can add the"},{"line_number":52,"context_line":"  ``{\u0027max_number_per_host\u0027: 3}`` in the extra_spec."},{"line_number":53,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":54,"context_line":"  the limit. This filter get the limit from policy extra_spec of specific"},{"line_number":55,"context_line":"  server group, and compare it with the instances number of same server group"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_4acd1d64","line":52,"in_reply_to":"3fa0c359_5f571d59","updated":"2018-02-23 16:23:29.000000000","message":"Yeah, I second the idea. For anti-affinity, only the operator knows how many \u0027affinity domains\u0027 he\u0027d like to achieve, so looks like a way better alternative.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b4cc18751623c21d2ebfefa64c76405032e18994","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  the limit. This filter get the limit from policy extra_spec of specific"},{"line_number":55,"context_line":"  server group, and compare it with the instances number of same server group"},{"line_number":56,"context_line":"  on this host, if the filter find the number is already over the limit, it"},{"line_number":57,"context_line":"  will filter out this host."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"Alternatives"},{"line_number":60,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_0a6155d3","line":57,"updated":"2018-02-23 16:23:29.000000000","message":"I totally disagree with the approach. \nIn the current Nova design model for scheduling, we have two different considerations for placing instances to host\n- either the host is not acceptable and we hard-fail for it. That\u0027s what we call a \"scheduler filter\".\n- or the host is somehow bad for that instance but we accept a degradation and then we accept it but we weigh it less than others (hence the \"weigher\").\n\nThat conceptual model means that either you consider a host as valid (and you rank it) or not, but you can\u0027t have a fluctuant limit that would consider your host as invalid.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8d996f436c4a86c10c57d8d94c70b65a80928745","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  the limit. This filter get the limit from policy extra_spec of specific"},{"line_number":55,"context_line":"  server group, and compare it with the instances number of same server group"},{"line_number":56,"context_line":"  on this host, if the filter find the number is already over the limit, it"},{"line_number":57,"context_line":"  will filter out this host."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"Alternatives"},{"line_number":60,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_606b9684","line":57,"in_reply_to":"3fa0c359_0a6155d3","updated":"2018-03-13 12:47:28.000000000","message":"Thanks for your reminder, after ptg discussion, I think I need update these wrong description.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"Alternatives"},{"line_number":60,"context_line":"------------"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Instead of adding the extra_spec attribute to the **instance group**"},{"line_number":63,"context_line":"data model, we can also add the extra_spec field to the"},{"line_number":64,"context_line":"**instance group policy** data model."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Instead of adding the extra_spec attribute to the **instance group**"},{"line_number":67,"context_line":"data model, we can also add the instance group metadata table. Note that:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_ff0949dc","line":64,"range":{"start_line":62,"start_character":0,"end_line":64,"end_character":37},"updated":"2018-02-23 15:27:25.000000000","message":"This isn\u0027t really an alternative to the proposed solution, this is really just about an option for data modeling.\n\nI forgot that we even had a special table for the policy:\n\nhttps://github.com/openstack/nova/blob/ef4000a0d326deb004843ee51d18030224c5630f/nova/db/sqlalchemy/api_models.py#L409\n\nWhich seems totally useless since the API user doesn\u0027t interact with policy resources at all, they interact with the group and define a policy (only one) on the group:\n\nhttps://github.com/openstack/nova/blob/ef4000a0d326deb004843ee51d18030224c5630f/nova/api/openstack/compute/schemas/server_groups.py#L29-L39\n\nSo whether we store the limit on the policy table or the group table doesn\u0027t matter to me, but it\u0027s probably something to mention in the \u0027data model impact\u0027 section rather than the \u0027alternatives\u0027 section.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":63,"context_line":"data model, we can also add the extra_spec field to the"},{"line_number":64,"context_line":"**instance group policy** data model."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Instead of adding the extra_spec attribute to the **instance group**"},{"line_number":67,"context_line":"data model, we can also add the instance group metadata table. Note that:"},{"line_number":68,"context_line":"we already dropped the instance_group_metadata table in [2]_."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Data model impact"},{"line_number":71,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_7f47791e","line":68,"range":{"start_line":66,"start_character":0,"end_line":68,"end_character":61},"updated":"2018-02-23 15:27:25.000000000","message":"We can\u0027t use a table that doesn\u0027t exist. And again, this isn\u0027t an alternative solution, it\u0027s a data model option (and not really an option if the table doesn\u0027t exist).","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8d996f436c4a86c10c57d8d94c70b65a80928745","unresolved":false,"context_lines":[{"line_number":63,"context_line":"data model, we can also add the extra_spec field to the"},{"line_number":64,"context_line":"**instance group policy** data model."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Instead of adding the extra_spec attribute to the **instance group**"},{"line_number":67,"context_line":"data model, we can also add the instance group metadata table. Note that:"},{"line_number":68,"context_line":"we already dropped the instance_group_metadata table in [2]_."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Data model impact"},{"line_number":71,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_80f82a49","line":68,"range":{"start_line":66,"start_character":0,"end_line":68,"end_character":61},"in_reply_to":"3fa0c359_7f47791e","updated":"2018-03-13 12:47:28.000000000","message":"OK, thanks for reminder.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e9aa365e370b835750948a80d599e4519b157691","unresolved":false,"context_lines":[{"line_number":70,"context_line":"Data model impact"},{"line_number":71,"context_line":"-----------------"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Add the extra_spec attribute to the **instance group** data model."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_7f521969","line":73,"updated":"2018-02-23 15:40:37.000000000","message":"FWIW, I\u0027m really (really) not excited about adding extra_specs to anything, especially instance_group.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":70,"context_line":"Data model impact"},{"line_number":71,"context_line":"-----------------"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Add the extra_spec attribute to the **instance group** data model."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_1f199520","line":73,"updated":"2018-02-23 15:27:25.000000000","message":"Or the \"instance_group_policy\" table I guess, unless we drop that table at some point and just store the policy on the instance_groups table directly.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3c033ca4c7f6e282c20cc6f0f4384b6e2aed7b91","unresolved":false,"context_lines":[{"line_number":70,"context_line":"Data model impact"},{"line_number":71,"context_line":"-----------------"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Add the extra_spec attribute to the **instance group** data model."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_e51e9a6e","line":73,"in_reply_to":"3fa0c359_4ab0bd43","updated":"2018-02-23 17:05:08.000000000","message":"I think the extra spec mentioned is an initial WIP proposal, not something set in stone, so we don\u0027t need to pile on this.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b4cc18751623c21d2ebfefa64c76405032e18994","unresolved":false,"context_lines":[{"line_number":70,"context_line":"Data model impact"},{"line_number":71,"context_line":"-----------------"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Add the extra_spec attribute to the **instance group** data model."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_4ab0bd43","line":73,"in_reply_to":"3fa0c359_7f521969","updated":"2018-02-23 16:23:29.000000000","message":"+1 with Dan","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":76,"context_line":"REST API impact"},{"line_number":77,"context_line":"---------------"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"Add PUT API of instance group to update the group extra_spec attribute."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Security impact"},{"line_number":82,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_7f91b951","line":79,"range":{"start_line":79,"start_character":0,"end_line":79,"end_character":71},"updated":"2018-02-23 15:27:25.000000000","message":"I\u0027m not sure about this - we\u0027d modify the POST method to allow setting the per-host limit when the group is created, but I know we don\u0027t allow changing policies and we don\u0027t allow adding/removing members from a group, because that requires dynamically rebalancing the group. So for similar reasons, we likely wouldn\u0027t allow changing the per-host limit on an existing group since it would require re-scheduling the group if the new per-host limit doesn\u0027t match the current state of the group.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8d996f436c4a86c10c57d8d94c70b65a80928745","unresolved":false,"context_lines":[{"line_number":76,"context_line":"REST API impact"},{"line_number":77,"context_line":"---------------"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"Add PUT API of instance group to update the group extra_spec attribute."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Security impact"},{"line_number":82,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df7087c5_40da124c","line":79,"range":{"start_line":79,"start_character":0,"end_line":79,"end_character":71},"in_reply_to":"3fa0c359_7f91b951","updated":"2018-03-13 12:47:28.000000000","message":"Agree, now I think we need only set limit when policy creating.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":86,"context_line":"Notifications impact"},{"line_number":87,"context_line":"--------------------"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"None"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"Other end user impact"},{"line_number":92,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_1f9c3568","line":89,"updated":"2018-02-23 15:27:25.000000000","message":"The server_group.create and server_group.delete versioned notifications would include the new per-host limit attribute.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":91,"context_line":"Other end user impact"},{"line_number":92,"context_line":"---------------------"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"None"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"Performance Impact"},{"line_number":97,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_3f97b147","line":94,"updated":"2018-02-23 15:27:25.000000000","message":"Likely python-novaclient and python-openstackclient changes.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e9aa365e370b835750948a80d599e4519b157691","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":129,"context_line":"* Create a new API microversion to add PUT API of instance group to"},{"line_number":130,"context_line":"  allow user to update the instance group extra_spec attribute."},{"line_number":131,"context_line":"* Modify the Nova client to handle the new microversion."},{"line_number":132,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":133,"context_line":"  the group limit."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_3f4811b1","line":130,"updated":"2018-02-23 15:40:37.000000000","message":"As above, what happens if you change this down on an existing group?","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":126,"context_line":"----------"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"* Add the extra_spec attribute to the **instance group** data model."},{"line_number":129,"context_line":"* Create a new API microversion to add PUT API of instance group to"},{"line_number":130,"context_line":"  allow user to update the instance group extra_spec attribute."},{"line_number":131,"context_line":"* Modify the Nova client to handle the new microversion."},{"line_number":132,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":133,"context_line":"  the group limit."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_ff8e292c","line":130,"range":{"start_line":129,"start_character":2,"end_line":130,"end_character":63},"updated":"2018-02-23 15:27:25.000000000","message":"I don\u0027t think we\u0027re going to do this, we\u0027d just have the new attribute on POST (creation) of the group.","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e9ce8e69ec8f8730f8f8f7a445fb6740b8ff31f","unresolved":false,"context_lines":[{"line_number":129,"context_line":"* Create a new API microversion to add PUT API of instance group to"},{"line_number":130,"context_line":"  allow user to update the instance group extra_spec attribute."},{"line_number":131,"context_line":"* Modify the Nova client to handle the new microversion."},{"line_number":132,"context_line":"* Add a filter to nova scheduler to filter out the host which is already over"},{"line_number":133,"context_line":"  the group limit."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"Dependencies"},{"line_number":136,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_5f7f1d14","line":133,"range":{"start_line":132,"start_character":2,"end_line":133,"end_character":18},"updated":"2018-02-23 15:27:25.000000000","message":"Can we just modify the existing server group affinity filters?","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"108f4cdc5883809fb8dc752628440ebc78a50e96","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"Docs needed for new API microversion and usage."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"References"},{"line_number":151,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":" .. [1] Virtual IMS Core Usecases:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fa0c359_8ab3250a","line":150,"updated":"2018-02-23 16:11:04.000000000","message":"You should also refer to the old backlog spec from sgordon:\n\nhttps://review.openstack.org/#/c/224325/","commit_id":"378023b96da5ffd9bd7b3e587d875a7f6aeb8ba8"}],"specs/rocky/approved/complex-anti-affinity-policies.rst":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8fecc854c97e2fd651d9cea1bf16ae004b603d8c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Problem description"},{"line_number":17,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Now, Nova supports filtering and weighting to make informed decisions on where"},{"line_number":20,"context_line":"a new instance should be created, and the ServerGroup(Anti)AffinityFilter"},{"line_number":21,"context_line":"implements (anti)affinity for a server group based on this scheduler mechanism."},{"line_number":22,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_0db3cf4e","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":5},"updated":"2018-03-14 14:50:40.000000000","message":"maybe delete this","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"dde211410cdf33f58df7993720e56d7fe3b2846e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Problem description"},{"line_number":17,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Now, Nova supports filtering and weighting to make informed decisions on where"},{"line_number":20,"context_line":"a new instance should be created, and the ServerGroup(Anti)AffinityFilter"},{"line_number":21,"context_line":"implements (anti)affinity for a server group based on this scheduler mechanism."},{"line_number":22,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_ebcaf59e","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":5},"in_reply_to":"df7087c5_0db3cf4e","updated":"2018-03-15 02:49:38.000000000","message":"Done","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8fecc854c97e2fd651d9cea1bf16ae004b603d8c","unresolved":false,"context_lines":[{"line_number":20,"context_line":"a new instance should be created, and the ServerGroup(Anti)AffinityFilter"},{"line_number":21,"context_line":"implements (anti)affinity for a server group based on this scheduler mechanism."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"The users just need set the policy for the specific server group to enable"},{"line_number":24,"context_line":"the (anti)affinity for the server group. This meets the most basic requirement"},{"line_number":25,"context_line":"of server group affinity, but it isn\u0027t enough for the more complex affinity"},{"line_number":26,"context_line":"requirement."}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_4dc46791","line":23,"range":{"start_line":23,"start_character":9,"end_line":23,"end_character":20},"updated":"2018-03-14 14:50:40.000000000","message":"delete this","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"dde211410cdf33f58df7993720e56d7fe3b2846e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"a new instance should be created, and the ServerGroup(Anti)AffinityFilter"},{"line_number":21,"context_line":"implements (anti)affinity for a server group based on this scheduler mechanism."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"The users just need set the policy for the specific server group to enable"},{"line_number":24,"context_line":"the (anti)affinity for the server group. This meets the most basic requirement"},{"line_number":25,"context_line":"of server group affinity, but it isn\u0027t enough for the more complex affinity"},{"line_number":26,"context_line":"requirement."}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_8bb9f915","line":23,"range":{"start_line":23,"start_character":9,"end_line":23,"end_character":20},"in_reply_to":"df7087c5_4dc46791","updated":"2018-03-15 02:49:38.000000000","message":"Done","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8fecc854c97e2fd651d9cea1bf16ae004b603d8c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"Proposed change"},{"line_number":46,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":47,"context_line":"This spec propose to:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy, and"},{"line_number":50,"context_line":"  now only support \"limit\" entry with an int value \u003e\u003d 1 which is validated with"},{"line_number":51,"context_line":"  jsonschema in API."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a group"},{"line_number":54,"context_line":"  on a given host, th user can create a policy with the ``{\u0027host_limit\u0027: 3}``"},{"line_number":55,"context_line":"  specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The filter"},{"line_number":58,"context_line":"  get the limit from policy specs, and compare it with the instances number"},{"line_number":59,"context_line":"  of same server group on this host. If the filter find the number is already"},{"line_number":60,"context_line":"  over the limit, it will filter out this host."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Alternatives"},{"line_number":63,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_6dda8b4b","line":60,"range":{"start_line":48,"start_character":0,"end_line":60,"end_character":47},"updated":"2018-03-14 14:50:40.000000000","message":"It seems you forgot the validation part, the possible keys in this dict will be limited to a set of pre-defined keys, we need to have a way to validate it.","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"dde211410cdf33f58df7993720e56d7fe3b2846e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"Proposed change"},{"line_number":46,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":47,"context_line":"This spec propose to:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy, and"},{"line_number":50,"context_line":"  now only support \"limit\" entry with an int value \u003e\u003d 1 which is validated with"},{"line_number":51,"context_line":"  jsonschema in API."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a group"},{"line_number":54,"context_line":"  on a given host, th user can create a policy with the ``{\u0027host_limit\u0027: 3}``"},{"line_number":55,"context_line":"  specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The filter"},{"line_number":58,"context_line":"  get the limit from policy specs, and compare it with the instances number"},{"line_number":59,"context_line":"  of same server group on this host. If the filter find the number is already"},{"line_number":60,"context_line":"  over the limit, it will filter out this host."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Alternatives"},{"line_number":63,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_6b0105af","line":60,"range":{"start_line":48,"start_character":0,"end_line":60,"end_character":47},"in_reply_to":"df7087c5_6dda8b4b","updated":"2018-03-15 02:49:38.000000000","message":"Done","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8fecc854c97e2fd651d9cea1bf16ae004b603d8c","unresolved":false,"context_lines":[{"line_number":79,"context_line":"REST API impact"},{"line_number":80,"context_line":"---------------"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Support passing ``specs`` to the create instance group API."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"The scehma of the ``specs``::"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"   \u0027specs\u0027: {"},{"line_number":87,"context_line":"        \u0027type\u0027: \u0027object\u0027,"},{"line_number":88,"context_line":"        \u0027properties\u0027: {"},{"line_number":89,"context_line":"            \u0027host_limit\u0027: parameter_types.positive_integer"},{"line_number":90,"context_line":"        },"},{"line_number":91,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":92,"context_line":"   }"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Security impact"},{"line_number":95,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_6db36b0b","line":92,"range":{"start_line":82,"start_character":0,"end_line":92,"end_character":4},"updated":"2018-03-14 14:50:40.000000000","message":"Oh, it is here, but I think this should be also mentioned in the above section. Also, should mention a microversion bump is needed.","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"dde211410cdf33f58df7993720e56d7fe3b2846e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"REST API impact"},{"line_number":80,"context_line":"---------------"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Support passing ``specs`` to the create instance group API."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"The scehma of the ``specs``::"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"   \u0027specs\u0027: {"},{"line_number":87,"context_line":"        \u0027type\u0027: \u0027object\u0027,"},{"line_number":88,"context_line":"        \u0027properties\u0027: {"},{"line_number":89,"context_line":"            \u0027host_limit\u0027: parameter_types.positive_integer"},{"line_number":90,"context_line":"        },"},{"line_number":91,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":92,"context_line":"   }"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Security impact"},{"line_number":95,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df7087c5_8bfc99b5","line":92,"range":{"start_line":82,"start_character":0,"end_line":92,"end_character":4},"in_reply_to":"df7087c5_6db36b0b","updated":"2018-03-15 02:49:38.000000000","message":"Done","commit_id":"1fbe9296360ade7e4115c7da988555ed9d538e17"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"8a6f751d3e06f14e1b7040ec135510ff7e1f9d86","unresolved":false,"context_lines":[{"line_number":66,"context_line":"Alternatives"},{"line_number":67,"context_line":"------------"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"An alternative would be to have a setting for the max spread before the"},{"line_number":70,"context_line":"scheduler would consider doubling up. The user can define how much redundancy"},{"line_number":71,"context_line":"they want at a minimum regardless of how many instances are in the group."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Data model impact"},{"line_number":74,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"df7087c5_5a53ac17","line":71,"range":{"start_line":69,"start_character":0,"end_line":71,"end_character":73},"updated":"2018-03-15 04:30:49.000000000","message":"I suspect this is likely to be more useful in a practical sense.  (Though it would actually be the \"minimum\" spread, not \"max\".)","commit_id":"16aca2b7e5ffade5f73205d2029288fd7e241628"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/complex-anti-affinity-policies"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint proposes to allow user to set more complex (anti-)affinity"},{"line_number":14,"context_line":"group policies."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_b5072419","line":13,"range":{"start_line":13,"start_character":33,"end_line":13,"end_character":37},"updated":"2018-03-19 14:18:23.000000000","message":"nit: \"a user\" or \"users\"","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/complex-anti-affinity-policies"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint proposes to allow user to set more complex (anti-)affinity"},{"line_number":14,"context_line":"group policies."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_ec686122","line":13,"range":{"start_line":13,"start_character":33,"end_line":13,"end_character":37},"in_reply_to":"df7087c5_b5072419","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":21,"context_line":"implements (anti)affinity for a server group based on this scheduler"},{"line_number":22,"context_line":"mechanism."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"The users set the policy for the specific server group to enable the"},{"line_number":25,"context_line":"(anti)affinity for the server group. This meets the most basic requirement of"},{"line_number":26,"context_line":"server group affinity, but it isn\u0027t enough for the more complex affinity"},{"line_number":27,"context_line":"requirement."}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_950ea030","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":9},"updated":"2018-03-19 14:18:23.000000000","message":"nit: Just \"Users set the ...\"","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":21,"context_line":"implements (anti)affinity for a server group based on this scheduler"},{"line_number":22,"context_line":"mechanism."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"The users set the policy for the specific server group to enable the"},{"line_number":25,"context_line":"(anti)affinity for the server group. This meets the most basic requirement of"},{"line_number":26,"context_line":"server group affinity, but it isn\u0027t enough for the more complex affinity"},{"line_number":27,"context_line":"requirement."}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_8c7525fd","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":9},"in_reply_to":"df7087c5_950ea030","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":26,"context_line":"server group affinity, but it isn\u0027t enough for the more complex affinity"},{"line_number":27,"context_line":"requirement."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"For example, the users want to enable anti-affinity policy with a limit other"},{"line_number":30,"context_line":"than 1, which the static limit today, by doing this, the number of VMs in the"},{"line_number":31,"context_line":"same anti-affinity group per host can be limited by users. To achieve both the"},{"line_number":32,"context_line":"anti-affinity and resource utilization requirement, it\u0027s a very useful ability"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_351b1474","line":29,"range":{"start_line":29,"start_character":13,"end_line":29,"end_character":22},"updated":"2018-03-19 14:18:23.000000000","message":"users","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":26,"context_line":"server group affinity, but it isn\u0027t enough for the more complex affinity"},{"line_number":27,"context_line":"requirement."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"For example, the users want to enable anti-affinity policy with a limit other"},{"line_number":30,"context_line":"than 1, which the static limit today, by doing this, the number of VMs in the"},{"line_number":31,"context_line":"same anti-affinity group per host can be limited by users. To achieve both the"},{"line_number":32,"context_line":"anti-affinity and resource utilization requirement, it\u0027s a very useful ability"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_1218507f","line":29,"range":{"start_line":29,"start_character":13,"end_line":29,"end_character":22},"in_reply_to":"df7087c5_351b1474","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":27,"context_line":"requirement."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"For example, the users want to enable anti-affinity policy with a limit other"},{"line_number":30,"context_line":"than 1, which the static limit today, by doing this, the number of VMs in the"},{"line_number":31,"context_line":"same anti-affinity group per host can be limited by users. To achieve both the"},{"line_number":32,"context_line":"anti-affinity and resource utilization requirement, it\u0027s a very useful ability"},{"line_number":33,"context_line":"to users, especially, when the users doesn\u0027t have enough hosts in their cloud"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_152cd097","line":30,"range":{"start_line":30,"start_character":36,"end_line":30,"end_character":40},"updated":"2018-03-19 14:18:23.000000000","message":". By doing this","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":27,"context_line":"requirement."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"For example, the users want to enable anti-affinity policy with a limit other"},{"line_number":30,"context_line":"than 1, which the static limit today, by doing this, the number of VMs in the"},{"line_number":31,"context_line":"same anti-affinity group per host can be limited by users. To achieve both the"},{"line_number":32,"context_line":"anti-affinity and resource utilization requirement, it\u0027s a very useful ability"},{"line_number":33,"context_line":"to users, especially, when the users doesn\u0027t have enough hosts in their cloud"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_55180874","line":30,"range":{"start_line":30,"start_character":14,"end_line":30,"end_character":17},"updated":"2018-03-19 14:18:23.000000000","message":"is the","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":27,"context_line":"requirement."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"For example, the users want to enable anti-affinity policy with a limit other"},{"line_number":30,"context_line":"than 1, which the static limit today, by doing this, the number of VMs in the"},{"line_number":31,"context_line":"same anti-affinity group per host can be limited by users. To achieve both the"},{"line_number":32,"context_line":"anti-affinity and resource utilization requirement, it\u0027s a very useful ability"},{"line_number":33,"context_line":"to users, especially, when the users doesn\u0027t have enough hosts in their cloud"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_92030010","line":30,"range":{"start_line":30,"start_character":36,"end_line":30,"end_character":40},"in_reply_to":"df7087c5_152cd097","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":27,"context_line":"requirement."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"For example, the users want to enable anti-affinity policy with a limit other"},{"line_number":30,"context_line":"than 1, which the static limit today, by doing this, the number of VMs in the"},{"line_number":31,"context_line":"same anti-affinity group per host can be limited by users. To achieve both the"},{"line_number":32,"context_line":"anti-affinity and resource utilization requirement, it\u0027s a very useful ability"},{"line_number":33,"context_line":"to users, especially, when the users doesn\u0027t have enough hosts in their cloud"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_fd07ad17","line":30,"range":{"start_line":30,"start_character":14,"end_line":30,"end_character":17},"in_reply_to":"df7087c5_55180874","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":30,"context_line":"than 1, which the static limit today, by doing this, the number of VMs in the"},{"line_number":31,"context_line":"same anti-affinity group per host can be limited by users. To achieve both the"},{"line_number":32,"context_line":"anti-affinity and resource utilization requirement, it\u0027s a very useful ability"},{"line_number":33,"context_line":"to users, especially, when the users doesn\u0027t have enough hosts in their cloud"},{"line_number":34,"context_line":"but still want some level of high reliability of their applications."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"So, the scheduler needs to provide some mechanism to support the more complex"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_353474de","line":33,"range":{"start_line":33,"start_character":37,"end_line":33,"end_character":44},"updated":"2018-03-19 14:18:23.000000000","message":"don\u0027t","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":30,"context_line":"than 1, which the static limit today, by doing this, the number of VMs in the"},{"line_number":31,"context_line":"same anti-affinity group per host can be limited by users. To achieve both the"},{"line_number":32,"context_line":"anti-affinity and resource utilization requirement, it\u0027s a very useful ability"},{"line_number":33,"context_line":"to users, especially, when the users doesn\u0027t have enough hosts in their cloud"},{"line_number":34,"context_line":"but still want some level of high reliability of their applications."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"So, the scheduler needs to provide some mechanism to support the more complex"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_bd113556","line":33,"range":{"start_line":33,"start_character":37,"end_line":33,"end_character":44},"in_reply_to":"df7087c5_353474de","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Proposed change"},{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec propose to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_d55ad828","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":17},"updated":"2018-03-19 14:18:23.000000000","message":"proposes","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Proposed change"},{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec propose to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_1d2621b9","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":17},"in_reply_to":"df7087c5_d55ad828","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec propose to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_95aa20d0","line":51,"range":{"start_line":51,"start_character":17,"end_line":51,"end_character":22},"updated":"2018-03-19 14:18:23.000000000","message":"I was thinking about the name of this and wonder if \"rules\" might be more appropriate to name these things that apply to the policy. Specs is a bit too generic and could be thought of like flavor extra specs which are not enforced via schema like these would be.\n\nJust a suggestion.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec propose to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_bd3ff5b3","line":51,"range":{"start_line":51,"start_character":17,"end_line":51,"end_character":22},"in_reply_to":"df7087c5_95aa20d0","updated":"2018-03-20 08:53:27.000000000","message":"sure, yes, I think the ``rules`` is okay for me, I can change it in next patch.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_b57c0473","line":53,"range":{"start_line":53,"start_character":66,"end_line":53,"end_character":69},"updated":"2018-03-19 14:18:23.000000000","message":"VMs","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_35b7943d","line":53,"range":{"start_line":53,"start_character":15,"end_line":53,"end_character":17},"updated":"2018-03-19 14:18:23.000000000","message":"if","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_1588506f","line":53,"range":{"start_line":53,"start_character":27,"end_line":53,"end_character":31},"updated":"2018-03-19 14:18:23.000000000","message":"wants","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_dd3c29c1","line":53,"range":{"start_line":53,"start_character":27,"end_line":53,"end_character":31},"in_reply_to":"df7087c5_1588506f","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_7d495d5e","line":53,"range":{"start_line":53,"start_character":15,"end_line":53,"end_character":17},"in_reply_to":"df7087c5_35b7943d","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_9d46b14f","line":53,"range":{"start_line":53,"start_character":66,"end_line":53,"end_character":69},"in_reply_to":"df7087c5_b57c0473","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_75966c97","line":54,"range":{"start_line":54,"start_character":25,"end_line":54,"end_character":27},"updated":"2018-03-19 14:18:23.000000000","message":"the","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":51,"context_line":"* Add a generic \"specs\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, If the user want to add the limit on the number of VMS in a"},{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_5d7a5988","line":54,"range":{"start_line":54,"start_character":25,"end_line":54,"end_character":27},"in_reply_to":"df7087c5_75966c97","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"},{"line_number":58,"context_line":"  and ``group_id`` fields."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* Create a new API microversion to support passing ``specs`` to the create"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_b597243b","line":57,"range":{"start_line":57,"start_character":2,"end_line":57,"end_character":35},"updated":"2018-03-19 14:18:23.000000000","message":"This whole part about the new object should probably move to the \u0027data model impact\u0027 section.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"},{"line_number":58,"context_line":"  and ``group_id`` fields."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* Create a new API microversion to support passing ``specs`` to the create"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_95d8e07f","line":57,"range":{"start_line":57,"start_character":36,"end_line":57,"end_character":42},"updated":"2018-03-19 14:18:23.000000000","message":"versioned object","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"},{"line_number":58,"context_line":"  and ``group_id`` fields."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* Create a new API microversion to support passing ``specs`` to the create"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_9d5f910d","line":57,"range":{"start_line":57,"start_character":36,"end_line":57,"end_character":42},"in_reply_to":"df7087c5_95d8e07f","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  group on a given host, th user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"},{"line_number":58,"context_line":"  and ``group_id`` fields."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* Create a new API microversion to support passing ``specs`` to the create"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_bd6855ba","line":57,"range":{"start_line":57,"start_character":2,"end_line":57,"end_character":35},"in_reply_to":"df7087c5_b597243b","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"},{"line_number":58,"context_line":"  and ``group_id`` fields."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* Create a new API microversion to support passing ``specs`` to the create"},{"line_number":61,"context_line":"  instance group API, and now only support \"limit\" entry with an int value"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_55bb280d","line":58,"updated":"2018-03-19 14:18:23.000000000","message":"To elaborate on this, I assume this would replace the InstanceGroup.policies field? I\u0027m not sure we can replace a field in a versioned object without a major version bump, so likely this would have to be a minor version change to InstanceGroup where we add a new \u0027policy\u0027 field (singular) and then make a note that the \u0027policies\u0027 field is deprecated after that point. So InstanceGroup.policy would be an instance of InstanceGroupPolicy.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` specs field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"},{"line_number":58,"context_line":"  and ``group_id`` fields."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* Create a new API microversion to support passing ``specs`` to the create"},{"line_number":61,"context_line":"  instance group API, and now only support \"limit\" entry with an int value"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_5d1819d2","line":58,"in_reply_to":"df7087c5_55bb280d","updated":"2018-03-20 08:53:27.000000000","message":"In my previous consideration, I regard policy as a separate object against InstanceGroup, and get/create operations are independent, like:\nhttps://review.openstack.org/#/c/553776/1/nova/api/openstack/compute/server_groups.py@173\nand leave the logic about \u0027policies\u0027 for legacy reason.\n\nBut I think add policy to ``InstanceGroup`` obj and deprecate the ``policies`` is better, it seems more convenient for us to get and write the obj.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":58,"context_line":"  and ``group_id`` fields."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* Create a new API microversion to support passing ``specs`` to the create"},{"line_number":61,"context_line":"  instance group API, and now only support \"limit\" entry with an int value"},{"line_number":62,"context_line":"  \u003e\u003d 1 which is validated with the json schema in API. The responses of"},{"line_number":63,"context_line":"  ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":64,"context_line":"  ``GET /os-server-groups/{server_group_id}`` also need to be change to the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_f5359ca9","line":61,"range":{"start_line":61,"start_character":44,"end_line":61,"end_character":49},"updated":"2018-03-19 14:18:23.000000000","message":"host_limit?","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":58,"context_line":"  and ``group_id`` fields."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* Create a new API microversion to support passing ``specs`` to the create"},{"line_number":61,"context_line":"  instance group API, and now only support \"limit\" entry with an int value"},{"line_number":62,"context_line":"  \u003e\u003d 1 which is validated with the json schema in API. The responses of"},{"line_number":63,"context_line":"  ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":64,"context_line":"  ``GET /os-server-groups/{server_group_id}`` also need to be change to the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_7d207df8","line":61,"range":{"start_line":61,"start_character":44,"end_line":61,"end_character":49},"in_reply_to":"df7087c5_f5359ca9","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":61,"context_line":"  instance group API, and now only support \"limit\" entry with an int value"},{"line_number":62,"context_line":"  \u003e\u003d 1 which is validated with the json schema in API. The responses of"},{"line_number":63,"context_line":"  ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":64,"context_line":"  ``GET /os-server-groups/{server_group_id}`` also need to be change to the"},{"line_number":65,"context_line":"  new policy format."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_75498c30","line":64,"range":{"start_line":64,"start_character":62,"end_line":64,"end_character":68},"updated":"2018-03-19 14:18:23.000000000","message":"changed","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":61,"context_line":"  instance group API, and now only support \"limit\" entry with an int value"},{"line_number":62,"context_line":"  \u003e\u003d 1 which is validated with the json schema in API. The responses of"},{"line_number":63,"context_line":"  ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":64,"context_line":"  ``GET /os-server-groups/{server_group_id}`` also need to be change to the"},{"line_number":65,"context_line":"  new policy format."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_bd6b751d","line":64,"range":{"start_line":64,"start_character":62,"end_line":64,"end_character":68},"in_reply_to":"df7087c5_75498c30","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":62,"context_line":"  \u003e\u003d 1 which is validated with the json schema in API. The responses of"},{"line_number":63,"context_line":"  ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":64,"context_line":"  ``GET /os-server-groups/{server_group_id}`` also need to be change to the"},{"line_number":65,"context_line":"  new policy format."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_956f8091","line":65,"updated":"2018-03-19 14:18:23.000000000","message":"In this same microversion, we should probably take the opportunity to stop returning the empty and unused \u0027metadata\u0027 fields in the response so that those aren\u0027t confused with the \u0027specs\u0027 (or \u0027rules\u0027) parameter.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":62,"context_line":"  \u003e\u003d 1 which is validated with the json schema in API. The responses of"},{"line_number":63,"context_line":"  ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":64,"context_line":"  ``GET /os-server-groups/{server_group_id}`` also need to be change to the"},{"line_number":65,"context_line":"  new policy format."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_7d4e3dc2","line":65,"in_reply_to":"df7087c5_956f8091","updated":"2018-03-20 08:53:27.000000000","message":"Yes, sure, I will add this item.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  new policy format."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"},{"line_number":69,"context_line":"  number of same server group on this host. If the filter find the number is"},{"line_number":70,"context_line":"  already over the limit, it will filter out this host."},{"line_number":71,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_b5264468","line":68,"range":{"start_line":68,"start_character":9,"end_line":68,"end_character":12},"updated":"2018-03-19 14:18:23.000000000","message":"will get","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  new policy format."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"},{"line_number":69,"context_line":"  number of same server group on this host. If the filter find the number is"},{"line_number":70,"context_line":"  already over the limit, it will filter out this host."},{"line_number":71,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_58e107d0","line":68,"range":{"start_line":68,"start_character":9,"end_line":68,"end_character":12},"in_reply_to":"df7087c5_b5264468","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  new policy format."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"},{"line_number":69,"context_line":"  number of same server group on this host. If the filter find the number is"},{"line_number":70,"context_line":"  already over the limit, it will filter out this host."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_d5e098fd","line":69,"range":{"start_line":68,"start_character":57,"end_line":69,"end_character":42},"updated":"2018-03-19 14:18:23.000000000","message":"This is a bit hard to read. Maybe:\n\n\"compare it against the number of servers within the same group on a given host.\"","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"},{"line_number":69,"context_line":"  number of same server group on this host. If the filter find the number is"},{"line_number":70,"context_line":"  already over the limit, it will filter out this host."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_95e22001","line":69,"range":{"start_line":69,"start_character":58,"end_line":69,"end_character":62},"updated":"2018-03-19 14:18:23.000000000","message":"finds","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"},{"line_number":69,"context_line":"  number of same server group on this host. If the filter find the number is"},{"line_number":70,"context_line":"  already over the limit, it will filter out this host."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_18eb8fb0","line":69,"range":{"start_line":69,"start_character":58,"end_line":69,"end_character":62},"in_reply_to":"df7087c5_95e22001","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  new policy format."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"},{"line_number":69,"context_line":"  number of same server group on this host. If the filter find the number is"},{"line_number":70,"context_line":"  already over the limit, it will filter out this host."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_b8cf0356","line":69,"range":{"start_line":68,"start_character":57,"end_line":69,"end_character":42},"in_reply_to":"df7087c5_d5e098fd","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"},{"line_number":69,"context_line":"  number of same server group on this host. If the filter find the number is"},{"line_number":70,"context_line":"  already over the limit, it will filter out this host."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"},{"line_number":73,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_b5b404f4","line":70,"updated":"2018-03-19 14:18:23.000000000","message":"We should mention somewhere that the default host_limit for the hard (anti-)affinity filter is 1 for backward compatibility.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":67,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model. The"},{"line_number":68,"context_line":"  filter get the limit from policy specs, and compare it with the instances"},{"line_number":69,"context_line":"  number of same server group on this host. If the filter find the number is"},{"line_number":70,"context_line":"  already over the limit, it will filter out this host."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"},{"line_number":73,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_f8cfbb26","line":70,"in_reply_to":"df7087c5_b5b404f4","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":83,"context_line":"  database table. A database schema migration is necessary in order to"},{"line_number":84,"context_line":"  add the column."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"* A new ``specs`` field will be added in the ``InstanceGroupPolicy`` object."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"},{"line_number":89,"context_line":"  and ``group_id`` fields."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"REST API impact"},{"line_number":92,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_75caec4f","line":89,"range":{"start_line":86,"start_character":0,"end_line":89,"end_character":26},"updated":"2018-03-19 14:18:23.000000000","message":"Replace this with the more detailed bullet from the \u0027proposed change\u0027 section, and go into more detail about what you plan to change on the InstanceGroup object with respect to it\u0027s current \u0027policies\u0027 field.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":83,"context_line":"  database table. A database schema migration is necessary in order to"},{"line_number":84,"context_line":"  add the column."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"* A new ``specs`` field will be added in the ``InstanceGroupPolicy`` object."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"* Add a new ``InstanceGroupPolicy`` object including the ``policy``, ``specs``"},{"line_number":89,"context_line":"  and ``group_id`` fields."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"REST API impact"},{"line_number":92,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_6cc44c41","line":89,"range":{"start_line":86,"start_character":0,"end_line":89,"end_character":26},"in_reply_to":"df7087c5_75caec4f","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                    \u0027policy\u0027: {"},{"line_number":126,"context_line":"                        \u0027type\u0027: \u0027string\u0027,"},{"line_number":127,"context_line":"                        \u0027enum\u0027: [\u0027anti-affinity\u0027, \u0027affinity\u0027,"},{"line_number":128,"context_line":"                        \u0027soft-anti-affinity\u0027, \u0027soft-affinity\u0027],"},{"line_number":129,"context_line":"                    },"},{"line_number":130,"context_line":"                    \u0027host_limit\u0027: parameter_types.positive_integer,"},{"line_number":131,"context_line":"                },"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_9568e021","line":128,"range":{"start_line":128,"start_character":24,"end_line":128,"end_character":61},"updated":"2018-03-19 14:18:23.000000000","message":"Initially the only spec, host_limit, does not apply to these other policies. What would happen if the user specifies a soft policy with the host_limit spec? We can\u0027t bake that logic into the json schema enforcement. Will the API validation code contain a mapping for valid specs to policies and fail with a 400 if an invalid combination is used? Or would the API simply pass it through and it\u0027s up to the scheduler filters to determine which is used?\n\nI think the API validation option is best as it\u0027s clear API behavior, not reliant on backend filter behavior. If a new filter or policy wanted to add a new \u0027spec\u0027 or use an existing \u0027spec\u0027 it\u0027s a behavior change and we\u0027d add another microversion.\n\nThis is something you should call out in the \"proposed change\" section.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                    \u0027policy\u0027: {"},{"line_number":126,"context_line":"                        \u0027type\u0027: \u0027string\u0027,"},{"line_number":127,"context_line":"                        \u0027enum\u0027: [\u0027anti-affinity\u0027, \u0027affinity\u0027,"},{"line_number":128,"context_line":"                        \u0027soft-anti-affinity\u0027, \u0027soft-affinity\u0027],"},{"line_number":129,"context_line":"                    },"},{"line_number":130,"context_line":"                    \u0027host_limit\u0027: parameter_types.positive_integer,"},{"line_number":131,"context_line":"                },"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_8c9a006c","line":128,"range":{"start_line":128,"start_character":24,"end_line":128,"end_character":61},"in_reply_to":"df7087c5_9568e021","updated":"2018-03-20 08:53:27.000000000","message":"Agree, I also think we need add api validation to limit the rules in specific policy, but now I don\u0027t know how to do this. -.-\n\nI will try to complete this.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                        \u0027enum\u0027: [\u0027anti-affinity\u0027, \u0027affinity\u0027,"},{"line_number":128,"context_line":"                        \u0027soft-anti-affinity\u0027, \u0027soft-affinity\u0027],"},{"line_number":129,"context_line":"                    },"},{"line_number":130,"context_line":"                    \u0027host_limit\u0027: parameter_types.positive_integer,"},{"line_number":131,"context_line":"                },"},{"line_number":132,"context_line":"            },"},{"line_number":133,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027policy\u0027],"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_f504bc80","line":130,"updated":"2018-03-19 14:18:23.000000000","message":"This would need to be nested under a \u0027spec\u0027 field.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                        \u0027enum\u0027: [\u0027anti-affinity\u0027, \u0027affinity\u0027,"},{"line_number":128,"context_line":"                        \u0027soft-anti-affinity\u0027, \u0027soft-affinity\u0027],"},{"line_number":129,"context_line":"                    },"},{"line_number":130,"context_line":"                    \u0027host_limit\u0027: parameter_types.positive_integer,"},{"line_number":131,"context_line":"                },"},{"line_number":132,"context_line":"            },"},{"line_number":133,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027policy\u0027],"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_2c5f34e6","line":130,"in_reply_to":"df7087c5_f504bc80","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                }"},{"line_number":152,"context_line":"            }"},{"line_number":153,"context_line":"            \"members\": [],"},{"line_number":154,"context_line":"            \"metadata\": {}"},{"line_number":155,"context_line":"        }"},{"line_number":156,"context_line":"    }"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_35f2349c","line":154,"range":{"start_line":154,"start_character":12,"end_line":154,"end_character":26},"updated":"2018-03-19 14:18:23.000000000","message":"Let\u0027s remove this in the same microversion.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                }"},{"line_number":152,"context_line":"            }"},{"line_number":153,"context_line":"            \"members\": [],"},{"line_number":154,"context_line":"            \"metadata\": {}"},{"line_number":155,"context_line":"        }"},{"line_number":156,"context_line":"    }"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_ece5bcdd","line":154,"range":{"start_line":154,"start_character":12,"end_line":154,"end_character":26},"in_reply_to":"df7087c5_35f2349c","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                }"},{"line_number":187,"context_line":"            },"},{"line_number":188,"context_line":"            \"members\": [],"},{"line_number":189,"context_line":"            \"metadata\": {}"},{"line_number":190,"context_line":"        }"},{"line_number":191,"context_line":"    }"},{"line_number":192,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_b533a462","line":189,"range":{"start_line":189,"start_character":12,"end_line":189,"end_character":26},"updated":"2018-03-19 14:18:23.000000000","message":"remove","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                }"},{"line_number":187,"context_line":"            },"},{"line_number":188,"context_line":"            \"members\": [],"},{"line_number":189,"context_line":"            \"metadata\": {}"},{"line_number":190,"context_line":"        }"},{"line_number":191,"context_line":"    }"},{"line_number":192,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_accfc455","line":189,"range":{"start_line":189,"start_character":12,"end_line":189,"end_character":26},"in_reply_to":"df7087c5_b533a462","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":198,"context_line":"Notifications impact"},{"line_number":199,"context_line":"--------------------"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"None"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Other end user impact"},{"line_number":204,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_7868a1b9","line":201,"updated":"2018-03-19 14:18:23.000000000","message":"We have versioned notifications for server groups:\n\nhttps://docs.openstack.org/nova/latest/reference/notifications.html#versioned-notification-samples\n\nSo the ServerGroupPayload would likely need to change to mirror the changes to the InstanceGroup versioned object.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":198,"context_line":"Notifications impact"},{"line_number":199,"context_line":"--------------------"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"None"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Other end user impact"},{"line_number":204,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_ef07ee17","line":201,"in_reply_to":"df7087c5_7868a1b9","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7af996957129567a82d74f4713b03e1c9e2e8bf1","unresolved":false,"context_lines":[{"line_number":203,"context_line":"Other end user impact"},{"line_number":204,"context_line":"---------------------"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"None"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"Performance Impact"},{"line_number":209,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_189f25b5","line":206,"updated":"2018-03-19 14:18:23.000000000","message":"CLI changes to python-openstackclient and/or python-novaclient? Those would likely need to grow a --spec (--rule) option, something like that.","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"9a6e0f82b6e0ee03e20fc7067e68755ffb780b31","unresolved":false,"context_lines":[{"line_number":203,"context_line":"Other end user impact"},{"line_number":204,"context_line":"---------------------"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"None"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"Performance Impact"},{"line_number":209,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"df7087c5_4f037a0e","line":206,"in_reply_to":"df7087c5_189f25b5","updated":"2018-03-20 08:53:27.000000000","message":"Done","commit_id":"e143e8576deb789f0e8cc99e8e346ebc7d6c0886"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55b7af7bb8b7187bc32394f29d6b8eea314781ce","unresolved":false,"context_lines":[{"line_number":57,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"  only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"  with the json schema in API."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"  2) The responses of ``POST /os-server-groups``, ``GET /os-server-groups`` and"}],"source_content_type":"text/x-rst","patch_set":7,"id":"df7087c5_b26ce89c","line":60,"updated":"2018-03-21 00:23:15.000000000","message":"nit: here and below, these need to be aligned with the first sentence above to format this numbered list properly.","commit_id":"f53fe1a7576071ef81a6af50f75d19f81b8acbad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55b7af7bb8b7187bc32394f29d6b8eea314781ce","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"  only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"  with the json schema in API."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"  2) The responses of ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":64,"context_line":"  ``GET /os-server-groups/{server_group_id}`` also need to be changed to the"}],"source_content_type":"text/x-rst","patch_set":7,"id":"df7087c5_121cb411","line":61,"updated":"2018-03-21 00:23:15.000000000","message":"In PS6 we talked about also doing some validation of the rules against specific policies, but I don\u0027t see any mention of that in here, only the schema validation.\n\nAs I said earlier, I don\u0027t think we can validate that with schema, so it would likely need to be in the REST API handler code when \u0027rules\u0027 are defined (we\u0027d have to maintain a versioned mapping in python code of acceptable rules for each policy). So if I specified the \u0027host_limit\u0027 rule with the \u0027soft-anti-affinity\u0027 policy, it should be a 400 error.\n\nIf we\u0027re unsure about this, let\u0027s get some more input from alex_xu and gmann.","commit_id":"f53fe1a7576071ef81a6af50f75d19f81b8acbad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55b7af7bb8b7187bc32394f29d6b8eea314781ce","unresolved":false,"context_lines":[{"line_number":98,"context_line":"* Add a new ``policy`` field to the ``InstanceGroup`` object."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"  The InstanceGroup.policy would be an instance of ``InstanceGroupPolicy``,"},{"line_number":101,"context_line":"  and the original ``policies`` would be deprecated."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"REST API impact"},{"line_number":104,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"df7087c5_920764ca","line":101,"range":{"start_line":101,"start_character":10,"end_line":101,"end_character":31},"updated":"2018-03-21 00:23:15.000000000","message":"original ``policies`` field would be","commit_id":"f53fe1a7576071ef81a6af50f75d19f81b8acbad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55b7af7bb8b7187bc32394f29d6b8eea314781ce","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                \u0027policy\u0027: {"},{"line_number":136,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":137,"context_line":"                    \u0027enum\u0027: [\u0027anti-affinity\u0027, \u0027affinity\u0027,"},{"line_number":138,"context_line":"                            \u0027soft-anti-affinity\u0027, soft-affinity\u0027],"},{"line_number":139,"context_line":"                },"},{"line_number":140,"context_line":"                \u0027rules\u0027: {"},{"line_number":141,"context_line":"                    \u0027type\u0027: \u0027object\u0027,"}],"source_content_type":"text/x-rst","patch_set":7,"id":"df7087c5_320e98e5","line":138,"updated":"2018-03-21 00:23:15.000000000","message":"alignment, the policy names should line up","commit_id":"f53fe1a7576071ef81a6af50f75d19f81b8acbad"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            \"id\": \"5bbcc3c4-1da2-4437-a48a-66f15b1b13f9\","},{"line_number":161,"context_line":"            \"name\": \"test\","},{"line_number":162,"context_line":"            \"policy\": {"},{"line_number":163,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":164,"context_line":"                \"rules\": {"},{"line_number":165,"context_line":"                    \"host_limit\": 3"},{"line_number":166,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":7,"id":"df7087c5_e3db707a","line":163,"range":{"start_line":163,"start_character":17,"end_line":163,"end_character":23},"updated":"2018-03-21 05:42:51.000000000","message":"ditto","commit_id":"f53fe1a7576071ef81a6af50f75d19f81b8acbad"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        \"server_group\": {"},{"line_number":178,"context_line":"            \"name\": \"test\","},{"line_number":179,"context_line":"            \"policy\": {"},{"line_number":180,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":181,"context_line":"                \"rules\": {"},{"line_number":182,"context_line":"                    \"host_limit\": 3"},{"line_number":183,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":7,"id":"df7087c5_c3e0ac29","line":180,"range":{"start_line":180,"start_character":17,"end_line":180,"end_character":23},"updated":"2018-03-21 05:42:51.000000000","message":"ditto","commit_id":"f53fe1a7576071ef81a6af50f75d19f81b8acbad"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            \"id\": \"5bbcc3c4-1da2-4437-a48a-66f15b1b13f9\","},{"line_number":195,"context_line":"            \"name\": \"test\","},{"line_number":196,"context_line":"            \"policy\": {"},{"line_number":197,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":198,"context_line":"                \"rules\": {"},{"line_number":199,"context_line":"                    \"host_limit\": 3"},{"line_number":200,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":7,"id":"df7087c5_43cedcb4","line":197,"range":{"start_line":197,"start_character":17,"end_line":197,"end_character":23},"updated":"2018-03-21 05:42:51.000000000","message":"ditto","commit_id":"f53fe1a7576071ef81a6af50f75d19f81b8acbad"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec proposes to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":54,"context_line":"  group on a given host, the user can create a policy with the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_c37aecb8","line":51,"range":{"start_line":51,"start_character":47,"end_line":51,"end_character":68},"updated":"2018-03-21 05:42:51.000000000","message":"what i get from problem statement and matt comment on @L61 - this proposal is to have \"rules\" field only for anti-affinity and affinity policy (not for soft-anti-affinity etc) ? if so we need to mention here explicitly because currently it looks like \u0027rules\u0027 will be valid and applied to all policy.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d981c2385c3567263a9750eb5472b0137cff11bd","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec proposes to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":54,"context_line":"  group on a given host, the user can create a policy with the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_24a40e08","line":51,"range":{"start_line":51,"start_character":47,"end_line":51,"end_character":68},"in_reply_to":"df7087c5_c37aecb8","updated":"2018-03-21 07:38:11.000000000","message":"Done","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a892ddded89239c783fb7cfd6b81c8de30eafcdc","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec proposes to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, applied to the policy."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":54,"context_line":"  group on a given host, the user can create a policy with the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_a46c9e9c","line":51,"range":{"start_line":51,"start_character":47,"end_line":51,"end_character":68},"in_reply_to":"df7087c5_c37aecb8","updated":"2018-03-21 07:29:13.000000000","message":"Sounds like there should have some description about the meaning of host_limit on each policy.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a892ddded89239c783fb7cfd6b81c8de30eafcdc","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":54,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_e4f7f6d3","line":55,"range":{"start_line":55,"start_character":6,"end_line":55,"end_character":16},"updated":"2018-03-21 07:29:13.000000000","message":"host_limit sounds like this is a limit on the number of hosts. maybe \u0027instance_per_host\u0027 or \u0027instance_limit\u0027?  English people may help on the naming.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"ffcbfa3f69e53f3a21fa7948d2de777895729c1b","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":54,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_985f7ee4","line":55,"range":{"start_line":55,"start_character":6,"end_line":55,"end_character":16},"in_reply_to":"df7087c5_e4f7f6d3","updated":"2018-03-21 07:47:41.000000000","message":"OK, thanks, let\u0027s see other idea.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"720c42eda40b9b8c9b6b7321d775e16d656fc7d3","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":54,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":55,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_d86c169e","line":55,"range":{"start_line":55,"start_character":6,"end_line":55,"end_character":16},"in_reply_to":"df7087c5_e4f7f6d3","updated":"2018-03-21 07:51:34.000000000","message":"affinity_limit, affinity_tolerance","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"     only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"     with the json schema in API. In addition, only ``anti-affinity`` and"},{"line_number":62,"context_line":"     ``affinity`` would be supported to apply the ``host_limit`` rule, if"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_69d2df36","line":59,"range":{"start_line":59,"start_character":21,"end_line":59,"end_character":30},"updated":"2018-03-21 05:42:51.000000000","message":"is it optional field or mandatory ? i think optional which we should mention explicitly","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d981c2385c3567263a9750eb5472b0137cff11bd","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"     only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"     with the json schema in API. In addition, only ``anti-affinity`` and"},{"line_number":62,"context_line":"     ``affinity`` would be supported to apply the ``host_limit`` rule, if"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_84863a65","line":59,"range":{"start_line":59,"start_character":21,"end_line":59,"end_character":30},"in_reply_to":"df7087c5_69d2df36","updated":"2018-03-21 07:38:11.000000000","message":"Yes, optional.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":57,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"     only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"     with the json schema in API. In addition, only ``anti-affinity`` and"},{"line_number":62,"context_line":"     ``affinity`` would be supported to apply the ``host_limit`` rule, if"},{"line_number":63,"context_line":"     ``host_limit`` rule is specified with other policy (like"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_89d5f31d","line":60,"range":{"start_line":60,"start_character":18,"end_line":60,"end_character":30},"updated":"2018-03-21 05:42:51.000000000","message":"ditto","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d981c2385c3567263a9750eb5472b0137cff11bd","unresolved":false,"context_lines":[{"line_number":57,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"     only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"     with the json schema in API. In addition, only ``anti-affinity`` and"},{"line_number":62,"context_line":"     ``affinity`` would be supported to apply the ``host_limit`` rule, if"},{"line_number":63,"context_line":"     ``host_limit`` rule is specified with other policy (like"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_046eaa95","line":60,"range":{"start_line":60,"start_character":18,"end_line":60,"end_character":30},"in_reply_to":"df7087c5_89d5f31d","updated":"2018-03-21 07:38:11.000000000","message":"optional too.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"     only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"     with the json schema in API. In addition, only ``anti-affinity`` and"},{"line_number":62,"context_line":"     ``affinity`` would be supported to apply the ``host_limit`` rule, if"},{"line_number":63,"context_line":"     ``host_limit`` rule is specified with other policy (like"},{"line_number":64,"context_line":"     ``soft-anti-affinity``, ``soft-affinity``), it will raise a 400 error"},{"line_number":65,"context_line":"     from API validation."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"  2) The responses of ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":68,"context_line":"     ``GET /os-server-groups/{server_group_id}`` also need to be changed to"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_834e3494","line":65,"range":{"start_line":61,"start_character":34,"end_line":65,"end_character":25},"updated":"2018-03-21 05:42:51.000000000","message":"Regarding whether we can do it via json schema or not-\n\nI think we can do it by defining the separate schema for each enum type and then combine those into a single schema with OneOf(or anyOf which does no make difference as \u0027policy\u0027 can be single unique value at a time)\n\nFor example:\n                \u0027combined_schema\u0027: \n                   \"oneOf\": [\n                       {\n                           \u0027attr_1\u0027: {\n                               \u0027type\u0027: \u0027string\u0027,\n                               \u0027enum\u0027: [\u0027value1\u0027],\n                           },\n                           \u0027extra_fields\u0027: {\u0027type\u0027: \u0027integer\u0027},\n                       },\n                       {\n                           \u0027attr_1\u0027: {\n                               \u0027type\u0027: \u0027string\u0027,\n                               \u0027enum\u0027: [\u0027value2\u0027],\n                           },\n                       } ]     \nSo in above case, if \u0027value1\u0027 is passed, first schema is applied where it accept \u0027extra_fileds\u0027 and if \u0027value2\u0027 then 2nd schema is being validated and it will restrict \u0027extra_fields\u0027.          \n\n Wrote  schema on L131 (REST API impact section)","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9b9399375d529b3b7a961cc31c9bbda653dbbde8","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"     only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"     with the json schema in API. In addition, only ``anti-affinity`` and"},{"line_number":62,"context_line":"     ``affinity`` would be supported to apply the ``host_limit`` rule, if"},{"line_number":63,"context_line":"     ``host_limit`` rule is specified with other policy (like"},{"line_number":64,"context_line":"     ``soft-anti-affinity``, ``soft-affinity``), it will raise a 400 error"},{"line_number":65,"context_line":"     from API validation."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"  2) The responses of ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":68,"context_line":"     ``GET /os-server-groups/{server_group_id}`` also need to be changed to"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_d0c0597f","line":65,"range":{"start_line":61,"start_character":34,"end_line":65,"end_character":25},"in_reply_to":"df7087c5_381c3212","updated":"2018-03-21 21:01:48.000000000","message":"Yeah the complicated json schema hurts my brain and I think would be hard to maintain, especially if we add more rules or policies in the future.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d981c2385c3567263a9750eb5472b0137cff11bd","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"     only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"     with the json schema in API. In addition, only ``anti-affinity`` and"},{"line_number":62,"context_line":"     ``affinity`` would be supported to apply the ``host_limit`` rule, if"},{"line_number":63,"context_line":"     ``host_limit`` rule is specified with other policy (like"},{"line_number":64,"context_line":"     ``soft-anti-affinity``, ``soft-affinity``), it will raise a 400 error"},{"line_number":65,"context_line":"     from API validation."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"  2) The responses of ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":68,"context_line":"     ``GET /os-server-groups/{server_group_id}`` also need to be changed to"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_84f2ba6e","line":65,"range":{"start_line":61,"start_character":34,"end_line":65,"end_character":25},"in_reply_to":"df7087c5_834e3494","updated":"2018-03-21 07:38:11.000000000","message":"Cool, thanks, I will try and update.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a892ddded89239c783fb7cfd6b81c8de30eafcdc","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"     only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"     with the json schema in API. In addition, only ``anti-affinity`` and"},{"line_number":62,"context_line":"     ``affinity`` would be supported to apply the ``host_limit`` rule, if"},{"line_number":63,"context_line":"     ``host_limit`` rule is specified with other policy (like"},{"line_number":64,"context_line":"     ``soft-anti-affinity``, ``soft-affinity``), it will raise a 400 error"},{"line_number":65,"context_line":"     from API validation."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"  2) The responses of ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":68,"context_line":"     ``GET /os-server-groups/{server_group_id}`` also need to be changed to"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_844e3a94","line":65,"range":{"start_line":61,"start_character":34,"end_line":65,"end_character":25},"in_reply_to":"df7087c5_834e3494","updated":"2018-03-21 07:29:13.000000000","message":"The schema gmann suggested looks good. Actually I\u0027m ok to validate that in the python code when the schema becomes complex. If the schema gmann suggested works, let us use that. If there is more complex schema, we can check in the code.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"720c42eda40b9b8c9b6b7321d775e16d656fc7d3","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  1) Support passing ``rules`` to the create instance group API, and now we"},{"line_number":60,"context_line":"     only support \"host_limit\" entry with an int value \u003e\u003d 1 which is validated"},{"line_number":61,"context_line":"     with the json schema in API. In addition, only ``anti-affinity`` and"},{"line_number":62,"context_line":"     ``affinity`` would be supported to apply the ``host_limit`` rule, if"},{"line_number":63,"context_line":"     ``host_limit`` rule is specified with other policy (like"},{"line_number":64,"context_line":"     ``soft-anti-affinity``, ``soft-affinity``), it will raise a 400 error"},{"line_number":65,"context_line":"     from API validation."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"  2) The responses of ``POST /os-server-groups``, ``GET /os-server-groups`` and"},{"line_number":68,"context_line":"     ``GET /os-server-groups/{server_group_id}`` also need to be changed to"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_381c3212","line":65,"range":{"start_line":61,"start_character":34,"end_line":65,"end_character":25},"in_reply_to":"df7087c5_84f2ba6e","updated":"2018-03-21 07:51:34.000000000","message":"I think do it in python could be easier, just add mapping about which policy can have which rule.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":68,"context_line":"     ``GET /os-server-groups/{server_group_id}`` also need to be changed to"},{"line_number":69,"context_line":"     the new policy format."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"  3) Remove the empty and unused ``metadata`` filed in the response."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model."},{"line_number":74,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_7e013704","line":71,"range":{"start_line":71,"start_character":59,"end_line":71,"end_character":67},"updated":"2018-03-21 05:42:51.000000000","message":"of what all APIs? or can you describe this in REST API Impact section.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d981c2385c3567263a9750eb5472b0137cff11bd","unresolved":false,"context_lines":[{"line_number":68,"context_line":"     ``GET /os-server-groups/{server_group_id}`` also need to be changed to"},{"line_number":69,"context_line":"     the new policy format."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"  3) Remove the empty and unused ``metadata`` filed in the response."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"* Change the ``GroupAffinityFilter`` to adapt to complex policy model."},{"line_number":74,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_24e96e7f","line":71,"range":{"start_line":71,"start_character":59,"end_line":71,"end_character":67},"in_reply_to":"df7087c5_7e013704","updated":"2018-03-21 07:38:11.000000000","message":"Done, thanks, I think we can describe in here and also in REST API Impact section.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    {"},{"line_number":120,"context_line":"        \"server_group\": {"},{"line_number":121,"context_line":"            \"name\": \"test\","},{"line_number":122,"context_line":"            \"policy\": {"},{"line_number":123,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":124,"context_line":"                \"rules\": {"},{"line_number":125,"context_line":"                    \"host_limit\": 3"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_035a244f","line":122,"range":{"start_line":122,"start_character":13,"end_line":122,"end_character":19},"updated":"2018-03-21 05:42:51.000000000","message":"+1 for singular name and changing to dict as it is just single value at a time.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \"server_group\": {"},{"line_number":121,"context_line":"            \"name\": \"test\","},{"line_number":122,"context_line":"            \"policy\": {"},{"line_number":123,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":124,"context_line":"                \"rules\": {"},{"line_number":125,"context_line":"                    \"host_limit\": 3"},{"line_number":126,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_c353cc38","line":123,"range":{"start_line":123,"start_character":17,"end_line":123,"end_character":23},"updated":"2018-03-21 05:42:51.000000000","message":"2 times \u0027policy\u0027 field seems redundant. how about just \u0027name\u0027 or \u0027policy_name\u0027 under \u0027policy\u0027 object-\n    {\n        \"server_group\": {\n            \"name\": \"test\",\n            \"policy\": {\n                \"name(or policy_name)\": \"anti-affinity\",\n                \"rules\": {\n                    \"host_limit\": 3\n                }\n            }\n        }\n    }","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"daebc5f55e52fba25effe63f3127a240438af62d","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \"server_group\": {"},{"line_number":121,"context_line":"            \"name\": \"test\","},{"line_number":122,"context_line":"            \"policy\": {"},{"line_number":123,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":124,"context_line":"                \"rules\": {"},{"line_number":125,"context_line":"                    \"host_limit\": 3"},{"line_number":126,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_58e6c6ea","line":123,"range":{"start_line":123,"start_character":17,"end_line":123,"end_character":23},"in_reply_to":"df7087c5_18c5ae8e","updated":"2018-03-21 08:05:11.000000000","message":"yea keeping that embedded inside policy object looks more better as Yikun mentioned it is policy attribute not server group.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"ffcbfa3f69e53f3a21fa7948d2de777895729c1b","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \"server_group\": {"},{"line_number":121,"context_line":"            \"name\": \"test\","},{"line_number":122,"context_line":"            \"policy\": {"},{"line_number":123,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":124,"context_line":"                \"rules\": {"},{"line_number":125,"context_line":"                    \"host_limit\": 3"},{"line_number":126,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_18c5ae8e","line":123,"range":{"start_line":123,"start_character":17,"end_line":123,"end_character":23},"in_reply_to":"df7087c5_446fc2fb","updated":"2018-03-21 07:47:41.000000000","message":"@alex, emm, I prefer put rules in policy dict, because I think rules is a part of policy, not a part of group. It\u0027s more clearly, right? just my idea :)","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"72c6feda1758821778ef1ff773150ca2fd3f5356","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \"server_group\": {"},{"line_number":121,"context_line":"            \"name\": \"test\","},{"line_number":122,"context_line":"            \"policy\": {"},{"line_number":123,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":124,"context_line":"                \"rules\": {"},{"line_number":125,"context_line":"                    \"host_limit\": 3"},{"line_number":126,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_fbdeb4d8","line":123,"range":{"start_line":123,"start_character":17,"end_line":123,"end_character":23},"in_reply_to":"df7087c5_58e6c6ea","updated":"2018-03-21 08:45:14.000000000","message":"@Yikun, good point, that makes sense for me.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d981c2385c3567263a9750eb5472b0137cff11bd","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \"server_group\": {"},{"line_number":121,"context_line":"            \"name\": \"test\","},{"line_number":122,"context_line":"            \"policy\": {"},{"line_number":123,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":124,"context_line":"                \"rules\": {"},{"line_number":125,"context_line":"                    \"host_limit\": 3"},{"line_number":126,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_44482286","line":123,"range":{"start_line":123,"start_character":17,"end_line":123,"end_character":23},"in_reply_to":"df7087c5_c353cc38","updated":"2018-03-21 07:38:11.000000000","message":"@gmann, I choose the 2 times \u0027policy\u0027 becasue it seems we need keep consist between api and db, so I use the 2 times policy which looks like a bit redundant.\n\nBut I think it\u0027s fine to me to change ``policy`` to ``name``.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a892ddded89239c783fb7cfd6b81c8de30eafcdc","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \"server_group\": {"},{"line_number":121,"context_line":"            \"name\": \"test\","},{"line_number":122,"context_line":"            \"policy\": {"},{"line_number":123,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":124,"context_line":"                \"rules\": {"},{"line_number":125,"context_line":"                    \"host_limit\": 3"},{"line_number":126,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_446fc2fb","line":123,"range":{"start_line":123,"start_character":17,"end_line":123,"end_character":23},"in_reply_to":"df7087c5_c353cc38","updated":"2018-03-21 07:29:13.000000000","message":"yea, or we just put one \u0027policy\u0027 field and one \u0027rules\u0027 field in the same level with \u0027name\u0027 field.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9b9399375d529b3b7a961cc31c9bbda653dbbde8","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \"server_group\": {"},{"line_number":121,"context_line":"            \"name\": \"test\","},{"line_number":122,"context_line":"            \"policy\": {"},{"line_number":123,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":124,"context_line":"                \"rules\": {"},{"line_number":125,"context_line":"                    \"host_limit\": 3"},{"line_number":126,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_d045b916","line":123,"range":{"start_line":123,"start_character":17,"end_line":123,"end_character":23},"in_reply_to":"df7087c5_fbdeb4d8","updated":"2018-03-21 21:01:48.000000000","message":"I missed this when looking at this before. Agree that we should have a \u0027name\u0027 key in the \u0027policy\u0027 dict.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"  The new JSON schema for the ``POST /os-server-groups`` as below::"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    create \u003d {"},{"line_number":134,"context_line":"    \u0027type\u0027: \u0027object\u0027,"},{"line_number":135,"context_line":"    \u0027properties\u0027: {"},{"line_number":136,"context_line":"        \u0027server_group\u0027: {"},{"line_number":137,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":138,"context_line":"            \u0027properties\u0027: {"},{"line_number":139,"context_line":"                \u0027policy\u0027: {"},{"line_number":140,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":141,"context_line":"                    \u0027enum\u0027: [\u0027anti-affinity\u0027, \u0027affinity\u0027, \u0027soft-anti-affinity\u0027, soft-affinity\u0027],"},{"line_number":142,"context_line":"                },"},{"line_number":143,"context_line":"                \u0027rules\u0027: {"},{"line_number":144,"context_line":"                    \u0027type\u0027: \u0027object\u0027,"},{"line_number":145,"context_line":"                    \u0027properties\u0027: {"},{"line_number":146,"context_line":"                        \u0027host_limit\u0027: parameter_types.positive_integer,"},{"line_number":147,"context_line":"                    },"},{"line_number":148,"context_line":"                    \u0027additionalProperties\u0027: False"},{"line_number":149,"context_line":"                }"},{"line_number":150,"context_line":"            },"},{"line_number":151,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027policy\u0027],"},{"line_number":152,"context_line":"            \u0027additionalProperties\u0027: False,"},{"line_number":153,"context_line":"        }"},{"line_number":154,"context_line":"    },"},{"line_number":155,"context_line":"    \u0027required\u0027: [\u0027server_group\u0027],"},{"line_number":156,"context_line":"    \u0027additionalProperties\u0027: False,"},{"line_number":157,"context_line":"    }"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  Change the response to the new policy format::"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_5ee8f314","line":157,"range":{"start_line":133,"start_character":0,"end_line":157,"end_character":5},"updated":"2018-03-21 05:42:51.000000000","message":"To validate each set of policy with different fields, We can do like below ?-\n\ncreate \u003d {\n    \u0027type\u0027: \u0027object\u0027,\n    \u0027properties\u0027: {\n        \u0027server_group\u0027: {\n            \u0027type\u0027: \u0027object\u0027,\n            \u0027properties\u0027: {\n                \u0027name\u0027: parameter_types.name,\n                \u0027policy\u0027:\n                    {\n                        \u0027oneOf\u0027: [{\n                            \u0027type\u0027: \u0027object\u0027,\n                            \u0027properties\u0027: {\n                                \u0027policy\u0027: {\n                                    \u0027type\u0027: \u0027string\u0027,\n                                    \u0027enum\u0027: [\u0027anti-affinity\u0027, \u0027affinity\u0027], },\n                                \u0027rules\u0027: {\n                                    \u0027type\u0027: \u0027object\u0027,\n                                    \u0027properties\u0027: {\n                                        \u0027host_limit\u0027:\n                                            parameter_types.positive_integer,\n                                    },\n                                    \u0027additionalProperties\u0027: False\n                                }\n                            },\n                            \u0027required\u0027: [\u0027policy\u0027],\n                            \u0027aditionalProperties\u0027: False\n                        },\n                        {\n                            \u0027type\u0027: \u0027object\u0027,\n                            \u0027properties\u0027: {\n                                \u0027policy\u0027: {\n                                    \u0027type\u0027: \u0027string\u0027,\n                                    \u0027enum\u0027: [\n                                        \u0027soft-anti-affinity\u0027,\n                                        \u0027soft-affinity\u0027], },\n                            },\n                            \u0027required\u0027: [\u0027policy\u0027],\n                            \u0027aditionalProperties\u0027: False\n                        }]\n                }\n            },\n            \u0027required\u0027: [\u0027name\u0027, \u0027policy\u0027],\n            \u0027additionalProperties\u0027: False,\n        }},\n         \u0027required\u0027: [\u0027server_group\u0027],\n        \u0027additionalProperties\u0027: False,\n    }","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d981c2385c3567263a9750eb5472b0137cff11bd","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"  The new JSON schema for the ``POST /os-server-groups`` as below::"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    create \u003d {"},{"line_number":134,"context_line":"    \u0027type\u0027: \u0027object\u0027,"},{"line_number":135,"context_line":"    \u0027properties\u0027: {"},{"line_number":136,"context_line":"        \u0027server_group\u0027: {"},{"line_number":137,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":138,"context_line":"            \u0027properties\u0027: {"},{"line_number":139,"context_line":"                \u0027policy\u0027: {"},{"line_number":140,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":141,"context_line":"                    \u0027enum\u0027: [\u0027anti-affinity\u0027, \u0027affinity\u0027, \u0027soft-anti-affinity\u0027, soft-affinity\u0027],"},{"line_number":142,"context_line":"                },"},{"line_number":143,"context_line":"                \u0027rules\u0027: {"},{"line_number":144,"context_line":"                    \u0027type\u0027: \u0027object\u0027,"},{"line_number":145,"context_line":"                    \u0027properties\u0027: {"},{"line_number":146,"context_line":"                        \u0027host_limit\u0027: parameter_types.positive_integer,"},{"line_number":147,"context_line":"                    },"},{"line_number":148,"context_line":"                    \u0027additionalProperties\u0027: False"},{"line_number":149,"context_line":"                }"},{"line_number":150,"context_line":"            },"},{"line_number":151,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027policy\u0027],"},{"line_number":152,"context_line":"            \u0027additionalProperties\u0027: False,"},{"line_number":153,"context_line":"        }"},{"line_number":154,"context_line":"    },"},{"line_number":155,"context_line":"    \u0027required\u0027: [\u0027server_group\u0027],"},{"line_number":156,"context_line":"    \u0027additionalProperties\u0027: False,"},{"line_number":157,"context_line":"    }"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  Change the response to the new policy format::"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_984c5e77","line":157,"range":{"start_line":133,"start_character":0,"end_line":157,"end_character":5},"in_reply_to":"df7087c5_5ee8f314","updated":"2018-03-21 07:38:11.000000000","message":"OK, Thanks","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            \"id\": \"5bbcc3c4-1da2-4437-a48a-66f15b1b13f9\","},{"line_number":164,"context_line":"            \"name\": \"test\","},{"line_number":165,"context_line":"            \"policy\": {"},{"line_number":166,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":167,"context_line":"                \"rules\": {"},{"line_number":168,"context_line":"                    \"host_limit\": 3"},{"line_number":169,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_031f8470","line":166,"range":{"start_line":166,"start_character":17,"end_line":166,"end_character":23},"updated":"2018-03-21 05:42:51.000000000","message":"ditto","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            \"name\": \"test\","},{"line_number":165,"context_line":"            \"policy\": {"},{"line_number":166,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":167,"context_line":"                \"rules\": {"},{"line_number":168,"context_line":"                    \"host_limit\": 3"},{"line_number":169,"context_line":"                }"},{"line_number":170,"context_line":"            }"},{"line_number":171,"context_line":"            \"members\": []"},{"line_number":172,"context_line":"        }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_a99d5767","line":169,"range":{"start_line":167,"start_character":0,"end_line":169,"end_character":17},"updated":"2018-03-21 05:42:51.000000000","message":"In case of \u0027soft-anti-affinity\u0027, we are going to 400 if \u0027rules\u0027 are in request body. what will happen for response case for \u0027soft-anti-affinity\u0027 ? will \u0027rules\u0027 not be present? if so then it make response body different in both policy which is not much user friendly. or we can returned this field with None ?","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9b9399375d529b3b7a961cc31c9bbda653dbbde8","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            \"name\": \"test\","},{"line_number":165,"context_line":"            \"policy\": {"},{"line_number":166,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":167,"context_line":"                \"rules\": {"},{"line_number":168,"context_line":"                    \"host_limit\": 3"},{"line_number":169,"context_line":"                }"},{"line_number":170,"context_line":"            }"},{"line_number":171,"context_line":"            \"members\": []"},{"line_number":172,"context_line":"        }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_d06e1995","line":169,"range":{"start_line":167,"start_character":0,"end_line":169,"end_character":17},"in_reply_to":"df7087c5_58b1e6e0","updated":"2018-03-21 21:01:48.000000000","message":"I agree that if the group has a policy but no rules, it\u0027s OK to return \u0027rules\u0027 in the GET response with a null value.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d981c2385c3567263a9750eb5472b0137cff11bd","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            \"name\": \"test\","},{"line_number":165,"context_line":"            \"policy\": {"},{"line_number":166,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":167,"context_line":"                \"rules\": {"},{"line_number":168,"context_line":"                    \"host_limit\": 3"},{"line_number":169,"context_line":"                }"},{"line_number":170,"context_line":"            }"},{"line_number":171,"context_line":"            \"members\": []"},{"line_number":172,"context_line":"        }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_b89da2bc","line":169,"range":{"start_line":167,"start_character":0,"end_line":169,"end_character":17},"in_reply_to":"df7087c5_a99d5767","updated":"2018-03-21 07:38:11.000000000","message":"I prefer rules is always be present, and if not exsits, just return \"rules\": None.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"daebc5f55e52fba25effe63f3127a240438af62d","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            \"name\": \"test\","},{"line_number":165,"context_line":"            \"policy\": {"},{"line_number":166,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":167,"context_line":"                \"rules\": {"},{"line_number":168,"context_line":"                    \"host_limit\": 3"},{"line_number":169,"context_line":"                }"},{"line_number":170,"context_line":"            }"},{"line_number":171,"context_line":"            \"members\": []"},{"line_number":172,"context_line":"        }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_58b1e6e0","line":169,"range":{"start_line":167,"start_character":0,"end_line":169,"end_character":17},"in_reply_to":"df7087c5_b89da2bc","updated":"2018-03-21 08:05:11.000000000","message":"yea, let\u0027s explicit mention that so that we can get more opinion.","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        \"server_group\": {"},{"line_number":181,"context_line":"            \"name\": \"test\","},{"line_number":182,"context_line":"            \"policy\": {"},{"line_number":183,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":184,"context_line":"                \"rules\": {"},{"line_number":185,"context_line":"                    \"host_limit\": 3"},{"line_number":186,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_a32d78a9","line":183,"range":{"start_line":183,"start_character":17,"end_line":183,"end_character":23},"updated":"2018-03-21 05:42:51.000000000","message":"ditto","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"92e5cf8d7a7bfb40955f659288960142ee82ffac","unresolved":false,"context_lines":[{"line_number":197,"context_line":"            \"id\": \"5bbcc3c4-1da2-4437-a48a-66f15b1b13f9\","},{"line_number":198,"context_line":"            \"name\": \"test\","},{"line_number":199,"context_line":"            \"policy\": {"},{"line_number":200,"context_line":"                \"policy\": \"anti-affinity\","},{"line_number":201,"context_line":"                \"rules\": {"},{"line_number":202,"context_line":"                    \"host_limit\": 3"},{"line_number":203,"context_line":"                }"}],"source_content_type":"text/x-rst","patch_set":8,"id":"df7087c5_c328ac98","line":200,"range":{"start_line":200,"start_character":17,"end_line":200,"end_character":23},"updated":"2018-03-21 05:42:51.000000000","message":"ditto","commit_id":"c73a2a266bbd43e03eb34dc7f40044c495549c01"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5bbb29c36a033c4054cffe5b8894991c652e1a9e","unresolved":false,"context_lines":[{"line_number":49,"context_line":"This spec proposes to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, can be applied to the"},{"line_number":52,"context_line":"  ``affinity`` and ``anti-affinity`` policies."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_14bec064","line":52,"range":{"start_line":52,"start_character":2,"end_line":52,"end_character":46},"updated":"2018-03-22 01:35:25.000000000","message":"For affinity, when the limit\u003d3 means that the max number of instances is 3, more than that will go to another host.\n\nFor anti-affinity, when the limit\u003d3 means that more than 3 instances on the host, will be go to another host? \n\nI\u0027m a little confuse on the meaning. Would you mind define the meaning for the different policy in the spec?","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"314a349b44590cc50c463f58a31dcdba7b7afa6f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec proposes to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, can be applied to the"},{"line_number":52,"context_line":"  ``affinity`` and ``anti-affinity`` policies."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_5f453142","line":52,"range":{"start_line":51,"start_character":0,"end_line":52,"end_character":46},"updated":"2018-03-22 01:47:04.000000000","message":"I have to say, it seems this rule is only useful for anti-affinity policy, and your understanding is correct, the \u0027server limit per host\u0027 is increased to 3 instead of the original 1. I cannot think about anything useful for affinity filter with this limit, when you specify affinity with limit, it is pretty much the same you can done using the anti-affinity with a suitable limit, and IMO adding a limit to \"affinity\" is somehow broken the meaning of \"affinity\"","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"4dc7ade486504b4a5573a57d8d77ea807c395977","unresolved":false,"context_lines":[{"line_number":49,"context_line":"This spec proposes to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, can be applied to the"},{"line_number":52,"context_line":"  ``affinity`` and ``anti-affinity`` policies."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_34b89f28","line":52,"range":{"start_line":52,"start_character":2,"end_line":52,"end_character":46},"in_reply_to":"df7087c5_14bec064","updated":"2018-03-22 07:00:00.000000000","message":"@alex, as mentioned from @zhenyu, I realize it seems \"max server per host\" concept is only useful and meaningful under the ``anti-affinity`` policy. and for affinity policy, in the future, I think a rules like \"min server per host\" is more useful?\n\nBack here, this item of ``Proposed change`` section, I just want to say we propose give a common mechanism to enable user to define the rules on policy.\n\nThen, the below item, we can describe more clearly that we only support \"max server per host\" rules under ``anti-affinity``, and define the meaning this rule  under ``anti-affinity``.\n\nSo, in here, just say: Add a generic \"rules\" field which is a dict, can be applied to the policies.\n\nis this OK?","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74743191ac15471da7a5695b37aa0e3ad066c0ff","unresolved":false,"context_lines":[{"line_number":49,"context_line":"This spec proposes to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, can be applied to the"},{"line_number":52,"context_line":"  ``affinity`` and ``anti-affinity`` policies."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_fc2bd8e7","line":52,"range":{"start_line":52,"start_character":2,"end_line":52,"end_character":46},"in_reply_to":"df7087c5_34b89f28","updated":"2018-03-22 20:27:50.000000000","message":"I am OK with leaving this part generic if you add a sub-section defining the rule(s) and their meanings, along with maybe some example usage for understanding. See my example below.","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1bf3e3048dda3f7ec7d37495ea3d0540d2bf0b1f","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_0c124c59","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"updated":"2018-03-21 10:00:49.000000000","message":"On Alex comments on this, i too like instance_limit or instance_per_host etc. but let\u0027s get more opinion before changing.","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f9e5e75bd9932f06b3e713fa33b43aac21961fc","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_30d3d53a","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"in_reply_to":"df7087c5_0c124c59","updated":"2018-03-21 21:08:47.000000000","message":"Agree that \u0027host_limit\u0027 sounds like it could make us restrict the number of hosts the instances are spread across in the group, which isn\u0027t what we\u0027re going for.\n\nI\u0027d probably not use \u0027instance\u0027 in the REST API, since the resource we\u0027re acting on in the REST API is \u0027server\u0027, so maybe \u0027server_per_host\u0027 or \u0027member_per_host\u0027 since servers are members of the group?","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d0104485f0eacbd555ed990e3893b45efd4aab37","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_349e5f63","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"in_reply_to":"df7087c5_143a3b97","updated":"2018-03-22 07:04:36.000000000","message":"yeah, sorry, I didn\u0027t noticed the @matt last reply, It\u0027s the same thing in my last reply.","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a1ee074e3979eab34efe8a17035eb770f57a3c4","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_bc58008a","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"in_reply_to":"df7087c5_1ce32cdb","updated":"2018-03-22 20:30:11.000000000","message":"\u003e But you could specify min_servers_per_host\u003d3 with a group of 6 and then it must be split across 2 hosts or fail.\n\nCorrection here, the members must be split across at most 2 hosts. If they can all fit on the same host that\u0027s great, but at least 3 must be on the same host in this scenario.","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1e5d2f31da5019a27a268f09939dbabae569e895","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_eeb499d3","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"in_reply_to":"df7087c5_30d3d53a","updated":"2018-03-21 23:39:52.000000000","message":"+1 for \u0027server_per_host\u0027","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74743191ac15471da7a5695b37aa0e3ad066c0ff","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_1ce32cdb","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"in_reply_to":"df7087c5_349e5f63","updated":"2018-03-22 20:27:50.000000000","message":"If we say \u0027max_servers_per_host\u0027, then that implies only working with the anti-affinity policy, since today if I have a group of 6 instances with an \u0027affinity\u0027 policy it means I must have all 6 instances on the same host, so max_servers_per_host with an \u0027affinity\u0027 policy doesn\u0027t make sense, since max_servers_per_host\u003dlen(group.members) with an affinity policy.\n\nSo then we could theoretically have a \u0027min_servers_per_host\u0027 rule for an affinity policy. By default that would be len(group.members) so all server group members must fit on the same host or we fail (same semantics as today). But you could specify min_servers_per_host\u003d3 with a group of 6 and then it must be split across 2 hosts or fail.\n\nAnd we\u0027d use our per-policy rule validation as described below to make sure the correct rules are used with the correct policies.","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e9b18d484b3f82491b4e8fa11cefdc2dfdab3518","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf659307_6689d473","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"in_reply_to":"df7087c5_bc58008a","updated":"2018-03-26 14:13:47.000000000","message":"\u003e So then we could theoretically have a \u0027min_servers_per_host\u0027 rule for an affinity policy. By default that would be len(group.members) so all server group members must fit on the same host or we fail (same semantics as today). But you could specify min_servers_per_host\u003d3 with a group of 6 and then it must be split across 2 hosts or fail.\n\nI think this is what caused a lot of the confusion in the next patch sets in this change. But I wasn\u0027t thinking clearly when I said: \"But you could specify min_servers_per_host\u003d3 with a group of 6 and then it must be split across 2 hosts or fail.\" I think instead we would say, try to put all 6 servers on a single host, but if you can\u0027t, ensure there are at least 3 per host if possible, otherwise fail.","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5bbb29c36a033c4054cffe5b8894991c652e1a9e","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_f4ba2c6c","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"in_reply_to":"df7087c5_eeb499d3","updated":"2018-03-22 01:35:25.000000000","message":"+1 for \u0027server_per_host\u0027, we should use \u0027server\u0027 instead of \u0027instance\u0027","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce10dddf05f7e53b0b82eb27d6d7158b936dfdfb","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_d45b6884","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"in_reply_to":"df7087c5_eeb499d3","updated":"2018-03-22 01:28:44.000000000","message":"Another thought, we should make sure \u0027limit\u0027 is in the rule name so that something like \u0027server_per_host\u0027 isn\u0027t confused as a strict requirement, like if I have a group with 5 instances and there are 6 hosts, and my \u0027server_per_host\u0027 is 3, I might think that means I need to pack 3 instances on 2 hosts.\n\nSo maybe \u0027server_per_host_limit\u0027? That more correctly implies that with a group of 5 servers with 6 hosts in an anti-affinity group, we\u0027ll have one server on each host (assuming there is space). And a group of 5 with a limit of 3 against 4 hosts would mean 4 get spread across 4 hosts and one of the hosts has 2 servers (which would normally be rejected in a strict anti-affinity policy).","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"4dc7ade486504b4a5573a57d8d77ea807c395977","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  For example, if the user wants to add the limit on the number of VMs in a"},{"line_number":55,"context_line":"  group on a given host, the user can create a policy with the"},{"line_number":56,"context_line":"  ``{\u0027host_limit\u0027: 3}`` rules field."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_143a3b97","line":56,"range":{"start_line":56,"start_character":5,"end_line":56,"end_character":17},"in_reply_to":"df7087c5_f4ba2c6c","updated":"2018-03-22 07:00:00.000000000","message":"\u0027max_server_per_host\u0027? or something can point the mean of  `max` or `min` or `absolute`?\n\nI think maybe \u0027max\u0027, \u0027min\u0027, \u0027absolute\u0027 for \"server per host\" rules would be became our requirements in the future.","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f9e5e75bd9932f06b3e713fa33b43aac21961fc","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                \u0027name\u0027: parameter_types.name,"},{"line_number":141,"context_line":"                \u0027policy\u0027:"},{"line_number":142,"context_line":"                    {"},{"line_number":143,"context_line":"                        \u0027oneOf\u0027: ["},{"line_number":144,"context_line":"                        {"},{"line_number":145,"context_line":"                            \u0027type\u0027: \u0027object\u0027,"},{"line_number":146,"context_line":"                            \u0027properties\u0027: {"}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_f00ebde3","line":143,"updated":"2018-03-21 21:08:47.000000000","message":"I could live with this, but if we add more rules or policies over time it might get complicated.","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74743191ac15471da7a5695b37aa0e3ad066c0ff","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                \u0027name\u0027: parameter_types.name,"},{"line_number":141,"context_line":"                \u0027policy\u0027:"},{"line_number":142,"context_line":"                    {"},{"line_number":143,"context_line":"                        \u0027oneOf\u0027: ["},{"line_number":144,"context_line":"                        {"},{"line_number":145,"context_line":"                            \u0027type\u0027: \u0027object\u0027,"},{"line_number":146,"context_line":"                            \u0027properties\u0027: {"}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_dc361452","line":143,"in_reply_to":"df7087c5_eee9f9b6","updated":"2018-03-22 20:27:50.000000000","message":"I will agree that I don\u0027t hate this. :)","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1e5d2f31da5019a27a268f09939dbabae569e895","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                \u0027name\u0027: parameter_types.name,"},{"line_number":141,"context_line":"                \u0027policy\u0027:"},{"line_number":142,"context_line":"                    {"},{"line_number":143,"context_line":"                        \u0027oneOf\u0027: ["},{"line_number":144,"context_line":"                        {"},{"line_number":145,"context_line":"                            \u0027type\u0027: \u0027object\u0027,"},{"line_number":146,"context_line":"                            \u0027properties\u0027: {"}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_eee9f9b6","line":143,"in_reply_to":"df7087c5_f00ebde3","updated":"2018-03-21 23:39:52.000000000","message":"yea, adding more set of rule with different combination makes it complex. \n\nBut current schema is not so hard so may be we can move it to python code when we face more rules things?","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f9e5e75bd9932f06b3e713fa33b43aac21961fc","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"The ``server_group.create``, ``server_group.delete`` and"},{"line_number":247,"context_line":"``server_group.add_member`` versioned notifications will be updated to include"},{"line_number":248,"context_line":"the new ``policy`` field instead of the old ``policies`` filed."},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"Other end user impact"},{"line_number":251,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"df7087c5_308af51a","line":248,"range":{"start_line":248,"start_character":57,"end_line":248,"end_character":62},"updated":"2018-03-21 21:08:47.000000000","message":"field","commit_id":"7a4ee417cd8ea3e098eed5afa45f39e0f4c7e5c9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"02283dd3cbc0abd65eae0097b5f2342726cf7293","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  2) \"min_server_per_host\" rule for ``affinity`` policy means that add the min"},{"line_number":66,"context_line":"     limit on the number of VMs in a group on a given host. For example, if"},{"line_number":67,"context_line":"     the user have a group of 6 instances with ``affinity`` policy, it means"},{"line_number":68,"context_line":"     the user must have all 6 instances on the same host, then the user can"},{"line_number":69,"context_line":"     specify ``{\u0027min_server_per_host\u0027: 3}`` rule for this group, and it means"},{"line_number":70,"context_line":"     spilt across at most 2 hosts."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf659307_94f540ce","line":70,"range":{"start_line":68,"start_character":58,"end_line":70,"end_character":34},"updated":"2018-03-26 03:05:59.000000000","message":"I feel \u0027min_server_per_host\u0027 for affinity policy can change the affinity general behavior if we fail on min server req. \n\nFor Example- 5 servers and 2 host - if ``{\u0027min_server_per_host\u0027: 3}`` will boot 3 servers on 1 host and try to boot 2 servers on 2nd and fail as it cannot place  at least 3 servers on 2nd host. right?\n\nIf so, this means affinity policy behavior is changed from its general behavior of putting all servers together till space. In above example, there was space on 2nd host and we put all remaining servers together but still failed.","commit_id":"033d073988b17da006492a85316a97dd229162f9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"f948e5d1ddd2dbd661a8257ce1f4fb40edc7f825","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  2) \"min_server_per_host\" rule for ``affinity`` policy means that add the min"},{"line_number":66,"context_line":"     limit on the number of VMs in a group on a given host. For example, if"},{"line_number":67,"context_line":"     the user have a group of 6 instances with ``affinity`` policy, it means"},{"line_number":68,"context_line":"     the user must have all 6 instances on the same host, then the user can"},{"line_number":69,"context_line":"     specify ``{\u0027min_server_per_host\u0027: 3}`` rule for this group, and it means"},{"line_number":70,"context_line":"     spilt across at most 2 hosts."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf659307_d42c1849","line":70,"range":{"start_line":68,"start_character":58,"end_line":70,"end_character":34},"in_reply_to":"bf659307_94f540ce","updated":"2018-03-26 03:07:41.000000000","message":"or we make value of min_server_per_host as multiple of it with requested servers? but that again cannot be done as request of servers can be separate request.","commit_id":"033d073988b17da006492a85316a97dd229162f9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5c29b601a473f2164e3b5339b1e0b8c8cd447c6c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  2) \"min_server_per_host\" rule for ``affinity`` policy means that add the min"},{"line_number":66,"context_line":"     limit on the number of VMs in a group on a given host. For example, if"},{"line_number":67,"context_line":"     the user have a group of 6 instances with ``affinity`` policy, it means"},{"line_number":68,"context_line":"     the user must have all 6 instances on the same host, then the user can"},{"line_number":69,"context_line":"     specify ``{\u0027min_server_per_host\u0027: 3}`` rule for this group, and it means"},{"line_number":70,"context_line":"     spilt across at most 2 hosts."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf659307_260e7c34","line":70,"range":{"start_line":68,"start_character":58,"end_line":70,"end_character":34},"in_reply_to":"bf659307_ce08032a","updated":"2018-03-26 14:09:10.000000000","message":"\u003e For Example- 5 servers and 2 host - if ``{\u0027min_server_per_host\u0027: 3}`` will boot 3 servers on 1 host and try to boot 2 servers on 2nd and fail as it cannot place at least 3 servers on 2nd host. right?\n\nmin_server_per_host in an affinity group shouldn\u0027t spread across hosts using the min limit, that\u0027s more like anti-affinity behavior.\n\nI think it would basically mean, try and put as many servers on the same host as possible, but if you can\u0027t put at least 3 on any given host, it\u0027s a failure. Whereas the existing (hard) affinity policy today says, all servers must be on the same host or fail.","commit_id":"033d073988b17da006492a85316a97dd229162f9"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"71b323986b3d6ced1db3449c566d2b82d03b38a0","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  2) \"min_server_per_host\" rule for ``affinity`` policy means that add the min"},{"line_number":66,"context_line":"     limit on the number of VMs in a group on a given host. For example, if"},{"line_number":67,"context_line":"     the user have a group of 6 instances with ``affinity`` policy, it means"},{"line_number":68,"context_line":"     the user must have all 6 instances on the same host, then the user can"},{"line_number":69,"context_line":"     specify ``{\u0027min_server_per_host\u0027: 3}`` rule for this group, and it means"},{"line_number":70,"context_line":"     spilt across at most 2 hosts."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf659307_ce08032a","line":70,"range":{"start_line":68,"start_character":58,"end_line":70,"end_character":34},"in_reply_to":"bf659307_d42c1849","updated":"2018-03-26 08:52:48.000000000","message":"I think I need more description on the mean of the affinity with min_server_per_host.\n\nBy default, min_server_per_host \u003d 1, We need create a  server s1 on host h1, and then add s1 to group g1, If the server create server with g1, it will be scheduled to h1(the scheduler check only 1 server in h1, and \u003e\u003d min_server_per_host), I think you has no question on it, we just put all server together till space.\n\nAnd if we set min_server_per_host \u003d 3,\n1. we have 3 server on host h1\n2. we have 2 server on host h2\n3. and then we add these 5 servers to g2\nIf the 6th server is comming, we will only pass h1, and h2 will not be a candidate host because it only has 2 server which the server per host \u003c min_server_per_host.\n\nThat means, we only want to put the server on the host which already have the server(in same group) \u003e\u003d min_server_per_host.\n\nAnd as we mentioned, I\u0027m a little hesitate, does we need add this min_server_per_host in affinity? Actually, it only have some theory possible on this, but I  can\u0027t find any  other actual user case about it.","commit_id":"033d073988b17da006492a85316a97dd229162f9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"02283dd3cbc0abd65eae0097b5f2342726cf7293","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  The filter will get the max(min)_server_per_host limit from policy rules,"},{"line_number":92,"context_line":"  and compare it against the number of servers within the same group on a"},{"line_number":93,"context_line":"  given host. If the filter finds the number is not not satisfied with the"},{"line_number":94,"context_line":"  limit, it will filter out this host."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"  Both the default ``max_server_per_host`` for the anti-affinity filter and"}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf659307_76451370","line":93,"range":{"start_line":93,"start_character":48,"end_line":93,"end_character":55},"updated":"2018-03-26 03:05:59.000000000","message":"single not","commit_id":"033d073988b17da006492a85316a97dd229162f9"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"71b323986b3d6ced1db3449c566d2b82d03b38a0","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  The filter will get the max(min)_server_per_host limit from policy rules,"},{"line_number":92,"context_line":"  and compare it against the number of servers within the same group on a"},{"line_number":93,"context_line":"  given host. If the filter finds the number is not not satisfied with the"},{"line_number":94,"context_line":"  limit, it will filter out this host."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"  Both the default ``max_server_per_host`` for the anti-affinity filter and"}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf659307_8ecbeb51","line":93,"range":{"start_line":93,"start_character":48,"end_line":93,"end_character":55},"in_reply_to":"bf659307_76451370","updated":"2018-03-26 08:52:48.000000000","message":"oops","commit_id":"033d073988b17da006492a85316a97dd229162f9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"02283dd3cbc0abd65eae0097b5f2342726cf7293","unresolved":false,"context_lines":[{"line_number":94,"context_line":"  limit, it will filter out this host."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"  Both the default ``max_server_per_host`` for the anti-affinity filter and"},{"line_number":97,"context_line":"  the default ``max_server_per_host`` for the affinity filter is 1 for"},{"line_number":98,"context_line":"  backward compatibility."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf659307_f675a3fb","line":97,"range":{"start_line":97,"start_character":16,"end_line":97,"end_character":35},"updated":"2018-03-26 03:05:59.000000000","message":"s/max_server_per_host/min_server_per_host","commit_id":"033d073988b17da006492a85316a97dd229162f9"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"71b323986b3d6ced1db3449c566d2b82d03b38a0","unresolved":false,"context_lines":[{"line_number":94,"context_line":"  limit, it will filter out this host."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"  Both the default ``max_server_per_host`` for the anti-affinity filter and"},{"line_number":97,"context_line":"  the default ``max_server_per_host`` for the affinity filter is 1 for"},{"line_number":98,"context_line":"  backward compatibility."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf659307_aec82f55","line":97,"range":{"start_line":97,"start_character":16,"end_line":97,"end_character":35},"in_reply_to":"bf659307_f675a3fb","updated":"2018-03-26 08:52:48.000000000","message":"Done","commit_id":"033d073988b17da006492a85316a97dd229162f9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"af9384408a5d97134e4ef34a96994f47f72b066e","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/complex-anti-affinity-policies"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint proposes to allow users to set more complex (anti-)affinity"},{"line_number":14,"context_line":"group policies."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_dd66542a","line":13,"range":{"start_line":13,"start_character":46,"end_line":13,"end_character":58},"updated":"2018-03-27 09:42:32.000000000","message":"the spec only describes additions to the existing policies, not extra new policies. Could you please clarify that ?\n\nI also don\u0027t think why we should call that \"complex\".","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"11e995817687b8a0706ae58ec3ed68e94a74910e","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/complex-anti-affinity-policies"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint proposes to allow users to set more complex (anti-)affinity"},{"line_number":14,"context_line":"group policies."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_4bd4a520","line":13,"range":{"start_line":13,"start_character":46,"end_line":13,"end_character":58},"in_reply_to":"bf659307_dd66542a","updated":"2018-03-28 01:52:41.000000000","message":"Sure, we need add some more common description on here, and also mention about we support the specific rules on anti-affinity policy.\n\nAnd for \"complex\", I think we can use \"advanced\"instead of it?","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"af9384408a5d97134e4ef34a96994f47f72b066e","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"So, the scheduler needs to provide some mechanism to support the more complex"},{"line_number":37,"context_line":"(anti)affinity policies."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Use Cases"},{"line_number":41,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_c0ff4bff","line":38,"updated":"2018-03-27 09:42:32.000000000","message":"You should mention why you can\u0027t use the soft affinity policies (done by the weighers), since they\u0027re not hard-blocking policies.\n\nWhat you really need is a strict anti-affinity policy that allows you more than 1 instance per host from the same group.","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"11e995817687b8a0706ae58ec3ed68e94a74910e","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"So, the scheduler needs to provide some mechanism to support the more complex"},{"line_number":37,"context_line":"(anti)affinity policies."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Use Cases"},{"line_number":41,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_ebf57984","line":38,"in_reply_to":"bf659307_c0ff4bff","updated":"2018-03-28 01:52:41.000000000","message":"yeah, will add some description on why we can\u0027t use soft one.\n\nYes, allows the user more than 1 instance per host from the same group is the core user case.","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"af9384408a5d97134e4ef34a96994f47f72b066e","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec proposes to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, can be applied to the policies."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  Now, only ``max_server_per_host`` for ``anti-affinity`` policy would be"},{"line_number":54,"context_line":"  supported, the example usage as below:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_807073a7","line":51,"updated":"2018-03-27 09:42:32.000000000","message":"what would be a similar \"rule\" for the strict *affinity* policy ?\nShould we limit the maximum number of instances per host too ?","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"11e995817687b8a0706ae58ec3ed68e94a74910e","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":49,"context_line":"This spec proposes to:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, can be applied to the policies."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  Now, only ``max_server_per_host`` for ``anti-affinity`` policy would be"},{"line_number":54,"context_line":"  supported, the example usage as below:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_eb681922","line":51,"in_reply_to":"bf659307_807073a7","updated":"2018-03-28 01:52:41.000000000","message":"No, I prefer only for anti one which we really need it, and the max for affinity I\u0027m not sure it has the true use case.","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"af9384408a5d97134e4ef34a96994f47f72b066e","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* Add a generic \"rules\" field which is a dict, can be applied to the policies."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  Now, only ``max_server_per_host`` for ``anti-affinity`` policy would be"},{"line_number":54,"context_line":"  supported, the example usage as below:"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"  \"max_server_per_host\" rule for ``anti-affinity`` policy means that add"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_e0504f0d","line":53,"range":{"start_line":53,"start_character":42,"end_line":53,"end_character":55},"updated":"2018-03-27 09:42:32.000000000","message":"just food for thoughts, but one day, I\u0027d love those policies to be named strict-anti-affinity and strict-affinity, in opposition to soft-anti-affinity and soft-affinity...","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"af9384408a5d97134e4ef34a96994f47f72b066e","unresolved":false,"context_lines":[{"line_number":97,"context_line":"Data model impact"},{"line_number":98,"context_line":"-----------------"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* The ``Text`` column ``rules`` will be added to the ``instance_group_policy``"},{"line_number":101,"context_line":"  database table. A database schema migration is necessary in order to"},{"line_number":102,"context_line":"  add the column."},{"line_number":103,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_20e2c730","line":100,"range":{"start_line":100,"start_character":7,"end_line":100,"end_character":30},"updated":"2018-03-27 09:42:32.000000000","message":"I don\u0027t like that. I\u0027d prefer an indirection table that would contain (server_group, rule_uuid) and a denormalized table like (rule, key, value) like (uuid1, max_server_per_host, 3) so we could list all the rules per server group.\n\nThoughts on that ?","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"af9384408a5d97134e4ef34a96994f47f72b066e","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                                \u0027rules\u0027: {"},{"line_number":156,"context_line":"                                    \u0027type\u0027: \u0027object\u0027,"},{"line_number":157,"context_line":"                                    \u0027properties\u0027: {"},{"line_number":158,"context_line":"                                        \u0027max_server_per_host\u0027: parameter_types.positive_integer,"},{"line_number":159,"context_line":"                                    },"},{"line_number":160,"context_line":"                                    \u0027additionalProperties\u0027: False"},{"line_number":161,"context_line":"                                }"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_006ea394","line":158,"updated":"2018-03-27 09:42:32.000000000","message":"I don\u0027t like having a specific JSON schema for a single policy, while it could be understandable that other policies could benefit from those \"rules\".\n\nAt least, we need to correctly evaluate the need for more than just a single rule for a single policy, and generalize a little bit...","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"11e995817687b8a0706ae58ec3ed68e94a74910e","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                                \u0027rules\u0027: {"},{"line_number":156,"context_line":"                                    \u0027type\u0027: \u0027object\u0027,"},{"line_number":157,"context_line":"                                    \u0027properties\u0027: {"},{"line_number":158,"context_line":"                                        \u0027max_server_per_host\u0027: parameter_types.positive_integer,"},{"line_number":159,"context_line":"                                    },"},{"line_number":160,"context_line":"                                    \u0027additionalProperties\u0027: False"},{"line_number":161,"context_line":"                                }"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_0bb9cd78","line":158,"in_reply_to":"bf659307_006ea394","updated":"2018-03-28 01:52:41.000000000","message":"emm, in previous consideration, I thought maybe we need add the new schema before we really need it, although it\u0027s not really flexible.","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"31dd9389052aaecea6096ffac05a27865e7e2061","unresolved":false,"context_lines":[{"line_number":184,"context_line":"    }"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"  Change the response to the new policy format and remove the empty and unused"},{"line_number":187,"context_line":"  ``metadata`` filed::"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    {"},{"line_number":190,"context_line":"        \"server_group\": {"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_07223d01","line":187,"range":{"start_line":187,"start_character":15,"end_line":187,"end_character":20},"updated":"2018-03-27 08:42:13.000000000","message":"field","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"11e995817687b8a0706ae58ec3ed68e94a74910e","unresolved":false,"context_lines":[{"line_number":184,"context_line":"    }"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"  Change the response to the new policy format and remove the empty and unused"},{"line_number":187,"context_line":"  ``metadata`` filed::"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    {"},{"line_number":190,"context_line":"        \"server_group\": {"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bf659307_2bbcd167","line":187,"range":{"start_line":187,"start_character":15,"end_line":187,"end_character":20},"in_reply_to":"bf659307_07223d01","updated":"2018-03-28 01:52:41.000000000","message":"Done","commit_id":"e6e36d90deb800c97eb332a68f2008b62c6b6d52"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0d3cfd49bb15a6f55a7c8e31e38a581818e1c9da","unresolved":false,"context_lines":[{"line_number":300,"context_line":"* Create a new API microversion to support passing ``rules`` to the create"},{"line_number":301,"context_line":"  instance group API."},{"line_number":302,"context_line":"* Modify the Nova client to handle the new microversion."},{"line_number":303,"context_line":"* Change the ``ServerGroupAntiAffinityFilter`` to adapt to complex policy"},{"line_number":304,"context_line":"  model."},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"Dependencies"},{"line_number":307,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bf659307_c5df1d38","line":304,"range":{"start_line":303,"start_character":2,"end_line":304,"end_character":8},"updated":"2018-03-29 04:47:25.000000000","message":"I think you also need conflict change in the after resource tracker claim","commit_id":"a0dc83c580127c01279a766d6b5fc2acbeb90bf6"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"22e426075adff37d4df0f0535eae21d4d20eb6ad","unresolved":false,"context_lines":[{"line_number":300,"context_line":"* Create a new API microversion to support passing ``rules`` to the create"},{"line_number":301,"context_line":"  instance group API."},{"line_number":302,"context_line":"* Modify the Nova client to handle the new microversion."},{"line_number":303,"context_line":"* Change the ``ServerGroupAntiAffinityFilter`` to adapt to complex policy"},{"line_number":304,"context_line":"  model."},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"Dependencies"},{"line_number":307,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bf659307_85afe528","line":304,"range":{"start_line":303,"start_character":2,"end_line":304,"end_character":8},"in_reply_to":"bf659307_c5df1d38","updated":"2018-04-11 07:19:45.000000000","message":"Done, thanks, and sorry to late update. :)","commit_id":"a0dc83c580127c01279a766d6b5fc2acbeb90bf6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a6af3c1d255d6a0990da8fd1e83c6e2e0e3b862","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Nova supports filtering and weighting to make informed decisions on where"},{"line_number":21,"context_line":"a new instance should be created, and the ServerGroup(Anti)AffinityFilter"},{"line_number":22,"context_line":"implements (anti)affinity for a server group based on this scheduler"},{"line_number":23,"context_line":"mechanism."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_d0e4ebae","line":21,"range":{"start_line":21,"start_character":42,"end_line":21,"end_character":73},"updated":"2018-04-18 19:32:47.000000000","message":"If we\u0027re not proposing any rule changes to the affinity policy, the spec can probably just be specifically about anti-affinity things, so this changes to just ServerGroupAntiAffinityFilter.","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"451ec622bcc78623fcdf71e97257688b58e33b6f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Nova supports filtering and weighting to make informed decisions on where"},{"line_number":21,"context_line":"a new instance should be created, and the ServerGroup(Anti)AffinityFilter"},{"line_number":22,"context_line":"implements (anti)affinity for a server group based on this scheduler"},{"line_number":23,"context_line":"mechanism."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_3e297189","line":21,"range":{"start_line":21,"start_character":42,"end_line":21,"end_character":73},"in_reply_to":"9f6a8fd7_d0e4ebae","updated":"2018-04-19 02:01:37.000000000","message":"Done","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a6af3c1d255d6a0990da8fd1e83c6e2e0e3b862","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Nova supports filtering and weighting to make informed decisions on where"},{"line_number":21,"context_line":"a new instance should be created, and the ServerGroup(Anti)AffinityFilter"},{"line_number":22,"context_line":"implements (anti)affinity for a server group based on this scheduler"},{"line_number":23,"context_line":"mechanism."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Users set the policy for the specific server group to enable the"}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_b0f37773","line":22,"range":{"start_line":22,"start_character":11,"end_line":22,"end_character":25},"updated":"2018-04-18 19:32:47.000000000","message":"anti-affinity, and so on","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"451ec622bcc78623fcdf71e97257688b58e33b6f","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Nova supports filtering and weighting to make informed decisions on where"},{"line_number":21,"context_line":"a new instance should be created, and the ServerGroup(Anti)AffinityFilter"},{"line_number":22,"context_line":"implements (anti)affinity for a server group based on this scheduler"},{"line_number":23,"context_line":"mechanism."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Users set the policy for the specific server group to enable the"}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_5e2c6598","line":22,"range":{"start_line":22,"start_character":11,"end_line":22,"end_character":25},"in_reply_to":"9f6a8fd7_b0f37773","updated":"2018-04-19 02:01:37.000000000","message":"Done","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a6af3c1d255d6a0990da8fd1e83c6e2e0e3b862","unresolved":false,"context_lines":[{"line_number":33,"context_line":"the anti-affinity and resource utilization requirement, it\u0027s a very useful"},{"line_number":34,"context_line":"ability to users, especially, when the users don\u0027t have enough hosts in their"},{"line_number":35,"context_line":"cloud but still want some level of high reliability of their applications. In"},{"line_number":36,"context_line":"addition, we also can\u0027t use the soft anti-affinity policy directly to filter"},{"line_number":37,"context_line":"out the host what we don\u0027t want, since they\u0027re not hard-blocking policy which"},{"line_number":38,"context_line":"implements based on weights."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"So, the scheduler needs to provide some mechanism to enable users to define"}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_b0c137e7","line":37,"range":{"start_line":36,"start_character":67,"end_line":37,"end_character":31},"updated":"2018-04-18 19:32:47.000000000","message":"I\u0027m not sure I understand this. I think your point is that this spec cares about a filtering mechanism, not weighing, so maybe re-word this like:\n\nIn addition, we also can\u0027t use the soft-anti-affinity policy since that is implemented based on weights rather than host filtering.","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"451ec622bcc78623fcdf71e97257688b58e33b6f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"the anti-affinity and resource utilization requirement, it\u0027s a very useful"},{"line_number":34,"context_line":"ability to users, especially, when the users don\u0027t have enough hosts in their"},{"line_number":35,"context_line":"cloud but still want some level of high reliability of their applications. In"},{"line_number":36,"context_line":"addition, we also can\u0027t use the soft anti-affinity policy directly to filter"},{"line_number":37,"context_line":"out the host what we don\u0027t want, since they\u0027re not hard-blocking policy which"},{"line_number":38,"context_line":"implements based on weights."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"So, the scheduler needs to provide some mechanism to enable users to define"}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_1e5b4d2e","line":37,"range":{"start_line":36,"start_character":67,"end_line":37,"end_character":31},"in_reply_to":"9f6a8fd7_b0c137e7","updated":"2018-04-19 02:01:37.000000000","message":"Yes, done.","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a6af3c1d255d6a0990da8fd1e83c6e2e0e3b862","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"  The filter will get the max_server_per_host limit from policy rules, and"},{"line_number":87,"context_line":"  compare it against the number of servers within the same group on a given"},{"line_number":88,"context_line":"  host. If the filter finds the number is not not satisfied with the limit,"},{"line_number":89,"context_line":"  it will filter out this host."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  The default ``max_server_per_host`` for the anti-affinity filter is 1 for"}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_d0806b8e","line":88,"range":{"start_line":88,"start_character":42,"end_line":88,"end_character":49},"updated":"2018-04-18 19:32:47.000000000","message":"s/not not/not/ - unless you are going for a very confusing double negative here. :)","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"451ec622bcc78623fcdf71e97257688b58e33b6f","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"  The filter will get the max_server_per_host limit from policy rules, and"},{"line_number":87,"context_line":"  compare it against the number of servers within the same group on a given"},{"line_number":88,"context_line":"  host. If the filter finds the number is not not satisfied with the limit,"},{"line_number":89,"context_line":"  it will filter out this host."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  The default ``max_server_per_host`` for the anti-affinity filter is 1 for"}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_de3cf5c0","line":88,"range":{"start_line":88,"start_character":42,"end_line":88,"end_character":49},"in_reply_to":"9f6a8fd7_d0806b8e","updated":"2018-04-19 02:01:37.000000000","message":": ), just a typo","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a6af3c1d255d6a0990da8fd1e83c6e2e0e3b862","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"  Note that: if the user creates a group without specifying the policy rules,"},{"line_number":208,"context_line":"  the value of ``rules`` key is ``None``."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"* GET /os-server-groups"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_50145b4e","line":208,"range":{"start_line":208,"start_character":2,"end_line":208,"end_character":41},"updated":"2018-04-18 19:32:47.000000000","message":"I don\u0027t know if it should be None or {} like for flavor extra specs in 2.61:\n\nhttps://github.com/openstack/nova/blob/master/doc/api_samples/flavor-manage/v2.61/flavor-create-post-resp.json#L24\n\nMight be better to be consistent.","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"451ec622bcc78623fcdf71e97257688b58e33b6f","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"  Note that: if the user creates a group without specifying the policy rules,"},{"line_number":208,"context_line":"  the value of ``rules`` key is ``None``."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"* GET /os-server-groups"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_9e467d4f","line":208,"range":{"start_line":208,"start_character":2,"end_line":208,"end_character":41},"in_reply_to":"9f6a8fd7_50145b4e","updated":"2018-04-19 02:01:37.000000000","message":"Yes, last idea, I just want to return the db storing value(default is None), but I think {} is better to keep consistent.","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a6af3c1d255d6a0990da8fd1e83c6e2e0e3b862","unresolved":false,"context_lines":[{"line_number":212,"context_line":"  Change the response to the new policy format and remove the empty and unused"},{"line_number":213,"context_line":"  ``metadata`` field::"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    {"},{"line_number":216,"context_line":"        \"server_group\": {"},{"line_number":217,"context_line":"            \"name\": \"test\","},{"line_number":218,"context_line":"            \"policy\": {"},{"line_number":219,"context_line":"                \"name\": \"anti-affinity\","},{"line_number":220,"context_line":"                \"rules\": {"},{"line_number":221,"context_line":"                    \"max_server_per_host\": 3"},{"line_number":222,"context_line":"                }"},{"line_number":223,"context_line":"            }"},{"line_number":224,"context_line":"        }"},{"line_number":225,"context_line":"    }"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"* GET /os-server-groups/{server_group_id}"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_b32b8180","line":225,"range":{"start_line":215,"start_character":0,"end_line":225,"end_character":5},"updated":"2018-04-18 19:32:47.000000000","message":"This is the wrong format, it should be a list:\n\nhttps://github.com/openstack/nova/blob/master/doc/api_samples/os-server-groups/v2.13/server-groups-list-resp.json","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"451ec622bcc78623fcdf71e97257688b58e33b6f","unresolved":false,"context_lines":[{"line_number":212,"context_line":"  Change the response to the new policy format and remove the empty and unused"},{"line_number":213,"context_line":"  ``metadata`` field::"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    {"},{"line_number":216,"context_line":"        \"server_group\": {"},{"line_number":217,"context_line":"            \"name\": \"test\","},{"line_number":218,"context_line":"            \"policy\": {"},{"line_number":219,"context_line":"                \"name\": \"anti-affinity\","},{"line_number":220,"context_line":"                \"rules\": {"},{"line_number":221,"context_line":"                    \"max_server_per_host\": 3"},{"line_number":222,"context_line":"                }"},{"line_number":223,"context_line":"            }"},{"line_number":224,"context_line":"        }"},{"line_number":225,"context_line":"    }"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"* GET /os-server-groups/{server_group_id}"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_9eb43d37","line":225,"range":{"start_line":215,"start_character":0,"end_line":225,"end_character":5},"in_reply_to":"9f6a8fd7_b32b8180","updated":"2018-04-19 02:01:37.000000000","message":"Done","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a6af3c1d255d6a0990da8fd1e83c6e2e0e3b862","unresolved":false,"context_lines":[{"line_number":258,"context_line":"Other end user impact"},{"line_number":259,"context_line":"---------------------"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"* Python-novaclient will be modified to add this new ``rule`` param to the"},{"line_number":262,"context_line":"  `nova server-group-create` shell command."},{"line_number":263,"context_line":"* Python-openstackclient will be modified to add this new ``rule`` param to the"},{"line_number":264,"context_line":"  `openstack server group create` shell command."}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_d335d5db","line":261,"range":{"start_line":261,"start_character":2,"end_line":261,"end_character":8},"updated":"2018-04-18 19:32:47.000000000","message":"nit: python-novaclient (since that\u0027s the name of the package on pypi)","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"451ec622bcc78623fcdf71e97257688b58e33b6f","unresolved":false,"context_lines":[{"line_number":258,"context_line":"Other end user impact"},{"line_number":259,"context_line":"---------------------"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"* Python-novaclient will be modified to add this new ``rule`` param to the"},{"line_number":262,"context_line":"  `nova server-group-create` shell command."},{"line_number":263,"context_line":"* Python-openstackclient will be modified to add this new ``rule`` param to the"},{"line_number":264,"context_line":"  `openstack server group create` shell command."}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_5e88e56f","line":261,"range":{"start_line":261,"start_character":2,"end_line":261,"end_character":8},"in_reply_to":"9f6a8fd7_d335d5db","updated":"2018-04-19 02:01:37.000000000","message":"Done","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2a6af3c1d255d6a0990da8fd1e83c6e2e0e3b862","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":"* Python-novaclient will be modified to add this new ``rule`` param to the"},{"line_number":262,"context_line":"  `nova server-group-create` shell command."},{"line_number":263,"context_line":"* Python-openstackclient will be modified to add this new ``rule`` param to the"},{"line_number":264,"context_line":"  `openstack server group create` shell command."},{"line_number":265,"context_line":""},{"line_number":266,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_f33019eb","line":263,"updated":"2018-04-18 19:32:47.000000000","message":"same","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"451ec622bcc78623fcdf71e97257688b58e33b6f","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":"* Python-novaclient will be modified to add this new ``rule`` param to the"},{"line_number":262,"context_line":"  `nova server-group-create` shell command."},{"line_number":263,"context_line":"* Python-openstackclient will be modified to add this new ``rule`` param to the"},{"line_number":264,"context_line":"  `openstack server group create` shell command."},{"line_number":265,"context_line":""},{"line_number":266,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"9f6a8fd7_fe7e9969","line":263,"in_reply_to":"9f6a8fd7_f33019eb","updated":"2018-04-19 02:01:37.000000000","message":"Done","commit_id":"62f2a8e6a70666e4cc498811edf032016d4071b2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3f90eba7e1029dc6a171a41ec9012273573a18ce","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  \"max_server_per_host\" rule for ``anti-affinity`` policy means that add"},{"line_number":60,"context_line":"  the max limit on the number of VMs in a group on a given host. For"},{"line_number":61,"context_line":"  example, if the user have a group of 6 instances and 2 hosts with a"},{"line_number":62,"context_line":"  ``anti-affinity`` policy, it will be rejected in current anti-affinity"},{"line_number":63,"context_line":"  policy, then the user can specify ``{\u0027max_server_per_host\u0027: 3}`` rule for"},{"line_number":64,"context_line":"  this group, and it means 6 instances get spread across 2 hosts and each"},{"line_number":65,"context_line":"  host has 3 servers."}],"source_content_type":"text/x-rst","patch_set":17,"id":"5f7c97a3_f51962d6","line":62,"range":{"start_line":61,"start_character":54,"end_line":62,"end_character":26},"updated":"2018-05-15 07:25:57.000000000","message":"The end user shouldn\u0027t know how much host in the background, but after talk with yikun, I see this requirement is coming from mano...so I think it is ok.","commit_id":"bdf6b927dfffadd72c99329653b81b5f8d01fcbd"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8ce9e12c226f0111a33cdfd18a9ba7f3c8d39dec","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  \"max_server_per_host\" rule for ``anti-affinity`` policy means that add"},{"line_number":60,"context_line":"  the max limit on the number of VMs in a group on a given host. For"},{"line_number":61,"context_line":"  example, if the user have a group of 6 instances and 2 hosts with a"},{"line_number":62,"context_line":"  ``anti-affinity`` policy, it will be rejected in current anti-affinity"},{"line_number":63,"context_line":"  policy, then the user can specify ``{\u0027max_server_per_host\u0027: 3}`` rule for"},{"line_number":64,"context_line":"  this group, and it means 6 instances get spread across 2 hosts and each"},{"line_number":65,"context_line":"  host has 3 servers."}],"source_content_type":"text/x-rst","patch_set":17,"id":"5f7c97a3_a425f90a","line":62,"range":{"start_line":61,"start_character":54,"end_line":62,"end_character":26},"in_reply_to":"5f7c97a3_f51962d6","updated":"2018-05-15 08:13:43.000000000","message":"thanks for your explanation in here, : )","commit_id":"bdf6b927dfffadd72c99329653b81b5f8d01fcbd"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3f90eba7e1029dc6a171a41ec9012273573a18ce","unresolved":false,"context_lines":[{"line_number":57,"context_line":"  supported, the example usage as below:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  \"max_server_per_host\" rule for ``anti-affinity`` policy means that add"},{"line_number":60,"context_line":"  the max limit on the number of VMs in a group on a given host. For"},{"line_number":61,"context_line":"  example, if the user have a group of 6 instances and 2 hosts with a"},{"line_number":62,"context_line":"  ``anti-affinity`` policy, it will be rejected in current anti-affinity"},{"line_number":63,"context_line":"  policy, then the user can specify ``{\u0027max_server_per_host\u0027: 3}`` rule for"},{"line_number":64,"context_line":"  this group, and it means 6 instances get spread across 2 hosts and each"},{"line_number":65,"context_line":"  host has 3 servers."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"5f7c97a3_75ac72ec","line":65,"range":{"start_line":60,"start_character":64,"end_line":65,"end_character":21},"updated":"2018-05-15 07:25:57.000000000","message":"This is more useful use-case than the one writen in the \u0027use cases\u0027 section.","commit_id":"bdf6b927dfffadd72c99329653b81b5f8d01fcbd"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8ce9e12c226f0111a33cdfd18a9ba7f3c8d39dec","unresolved":false,"context_lines":[{"line_number":57,"context_line":"  supported, the example usage as below:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"  \"max_server_per_host\" rule for ``anti-affinity`` policy means that add"},{"line_number":60,"context_line":"  the max limit on the number of VMs in a group on a given host. For"},{"line_number":61,"context_line":"  example, if the user have a group of 6 instances and 2 hosts with a"},{"line_number":62,"context_line":"  ``anti-affinity`` policy, it will be rejected in current anti-affinity"},{"line_number":63,"context_line":"  policy, then the user can specify ``{\u0027max_server_per_host\u0027: 3}`` rule for"},{"line_number":64,"context_line":"  this group, and it means 6 instances get spread across 2 hosts and each"},{"line_number":65,"context_line":"  host has 3 servers."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"* Create a new API microversion to support these changes:"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"5f7c97a3_241a49cb","line":65,"range":{"start_line":60,"start_character":64,"end_line":65,"end_character":21},"in_reply_to":"5f7c97a3_75ac72ec","updated":"2018-05-15 08:13:43.000000000","message":":), this is a detail and real example to describe the actual meaning of max_limit, and what the benefit the user can get.","commit_id":"bdf6b927dfffadd72c99329653b81b5f8d01fcbd"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3f90eba7e1029dc6a171a41ec9012273573a18ce","unresolved":false,"context_lines":[{"line_number":100,"context_line":"Data model impact"},{"line_number":101,"context_line":"-----------------"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"* The ``Text`` column ``rules`` will be added to the ``instance_group_policy``"},{"line_number":104,"context_line":"  database table. A database schema migration is necessary in order to"},{"line_number":105,"context_line":"  add the column."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"* Add a new ``InstanceGroupPolicy`` versioned object including the ``policy``,"},{"line_number":108,"context_line":"  ``rules`` and ``group_id`` fields."}],"source_content_type":"text/x-rst","patch_set":17,"id":"5f7c97a3_35defad9","line":105,"range":{"start_line":103,"start_character":0,"end_line":105,"end_character":17},"updated":"2018-05-15 07:25:57.000000000","message":"You didn\u0027t say what kind of format text you want to store in this column. And I think we don\u0027t like to store a complex format text in a column.\nAnd this won\u0027t work if we have multiple rules in the future if this column only stores one rule. And at least from the API changes sounds like we support multiple rules.","commit_id":"bdf6b927dfffadd72c99329653b81b5f8d01fcbd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0265cb350cd05e70964b0902d1cc77fbb7d4f63b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"Data model impact"},{"line_number":101,"context_line":"-----------------"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"* The ``Text`` column ``rules`` will be added to the ``instance_group_policy``"},{"line_number":104,"context_line":"  database table. A database schema migration is necessary in order to"},{"line_number":105,"context_line":"  add the column."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"* Add a new ``InstanceGroupPolicy`` versioned object including the ``policy``,"},{"line_number":108,"context_line":"  ``rules`` and ``group_id`` fields."}],"source_content_type":"text/x-rst","patch_set":17,"id":"5f7c97a3_c95b66f3","line":105,"range":{"start_line":103,"start_character":0,"end_line":105,"end_character":17},"in_reply_to":"5f7c97a3_35defad9","updated":"2018-05-15 12:54:19.000000000","message":"\u003e And I think we don\u0027t like to store a complex format text in a column. And this won\u0027t work if we have multiple rules in the future if this column only stores one rule.\n\nThink of this like flavor extra specs, but not an actual field that we need to index or query, so it\u0027s just going to be a serialized json dict associated with the policy.","commit_id":"bdf6b927dfffadd72c99329653b81b5f8d01fcbd"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8ce9e12c226f0111a33cdfd18a9ba7f3c8d39dec","unresolved":false,"context_lines":[{"line_number":100,"context_line":"Data model impact"},{"line_number":101,"context_line":"-----------------"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"* The ``Text`` column ``rules`` will be added to the ``instance_group_policy``"},{"line_number":104,"context_line":"  database table. A database schema migration is necessary in order to"},{"line_number":105,"context_line":"  add the column."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"* Add a new ``InstanceGroupPolicy`` versioned object including the ``policy``,"},{"line_number":108,"context_line":"  ``rules`` and ``group_id`` fields."}],"source_content_type":"text/x-rst","patch_set":17,"id":"5f7c97a3_84cebd60","line":105,"range":{"start_line":103,"start_character":0,"end_line":105,"end_character":17},"in_reply_to":"5f7c97a3_35defad9","updated":"2018-05-15 08:13:43.000000000","message":"OK, I will plus the detail format info in here, and the format is dict containing multiple k/v pairs like:\n{\u0027max_server_per_host\u0027: 3, \u0027other_key\u0027: \u0027other_value\u0027}","commit_id":"bdf6b927dfffadd72c99329653b81b5f8d01fcbd"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"14e1536204e6a2d1ab9ff0872650dd990eec6c2e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"Data model impact"},{"line_number":101,"context_line":"-----------------"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"* The ``Text`` column ``rules`` will be added to the ``instance_group_policy``"},{"line_number":104,"context_line":"  database table. A database schema migration is necessary in order to"},{"line_number":105,"context_line":"  add the column."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"* Add a new ``InstanceGroupPolicy`` versioned object including the ``policy``,"},{"line_number":108,"context_line":"  ``rules`` and ``group_id`` fields."}],"source_content_type":"text/x-rst","patch_set":17,"id":"5f7c97a3_22cea259","line":105,"range":{"start_line":103,"start_character":0,"end_line":105,"end_character":17},"in_reply_to":"5f7c97a3_c95b66f3","updated":"2018-05-16 06:42:16.000000000","message":"ok, that makes sense to me.","commit_id":"bdf6b927dfffadd72c99329653b81b5f8d01fcbd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c00d93f825f280c8358889df724cc40c9a8dec6f","unresolved":false,"context_lines":[{"line_number":107,"context_line":"  The format of the ``rules`` is a dict containing multiple key/value pairs"},{"line_number":108,"context_line":"  like::"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    {\u0027max_server_per_host\u0027: 3, `other_key`: `other_value`}"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"* Add a new ``InstanceGroupPolicy`` versioned object including the ``policy``,"},{"line_number":113,"context_line":"  ``rules`` and ``group_id`` fields."}],"source_content_type":"text/x-rst","patch_set":18,"id":"5f7c97a3_0934fe91","line":110,"updated":"2018-05-15 12:56:58.000000000","message":"To be clear, this spec is only proposing a single new rule (max_server_per_host) for the anti-affinity policy, as seen in the REST API json schema validation below. The point of storing it as a json blob in the data base is to model the REST API and allow for future rules so we don\u0027t need an entirely different table that is just key/value pairs. We don\u0027t need to index/search on the rules so json blob is sufficient.","commit_id":"1bcccb4195a8c2951d54e7bd999bf3152391636a"}]}
