-
Notifications
You must be signed in to change notification settings - Fork 95
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
Import very slow and not adding interfaces correctly to all device templates #152
Comments
I have also tried first deleting the device type before running the import, but it had the same results and the interface-templates were not created.
|
I have also attempted after first deleting the device and manufacturer but again the interfaces are not created.
|
I'm facing the same issue. I started the script after upgrading to 4.1.1. The last time it ran was around 6 months ago with v3.7 and it took minutes. It's currently running since 24 hours and still going. |
I'm also facing the same issue with interfaces not being added for many device/module types. |
The issue comes from the import script as it tries to update existing entries. Does the import tool really need to update existing entries? |
The issue that I'm seeing is that it is fetching all interfaces for all device types, not just the one it is working on at the time. |
it is related to this netbox-community/netbox#15410 |
devicetype_id => device_type_id moduletype_id => module_type_id netbox-community#152 (comment) netbox-community/netbox#15410
Thas was indeed the cause for my issue. I did the changes and it parsed correctly the manufacturer i gave as input. |
Never mind, I just found #156 which is roughly the same. |
I have already created #155. I don't think the developers are actively looking into the project any more. |
I previously imported all the device templates using this tool last year and it ran within a few minutes.
I've just tried to update the device templates and it ran so slowly, I had to terminate after many hours.
Looking at netbox logs, at the time, it appears to be querying for every interface_template instead of just for that device type (we currently have over 68,000), and it does this for every device it's importing!
2024-09-18 13:30:41 172.18.0.1 - - [18/Sep/2024:12:30:41 +0000] "GET /api/dcim/interface-templates/?devicetype_id=3201&limit=1000&offset=68000 HTTP/1.1" 200 573608 "-" "python-requests/2.32.3"
I have also found not all devices are having their interfaces added correctly.
As an example, I ran the following command to import a single device from T-Bao.
This is the yaml file:
This is the command:
This is the result:
I've attached the output when run with the -v to give more detail.
Device-Type-Library-Import.txt
Running Netbox version 4.1.1 in a Docker container.
The text was updated successfully, but these errors were encountered: