steve caldwell wrote:> I had a host that was exporting a resource to another host to trigger
> backups. The first host has now gone away, but the second host is
> still seeing the exported resource (because it still exists in the
> puppetmaster''s database). I fixed the problem by going in to the
> database and deleting all the rows I could find that related to the
> absent host, but I''m wondering if there''s a better way to
handle this
> situation.
>
> FYI, the SQL commands I ran were:
>
> SET @host_id = ...
>
> DELETE FROM fact_values WHERE host_id=@host_id;
>
> DELETE FROM param_values WHERE resource_id IN (
> SELECT id FROM resources WHERE host_id=@host_id
> );
>
> DELETE FROM resource_tags WHERE resource_id IN (
> SELECT id FROM resources WHERE host_id=@host_id
> );
>
> DELETE FROM resources WHERE host_id=@host_id;
>
> DELETE FROM hosts WHERE id=@host_id;
>
There''s a script for doing this the "easy" AR way.
http://reductivelabs.com/trac/puppet/attachment/wiki/UsingStoredConfiguration/kill_node_in_storedconfigs_db.rb
Regards,
AJ
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---