Upgrade from Netbox 2.9.11 to 2.10.10 Error #12302
Replies: 2 comments 4 replies
-
Can you show the whole migration log? 0051_migrate_customfields.py has a number of dependencies, i.e. migrations which should have run before this one:
Therefore, either:
You can check case (2) by doing a SQL query on your machine. I don't have an old Netbox lying around, but you should have a table called something like Incidentally, although there's no harm going stepwise as you are, in reality you only need to do two steps: one to 2.11.12, and then to 3.4.8. Between those two you'll have to upgrade the other requirements: definitely python to 3.8+, and postgres to 11+. Maybe redis too. If you have multiple versions of python on your box, then you can do this to tell upgrade.sh which one to use (you'll have to remember to do this every time you upgrade in future too)
You may find it's easier to build a fresh modern VM with 3.4.8, import the SQL data (and media files) from the 2.11.12 instance, and then run |
Beta Was this translation helpful? Give feedback.
-
You may find it's easier to build a fresh modern VM with 3.4.8, import the SQL data (and media files) from the 2.11.12 instance, and then run ./upgrade.sh to complete the upgrade of the database.
It is possible to get Netbox 3.4.8 running cleanly on EL7 but you'll need the rh-python-python38 and rh-redis5-redis packages from SCL in addition to upgrading PostgreSQL (which may require a dump/restore) using postgresql.org packages (or SCL if they exist), but as Brian said, just migrating the DB to a new server and running upgrade.sh there after upgrading to 2.11.12 in-place may be a simpler process since you have to change so much of the underlying dependancies.
Getting the latest pynetbox and Ansible collection running on EL7 with Ansible 2.9 is a problem I haven't yet solved.
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm working to get our very old Netbox instance upgraded from 2.9.11 to 3.4 We're currently running CentOS 7.9 and Postgres 9.6.
Due to the amount of changes between the versions I am upgrading using the git version tags going from one version to the next. After I git pull and checkout the tag for 2.10.10 I run the upgrade script. It gets through some migrations until the extras.0051_migrate_customfields.py script is run.
Here is the error I am getting:
Clearly there is something wrong with one of our custom field values but I cannot determine which one is the problem.
I did find this older thread: #5475
The fix is to add a block to a function that skips invalid custom field values. When I run that it upgrades successfully but it removed all of the values from our custom fields (we use them for automation).
I've dug through the extras_customfieldvalue table in the netbox database but none of the values appears to be assigned to a null or empty object.
Any help would be greatly appreciated at this point because I'm out of ideas at this point.
Beta Was this translation helpful? Give feedback.
All reactions