Manu Kumar
unread,Jul 23, 2026, 2:40:44 AM (9 days ago) Jul 23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenWISP
Hello team,
I am using the latest version of OpenWISP 2, and I am experiencing an inconsistent behavior regarding how the database handles the "management_ip" column for devices that have been offline/unreachable for several days.
According to the documentation, "OPENWISP_MONITORING_AUTO_CLEAR_MANAGEMENT_IP" defaults to True, which should automatically clear the management_ip field once a device transitions to a FAILED/OFFLINE state.
However, I am seeing two completely different behaviors for devices that have both been unreachable for many days:
1. Device A (Behavior Bug): Has been offline for days. The OpenWISP Monitoring dashboard correctly shows its status, but its "management_ip" (e.g., 10.8.2.223) remains frozen in the database and is never cleared.
2. Device B (Expected Behavior): Went offline and its "management_ip" was successfully cleared automatically (-).
Looking at openwisp-controller/config/controller/views.py, I see that the `_remove_duplicated_management_ip` hook only triggers a clean up if a *different* active device connects and registers a duplicate IP address.
My questions for the forum are:
1. Since OPENWISP_MONITORING_AUTO_CLEAR_MANAGEMENT_IP is True, why would the background worker cleanly wipe the IP for Device B but completely miss Device A, leaving its stale VPN IP in the database indefinitely?
2. Are there specific multi-tenancy organization boundaries or Celery background task conditions that could cause the monitoring auto-clear task to skip certain devices or fail silently?
3. What is the best way to debug or force-run the Celery task responsible for sweeping these stale management IPs?
Any guidance or troubleshooting steps would be greatly appreciated.
Thank you,
Manu