View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
2107 | RackTables | IPv4/IPv6/SLB | public | 2025-01-13 15:30 | 2025-01-14 15:21 |
Reporter | ntavares | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 0.22.0 | ||||
Summary | 2107: Deleting an IPv4Network with VLANIPv4 assigned results in error: FK violation | ||||
Description | After assigning a VLAN to an IPv4 network (probably IPv6 too?), we can't simply delete the network - without first unlinking it from the VLAN. The error returned is a FK violation, which is not very user-friendly, but what I'd expect is the resource to be deleted along with all related entity links, as it happens with other resources. | ||||
Steps To Reproduce | 1. Create a VLAN 2. Create an IPv4 network 3. Assign the VLAN to the IPv4 network Now, when you try to delete the IPv4 network, you're presented with a FK error, record should not be deleted. | ||||
Additional Information | Intercepted queries are: DELETE FROM `FileLink` WHERE `entity_type` = 'ipv4net' AND `entity_id` = '234' DELETE FROM `IPv4Network` WHERE `id` = '234' I suppose we're missing a: DELETE FROM VLANIPv4 WHERE ipv4net_id = 234; | ||||
Tags | No tags attached. | ||||
This is exactly the intended behaviour and follows the same logic that does not allow deleting a row with racks etc. Some high-level operations imply auto-cascading and some do not. | |
Hi @infrastation, I was afraid you were going to reply that :-) However, at least, shouldn't the software provide a more user-friendly error? "FK error" says absolutely nothing about what the problem is, the user is left at a loss. I know it was the VLANIPv4 because I've checked MySQL logs, a less tech-savy user will simply consider the software "broken". However, without being too familiar with the schema, I can't think of a good reason why wouldn't racktables simply remove the link with the VLAN (therefore, be one of those auto-cascading operations, just like what seems to happen with FileLink (above)). It can easily be recreated.... |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2025-01-13 15:30 | ntavares | New Issue | |
2025-01-14 01:12 | infrastation | Note Added: 0004597 | |
2025-01-14 15:21 | ntavares | Note Added: 0004599 |