Hi Gavin,<div><br></div><div>From an API perspective, this is intentional, as it is important to be able to clean up ports that another service (e.g., Nova) might have orphaned. It also means that services like Nova can delete the port for a VM without two calls (first to clear the device_id, second to delete the port). </div>
<div><br></div><div>That said, I think one could certainly argue that from a tenant CLI or GUI perspective, we should try to warn users who are deleting a port that appears to be in use, and for example, require them to specify a --force option (CLI) or click another confirmation (GUI) if the device_id of a port is still set. That would be a pretty simple change, I suspect. </div>
<div><br></div><div>Dan</div><div><br></div><div>p.s. The patch proposed by someone else to enforce that API deletes cannot happen if device_id is non-empty actually breaks the current nova/quantum interaction and (ironically) leaves orphaned ports with a device_id set. <a href="https://review.openstack.org/#/c/21520/">https://review.openstack.org/#/c/21520/</a><br>
<br><div class="gmail_quote">On Thu, Feb 7, 2013 at 9:58 AM, Brebner, Gavin <span dir="ltr"><<a href="mailto:gavin.brebner@hp.com" target="_blank">gavin.brebner@hp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Running on a quantum-enabled devstack.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I created a network, subnet and a VM that used the network.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I then deleted the port used by the VM – no error, and I end up<u></u><u></u></p>
<p class="MsoNormal">getting a VM without an address :<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="FR">ubuntu@az3devstackvm2:/opt/stack/tempest2/tempest/tests/network$ nova list<u></u><u></u></span></p>
<p class="MsoNormal">+--------------------------------------+-----------------------+--------+----------+<u></u><u></u></p>
<p class="MsoNormal">| ID | Name | Status | Networks |<u></u><u></u></p>
<p class="MsoNormal">+--------------------------------------+-----------------------+--------+----------+<u></u><u></u></p>
<p class="MsoNormal">| e43ec1a6-9499-4a7f-bbd0-fbecf6f3c115 | server-negtest-322040 | ACTIVE | |<u></u><u></u></p>
<p class="MsoNormal">+--------------------------------------+-----------------------+--------+----------+<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">So far I’ve not found a way to re-attach the VM to my network.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is this a bug or a feature ?<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Gavin<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</font></span></div>
</div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Dan Wendlandt <div>Nicira, Inc: <a href="http://www.nicira.com" target="_blank">www.nicira.com</a><br><div>twitter: danwendlandt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~<br></div></div>
</div>