I use the version tag to checkout the sources (sorry for the French localization):
[marin@www-00 netbox]$ cd /opt/netbox/
[marin@www-00 netbox]$ sudo git checkout tags/v2.11.3
HEAD est maintenant sur c855570b5 Merge pull request #6371 from netbox-community/develop
[marin@www-00 netbox]$ sudo git status
HEAD détachée sur v2.11.3
Fichiers non suivis:
(utilisez "git add <fichier>..." pour inclure dans ce qui sera validé)
logs/
aucune modification ajoutée à la validation mais des fichiers non suivis sont présents (utilisez "git add" pour les suivre)
Here is the output of the upgrade.sh script (no error):
[marin@www-00 netbox]$ sudo bash upgrade.sh
Removing old virtual environment...
Creating a new virtual environment at /opt/netbox/venv...
Updating pip (pip install --upgrade pip)...
Collecting pip
Using cached https://files.pythonhosted.org/packages/cd/6f/43037c7bcc8bd8ba7c9074256b1a11596daa15555808ec748048c1507f08/pip-21.1.1-py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 19.3.1
Uninstalling pip-19.3.1:
Successfully uninstalled pip-19.3.1
Successfully installed pip-21.1.1
pip 21.1.1 from /opt/netbox/venv/lib64/python3.8/site-packages/pip (python 3.8)
Installing Python system packages (pip install wheel)...
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.36.2
Installing core dependencies (pip install -r requirements.txt)...
Collecting Django==3.2.2
Using cached Django-3.2.2-py3-none-any.whl (7.9 MB)
Collecting django-cacheops==6.0
Using cached django_cacheops-6.0-py2.py3-none-any.whl (39 kB)
Collecting django-cors-headers==3.7.0
Using cached django_cors_headers-3.7.0-py3-none-any.whl (12 kB)
Collecting django-debug-toolbar==3.2.1
Using cached django_debug_toolbar-3.2.1-py3-none-any.whl (199 kB)
Collecting django-filter==2.4.0
Using cached django_filter-2.4.0-py3-none-any.whl (73 kB)
Collecting django-mptt==0.12.0
Using cached django_mptt-0.12.0-py2.py3-none-any.whl (111 kB)
Collecting django-pglocks==1.0.4
Using cached django_pglocks-1.0.4-py3-none-any.whl
Collecting django-prometheus==2.1.0
Using cached django_prometheus-2.1.0-py2.py3-none-any.whl (28 kB)
Collecting django-rq==2.4.1
Using cached django_rq-2.4.1-py2.py3-none-any.whl (45 kB)
Collecting django-tables2==2.3.4
Using cached django_tables2-2.3.4-py2.py3-none-any.whl (91 kB)
Collecting django-taggit==1.4.0
Using cached django_taggit-1.4.0-py3-none-any.whl (46 kB)
Collecting django-timezone-field==4.1.2
Using cached django_timezone_field-4.1.2-py3-none-any.whl (9.6 kB)
Collecting djangorestframework==3.12.4
Using cached djangorestframework-3.12.4-py3-none-any.whl (957 kB)
Collecting drf-yasg[validation]==1.20.0
Using cached drf_yasg-1.20.0-py2.py3-none-any.whl (1.6 MB)
Collecting gunicorn==20.1.0
Using cached gunicorn-20.1.0-py3-none-any.whl (79 kB)
Collecting Jinja2==2.11.3
Using cached Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Collecting Markdown==3.3.4
Using cached Markdown-3.3.4-py3-none-any.whl (97 kB)
Collecting netaddr==0.8.0
Using cached netaddr-0.8.0-py2.py3-none-any.whl (1.9 MB)
Collecting Pillow==8.2.0
Using cached Pillow-8.2.0-cp38-cp38-manylinux1_x86_64.whl (3.0 MB)
Collecting psycopg2-binary==2.8.6
Using cached psycopg2_binary-2.8.6-cp38-cp38-manylinux1_x86_64.whl (3.0 MB)
Collecting pycryptodome==3.10.1
Using cached pycryptodome-3.10.1-cp35-abi3-manylinux2010_x86_64.whl (1.9 MB)
Collecting PyYAML==5.4.1
Using cached PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl (662 kB)
Collecting svgwrite==1.4.1
Using cached svgwrite-1.4.1-py3-none-any.whl (66 kB)
Collecting tablib==3.0.0
Using cached tablib-3.0.0-py3-none-any.whl (47 kB)
Collecting pytz
Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting sqlparse>=0.2.2
Using cached sqlparse-0.4.1-py3-none-any.whl (42 kB)
Collecting asgiref<4,>=3.3.2
Using cached asgiref-3.3.4-py3-none-any.whl (22 kB)
Collecting six>=1.4.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting redis>=3.0.0
Using cached redis-3.5.3-py2.py3-none-any.whl (72 kB)
Collecting funcy<2.0,>=1.8
Using cached funcy-1.15-py2.py3-none-any.whl (32 kB)
Collecting django-js-asset
Using cached django_js_asset-1.2.2-py2.py3-none-any.whl (5.8 kB)
Collecting prometheus-client>=0.7
Using cached prometheus_client-0.10.1-py2.py3-none-any.whl (55 kB)
Collecting rq>=1.2
Using cached rq-1.8.0-py2.py3-none-any.whl (64 kB)
Requirement already satisfied: setuptools>=3.0 in ./venv/lib/python3.8/site-packages (from gunicorn==20.1.0->-r requirements.txt (line 15)) (41.6.0)
Collecting MarkupSafe>=0.23
Using cached MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl (32 kB)
Collecting inflection>=0.3.1
Using cached inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
Collecting coreschema>=0.0.4
Using cached coreschema-0.0.4-py3-none-any.whl
Collecting uritemplate>=3.0.0
Using cached uritemplate-3.0.1-py2.py3-none-any.whl (15 kB)
Collecting ruamel.yaml>=0.15.34
Using cached ruamel.yaml-0.17.4-py3-none-any.whl (101 kB)
Collecting packaging
Using cached packaging-20.9-py2.py3-none-any.whl (40 kB)
Collecting coreapi>=2.3.3
Using cached coreapi-2.3.3-py2.py3-none-any.whl (25 kB)
Collecting swagger-spec-validator>=2.1.0
Using cached swagger_spec_validator-2.7.3-py2.py3-none-any.whl (27 kB)
Collecting itypes
Using cached itypes-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting requests
Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting click>=5.0.0
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting ruamel.yaml.clib>=0.1.2
Using cached ruamel.yaml.clib-0.2.2-cp38-cp38-manylinux1_x86_64.whl (578 kB)
Collecting jsonschema
Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Collecting pyrsistent>=0.14.0
Using cached pyrsistent-0.17.3-cp38-cp38-linux_x86_64.whl
Collecting attrs>=17.4.0
Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting pyparsing>=2.0.2
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting chardet<5,>=3.0.2
Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting idna<3,>=2.5
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
Installing collected packages: MarkupSafe, urllib3, sqlparse, pytz, Jinja2, idna, chardet, certifi, asgiref, uritemplate, six, ruamel.yaml.clib, requests, pyrsistent, pyparsing, itypes, Django, coreschema, attrs, ruamel.yaml, redis, PyYAML, packaging, jsonschema, inflection, djangorestframework, coreapi, click, swagger-spec-validator, rq, prometheus-client, funcy, drf-yasg, django-js-asset, tablib, svgwrite, pycryptodome, psycopg2-binary, Pillow, netaddr, Markdown, gunicorn, django-timezone-field, django-taggit, django-tables2, django-rq, django-prometheus, django-pglocks, django-mptt, django-filter, django-debug-toolbar, django-cors-headers, django-cacheops
Successfully installed Django-3.2.2 Jinja2-2.11.3 Markdown-3.3.4 MarkupSafe-1.1.1 Pillow-8.2.0 PyYAML-5.4.1 asgiref-3.3.4 attrs-21.2.0 certifi-2020.12.5 chardet-4.0.0 click-7.1.2 coreapi-2.3.3 coreschema-0.0.4 django-cacheops-6.0 django-cors-headers-3.7.0 django-debug-toolbar-3.2.1 django-filter-2.4.0 django-js-asset-1.2.2 django-mptt-0.12.0 django-pglocks-1.0.4 django-prometheus-2.1.0 django-rq-2.4.1 django-tables2-2.3.4 django-taggit-1.4.0 django-timezone-field-4.1.2 djangorestframework-3.12.4 drf-yasg-1.20.0 funcy-1.15 gunicorn-20.1.0 idna-2.10 inflection-0.5.1 itypes-1.2.0 jsonschema-3.2.0 netaddr-0.8.0 packaging-20.9 prometheus-client-0.10.1 psycopg2-binary-2.8.6 pycryptodome-3.10.1 pyparsing-2.4.7 pyrsistent-0.17.3 pytz-2021.1 redis-3.5.3 requests-2.25.1 rq-1.8.0 ruamel.yaml-0.17.4 ruamel.yaml.clib-0.2.2 six-1.16.0 sqlparse-0.4.1 svgwrite-1.4.1 swagger-spec-validator-2.7.3 tablib-3.0.0 uritemplate-3.0.1 urllib3-1.26.4
Installing local dependencies (pip install -r local_requirements.txt)...
Collecting napalm
Using cached napalm-3.2.0-py2.py3-none-any.whl (230 kB)
Collecting django-auth-ldap
Using cached django_auth_ldap-2.4.0-py3-none-any.whl (20 kB)
Collecting junos-eznc>=2.2.1
Using cached junos_eznc-2.6.0-py2.py3-none-any.whl (195 kB)
Requirement already satisfied: jinja2 in ./venv/lib/python3.8/site-packages (from napalm->-r local_requirements.txt (line 1)) (2.11.3)
Collecting scp
Using cached scp-0.13.3-py2.py3-none-any.whl (8.2 kB)
Requirement already satisfied: setuptools>=38.4.0 in ./venv/lib/python3.8/site-packages (from napalm->-r local_requirements.txt (line 1)) (41.6.0)
Collecting textfsm
Using cached textfsm-1.1.0-py2.py3-none-any.whl (37 kB)
Requirement already satisfied: netaddr in ./venv/lib/python3.8/site-packages (from napalm->-r local_requirements.txt (line 1)) (0.8.0)
Requirement already satisfied: pyYAML in ./venv/lib/python3.8/site-packages (from napalm->-r local_requirements.txt (line 1)) (5.4.1)
Requirement already satisfied: requests>=2.7.0 in ./venv/lib/python3.8/site-packages (from napalm->-r local_requirements.txt (line 1)) (2.25.1)
Collecting netmiko>=3.1.0
Using cached netmiko-3.4.0-py3-none-any.whl (178 kB)
Collecting paramiko>=2.6.0
Using cached paramiko-2.7.2-py2.py3-none-any.whl (206 kB)
Collecting ciscoconfparse
Using cached ciscoconfparse-1.5.30-py3-none-any.whl (94 kB)
Collecting future
Using cached future-0.18.2-py3-none-any.whl
Collecting pyeapi>=0.8.2
Using cached pyeapi-0.8.4-py3-none-any.whl
Collecting cffi>=1.11.3
Using cached cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl (411 kB)
Collecting lxml>=4.3.0
Using cached lxml-4.6.3-cp38-cp38-manylinux2014_x86_64.whl (6.8 MB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Requirement already satisfied: six in ./venv/lib/python3.8/site-packages (from junos-eznc>=2.2.1->napalm->-r local_requirements.txt (line 1)) (1.16.0)
Collecting pyserial
Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting ncclient==0.6.9
Using cached ncclient-0.6.9-py2.py3-none-any.whl
Requirement already satisfied: pyparsing in ./venv/lib/python3.8/site-packages (from junos-eznc>=2.2.1->napalm->-r local_requirements.txt (line 1)) (2.4.7)
Collecting yamlordereddictloader
Using cached yamlordereddictloader-0.4.0-py3-none-any.whl
Collecting transitions
Using cached transitions-0.8.8-py2.py3-none-any.whl (82 kB)
Requirement already satisfied: MarkupSafe>=0.23 in ./venv/lib/python3.8/site-packages (from jinja2->napalm->-r local_requirements.txt (line 1)) (1.1.1)
Collecting tenacity
Using cached tenacity-7.0.0-py2.py3-none-any.whl (23 kB)
Collecting ntc-templates
Using cached ntc_templates-2.0.0-py3-none-any.whl (280 kB)
Collecting cryptography>=2.5
Using cached cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl (3.2 MB)
Collecting bcrypt>=3.1.3
Using cached bcrypt-3.2.0-cp36-abi3-manylinux2010_x86_64.whl (63 kB)
Collecting pynacl>=1.0.1
Using cached PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl (961 kB)
Requirement already satisfied: idna<3,>=2.5 in ./venv/lib/python3.8/site-packages (from requests>=2.7.0->napalm->-r local_requirements.txt (line 1)) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.8/site-packages (from requests>=2.7.0->napalm->-r local_requirements.txt (line 1)) (2020.12.5)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./venv/lib/python3.8/site-packages (from requests>=2.7.0->napalm->-r local_requirements.txt (line 1)) (1.26.4)
Requirement already satisfied: chardet<5,>=3.0.2 in ./venv/lib/python3.8/site-packages (from requests>=2.7.0->napalm->-r local_requirements.txt (line 1)) (4.0.0)
Collecting python-ldap>=3.1
Using cached python_ldap-3.3.1-cp38-cp38-linux_x86_64.whl
Requirement already satisfied: Django>=2.2 in ./venv/lib/python3.8/site-packages (from django-auth-ldap->-r local_requirements.txt (line 2)) (3.2.2)
Requirement already satisfied: pytz in ./venv/lib/python3.8/site-packages (from Django>=2.2->django-auth-ldap->-r local_requirements.txt (line 2)) (2021.1)
Requirement already satisfied: sqlparse>=0.2.2 in ./venv/lib/python3.8/site-packages (from Django>=2.2->django-auth-ldap->-r local_requirements.txt (line 2)) (0.4.1)
Requirement already satisfied: asgiref<4,>=3.3.2 in ./venv/lib/python3.8/site-packages (from Django>=2.2->django-auth-ldap->-r local_requirements.txt (line 2)) (3.3.4)
Collecting pyasn1>=0.3.7
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting pyasn1-modules>=0.1.5
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting passlib
Using cached passlib-1.7.4-py2.py3-none-any.whl (525 kB)
Collecting colorama
Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting dnspython
Using cached dnspython-2.1.0-py3-none-any.whl (241 kB)
Installing collected packages: pycparser, cffi, pynacl, future, cryptography, bcrypt, textfsm, pyasn1, paramiko, lxml, yamlordereddictloader, transitions, tenacity, scp, pyserial, pyasn1-modules, passlib, ntc-templates, ncclient, dnspython, colorama, python-ldap, pyeapi, netmiko, junos-eznc, ciscoconfparse, napalm, django-auth-ldap
Successfully installed bcrypt-3.2.0 cffi-1.14.5 ciscoconfparse-1.5.30 colorama-0.4.4 cryptography-3.4.7 django-auth-ldap-2.4.0 dnspython-2.1.0 future-0.18.2 junos-eznc-2.6.0 lxml-4.6.3 napalm-3.2.0 ncclient-0.6.9 netmiko-3.4.0 ntc-templates-2.0.0 paramiko-2.7.2 passlib-1.7.4 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.20 pyeapi-0.8.4 pynacl-1.4.0 pyserial-3.5 python-ldap-3.3.1 scp-0.13.3 tenacity-7.0.0 textfsm-1.1.0 transitions-0.8.8 yamlordereddictloader-0.4.0
Applying database migrations (python3 netbox/manage.py migrate)...
Operations to perform:
Apply all migrations: admin, auth, circuits, contenttypes, dcim, extras, ipam, secrets, sessions, taggit, tenancy, users, virtualization
Running migrations:
No migrations to apply.
Checking for missing cable paths (python3 netbox/manage.py trace_paths --no-input)...
Found no missing console port paths; skipping
Found no missing console server port paths; skipping
Found no missing interface paths; skipping
Found no missing power feed paths; skipping
Found no missing power outlet paths; skipping
Found no missing power port paths; skipping
Finished.
Collecting static files (python3 netbox/manage.py collectstatic --no-input)...
202 static files copied to '/opt/netbox/netbox/static', 755 unmodified.
Removing stale content types (python3 netbox/manage.py remove_stale_contenttypes --no-input)...
Removing expired user sessions (python3 netbox/manage.py clearsessions)...
Clearing cache data (python3 netbox/manage.py invalidate all)...
Upgrade complete! Don't forget to restart the NetBox services:
> sudo systemctl restart netbox netbox-rq
My local requirements:
[marin@www-00 netbox]$ cat local_requirements.txt
napalm
django-auth-ldap
And the venv package list:
(venv) [marin@www-00 netbox]$ pip list
Package Version
---------------------- ---------
asgiref 3.3.4
attrs 21.2.0
bcrypt 3.2.0
certifi 2020.12.5
cffi 1.14.5
chardet 4.0.0
ciscoconfparse 1.5.30
click 7.1.2
colorama 0.4.4
coreapi 2.3.3
coreschema 0.0.4
cryptography 3.4.7
Django 3.2.2
django-auth-ldap 2.4.0
django-cacheops 6.0
django-cors-headers 3.7.0
django-debug-toolbar 3.2.1
django-filter 2.4.0
django-js-asset 1.2.2
django-mptt 0.12.0
django-pglocks 1.0.4
django-prometheus 2.1.0
django-rq 2.4.1
django-tables2 2.3.4
django-taggit 1.4.0
django-timezone-field 4.1.2
djangorestframework 3.12.4
dnspython 2.1.0
drf-yasg 1.20.0
funcy 1.15
future 0.18.2
gunicorn 20.1.0
idna 2.10
inflection 0.5.1
itypes 1.2.0
Jinja2 2.11.3
jsonschema 3.2.0
junos-eznc 2.6.0
lxml 4.6.3
Markdown 3.3.4
MarkupSafe 1.1.1
napalm 3.2.0
ncclient 0.6.9
netaddr 0.8.0
netmiko 3.4.0
ntc-templates 2.0.0
packaging 20.9
paramiko 2.7.2
passlib 1.7.4
Pillow 8.2.0
pip 21.1.1
prometheus-client 0.10.1
psycopg2-binary 2.8.6
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.20
pycryptodome 3.10.1
pyeapi 0.8.4
PyNaCl 1.4.0
pyparsing 2.4.7
pyrsistent 0.17.3
pyserial 3.5
python-ldap 3.3.1
pytz 2021.1
PyYAML 5.4.1
redis 3.5.3
requests 2.25.1
rq 1.8.0
ruamel.yaml 0.17.4
ruamel.yaml.clib 0.2.2
scp 0.13.3
setuptools 41.6.0
six 1.16.0
sqlparse 0.4.1
svgwrite 1.4.1
swagger-spec-validator 2.7.3
tablib 3.0.0
tenacity 7.0.0
textfsm 1.1.0
transitions 0.8.8
uritemplate 3.0.1
urllib3 1.26.4
wheel 0.36.2
yamlordereddictloader 0.4.0
If we ignore packages coming from our local requirements, all packages have the same version except setuptools (mine is more recent). That's very strange!