remove db on db-relation-departed

Bug #1490643 reported by Kevin W Monroe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache-hive (Juju Charms Collection)
New
Undecided
Juju Big Data Development

Bug Description

Hive should remove its database from the db unit when the relevant realtion-departed (or -broken) hook fires.

This means creating the right hook to do the removal and potentially adding logic to clean old connection info from hive-site.xml.

Revision history for this message
Cory Johns (johnsca) wrote :

The MySQL relation is listed as required, and the cleanup block stops the Hive service. What does it matter if hive-site.xml has an incorrect entry if the service isn't running?

I'm also not sure I understand what you mean by "remove its database from the db unit"?

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

Yeah, it wouldn't matter if incorrect config was in hive-site.xml. But I can foresee an admin seeing mysql connection info in hive-site.xml and wondering why the heck hive isn't starting. I think it'd be nice to clear those out so it's obvious that we have no mysql user/password in the hive config.

For the other thing, hive creates tables on the db given to it by mysql. If the mysql relation is removed (which an admin might do if they want to swap it out for mariadb), the mysql unit would still have the hive database configured. Now fast forward 2 years and the mysql admin being like "oh crap, what are all these databases doing here?". I think anybody that creates a database on a db unit should be responsible for removing that db if that relation is removed.

This is all nice-to-have. No functionality is breaking, but I wanted to file the bug so I don't forget.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.