sureshanaparti commented on issue #8703:
URL: https://github.com/apache/cloudstack/issues/8703#issuecomment-1966067518

   > > oh, and as user-data is a first class citizen now we should have a 
column like that. @adidiborg adding that column could solve your issue, Did you 
try that?
   > 
   > @DaanHoogland / @weizhouapache , no I haven't. I'm new to using Cloudstack 
and haven't touched its mysql DB entries yet. Can you please share SQL commands 
that would allow to delete User data? Thanks
   
   @adidiborg Follow the steps listed (assuming user data id = 1, based on the 
screenshot added)
   - Check/Confirm there are no templates with the user data - empty result for 
the sql below.
      `SELECT id, name, user_data_id, user_data_link_policy FROM 
cloud.vm_template WHERE user_data_id = 1 AND removed IS NULL;`
   - If no templates, update user_data_id to NULL, in vm_template table - use 
update sql below.
      `UPDATE cloud.vm_template SET user_data_id = NULL, user_data_link_policy 
= NULL WHERE user_data_id = 1 AND removed IS NOT NULL;`
   - Now, Delete the user data from UI, or use delete sql below
      `DELETE FROM cloud.user_data WHERE id = 1;`
      
   Hope this helps.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to