Removing Zenpack does not remove everything #7

Closed
mdesimone opened this Issue Mar 21, 2012 · 4 comments

Comments

Projects
None yet
3 participants

If you do an uninstall on the ZenPack it leaves components on the device. If you click on a component a ribbon error is displayed. The template also remains on the system.

Owner

cluther commented Mar 22, 2012

Thanks for the report. I can easily replicate this. This kind of thing isn't a problem in most ZenPacks because they deliver their own device class which gets completely removed including any included devices if you remove the ZenPack. Because the RabbitMQ ZenPack just adds modeler plugins and monitoring templates to existing device classes, it doesn't benefit from the automatic cleanup.

Explicit cleanup needs to be added to the ZenPack's remove method.

alienth commented Apr 26, 2012

Would inheriting ZenPackPersistence on the component classes work here at all? Wouldn't that clean up the components on uninstall?

Owner

cluther commented May 1, 2012

I wasn't sure on the answer to that so I made inherited from ZenPackPersistence in RabbitMQComponent and implemented the contract. A quick test seems to indicate that it doesn't work. I haven't dug into why yet.

alienth commented May 2, 2012

I looked around at some other analogous ZenPacks. Looks like the community RDBMS ZenPack removes all components properly when being uninstalled. Its remove() in init.py isn't very different than what is in the RabbtiMQ ZenPack - except that the components there are a relation to OperatingSystem, rather than Device.

@ghost ghost assigned cluther May 22, 2012

@cluther cluther closed this in f94bd95 Jun 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment