Under some conditions, when a device is deleted from Junos Space, the device entry remains in Security Director. This article provides a workaround.
Device is listed twice in the Security Director Device list.
Device that has been deleted continues to appear in Security Director.
The delete operation does not complete in Security Director under certain conditions when a policy is assigned at the time of delete.
The workaround for all versions where this problem is seen is given below:
Download the script file here .
SCP file to server and unzip:
Example:
unzip CleanupStaleDevices_Oct2020.zip
Run the script:
bash CleanupStaleDevices.sh
Note: The script can be extracted on your computer. Each command inside the script can run on the CLI if copying to a remote system is difficult.
Upgrade to Junos Space 18.3R1 to prevent this from happening. However, it will not correct any bad entries at the time of upgrade.
See PR1356317 for additional details.
2020-10-16: Updated the script file
2020-07-22: Updated steps 2 and 3 in solution.