1.1.0 On Thu, Sep 8, 2011 at 9:31 AM, Craig White <[email protected]> wrote:
> version? > > On Sep 8, 2011, at 8:22 AM, Justin Lambert wrote: > > > Destroying nodes in puppet dashboard seems to kill dashboard after about > 5 minutes requiring a restart. I took at look at the DB schema and was just > going to remove nodes via SQL directly instead of using the dashboard and > wanted to see if anyone sees anything wrong with this. I know the queries > could be improved not doing my subselects, but I just wanted to make sure > I'm not either forgetting some data or doing something terrible. > > > > > > select id from nodes where name like 'myname%'; > > delete from resource_events where resource_status_id in ( select id from > resource_statuses where report_id in ( select id from reports where node_id > = 71 )); > > delete from resource_statuses where report_id in (select id from reports > where node_id=71); > > delete from metrics where report_id in (select id from reports where > node_id=71); > > delete from report_logs where report_id in (select id from reports where > node_id=71); > > delete from resource_events where resource_status_id in ( select id from > resource_statuses where report_id in ( select id from old_reports where > node_id = 71 )); > > delete from resource_statuses where report_id in (select id from > old_reports where node_id=71); > > delete from metrics where report_id in (select id from old_reports where > node_id=71); > > delete from report_logs where report_id in (select id from old_reports > where node_id=71); > > delete from reports where node_id=71; > > delete from node_group_memberships where node_id=71; > > delete from node_class_memberships where node_id=71; > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
