<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><DIV>I am also perplexed about the ports backing floating ips. when plugin is selected  OVS or LB, the ip address belonging to a port backing that floating ip is really set on VIF of  'qg-' , what is the port real action?<BR><BR><BR></DIV>
<DIV></DIV>
<DIV id="divNeteaseMailCard"></DIV>
<DIV><BR></DIV>At 2014-01-15 07:50:36,"Salvatore Orlando" <sorlando@nicira.com> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" id="isReplyContent">
<DIV dir="ltr">
<P>TL;DR;<BR>I have been looking back at the API and found out that it's a bit weird how floating IPs are mapped to ports. This might or might not be an issue, and several things can be done about it.<BR>The rest of this post is a boring description of the problem and a possibly even more boring list of potential solutions.</P>
<P>Floating IPs are backed by ports on the external network where they are implemented; while there are good reason for doing so, this has some seemingly weird side effects, which are usually not visible to tenants as only admins are allowed (by default) to view the ports backing the floating IPs.<BR></P>
<P>Assigning an external port to a floating IP is an easy way for ensuring the IP address used for the floating IP is then not reused for other allocation purposes on the external network; indeed admin users might start VMs on external networks as well. Conceptually, it is also an example of port-level insertion for a network service (DNAT/SNAT).</P>
<P>However these are the tricky aspects:<BR>- IP Address changes: The API allows IP address updates for a floating IP port. However as it might be expected, the IP of the floating IP entities does not change, as well as the actual floating IP implemented in the backend (l3 agent or whatever the plugin uses).<BR>- operational status: It is always down at least for plugins based on OVS/LB agents. This is because there is no actual VIF backing a floating IP, so there is nothing to wire.<BR>- admin status: updating it just has no effect at all<BR>- Security groups and  allowed address pairs: The API allows for updating them, but it is not clear whether something actually happens in the backend, and I'm even not entirely sure this makes sense at all. </P>
<P>Why these things happen, whether it's intended behaviour, and whether it's the right behaviour it's debatable.</P>
<P>From my perspective, this leads to inconsistent state, as:<BR>- the address reported in the floating IP entity might differ from the one on the port backing the floating IP<BR>- operational status is wrongly represented as down<BR>- expectations concerning operations on the port are not met (eg: admin status update)<BR>And I reckon state inconsistencies should always be avoided.</P>
<P>Considering the situation described above, there are few possible options.<BR></P>
<P>1- don't do anything, since the port backing the floating IP is hidden from the tenant.<BR>This might be ok provided that a compelling reason for ignoring entities not visible to tenants is provided.<BR>However it has to be noted that Neutron authZ logic, which is based on openstack.common would allow deployers to change that (*)</P>
<P>2- remove the need for a floating IP to be backed from a port<BR>While this might seem simple, this has non-trivial implications as IPAM logic would need to become aware of floating IPs, and should  be discussed further.</P>
<P>3- leverage policy-based APIs, and transform floating IPs in a "remote access policy"<BR>In this way the floating IP will become a policy to apply to a port; it will be easier to solve conflicts with security policies and it will be possible to just use IPs (or addressing policies) configured on the port.<BR>However, this will be hardly backward compatible, and its feasibility depends on the outcome of the more general discussions on policy-based APIs for neutron.</P>
<P>4- Document the current behaviour<BR>This is something which is probably worth doing anyway until a solution is agreed upon</P>
<P>Summarising, since all the 'technical' options sounds not feasible for the upcoming Icehouse release, it seems worth at least documenting the current behaviour, and start a discussion on whether we should do something about this and, if yes, what.<BR></P>
<P>Regards and apologies for the long post,<BR>Salvatore</P>
<P>(*) As an interesting corollary, the flexibility of making authZ policies super-configurable causes the API to be non-portable. However, this is a subject for a different discussion.<BR></P></DIV></BLOCKQUOTE></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>