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

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion, visit 
https://groups.google.com/d/msgid/openwisp/20900708-95f9-47ab-a0b7-f71e55bfcb81n%40googlegroups.com.

Reply via email to