failed apache-hive installs should fail well

Bug #1491044 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 was broken for a bit. Sam deployed it and had a failed installation. We fixed it, and he tried a juju upgrade-charm to get the new bits. Unfortunately, we don't handle partial installation very well at all. Since the first install failed, we never set the hive.installed KV, and upgrade-charm re-entered the install->setup_hive_config. This broke as this log snippet shows:

unit-hive-0[11112]: 2015-09-01 09:37:30 INFO unit.hive/0.hadoop-plugin-relation-changed logger.go:40 File "/var/lib/juju/agents/unit-hive-0/charm/hooks/callbacks.py", line 81, in install
unit-hive-0[11112]: 2015-09-01 09:37:30 INFO unit.hive/0.hadoop-plugin-relation-changed logger.go:40 self.setup_hive_config()
unit-hive-0[11112]: 2015-09-01 09:37:30 INFO unit.hive/0.hadoop-plugin-relation-changed logger.go:40 File "/var/lib/juju/agents/unit-hive-0/charm/hooks/callbacks.py", line 97, in setup_hive_config
unit-hive-0[11112]: 2015-09-01 09:37:30 INFO unit.hive/0.hadoop-plugin-relation-changed logger.go:40 default_conf.copytree(hive_conf)
unit-hive-0[11112]: 2015-09-01 09:37:30 INFO unit.hive/0.hadoop-plugin-relation-changed logger.go:40 File "/usr/lib/python2.7/shutil.py", line 171, in copytree
unit-hive-0[11112]: 2015-09-01 09:37:30 INFO unit.hive/0.hadoop-plugin-relation-changed logger.go:40 names = os.listdir(src)
unit-hive-0[11112]: 2015-09-01 09:37:30 INFO unit.hive/0.hadoop-plugin-relation-changed logger.go:40 OSError: [Errno 2] No such file or directory: '/usr/lib/hive/conf'

Couple options to fix this:
1. test for, or try/except around, actions on the /usr/lib/hive/conf directory
2. blow away hive-related filesystem changes in the beginning of install, and let install set it all back up again.

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.