Issue #3820 has been updated by James Turnbull.

Status changed from Unreviewed to Accepted
Assigned to set to Rein Henrichs
Target version set to 1.1


----------------------------------------
Bug #3820: Deleting a used class causes node to be un-renderable
http://projects.puppetlabs.com/issues/3820

Author: Jonathan Booth
Status: Accepted
Priority: Normal
Assigned to: Rein Henrichs
Category: 
Target version: 1.1
Keywords: 
Branch: 
Affected URL: 


Create a class 'default'. Add 'default' to a node. Delete class 'default' 
(don't remove the node from it first). Try to load the node's page => failure. 
Inspecting the database manually I see:

<pre>
    mysql> select * from node_classes;
    +----+---------+---------------------+---------------------+
    | id | name    | created_at          | updated_at          |
    +----+---------+---------------------+---------------------+
    |  3 | Test    | 2010-05-20 19:59:39 | 2010-05-20 19:59:39 |
    |  4 | default | 2010-05-20 20:00:01 | 2010-05-20 20:00:01 |
    +----+---------+---------------------+---------------------+
    2 rows in set (0.00 sec)
    mysql> select * from node_class_memberships;
    +----+---------+---------------+---------------------+---------------------+
    | id | node_id | node_class_id | created_at          | updated_at          |
    +----+---------+---------------+---------------------+---------------------+
    |  1 |       1 |             2 | 2010-05-20 19:48:50 | 2010-05-20 19:48:50 |
    +----+---------+---------------+---------------------+---------------------+
    1 row in set (0.00 sec)
</pre>
    
In this case I'd created a Test, then a default, then added the node to class 
default. Then I deleted Test (node_class_id 1, and unused -- so far so good). 
They I deleted the old-default (node_class_id 2) and it failed out. I tried 
re-adding test and default but things aren't keyed like that so it didn't fix 
things (I didn't expect it to).

Cleaning the (now invalid) entries from 'node_class_memberships' AND 
'timeline_events' tables (the first alone was insufficient) lets the page load. 
This probably also holds true for the 'node_group_memberships' and maybe 
'parameters' tables too.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to