ipdevpoll multiprocess mode broken in NAV 4.4.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
High
|
Morten Brekkevold |
Bug Description
Attempting to run ipdevpoll in multiprocess mode under NAV 4.4.0 results in tracebacks from each of the spawned worker processes. The processes end up stalled, and no collection takes place.
The traceback looks like this:
2016-01-19 12:37:12,776 [31470] [INFO plugins] Imported 26 plugin classes, 26 classes in plugin registry
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.run()
File "/usr/lib/
self.
--- <exception caught here> ---
File "/usr/lib/
result = context.call(ctx, function, *args, **kwargs)
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
'snmpAgentS
File "/usr/lib/
return self.filter(filtr)
File "/usr/lib/
return getattr(
File "/usr/lib/
return self._filter_
File "/usr/lib/
clone.
File "/usr/lib/
clause, require_inner = self._add_
File "/usr/lib/
current_
File "/usr/lib/
current_
File "/usr/lib/
lookups, parts, reffed_aggregate = self.solve_
File "/usr/lib/
_, field, _, lookup_parts = self.names_
File "/usr/lib/
field, model, direct, m2m = opts.get_
File "/usr/lib/
cache = self.init_
File "/usr/lib/
for f, model in self.get_
File "/usr/lib/
cache = self._fill_
File "/usr/lib/
for klass in self.apps.
File "/usr/lib/
result = user_function(
File "/usr/lib/
self.
File "/usr/lib/
raise AppRegistryNotR
django.
Changed in nav: | |
status: | Fix Committed → Fix Released |
summary: |
- ipdevpoll multiprocess mode broken in NAV 4.0.0 + ipdevpoll multiprocess mode broken in NAV 4.4.0 |
description: | updated |
The nav.models module performs a very naive verification of the DJANGO_ SETTINGS_ MODULE environment variable, only running "django.setup()" if it was unset at module load time.
ipdevpoll, and other binaries in NAV, defer to this module to ensure all the Django models are properly loaded under Django 1.7, and do not perform this check themselves.
The problem here is that the environment variable is already set as the ipdevpoll child processes start (and it could be for any NAV program in a production setup), cause the django.setup() to never be run. This results in the django. core.exceptions .AppRegistryNot Ready exception.