[openstack-dev] [Heat][Nova][Neutron]Detach interface will delete the port

Sergey Kraynev skraynev at mirantis.com
Thu Apr 17 07:34:36 UTC 2014


Hello Huang.

You are right, that this problem is presented in networks update for
OS::Nova::Server. I have known about it, and I wanted to discuss it with
Steve Baker, but possibly forgot to do it. Thank you, that you raise this
thread.

About issue.

The cause why it happens is simple: when nova calls detach_interface,  port
will be detached  and deleted at all.


I think there are two solutions:
>
> First:
>
> Heat get the port information before to “detach”, and to create the port
> again before to “attach”.
>
> But I think it looks ugly and will increase risk failure for re-create.
>

I agree that it's not useful solution. This approach has a lot of bad sides
and one of them :
 - if you update only server, your other resources should stay without
changes, but in this case port will be recreated. (so it will be new
different resource)


Second:
>
> Neutron provide a detach_port api to nova, so that nova provide the real
> “detach” not “delete” to heat.
>
>
>

I have told with folk from neutron team and they told me that neutron does
not have such api and it's not possible to do this thing.

So I think, that problem should be solved in nova. F.e. will be good to
provide detach_interface command with additional flag delete_port=True.
(some kind of soft detach).
In this case we could use existing port after detaching.

Regards,
Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140417/ebf2894c/attachment.html>


More information about the OpenStack-dev mailing list