<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<style>
    font{
        line-height: 1.6;
    }
    ul,ol{
        padding-left: 20px;
        list-style-position: inside;
    }
</style>
<div style="font-family:微软雅黑,Verdana,"Microsoft Yahei",SimSun,sans-serif;font-size:14px; line-height:1.6;">
    <div>
    <div>
        <span>
            <br>
        </span>
    </div><div><span>Hi Matt,</span></div><div><span><br></span></div><div><span>Wow, It is wonderful. And it's my first time to use the JsonFilter.</span></div><div><br></div><div>At your suggestion and reading the doc[1], add the JsonFilter to the `filter_scheduler` for `nova.conf`.</div><div>Then I used the <span style="line-height: 1.6;">command like "openstack server create <name> ... --hint query='["=","$host","openstack-node-1"]'.</span></div><div><br></div><div>Great, nova evaluates all the scheduler filters and when it uses the JsonFilter, it only matches the specified host</div><div>in query and removes others. :P</div><div><br></div><div>BTW, as you mentioned at the early email, the az:host:node format is an admin API.</div><div>Maybe we can add a micro version for booting API to evaluate the filters even with</div><div>forced_host/forced_node. I have post a draft spec to the nova-spec[2]. If anyone is</div><div>convenient, welcome to review and give some comments. : )</div><div><br></div>
    <div><br></div><div>[1] <a href="https://docs.openstack.org/nova/latest/user/filter-scheduler.html" _src="https://docs.openstack.org/nova/latest/user/filter-scheduler.html" style="line-height: 1.6;">https://docs.openstack.org/nova/latest/user/filter-scheduler.html</a></div><div>[2] <a href="https://review.openstack.org/#/c/645458/" _src="https://review.openstack.org/#/c/645458/" style="line-height: 1.6;">https://review.openstack.org/#/c/645458/</a></div><div><br></div><div>Best Regards
</div><div>Boxiang</div>
    <div id="ntes-pcmac-signature" style="font-family:'微软雅黑'">
        
        <div style="font-size:14px; padding: 0;  margin:0;">

        </div>
    </div>
</div><div class="J-reply" style="background-color:#f2f2f2;color:black;padding-top:6px;padding-bottom:6px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:45px;margin-bottom:20px;font-family:'微软雅黑';">
    <div style="font-size:12px;line-height:1.5;word-break:break-all;margin-left:10px;margin-right:10px">On <span class="mail-date">3/28/2019 22:51</span>,<a class="mail-to" style="text-decoration:none;color:#2a83f2;" href="mailto:mriedemos@gmail.com">Matt Riedemann<mriedemos@gmail.com></a> wrote: </div>
</div>
<blockquote id="ntes-pcmail-quote" style="margin: 0; padding: 0; font-size: 14px; font-family: '微软雅黑';">
On 3/14/2019 7:19 AM, Matt Riedemann wrote:<br> <blockquote class="mmbqc1"><blockquote class="mmbqc2">So I think even we specify the force_hosts or force_nodes, <br> scheduler should evaluate the filters.<br> </blockquote><br> Sylvain has talked about make force_hosts/nodes more like cold/live <br> migration and evacuate where a host is provided but not forced through <br> bypassing the scheduler, and I think that would be a good addition but <br> not really with a configuration option - generally we don't want <br> config-driven API behavior since it's not interoperable. This is a murky <br> area though since force hosts/nodes is an admin API parameter by default <br> policy so it's not interoperable by default anyway. A couple of options <br> to avoid a config option:<br> <br> 1. Add a new parameter (or couple of parameters) to the server create <br> API which would deprecate the weird az:host:node format for forcing a <br> host/node and if used, would run the requested destination through the <br> scheduler filters. This would be like how cold migrate with a target <br> host works today. If users wanted to continue forcing the host and <br> bypass the scheduler, they could still use an older microversion with <br> the az:host:node format.<br> <br> 2. At the very least, rather than a config option, add a policy rule to <br> control whether or not az:host:node (force host/node) bypasses the <br> scheduler filters, so some users with certain roles can do that but not <br> others. This is not an ideal option though and I'd prefer option 1.<br></blockquote><br>Another alternative for force_hosts/nodes during server create is to use <br>the JsonFilter and provide a 'query' scheduler hint where you filter on <br>a specific host/node, e.g.:<br><br>openstack server create --hint '["=","host","target.host.com"]' ...<br><br>Granted, the JsonFilter is not enabled by default and not very well <br>tested so we recommend against using it [1] but it is an existing <br>alternative if you want to specify a host and still run through the filters.<br><br>[1] https://review.openstack.org/#/c/647796/<br><br>-- <br><br>Thanks,<br><br>Matt<br></blockquote><!--😀-->
</div>
</body>
</html>