Skip to content

Commit

Permalink
Fix broken navoidverify on Linux
Browse files Browse the repository at this point in the history
For the same reasons as documented in nav.ipdevpoll.epollreactor2,
navoidverify seems to have stopped working (at least on Linux), due
to incompatibilites between the default epollreactor implementation
and pynetsnmp.

This change installs NAV's epollreactor2 in Twisted before any
of the twisted imports run and install the default reactor.
  • Loading branch information
lunkwill42 committed Nov 14, 2023
1 parent 0388823 commit 5356a3e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/navoidverify
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ NAV-monitored devices.

from __future__ import print_function

import platform
import sys
from itertools import cycle
from argparse import ArgumentParser
Expand All @@ -30,6 +31,11 @@ from nav.bootstrap import bootstrap_django

bootstrap_django(__file__)

if platform.system() == "Linux":
from nav.ipdevpoll.epollreactor2 import install

install()

from nav.ipdevpoll.snmp.common import snmp_parameter_factory, SnmpError
from nav.models.manage import Netbox, ManagementProfile
from nav.ipdevpoll.snmp import snmpprotocol, AgentProxy
Expand Down

0 comments on commit 5356a3e

Please sign in to comment.