Upgrading Netbox from 2.8.4 to 2.9

132 views
Skip to first unread message

Nicholas Bentley

unread,
Nov 28, 2021, 8:48:25 PM11/28/21
to NetBox
Hi Guys,

Love Netbox but struggling to go through the upgrade process.

I've currently deployed a version in our dev environment trying to get it upgraded to 2.9 first and been following the steps to get it upgraded but running into a number of issues and was wondering if anybody could provide advice.

1. Copied all configuration data from /opt/netbox to /opt/netbox-2.9.0
Since the current deployment is in /op/netbox I figured it would be easier just specifying which version I'll be upgrading too as I want to upgrade to v3.0 eventually and will take a while. Followed the below guide mainly.


2. Added cryptography<3.4 to local_requirements.txt
This I had to do cause during the upgrade I would get about my version of cryptography not being up to date. Adding this in has helped a lot.

3. After the upgrade I can't seem to start the netbox service.

● netbox.service - NetBox WSGI Service
   Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2021-11-29 12:43:19 AEDT; 25s ago
  Process: 18882 ExecStart=/opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi (code=exited, status=1/FAILURE)

I can see it referencing the old /opt/netbox location rather than the /opt/netbox-v2.9.0 which I was hoping it would reference.

What would be the next steps to troubleshoot this further?

Cheers,

Nick

Brian Candler

unread,
Nov 29, 2021, 4:13:56 AM11/29/21
to NetBox
I am presuming you originally installed netbox as a zip/tar release (option A) rather than git (option B)?

If so, /opt/netbox will be a symlink to the original version, e.g. /opt/netbox -> /opt/netbox-2.8.4
and you need to update this to point to the newly downloaded release.

That step is show here:

wget https://github.com/netbox-community/netbox/archive/vX.Y.Z.tar.gz sudo tar -xzf vX.Y.Z.tar.gz -C /opt sudo ln -sfn /opt/netbox-X.Y.Z/ /opt/netbox # <<<< NOTE

Did you omit that step?  If there was an error, you can't just ignore it.

Otherwise: if Netbox was originally installed from git, then you need to follow the git upgrade instructions (option B).

If you don't know which option, check for the existence of a hidden directory /opt/netbox/.git - if it's present, option B was used.
Reply all
Reply to author
Forward
0 new messages