device search by macaddress broken #2757

Closed
opened 2025-12-29 18:21:47 +01:00 by adam · 3 comments
Owner

Originally created by @a31amit on GitHub (Jul 23, 2019).

Environment

  • Python version: 3.7
  • NetBox version: 2.6.1 or develop

it looks to be an issue with netbox caching or search by mac address. I tried with Redis caching to 0, it is still broken.
for some reasons it's working for old existing devices in the database but whenever I create a new device or new interface, its broken. I tried with Redis flush but its same, doubt if logic in netbox core may need to check.

Steps to Reproduce

  1. Create a New Interface with its valid mac address
  2. Search Mac Address in Search Box of netbox

Expected Behavior

netbox should return the device in search.

Observed Behavior

It doesn't return anything. Also, it seems the same for API as well.

Originally created by @a31amit on GitHub (Jul 23, 2019). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.7 * NetBox version: 2.6.1 or develop <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a wrapper like pynetbox. --> it looks to be an issue with netbox caching or search by mac address. I tried with Redis caching to 0, it is still broken. for some reasons it's working for old existing devices in the database but whenever I create a new device or new interface, its broken. I tried with Redis flush but its same, doubt if logic in netbox core may need to check. ### Steps to Reproduce 1. Create a New Interface with its valid mac address 2. Search Mac Address in Search Box of netbox <!-- What did you expect to happen? --> ### Expected Behavior netbox should return the device in search. <!-- What happened instead? --> ### Observed Behavior It doesn't return anything. Also, it seems the same for API as well.
adam closed this issue 2025-12-29 18:21:47 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 25, 2019):

Please indicate the exact values you are using to produce this issue.

@jeremystretch commented on GitHub (Jul 25, 2019): Please indicate the exact values you are using to produce this issue.
Author
Owner

@a31amit commented on GitHub (Jul 25, 2019):

  1. Click on Add New Interface with Name eth1 or with some other name which doesn't exist for the same device.
  2. Update a valid Mac Address for example - b0:35:9f:8a:2d:e8
  3. Save
  4. Search a Mac Address in global Search

Result - Nothing Returns.

For old devices and their interfaces with mac address which exist before migration to 2.6.0 or everything which was in netbox 2.5.13 still searchable

@a31amit commented on GitHub (Jul 25, 2019): 1. Click on Add New Interface with Name eth1 or with some other name which doesn't exist for the same device. 2. Update a valid Mac Address for example - b0:35:9f:8a:2d:e8 3. Save 4. Search a Mac Address in global Search Result - Nothing Returns. For old devices and their interfaces with mac address which exist before migration to 2.6.0 or everything which was in netbox 2.5.13 still searchable
Author
Owner

@jeremystretch commented on GitHub (Aug 15, 2019):

See, this:

Search a Mac Address in global Search

is different from your original post:

Search Mac Address in Search Box of netbox

Global search doesn't match on MAC addresses. The mac_address filter does this and works as expected.

@jeremystretch commented on GitHub (Aug 15, 2019): See, this: > Search a Mac Address in global Search is different from your original post: > Search Mac Address in Search Box of netbox Global search doesn't match on MAC addresses. The `mac_address` filter does this and works as expected.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2757