Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cascade delete IP addresses with interfaces #6015

Closed
proudbro opened this issue Mar 19, 2021 · 9 comments
Closed

Cascade delete IP addresses with interfaces #6015

proudbro opened this issue Mar 19, 2021 · 9 comments
Labels
pending closure Requires immediate attention to avoid being closed for inactivity status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: feature Introduction of new functionality to the application

Comments

@proudbro
Copy link

NetBox version

v.2.10.6

Feature type

Change to existing functionality

Proposed functionality

Steps to Reproduce:

  • Create any device with Interfaces components
  • Add IP address on interface
  • Delete Device
  • IP address is removed from the system

I propose to change the current behavior when removing an interface with assigned IP.
Now it occurs cascading IP address deletion with device and its interfaces despite user has prohibition on IP deletion.

Use case

Previously added IP address will return to the list of IP addresses and can be assigned instead of creating it again

Database changes

No response

External dependencies

No response

Based on: #5945

@proudbro proudbro added the type: feature Introduction of new functionality to the application label Mar 19, 2021
@jeremystretch
Copy link
Member

We generally avoid any workflows wherein data can be deleted unexpectedly. I personally would prefer to disable the deletion of an interface with assigned IP addresses, but it's open for discussion.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Mar 29, 2021
@ljb2of3
Copy link

ljb2of3 commented Apr 8, 2021

I think I'd side with @jeremystretch on this one. Deleting the IP just because the interface got deleted would be unexpected behavior to me. However, there are times where the proposed functionality could be useful. Perhaps some sort of "deleting this interface / device will leave orphaned IPs (1.1.1.1, 2.3.4.5, etc). Delete these too?" prompt would be useful, but barring that if I had to choose between "auto delete IPs" and "block delete unless IPs are removed" I'd go with blocking the delete operation.

@abrahamvegh
Copy link
Contributor

I agree with @ljb2of3, presenting the option, especially when the objects will be orphaned, would be nice, but otherwise I think one of NetBox’s strong suites is making it difficult to accidentally lose data.

@jeremystretch
Copy link
Member

Somewhat related to #5418

@jeremystretch
Copy link
Member

The best solution here might be to present the option to the user when an interface is being deleted. We should be able to add a checkbox labeled "delete n assigned IP addresses" to the confirmation form.

@proudbro
Copy link
Author

proudbro commented May 4, 2021

@jeremystretch , yes, good idea

@ljb2of3
Copy link

ljb2of3 commented May 4, 2021 via email

@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jul 1, 2021
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Aug 31, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2021

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions github-actions bot closed this as completed Oct 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pending closure Requires immediate attention to avoid being closed for inactivity status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

4 participants