Interfaces not visualizing on child devices #1444

Closed
opened 2025-12-29 16:32:14 +01:00 by adam · 9 comments
Owner

Originally created by @atkozhuharov on GitHub (Dec 8, 2017).

Issue type

[ ] Feature request
[ x] Bug report
[ ] Documentation

Environment

  • Python version: 3.4.5
  • NetBox version: 2.2.6
    on CentOS 7

Description

I have a device which is a server chassis(added to a rack) and several blade servers which are children of said chassis. I have added interfaces to all child devices. After binding an interface to an IP address, the interface stops visualizing in the device page. The interface DOES exist and is bind to the device, but it doesn't render/visualize.
dev_1

DB info:
select * from dcim_device where name = 'c1s01';
-[ RECORD 1 ]--+------------------------------
id | 201
created | 2017-12-07
last_updated | 2017-12-07 17:14:26.515451+00
name | c1s01
serial |
position |
face |
status | 1
comments |
device_role_id | 12
device_type_id | 6
platform_id | 10
rack_id | 7
primary_ip4_id | 6145
primary_ip6_id |
tenant_id | 5
asset_tag |
site_id | 1
cluster_id |

select * from dcim_interface where device_id = 201;
-[ RECORD 1 ]------+------------------
id | 682
name | p49p1
form_factor | 1000
mgmt_only | f
description |
device_id | 201
mac_address | 00:23:ae:fe:4e:fc
lag_id |
enabled | t
mtu |
virtual_machine_id |

-[ RECORD 1 ]-+------------------------------
id | 6145
created | 2017-11-30
last_updated | 2017-12-07 17:14:26.326756+00
family | 4
address | 10.0.2.191
description | c1s01
interface_id | 682
nat_inside_id |
vrf_id |
tenant_id | 1
status | 1
role | 51

As soon as I unlink the interface/IP the interface starts visualizing.
This isn't a problem with the data, as the interface is being fetched and passed to be rendered by the Jinja logic.

Steps to reproduce:

  1. Add a device type (parent) and a device type(child). See my types for reference:
    dev_types
  2. Create an IP address which to use for the child device
  3. Add a device with the type of the parent and one with the type of the child. I just tried and the child doesn't even have to be in the bay.
  4. Add an interface
  5. Bind the created IP to the created interface.
Originally created by @atkozhuharov on GitHub (Dec 8, 2017). ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [ x] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> <!-- Please describe the environment in which you are running NetBox. (Be sure to verify that you are running the latest stable release of NetBox before submitting a bug report.) If you are submitting a bug report and have made any changes to the code base, please first validate that your bug can be recreated while running an official release. --> ### Environment * Python version: 3.4.5 * NetBox version: 2.2.6 on CentOS 7 ### Description I have a device which is a server chassis(added to a rack) and several blade servers which are children of said chassis. I have added interfaces to all child devices. After binding an interface to an IP address, the interface stops visualizing in the device page. The interface DOES exist and is bind to the device, but it doesn't render/visualize. ![dev_1](https://user-images.githubusercontent.com/25763860/33772212-945b96cc-dc3c-11e7-8ff1-c4d55efdb217.png) DB info: select * from dcim_device where name = 'c1s01'; -[ RECORD 1 ]--+------------------------------ id | 201 created | 2017-12-07 last_updated | 2017-12-07 17:14:26.515451+00 name | c1s01 serial | position | face | status | 1 comments | device_role_id | 12 device_type_id | 6 platform_id | 10 rack_id | 7 primary_ip4_id | 6145 primary_ip6_id | tenant_id | 5 asset_tag | site_id | 1 cluster_id | select * from dcim_interface where device_id = 201; -[ RECORD 1 ]------+------------------ id | 682 name | p49p1 form_factor | 1000 mgmt_only | f description | device_id | 201 mac_address | 00:23:ae:fe:4e:fc lag_id | enabled | t mtu | virtual_machine_id | -[ RECORD 1 ]-+------------------------------ id | 6145 created | 2017-11-30 last_updated | 2017-12-07 17:14:26.326756+00 family | 4 address | 10.0.2.191 description | c1s01 interface_id | 682 nat_inside_id | vrf_id | tenant_id | 1 status | 1 role | 51 As soon as I unlink the interface/IP the interface starts visualizing. This isn't a problem with the data, as the interface is being fetched and passed to be rendered by the Jinja logic. Steps to reproduce: 1) Add a device type (parent) and a device type(child). See my types for reference: ![dev_types](https://user-images.githubusercontent.com/25763860/33773818-e2c38cc0-dc41-11e7-89e2-b83ebe44d17d.png) 2) Create an IP address which to use for the child device 3) Add a device with the type of the parent and one with the type of the child. I just tried and the child doesn't even have to be in the bay. 4) Add an interface 5) Bind the created IP to the created interface.
adam closed this issue 2025-12-29 16:32:14 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 8, 2017):

Please provide the steps needed to reproduce this bug, using specific values.

@jeremystretch commented on GitHub (Dec 8, 2017): Please provide the steps needed to reproduce this bug, using specific values.
Author
Owner

@atkozhuharov commented on GitHub (Dec 8, 2017):

@jeremystretch - done, edited the description of the issue.

@atkozhuharov commented on GitHub (Dec 8, 2017): @jeremystretch - done, edited the description of the issue.
Author
Owner

@jeremystretch commented on GitHub (Dec 13, 2017):

I'm not able to reproduce this. I can assign IPs to interfaces belonging to a child device and they show normally. I'm not sure what would prevent them from showing up.

@atkozhuharov Can you post a more detailed set of steps to reproduce this please? Be sure to specify exactly what you're doing at each step, what values you're using, etc.

@jeremystretch commented on GitHub (Dec 13, 2017): I'm not able to reproduce this. I can assign IPs to interfaces belonging to a child device and they show normally. I'm not sure what would prevent them from showing up. @atkozhuharov Can you post a more detailed set of steps to reproduce this please? Be sure to specify exactly what you're doing at each step, what values you're using, etc.
Author
Owner

@atkozhuharov commented on GitHub (Dec 14, 2017):

The steps I took are as in the description. Here are the concrete values:
Site: Testing
Rack: fl5.rack, group: floor5, width 19 inces, height 42U descending units

Device Type:
M1000E Dell Height - 10U, Fulldepth, Net device, Parent role
M1000E Dell Height - 0U, Fulldepth, Net device, Child role

Devices:
name: dell-chassis, device-role: chassis, Dell M1000E
name: c1s01, device role: Openstack node, Dell M610, serial: ABCD, site: Testing, rack: fl5.rack, Status: Active, Platform: Ubuntu, Primary IPv4 10.0.2.191/32

Interface:
c1s01:

IP:
10.0.2.191/32, VRF global, family ipv4, tenant: test, status:active, role: blade server, description c1s01

@atkozhuharov commented on GitHub (Dec 14, 2017): The steps I took are as in the description. Here are the concrete values: Site: Testing Rack: fl5.rack, group: floor5, width 19 inces, height 42U descending units Device Type: M1000E Dell Height - 10U, Fulldepth, Net device, Parent role M1000E Dell Height - 0U, Fulldepth, Net device, Child role Devices: name: dell-chassis, device-role: chassis, Dell M1000E name: c1s01, device role: Openstack node, Dell M610, serial: ABCD, site: Testing, rack: fl5.rack, Status: Active, Platform: Ubuntu, Primary IPv4 10.0.2.191/32 Interface: c1s01: IP: 10.0.2.191/32, VRF global, family ipv4, tenant: test, status:active, role: blade server, description c1s01
Author
Owner

@jeremystretch commented on GitHub (Dec 14, 2017):

"blade server" isn't a valid IP address role.

@jeremystretch commented on GitHub (Dec 14, 2017): "blade server" isn't a valid IP address role.
Author
Owner

@atkozhuharov commented on GitHub (Dec 14, 2017):

Why is it not valid ? Attached screenshot.
screenshot from 2017-12-14 18-41-30

@atkozhuharov commented on GitHub (Dec 14, 2017): Why is it not valid ? Attached screenshot. ![screenshot from 2017-12-14 18-41-30](https://user-images.githubusercontent.com/25763860/34003638-79651fb6-e0fe-11e7-958a-7eef530fee79.png)
Author
Owner

@jeremystretch commented on GitHub (Dec 14, 2017):

IPAddress role choices are hard-coded. You're probably looking at Prefix/VLAN roles.

IPADDRESS_ROLE_LOOPBACK = 10
IPADDRESS_ROLE_SECONDARY = 20
IPADDRESS_ROLE_ANYCAST = 30
IPADDRESS_ROLE_VIP = 40
IPADDRESS_ROLE_VRRP = 41
IPADDRESS_ROLE_HSRP = 42
IPADDRESS_ROLE_GLBP = 43
IPADDRESS_ROLE_CARP = 44
IPADDRESS_ROLE_CHOICES = (
    (IPADDRESS_ROLE_LOOPBACK, 'Loopback'),
    (IPADDRESS_ROLE_SECONDARY, 'Secondary'),
    (IPADDRESS_ROLE_ANYCAST, 'Anycast'),
    (IPADDRESS_ROLE_VIP, 'VIP'),
    (IPADDRESS_ROLE_VRRP, 'VRRP'),
    (IPADDRESS_ROLE_HSRP, 'HSRP'),
    (IPADDRESS_ROLE_GLBP, 'GLBP'),
    (IPADDRESS_ROLE_CARP, 'CARP'),
)```
@jeremystretch commented on GitHub (Dec 14, 2017): IPAddress role choices are hard-coded. You're probably looking at Prefix/VLAN roles. ```# IP address roles IPADDRESS_ROLE_LOOPBACK = 10 IPADDRESS_ROLE_SECONDARY = 20 IPADDRESS_ROLE_ANYCAST = 30 IPADDRESS_ROLE_VIP = 40 IPADDRESS_ROLE_VRRP = 41 IPADDRESS_ROLE_HSRP = 42 IPADDRESS_ROLE_GLBP = 43 IPADDRESS_ROLE_CARP = 44 IPADDRESS_ROLE_CHOICES = ( (IPADDRESS_ROLE_LOOPBACK, 'Loopback'), (IPADDRESS_ROLE_SECONDARY, 'Secondary'), (IPADDRESS_ROLE_ANYCAST, 'Anycast'), (IPADDRESS_ROLE_VIP, 'VIP'), (IPADDRESS_ROLE_VRRP, 'VRRP'), (IPADDRESS_ROLE_HSRP, 'HSRP'), (IPADDRESS_ROLE_GLBP, 'GLBP'), (IPADDRESS_ROLE_CARP, 'CARP'), )```
Author
Owner

@atkozhuharov commented on GitHub (Dec 14, 2017):

Yes the prefix role is blade-server.

@atkozhuharov commented on GitHub (Dec 14, 2017): Yes the prefix role is blade-server.
Author
Owner

@jeremystretch commented on GitHub (Dec 14, 2017):

Prefixes are not involved in this workflow at all.

I'm sorry, but I'm not able to reproduce this issue with the information provided, and thus am closing this issue. If someone can provide detailed instructions for reproducing the reported issue on a stock NetBox installation, I'll re-open it.

@jeremystretch commented on GitHub (Dec 14, 2017): Prefixes are not involved in this workflow at all. I'm sorry, but I'm not able to reproduce this issue with the information provided, and thus am closing this issue. If someone can provide detailed instructions for reproducing the reported issue on a stock NetBox installation, I'll re-open it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1444