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

identify reason for differences in NetBox device types #397

Closed
mmguero opened this issue Jan 30, 2024 · 4 comments
Closed

identify reason for differences in NetBox device types #397

mmguero opened this issue Jan 30, 2024 · 4 comments
Labels
bug Something isn't working netbox Related to Malcolm's use of NetBox

Comments

@mmguero
Copy link
Collaborator

mmguero commented Jan 30, 2024

On startup this script is used to preload the netbox device type library.

I've noticed that the number of device types seems to be slightly different on a few fresh installations of Malcolm (like, in the 2700's range but not exactly the same). Another box I have has about 2900.

We should determine the reason for the discrepancy and see if it needs to be addressed.

@mmguero mmguero added bug Something isn't working netbox Related to Malcolm's use of NetBox falcon labels Jan 30, 2024
@mmguero mmguero added this to the v24.02.0 milestone Jan 30, 2024
@mmguero mmguero added this to Malcolm Jan 30, 2024
@mmguero mmguero moved this to Todo (investigate) in Malcolm Jan 31, 2024
@mmguero mmguero self-assigned this Feb 13, 2024
@mmguero mmguero moved this from Todo (investigate) to In Progress in Malcolm Feb 13, 2024
@mmguero
Copy link
Collaborator Author

mmguero commented Feb 13, 2024

The total number that seems to exist in the library (we remove the WatchGuard folder manually on the image build as it causes an error on import):

devicetype-library/device-types $ grep -Pr "^model:" | grep -v WatchGuard | wc -l
2936

@mmguero
Copy link
Collaborator Author

mmguero commented Feb 13, 2024

During a normal startup without any live capture, no running enrichment, etc., I have 2930 device types. We do consistently have a few errors:

netbox-1  | ... "POST /netbox/api/dcim/device-types/ HTTP/1.1" 400 47 ...
netbox-1  | ... "POST /netbox/api/dcim/device-types/ HTTP/1.1" 400 47 ...
netbox-1  | ... "POST /netbox/api/dcim/device-types/ HTTP/1.1" 400 47 ...
netbox-1  | ... "POST /netbox/api/dcim/device-types/ HTTP/1.1" 400 47 ...
netbox-1  | ... "POST /netbox/api/dcim/device-types/ HTTP/1.1" 400 47 ...
netbox-1  | ... "POST /netbox/api/dcim/device-types/ HTTP/1.1" 400 47 ...

However I don't think this is due to anything we're doing, and it is consistently reproducible. I think these are errors in the source data itself.

So seeing that there are 6 device types that got error 400s on them, and I ended up with exactly 6 less than what I counted as a "full" complement, this seems reasonable.

We also get some errors for some other records:

netbox-1  | 127.0.0.1 - - [13/Feb/2024:22:05:20 +0000] "POST /netbox/api/dcim/power-outlet-templates/ HTTP/1.1" 400 1089 "-" "python-requests/2.31.0"
netbox-1  | 127.0.0.1 - - [13/Feb/2024:22:18:34 +0000] "POST /netbox/api/dcim/module-types/ HTTP/1.1" 400 76 "-" "python-requests/2.31.0"
netbox-1  | 127.0.0.1 - - [13/Feb/2024:22:18:34 +0000] "POST /netbox/api/dcim/module-types/ HTTP/1.1" 400 76 "-" "python-requests/2.31.0"
netbox-1  | 127.0.0.1 - - [13/Feb/2024:22:18:37 +0000] "POST /netbox/api/dcim/module-types/ HTTP/1.1" 400 76 "-" "python-requests/2.31.0"

Again, I don't have an indication that this is really a problem, but is more likely an issue with the data.

I'm going to try this a few more times but if I get the same results (2930) I don't know what else we'd do about this.

@mmguero mmguero modified the milestones: v24.02.0, v24.03.0 Feb 13, 2024
@mmguero
Copy link
Collaborator Author

mmguero commented Feb 13, 2024

Because I don't think this is high priority, I'm going to bump it and get v24.02.0 out.

@mmguero mmguero modified the milestones: v24.03.0, z.staging Feb 15, 2024
@mmguero mmguero removed the falcon label May 7, 2024
@mmguero mmguero moved this from In Progress to Todo (investigate) in Malcolm May 15, 2024
@mmguero mmguero removed their assignment Sep 30, 2024
@mmguero
Copy link
Collaborator Author

mmguero commented Nov 4, 2024

Kamino closed and cloned this issue to cisagov/Malcolm

@mmguero mmguero closed this as completed Nov 4, 2024
@github-project-automation github-project-automation bot moved this from Todo (investigate) to Done in Malcolm Nov 4, 2024
@mmguero mmguero moved this from Done to Migrated in Malcolm Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working netbox Related to Malcolm's use of NetBox
Projects
Status: Migrated
Development

No branches or pull requests

1 participant