On 02/15/2010 04:05 AM, Vreman, Peter wrote:

The cobblerd aborts with an exception if a kernel or initrd is removed. This comes from the fact that the distro’s are loaded from disk and also the validation code is run.

The problem is that without a running cobblerd it is not possible to remove a distro cleanly. The only hack around it is to delete the .json file with the risk to break profiles and systems.

 

The source of the problem is the collections.add() function. This function is made too generic to be used for multiple cases:

-          Load from disk

-          Save to disk

-          Add new system

-          Update system

But all 4 actions have different kind of checks and triggers points.

 

My proposal is to refactor the collection.add() function to split it into multiple methods. Some part of the triggers, duplication checks can then also move to the corresponding collection_*.py code. E.g. the IP duplication check to a virtual method in collection_system.py

 

Shall I create a patch for this?

 


+1000.  Biggest issue in cobbler is inconsistency in the data store which causes cobbler to crash or never start again.  And usually it can't even tell you which json file is in error. 

So you have my vote to try and make this more sane. :-)

Regards,

Peter

 


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
_______________________________________________ cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler-devel