Upgrade procedure failed #1183

Closed
opened 2025-12-29 16:29:50 +01:00 by adam · 1 comment
Owner

Originally created by @xine32 on GitHub (Aug 19, 2017).

Hi !

I newbie with Netbox as well with Linux.... :(

I'm responsible to upgrade our netbox installation from 1.9.1 to the latest on request a clone of our current production Netbox installation. So I will be able safely play with it before going it the real production installation.

My target would in 2 separates step :

     1- upgrade to the latest available version
     2- I seen somewhere that is possible to run Netbox within a cluster configuration (so it will be final target to have redundant copy of our netbox documentation in case our main site is unavailable)

So for the upgrade process I found procedure : https://netbox.readthedocs.io/en/stable/installation/upgrading/

My current installation has been completed by someone who left the company. I understand that he has install the netbox in /opt/netbox instead of /opt/netbox-version number, and use softlink to manage the service after as suggested.

So after the extraction of "netbox-2.1.3.tar.gz" in folder "/opt" I have 2 sub folders :
"/opt/netbox"
"/opt/netbox-2-1.3"

But If I understand properly it was expected to have, as a default installation :
"/opt/netbox-1-9.1"
"/opt/netbox-2-1.3"

So that's I didn't undersood the softlink needs to be define at the beginging which was should be "ln -sf netbox-2.1.3/ netbox" form folder /opt.

And the next was suppose to be :
cp /opt/netbox-1.9.1/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/configuration.py

cp /opt/netbox-1.9.1/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/configuration.py

But my case since the standard initial did not been followe it should be :
cp /opt/netbox/netbox/netbox/configuration.py /opt/netbox2-1.3/netbox/netbox/configuration.py
cp /opt/netbox/netbox/netbox/configuration.py /opt/netbox2-1.3/netbox/netbox/configuration.py

The upgrade.sh should be run (my case) from /opt/netbox-2-1.3 folder as ./upgrade.sh (I make sure python 3 is installed, but is not set as a default python interpreter)

But after I restarted WSGI service I still getting version number 1.9.1 when I'm connected to the web page.

So as a test I stop the service again and simply try to rename /opt/netbox to /opt/netbox.old and rename /opt/netbox-2.1.3 to /opt/netbox
but the service failed to start

also if it I try to correct the installation procedure for future and left the /opt/netbox-2.1.3 as is and create softlink as describe at the beginning of this procedure by using command : "ln -sf netbox-2.1.3/ netbox" the service still failed to start.

What can I do to achieve my first target of this task and also if possible make the installation more standard for easier future would be great without reinstall everything.

Also as my second target task, I would like to know if servers member of the cluster can be reside in different site location in different IP subnet which their own copy of the database. I would like to make sure Netbox database be always available even if the site of the netbox current copy goes unavailable. In case the main is an available is the other copy of the netbox database can be set temporally in and Read/write mode for the time the main can be put online back after what the main copy should be return to the original site location.

Thank you !

Originally created by @xine32 on GitHub (Aug 19, 2017). Hi ! I newbie with Netbox as well with Linux.... :( I'm responsible to upgrade our netbox installation from 1.9.1 to the latest on request a clone of our current production Netbox installation. So I will be able safely play with it before going it the real production installation. My target would in 2 separates step : 1- upgrade to the latest available version 2- I seen somewhere that is possible to run Netbox within a cluster configuration (so it will be final target to have redundant copy of our netbox documentation in case our main site is unavailable) So for the upgrade process I found procedure : https://netbox.readthedocs.io/en/stable/installation/upgrading/ My current installation has been completed by someone who left the company. I understand that he has install the netbox in /opt/netbox instead of /opt/netbox-version number, and use softlink to manage the service after as suggested. So after the extraction of "netbox-2.1.3.tar.gz" in folder "/opt" I have 2 sub folders : "/opt/netbox" "/opt/netbox-2-1.3" But If I understand properly it was expected to have, as a default installation : "/opt/netbox-1-9.1" "/opt/netbox-2-1.3" So that's I didn't undersood the softlink needs to be define at the beginging which was should be "ln -sf netbox-2.1.3/ netbox" form folder /opt. And the next was suppose to be : cp /opt/netbox-1.9.1/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/configuration.py cp /opt/netbox-1.9.1/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/configuration.py But my case since the standard initial did not been followe it should be : cp /opt/netbox/netbox/netbox/configuration.py /opt/netbox2-1.3/netbox/netbox/configuration.py cp /opt/netbox/netbox/netbox/configuration.py /opt/netbox2-1.3/netbox/netbox/configuration.py The upgrade.sh should be run (my case) from /opt/netbox-2-1.3 folder as ./upgrade.sh (I make sure python 3 is installed, but is not set as a default python interpreter) But after I restarted WSGI service I still getting version number 1.9.1 when I'm connected to the web page. So as a test I stop the service again and simply try to rename /opt/netbox to /opt/netbox.old and rename /opt/netbox-2.1.3 to /opt/netbox but the service failed to start also if it I try to correct the installation procedure for future and left the /opt/netbox-2.1.3 as is and create softlink as describe at the beginning of this procedure by using command : "ln -sf netbox-2.1.3/ netbox" the service still failed to start. What can I do to achieve my first target of this task and also if possible make the installation more standard for easier future would be great without reinstall everything. Also as my second target task, I would like to know if servers member of the cluster can be reside in different site location in different IP subnet which their own copy of the database. I would like to make sure Netbox database be always available even if the site of the netbox current copy goes unavailable. In case the main is an available is the other copy of the netbox database can be set temporally in and Read/write mode for the time the main can be put online back after what the main copy should be return to the original site location. Thank you !
adam closed this issue 2025-12-29 16:29:50 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 21, 2017):

Thank you for your interest in NetBox. GitHub issues are intended for reporting bugs and requesting features, and must be submitted using the template provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list.

@jeremystretch commented on GitHub (Aug 21, 2017): Thank you for your interest in NetBox. GitHub issues are intended for reporting bugs and requesting features, and must be submitted using the template provided [here](https://raw.githubusercontent.com/digitalocean/netbox/develop/.github/ISSUE_TEMPLATE.md). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1183