[2.0, 2.1] Release and list IPs reserved by another user

Bug #1629061 reported by Andreas Hasenack
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Mike Pontillo

Bug Description

It's helpful, via the API, to list and release IPs reserved by another user. Currently you only get back (via read) and can release IPs of the current user, not somebody else.

In general, I was looking at something like a command-line switch perhaps, like --all-users, that would include in the read action result objects belonging to other users.

Related branches

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

@andreas, I'm curious, what error do you get if you try and release an IP owned by someone else?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I get this:

$ maas admin-costack ipaddresses release ip=10.5.200.4
User reserved IP 10.5.200.4 does not exist.

That ip is owned by another user.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

I'm not so sure about being able to release the IP addresses of other users - if you can't do that is there any point in being able to do the former? Might be a good idea to expand on your use case here, in case there's another way to do what you want.

Changed in maas:
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → High
milestone: none → 2.1.0
no longer affects: maas/2.0
Changed in maas:
importance: High → Undecided
status: Triaged → Incomplete
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Re: [Bug 1629061] Re: Release and list IPs reserved by another user

One use case is a user left the company but has IPs reserved in MAAS. How
does an admin clean that up?

Another use case is faulty software that has reserved IPs and not released
them after having used them. Would be useful to be able to clean that up
without having to ask each user to do that.

Again, this is just about an admin user having this capability. Maybe even
just admin proper, not a normal user with admin privileges.

On Oct 7, 2016 18:10, "Brendan Donegan" <email address hidden>
wrote:

> I'm not so sure about being able to release the IP addresses of other
> users - if you can't do that is there any point in being able to do the
> former? Might be a good idea to expand on your use case here, in case
> there's another way to do what you want.
>
> ** Changed in: maas
> Status: New => Incomplete
>
> ** Changed in: maas
> Status: Incomplete => Triaged
>
> ** Changed in: maas
> Milestone: None => 2.1.0
>
> ** Also affects: maas/2.0
> Importance: Undecided
> Status: New
>
> ** Changed in: maas/2.0
> Milestone: None => 2.0.1
>
> ** No longer affects: maas/2.0
>
> ** Changed in: maas
> Status: Triaged => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1629061
>
> Title:
> Release and list IPs reserved by another user
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1629061/+subscriptions
>

summary: - Release and list IPs reserved by another user
+ [2.0, 2.1] Release and list IPs reserved by another user
Changed in maas:
status: Incomplete → In Progress
assignee: nobody → Mike Pontillo (mpontillo)
importance: Undecided → Critical
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Not sure why this was still marked Incomplete; this is a well-understood issue.

Another similar issue came up (bug #1630034), where a static IP address (assigned to a node or BMC) somehow became "orphaned" in the database, and was no longer linked to an interface, yet was still "taking up space" as an allocated IP address in MAAS.

While we have not root-caused the reason why the address was "orphaned", I decided to implement a workaround for #1630034 while at the same time fixing this issue.

I plan to enhance the "read" operation so that IP addresses that do not belong to the requesting user can optionally be seen (while also adding support for viewing other allocated address types at the same time).

Also, I plan to add a "force=true" parameter to the 'release' operation so that administrators can forcibly release IP addresses that belong to another user (or are another type), in case "orphaned" IP addresses appear in the database in the future.

Changed in maas:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Andreas, or anyone else affected,

Accepted maas into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/maas/2.1.0+bzr5480-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Tested and confirmed it works as expected. Marking verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

I can confirm that this fixes the bug

Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for maas has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Igor Gnip (igorgnip) wrote :

this still occasionally happens - maas finds "observed" ip which never times out and the ip address cannot be used until observed ip is removed from maas database.

Revision history for this message
Igor Gnip (igorgnip) wrote :

This or something very similar happens with maas 2.7.2 - observed ip won't go away and it prevents us from assigning the same ip to a machine.

Doesn't maas have cleanup of ips in database ?
Are observed ips more important than assigning the ip to other machines ? Observed is not really a statement that this ip is still there, it was just observed once.

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.