Feature #1717
open
Improve smart-variable unassignment during a puppetclass removal
Added by Olivier Favre almost 13 years ago.
Updated over 10 years ago.
Description
Smart-variables contain a lot of configuration we do not want to loose.
When a puppet class is deleted, the associated smart-variable are indeed not suppressed.
But the old puppetclass' id is still stored in the database.
NULL should be stored instead inside puppetclass_id.
Additionally, we should keep track of the last assigned puppetclass' name (when unassigning), as this would help identifying them.
cant we use auditing for that (instead of storing the class name?)
- Status changed from New to Assigned
- Assignee set to Olivier Favre
- Estimated time changed from 1:00 h to 2:00 h
- Difficulty changed from easy to medium
Ohad Levy wrote:
cant we use auditing for that (instead of storing the class name?)
Does that imply?:
- auditing
puppetclass
-lookup_keys
association
- making a search in the audits if
lookup_key.puppetclass == nil
, extracting the name from the audits
We can make a second search in the audits to see the last destroy action associated with the old puppetclass id, but that assumes ids are never reused.
If this assumption does not hold, we would need to store the puppetclass name at the time of the dissociation, inside the audit record.
- Status changed from Assigned to New
Also available in: Atom
PDF