Questions about organization visibility, deletion, and data source cleanup
Hi Hystax team,
I have a few questions regarding OptScale functionality:
-
Is it possible to have a root-level user that can view all organizations?
I’d like to know if there is a super admin role or a way to have full visibility across all organizations. -
Is it possible to delete an organization?
I couldn’t find any API or UI documentation on deleting an organization. If it’s possible, could you share how? -
After deleting a data source, is it possible to remove it completely from the MariaDB database?
I’d like to ensure that unused or deleted data sources are fully cleaned up from the system.
Thanks in advance for your support!
Hello @vgarcia-lessthanthree
- Unfortunately, there is no such user.
- Yes, sure. Please go to Settings, to the Organization tab, and Delete (attached scr.)
- Unfortunately, there is no such functionality.
Thanks. Points 1 and 2 understood.
But can you help me with point 3?
From the graphical interface, I can delete the organizations and cloud accounts, but by checking the database in MariaDB, they appear.
How can I know from MariaDB (or another pod) that these organizations or cloud accounts have been deleted?
Is there a cleanup command that can do this?
Dear @vgarcia-lessthanthree
- You can determine that records have been deleted by the deleted_at field in the database. Deleted records have a deletion timestamp, while those that were not deleted have 0.
- Unfortunately, we do not have a command dedicated to cleaning up deleted cloud accounts and organizations from MariaDB.
The deletion timestamp is not working properly, I have deleted several organizations and none of them have inserted the deletion timestamp into the database.
@vgarcia-lessthanthree On our test bench, all deleted cloud accounts and organizations have a deletion timestamp. Could you please provide a screenshot? Please also describe how you delete organizations.
The error occurs when I delete a user I invited. So the organization remains undeleted.
How can I delete those organizations? And how can I delete users who haven't been invited?
@vgarcia-lessthanthree Could you describe step by step your actions when deleting a user and the places where you encounter errors? Preferably with screenshots.
@VR-Hystax the steps.
Step 1: I invite a user named "prueba"
Step 2: When you log in with the guest user, an organization named "prueba" is automatically created.
Step 3: I delete the guest user
Step 4: After deleting the user, the "prueba" organization remains in the database.
Hello @vgarcia-lessthanthree Thank you for the information provided. This is the expected behavior, because when you logged in first time as the user "prueba", the organization "prueba" was automatically created (in which the user "prueba" is the organization's manager). When you invite "prueba" to other organizations and give him the role of organization manager, the organization "prueba" still exists in the database, and removing the user "prueba" from other organizations does not affect the organization "prueba". This organization is still stored in the database because the user "prueba" did not have an organization before the first login.
Understood, but when I select a user in the "select a new user that will take over all the assets of prueba" checkbox, that user doesn't inherit the test assets.
And on the other hand, just to be clear:
Is there any way to delete a user or that user's organization?
Hello @vgarcia-lessthanthree When you select a user in the "select a new user that will take over all the assets of prueba" checkbox, it means that you assign all the resources that were under the control of the user "prueba" to the Organization manager of that organization. Could you explain what test assets mean? There are two possible solutions to delete a user's organization:
- log in under that user and delete the organization:
2. use swagger:
https://<your_cluster_ip>/restapi/v2/swagger/spec.html#/
Delete /restapi/v2/organizations/{id}
To delete a user, use this swagger: https://staging.optscale.com/auth/v2/swagger/spec.html#/ Delete /auth/v2/users/{user_id}
ok. Thanks