NetBox v2.8.0 Released

276 views
Skip to first unread message

Jeremy Stretch

unread,
Apr 13, 2020, 11:33:29 AM4/13/20
to NetBox

New Features (Beta)

This release introduces two new features in beta status. While they are expected to be functional, their precise implementation is subject to change during the v2.8 release cycle. It is recommended to wait until NetBox v2.9 to deploy them in production.

Remote Authentication Support (#2328)

Several new configuration parameters provide support for authenticating an incoming request based on the value of a specific HTTP header. This can be leveraged to employ remote authentication via an nginx or Apache plugin, directing NetBox to create and configure a local user account as needed. The configuration parameters are:

  • REMOTE_AUTH_ENABLED - Enables remote authentication (disabled by default)
  • REMOTE_AUTH_HEADER - The name of the HTTP header which conveys the username
  • REMOTE_AUTH_AUTO_CREATE_USER - Enables the automatic creation of new users (disabled by default)
  • REMOTE_AUTH_DEFAULT_GROUPS - A list of groups to assign newly created users
  • REMOTE_AUTH_DEFAULT_PERMISSIONS - A list of permissions to assign newly created users

If further customization of remote authentication is desired (for instance, if you want to pass group/permission information via HTTP headers as well), NetBox allows you to inject a custom Django authentication backend to retain full control over the authentication and configuration of remote users.

Plugins (#3351)

This release introduces support for custom plugins, which can be used to extend NetBox's functionality beyond what the core product provides. For example, plugins can be used to:

  • Add new Django models
  • Provide new views with custom templates
  • Inject custom template into object views
  • Introduce new API endpoints
  • Add custom request/response middleware

For NetBox plugins to be recognized, they must be installed and added by name to the PLUGINS configuration parameter. (Plugin support is disabled by default.) Plugins can be configured under the PLUGINS_CONFIG parameter. More information can be found the in the plugins documentation.

Enhancements

  • #1754 - Added support for nested rack groups
  • #3939 - Added support for nested tenant groups
  • #4078 - Standardized description fields across all models
  • #4195 - Enabled application logging (see logging configuration)

Bug Fixes

  • #4474 - Fix population of device types when bulk editing devices
  • #4476 - Correct typo in slugs for Infiniband interface types

API Changes

  • The _choices API endpoints have been removed. Instead, use an OPTIONS request to a model's endpoint to view the available values for all fields. (#3416)
  • The id__in filter has been removed from all models (#4313). Use the format ?id=1&id=2 instead.
  • dcim.Manufacturer: Added a description field
  • dcim.Platform: Added a description field
  • dcim.Rack: The /api/dcim/racks/<pk>/units/ endpoint has been replaced with /api/dcim/racks/<pk>/elevation/.
  • dcim.RackGroup: Added a description field
  • dcim.Region: Added a description field
  • extras.Tag: Renamed comments to description; truncated length to 200 characters; removed Markdown rendering
  • ipam.RIR: Added a description field
  • ipam.VLANGroup: Added a description field
  • tenancy.TenantGroup: Added a description field
  • virtualization.ClusterGroup: Added a description field
  • virtualization.ClusterType: Added a description field

Other Changes

  • #4081 - The family field has been removed from the Aggregate, Prefix, and IPAddress models. The field remains available in the API representations of these models, however the column has been removed from the database table.

--
Jeremy Stretch
Sr. Network Automation Engineer
Network to Code, LLC

Brian Candler

unread,
Apr 13, 2020, 12:01:18 PM4/13/20
to NetBox
Please note well: you MUST have python 3.6+ for this upgrade.

I did an upgrade under Ubuntu 16.04 (which has python 3.5), and I get a syntax error on upgrade.  It took me a while to realise the problem.  Netbox 2.7 used to give a warning that python 3.6 would be required for future versions - but if it still has this warning, it's not early enough now.

Regards,

Brian.


Applying database migrations (python3 netbox/manage.py migrate)...
Traceback (most recent call last):
  File "netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/opt/netbox/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 345, in execute
    settings.INSTALLED_APPS
  File "/opt/netbox/venv/lib/python3.5/site-packages/django/conf/__init__.py", line 76, in __getattr__
    self._setup(name)
  File "/opt/netbox/venv/lib/python3.5/site-packages/django/conf/__init__.py", line 63, in _setup
    self._wrapped = Settings(settings_module)
  File "/opt/netbox/venv/lib/python3.5/site-packages/django/conf/__init__.py", line 142, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 661, in exec_module
  File "<frozen importlib._bootstrap_external>", line 767, in get_code
  File "<frozen importlib._bootstrap_external>", line 727, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/opt/netbox/netbox/netbox/settings.py", line 647
    f"Unable to import plugin {plugin_name}: Module not found. Check that the plugin module has been "
                                                                                                     ^
SyntaxError: invalid syntax

Jeremy Stretch

unread,
Apr 13, 2020, 1:17:19 PM4/13/20
to Brian Candler, NetBox
Ironically, we do specifically check for a minimum Python version in settings.py and raise a RuntimeError exception if it's not compatible. However, the use of format strings elsewhere in the same file is preventing compilation under Python 3.5, so the check never runs.

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/6fdc66db-1c64-4103-9880-842588777fcd%40googlegroups.com.

Brian Candler

unread,
Apr 14, 2020, 5:02:19 AM4/14/20
to NetBox
I notice some commits making settings.py run again, and also adding notes that python 3.6 is required - cool.

Please could this note also be published at https://github.com/netbox-community/netbox/releases/tag/v2.8.0 ?

Chris Murrell

unread,
Apr 15, 2020, 8:47:16 AM4/15/20
to NetBox
Hello,

I have tried to upgrade from 2.7.11 to 2.8 using option be and says completed but still says 2.7.11 in the footer, how do i know if its actuallt been updated?

Brian Candler

unread,
Apr 15, 2020, 8:49:14 AM4/15/20
to NetBox
I don't know what "option be" means, but I have upgraded two systems to 2.8.0 and they both say 2.8.0 in the footer.

Did you remember to restart netbox?

Chris Murrell

unread,
Apr 15, 2020, 8:56:46 AM4/15/20
to NetBox
Yes.


so the following

# cd /opt/netbox
# git checkout master
# git pull origin master
# git status

./upgrade.sh

Chris Murrell

unread,
Apr 15, 2020, 9:06:59 AM4/15/20
to NetBox
Got it working, needed to do "git stash"


On Monday, 13 April 2020 16:33:29 UTC+1, Jeremy Stretch wrote:

Brian Candler

unread,
Apr 15, 2020, 9:32:29 AM4/15/20
to NetBox
On Wednesday, 15 April 2020 14:06:59 UTC+1, Chris Murrell wrote:
Got it working, needed to do "git stash"


Did you get an error on the "git pull" stage, because you'd made a local modification? Then yes:

git stash
git pull
git stash apply

Luis Gonzalez

unread,
Apr 24, 2020, 6:34:57 AM4/24/20
to NetBox
Hi.

I have the following error when trying to update

error: pathspec 'master' did not match any file(s) known to git.

Could you tell me the problem?

Thank you,
Reply all
Reply to author
Forward
0 new messages