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; jl -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
1.1.0 On Thu, Sep 8, 2011 at 9:31 AM, Craig White <craig.white@ttiltd.com> 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 puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > 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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I was able to destroy nodes on 1.2.1 rc4 without having to restart dashboard/passenger - don''t know about 1.1.0 though Craig On Sep 8, 2011, at 9:25 AM, Justin Lambert wrote:> 1.1.0 > > On Thu, Sep 8, 2011 at 9:31 AM, Craig White <craig.white@ttiltd.com> 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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 08/09/11 16:22, Justin Lambert wrote:> Destroying nodes in puppet dashboard seems to kill dashboard after about > 5 minutes requiring a restart.If it''s of help I can confirm the same with Dashboard v1.1.0 Workaround here is to reduce the number of stored reports to 10 days immediately before destroying a node. Then I just get high load for a while but all recovers. I am running Puppetmaster and Dashboard on a VM with limited memory, though other than ''destroy'' it copes fine with ~30 nodes. LS -- Laurence Southon Tiger Computing, Bexley www.tiger-computing.co.uk -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.