<div dir="ltr">Adding [Congress] to the subject line for proper filtering...<br><br>Congress lets you execute most of the Nova client API calls.  You use the same arguments you would use for the Nova client.  Here are the docs for the live-migration API: scroll down to live-migrate.<div><br></div><div><a href="https://docs.openstack.org/python-novaclient/latest/reference/api/novaclient.v2.servers.html">https://docs.openstack.org/python-novaclient/latest/reference/api/novaclient.v2.servers.html</a><br><div><br></div><div>Congress doesn't let you pass in keyword args like host="foo" (others will correct me if that's changed recently), so you will need to figure out what non-keyword arguments live-migration allows you to pass.  It wasn't clear to me from the docs. </div><div><br></div><div>Tim</div><div>  <br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 18, 2017 at 12:53 AM houzhian <<a href="mailto:houzhian@gmail.com">houzhian@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

    

<div>

<div style="font-family:"\005fae\008f6f\0096c5\009ed1";font-size:14px;color:#000000;line-height:1.7">
    <div>
<div><span><br></span></div>
<div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px">Hey guys, thanks for your efforts on OpenStack Congress, I am very puzzled about policy of Congress on recent days and I decided to ask you for some help, I am looking forward to your reply.</div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px"><br></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px"><div style="font-family:Consolas,'Courier New',monospace;color:rgb(187,187,187);font-size:18px;line-height:24px;white-space:pre-wrap;background-color:rgb(0,43,54)"><div style="font-family:Verdana,微软雅黑,宋体,sans-serif!important">openstack congress policy rule create <span style="color:rgb(203,75,22)">\</span></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif!important">    --name live_migrate_vm classification <span style="color:rgb(203,75,22)">\</span></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif!important">    <span style="color:rgb(42,161,152)">'execute[nova:servers.live_migrate(vmid,"<a href="http://overcloud-novacompute-1.opnfvlf.org" target="_blank">overcloud-novacompute-1.opnfvlf.org</a>","False","False")] :-</span></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif!important"><span style="color:rgb(42,161,152)">        host_down(host),</span></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif!important"><span style="color:rgb(42,161,152)">        active_instance_in_host(vmid, host)'</span></div><br style="font-family:Verdana,微软雅黑,宋体,sans-serif!important"></div></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px"><br></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px">Is this a valid policy? Is there some connection between nova client api and execute in congress policy which are allowed to use? I noticed that </div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px"><span style="line-height:1.7">    </span>nova pause vmid</div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px">    'execute[nova:servers.pause(vmid)] :- condition' works properly</div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px">    nova migrate vmid</div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px"><span style="line-height:1.7">    '</span><span style="line-height:23.8px">execute[nova:servers.pause(vmid)] :- condition' works properly</span></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px"><span style="line-height:23.8px">there exist nova live-migration vmid</span></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px"><span style="line-height:23.8px">but I can not add execute[nova:servers.live-migration(vmid,other params maybe)] to congress policy, nova:servers.live-migrate(vmid,other params) can be added successfuly but it didn't do live migration jobs, nothing happened.I am confused about this,</span></div><div style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:23.8px"><span style="line-height:23.8px">Am I able to use congress to do some automatic fault recovery like live migration?</span></div></div>
<div><span><br></span></div>
<div id="m_-4806688784329480909ntes-pcmail-signature" style="font-family:'\005fae\008f6f\0096c5\009ed1'">
    

                <font style="padding:0;margin:0">
                    <div id="m_-4806688784329480909ntes-pcmail-signature-default" style="font-size:14px;color:#000;text-decoration:none">发自网易邮箱大师</div>                </font>

</div><br>
</div>
</div>
</div>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div></div></div></div>