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

Inconsistent Parent-Child Relationship for IP Addresses After Prefix Renaming #6698

Open
kacem-expereo opened this issue Dec 26, 2024 · 4 comments
Labels
triage This issue is new and has not been reviewed. type: bug Something isn't working as expected

Comments

@kacem-expereo
Copy link

kacem-expereo commented Dec 26, 2024

Environment

  • Nautobot version : 2.4.0b1 (demo nautobot)

Steps to Reproduce

I noticed a behavior change between 2.3.0 and the demo version 2.4.0b1 but I could not locate the appropriate commit.
1.Create a prefix without parents.(Easier done in a new namespace)
2.Create one or many ip addresses under this prefix
3.rename the prefix.

Expected Behavior

The ip addresses belonging to the original prefix should become orphan or the model should prevent the prefix from being renamed.
Since the model does not allow an ip to be orphan. I would expect renaming the prefix impossible until the user renames all IP addresses...?

Observed Behavior

The prefix shown in the GUI has no ip addresses which is expected. However the Ip addresses still have a parent connection with the renamed prefix.
See :
https://next.demo.nautobot.com/ipam/ip-addresses/9c84aa9c-f892-4138-8cb8-4854009c8e90/?tab=main
IP address 192.168.1.1/24 has 192.168.42.0/24 as parent.

@kacem-expereo kacem-expereo added triage This issue is new and has not been reviewed. type: bug Something isn't working as expected labels Dec 26, 2024
@glennmatthews
Copy link
Contributor

Thanks for the report! I would suspect #6616 as a possible related issue, but we'll need to investigate to be sure.

@glennmatthews
Copy link
Contributor

Can you clarify the "behavior change" aspect of this report - was the observed behavior different for you in an earlier version?

@kacem-expereo
Copy link
Author

kacem-expereo commented Jan 2, 2025

hello Glenn,
thanks a lot for your time.
The difference is on the GUI.
In nautobot v2.3, after you rename the prefix, it feels like you just changed a display, the IP addresses that were under the original prefix are still shown.
On the demo website, the GUI behavior changes. After the prefix is renamed, the IP addresses are no longer displayed.
However if you go to the ip address object, you will find the inconsistent parent attached.
Hope this is clear enough, if not I can attach screenshots let me know

@glennmatthews
Copy link
Contributor

Gotcha, the GUI behavior change is likely due to #6278 and related fixes, but the database foreign keys are incorrect in both cases. This has probably been an issue since v2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage This issue is new and has not been reviewed. type: bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants