<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This is based on the behavior of elastic ips in amazon where a call to associate an ip with a new instance will simply move it.<div><br></div><div>Vish</div><div><br><div><div>On Nov 6, 2012, at 4:53 PM, Stef T <<a href="mailto:stef@ummon.com">stef@ummon.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<div bgcolor="#CCCCCC" text="#000000">
<font size="+1">Hello Everyone,<br>
So, before I start making code changes to nova-network, I have
to ask, why does the nova-network first disassociate the
floating-ip before associating it ? Surely, if the floating-ip is
associated with another instance it shouldn't jst be disassociated
blindly ?<br>
<br>
I refer to line 477 of nova/network/manager.py (the
associate_floating_ip method) and specifically this;<br>
<br>
# make sure project owns this floating ip (allocated)<br>
self._floating_ip_owned_by_project(context, floating_ip)<br>
<br>
# disassociate any already associated<br>
orig_instance_uuid = None<br>
if floating_ip['fixed_ip_id']:<br>
# find previously associated instance<br>
fixed_ip = self.db.fixed_ip_get(context,<br>
floating_ip['fixed_ip_id'])<br>
orig_instance_uuid = fixed_ip['instance_uuid']<br>
<br>
self.disassociate_floating_ip(context,
floating_address)<br>
<br>
Now, I can see two solutions, in the case that this is
'correct'. One is to create a method called 're-associate'. The
other idea is to only allow disassocation to happen if there is a
'force' flag (or some such). <br>
<br>
In the case of more than one operator, it's REALLY easy to
step on each others toes. This is even before I get onto the whole
notion of malicious intent.<br>
<br>
Am I reading this wrong ? I am open to being an idiot :)<br>
<br>
Regards<br>
S.<br>
<br>
</font>
</div>
_______________________________________________<br>Mailing list: <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br>Post to : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>Unsubscribe : <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br>More help : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br></blockquote></div><br></div></body></html>