Inconsistent management_ip auto-clear behavior on offline devices

7 views
Skip to first unread message

Manu Kumar

unread,
Jul 23, 2026, 2:40:44 AM (9 days ago) Jul 23
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
Reply all
Reply to author
Forward
0 new messages