associate floating ip address to an instance works without allocating address

Bug #708320 reported by Tushar Patil
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Tushar Patil

Bug Description

Tested with Trunk revision No 606.

I created a floating addresses of range 10.2.3.0/24

I can associate floating ip addres 10.2.3.96 to an instance without allocating it for the project.

Expected Result: It should gives error message something like
"Floating ip address <IP address> is not allocated to project <AAA>"

Related branches

Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 708320] [NEW] associate floating ip address to an instance works without allocating address

are you an admin? Is the instance allocated to another project?

Vish

On Jan 26, 2011, at 1:37 PM, Tushar Patil wrote:

> Public bug reported:
>
> Tested with Trunk revision No 606.
>
> I created a floating addresses of range 10.2.3.0/24
>
> I can associate floating ip addres 10.2.3.96 to an instance without
> allocating it for the project.
>
> Expected Result: It should gives error message something like
> "Floating ip address <IP address> is not allocated to project <AAA>"
>
> ** Affects: nova
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of Nova Bug
> Team, which is subscribed to OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/708320
>
> Title:
> associate floating ip address to an instance works without allocating
> address
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> Tested with Trunk revision No 606.
>
> I created a floating addresses of range 10.2.3.0/24
>
> I can associate floating ip addres 10.2.3.96 to an instance without
> allocating it for the project.
>
> Expected Result: It should gives error message something like
> "Floating ip address <IP address> is not allocated to project <AAA>"
>
>

Revision history for this message
Tushar Patil (tpatil) wrote :

Yes, I am running euca-associate-address as admin.

No, the floating ip address is not allocated to any project.

Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 708320] Re: associate floating ip address to an instance works without allocating address

Admin may bypass the allocated check. I don't think this works as a normal user and it probably shouldn't work as an admin either.
On Jan 26, 2011, at 3:05 PM, Tushar Patil wrote:

> Yes, I am running euca-associate-address as admin.
>
> No, the floating ip address is not allocated to any project.
>
> --
> You received this bug notification because you are a member of Nova Bug
> Team, which is subscribed to OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/708320
>
> Title:
> associate floating ip address to an instance works without allocating
> address
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> Tested with Trunk revision No 606.
>
> I created a floating addresses of range 10.2.3.0/24
>
> I can associate floating ip addres 10.2.3.96 to an instance without
> allocating it for the project.
>
> Expected Result: It should gives error message something like
> "Floating ip address <IP address> is not allocated to project <AAA>"
>
>

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Tushar Patil (tpatil)
Changed in nova:
assignee: nobody → Tushar Patil (tpatil)
status: Confirmed → In Progress
Revision history for this message
Masanori Itoh (itohm) wrote :

Hi Tushar, Vish,

I think floating IP issue is more complicated.

One more thing is that at this moment all floating IPs (Elastic IPs for euca2ools users) are displayed by DescribeAddresses API call. But, I think we should suppress un-allocated floating IPs.

I created a bug fix branch to address the above issue and linked it to this bug report.

What do you think about?

-Masanori

Revision history for this message
Tushar Patil (tpatil) wrote :

You have a good point.
I think it is better you report a new bug and fix it.

Revision history for this message
Vish Ishaya (vishvananda) wrote :

> One more thing is that at this moment all floating IPs (Elastic IPs for euca2ools users) are displayed by DescribeAddresses API call. But, I think we should suppress un-allocated floating IPs.

It only shows all ips for admins. Regular users only see ips that have been allocated to the project. I don't think a fix is necessary.

Revision history for this message
Masanori Itoh (itohm) wrote :

Hi Vish,

OK. I will post another bug report soon.
Actually, I have some more issues on Floating IP/Elastic IP thing.
So, maybe bug report*s* and patch*es*. :)

Regards,
-Masanori

Revision history for this message
Masanori Itoh (itohm) wrote :

Oops. The above comment(#7) was for Tushar.

Vish,

> It only shows all ips for admins. Regular users only see ips that have been allocated to the project. I don't think a fix is necessary.

I alto think that in the case of the call by admin it's reasonable displaying all allocated floating/elastic IPs regardless of the owner.

My point is that only Floating IPs/Elastic IPs allocated by AllocateAddress call should be displayed.
In other word, DescribeAddresses call should not return any address without AllocateAddress calls in the case of EC2 API.

At this moment, all floating IPs are displayed even including network address and broadcast address by euca-describe addresses.

I know Floating IP and Elastic IP(or public IP) are different somehow, and I will check both cases.
Give me time a little bit.

Regards,

-Masanori

Revision history for this message
Tushar Patil (tpatil) wrote :

This bug is already fixed in revision 926. This bug status should be marked as Fix Committed.

Revision history for this message
Masanori Itoh (itohm) wrote :

> This bug is already fixed in revision 926. This bug status should be marked as Fix Committed.

Agreed.
I'm unlinking my branch and change the status.

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.