After deleting a remote user via the controller GUI, the user login fails with "user matching query does not exist" and the user is not created on the controller.
If attempting to create the same user as a local user via the GUI it fails with “User activity with this Name already exists”
Affects Versions: 22.x, 30.x (30.1.x and 30.2.x) and 31.1.x
Fix Version: The fix for this issue will be implemented on the next GA releases of VMware Avi Load Balancer 31.2.1
Workaround:
Steps to delete the useractivity object via manage.py
admin@:~$ sudo -i
[sudo] password for admin:
root@:~#python3 /opt/avi/python/bin/portal/manage.py shell
In [1]: username = “example-username” ---> #Deleted Remote User Name
In [2]: from permission.models import User
In [3]: from api.models import UserActivity
In [4]: user_obj = User.objects.get(name=username)
In [5]: user_activity_obj = UserActivity.objects.get(name=username)
In [6]: user_activity_obj.protobuf()
In [7]: user_activity_obj.delete()
In [8]: quit()
If you encounter this issue in your system and not able to execute the given workaround to the fix the issue, please contact technical support for assistance.