Migration of virtualization.0040_convert_disk_size fails with very large value #10351

Closed
opened 2025-12-29 21:30:23 +01:00 by adam · 1 comment
Owner

Originally created by @Kage1 on GitHub (Oct 11, 2024).

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

4.0.10

Python Version

3.10

Steps to Reproduce

  1. Running Netbox 4.0.10
  2. Set Virtual Machine Resources Disk (GB) to an absurdly large value. e.g. 3700000
  3. Value is accepted and record saved
  4. Check release notes and dependences for 4.1.x branch of Netbox
  5. Pull master branch (currently 4.1.3)
  6. Run upgrade.sh against current install
  7. Upgrade runs as expected till migration of virtualization.0040_convert_disk_size which fails with "integer out of range"
  8. Revert VM and set Virtual Machine Resources Disk (GB) to a more normal value. e.g. 3700
  9. Conversion runs as expected

Expected Behavior

If a value is accepted in the GUI then the conversion should be able to handle the value during the migration of the table.

Observed Behavior

Running migrations:
  Applying core.0011_move_objectchange... OK
  Applying extras.0117_move_objectchange... OK
  Applying extras.0118_customfield_uniqueness... OK
  Applying extras.0119_notifications... OK
  Applying circuits.0044_circuit_groups... OK
  Applying core.0012_job_object_type_optional... OK
  Applying extras.0120_eventrule_event_types... OK
  Applying extras.0121_customfield_related_object_filter... OK
  Applying dcim.0188_racktype... OK
  Applying dcim.0189_moduletype_rack_airflow... OK
  Applying dcim.0190_nested_modules... OK
  Applying dcim.0191_module_bay_rebuild... OK
  Applying ipam.0070_vlangroup_vlan_id_ranges... OK
  Applying virtualization.0039_virtualmachine_serial_number... OK
  Applying virtualization.0040_convert_disk_size...Traceback (most recent call last):
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 105, in _execute
    return self.cursor.execute(sql, params)
  File "/opt/netbox/venv/lib/python3.10/site-packages/psycopg/cursor.py", line 97, in execute
    raise ex.with_traceback(None)
psycopg.errors.NumericValueOutOfRange: integer out of range
Originally created by @Kage1 on GitHub (Oct 11, 2024). ### Deployment Type Self-hosted ### Triage priority N/A ### NetBox Version 4.0.10 ### Python Version 3.10 ### Steps to Reproduce 1. Running Netbox 4.0.10 2. Set Virtual Machine Resources Disk (GB) to an absurdly large value. e.g. 3700000 3. Value is accepted and record saved 4. Check release notes and dependences for 4.1.x branch of Netbox 5. Pull master branch (currently 4.1.3) 6. Run upgrade.sh against current install 7. Upgrade runs as expected till migration of virtualization.0040_convert_disk_size which fails with "integer out of range" 8. Revert VM and set Virtual Machine Resources Disk (GB) to a more normal value. e.g. 3700 9. Conversion runs as expected ### Expected Behavior If a value is accepted in the GUI then the conversion should be able to handle the value during the migration of the table. ### Observed Behavior ``` Running migrations: Applying core.0011_move_objectchange... OK Applying extras.0117_move_objectchange... OK Applying extras.0118_customfield_uniqueness... OK Applying extras.0119_notifications... OK Applying circuits.0044_circuit_groups... OK Applying core.0012_job_object_type_optional... OK Applying extras.0120_eventrule_event_types... OK Applying extras.0121_customfield_related_object_filter... OK Applying dcim.0188_racktype... OK Applying dcim.0189_moduletype_rack_airflow... OK Applying dcim.0190_nested_modules... OK Applying dcim.0191_module_bay_rebuild... OK Applying ipam.0070_vlangroup_vlan_id_ranges... OK Applying virtualization.0039_virtualmachine_serial_number... OK Applying virtualization.0040_convert_disk_size...Traceback (most recent call last): File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 105, in _execute return self.cursor.execute(sql, params) File "/opt/netbox/venv/lib/python3.10/site-packages/psycopg/cursor.py", line 97, in execute raise ex.with_traceback(None) psycopg.errors.NumericValueOutOfRange: integer out of range ```
adam added the type: bugseverity: low labels 2025-12-29 21:30:23 +01:00
adam closed this issue 2025-12-29 21:30:23 +01:00
Author
Owner

@arthanson commented on GitHub (Oct 15, 2024):

I'm going to close this as not a bug as the current field can store over 2,000 TB.

@arthanson commented on GitHub (Oct 15, 2024): I'm going to close this as not a bug as the current field can store over 2,000 TB.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10351