Comment 2 for bug 1487050

Revision history for this message
Matt Bruzek (mbruzek) wrote :

Hello Amir! Thank you for the submission of apache hbase charm. I appreciate the amount of work that was done here to charm up this Apache project. I took a look at this charm and here is what I found.

# icon.svg
This icon does not look very nice. It is a white graphic on grey. The icon is on the same layer as the background so I was not able to fix this one, but I did create a new icon with a white background and put the hbase icon on the pictogram layer.

# README.md
The file converts properly to markdown and looks great! The quickstart command is invalid, and I am unable to locate the “apache-hadoop-hbase” bundle on jujucharms.com at all. The hyperlink to apache-hadoop-hbase url is also invalid giving me a 404 error.

# tests/
The tests appear to be a good representation of this charm. I ran them with bundletester and they passed! Congratulations on passing amulet tests! That helps verify the quality of the charm with a real deployment.

# master-relation-broken

While tearing down the test I encountered a hook error in the relations. Here is the “juju status”

      hbase-master/0:
        workload-status:
          current: error
          message: 'hook failed: "master-relation-broken" for hbase-regionserver:regionserver'
          since: 02 Oct 2015 11:31:52-05:00

The relevant section from the juju log:

2015-10-02 16:31:51 DEBUG juju.worker.uniter modes.go:31 [AGENT-STATUS] executing: running zookeeper-relation-departed hook
2015-10-02 16:31:51 INFO juju.worker.uniter.context runner.go:158 skipped "zookeeper-relation-departed" hook (not implemented)
2015-10-02 16:31:51 INFO juju.worker.uniter.context context.go:530 handling reboot
2015-10-02 16:31:51 INFO juju.worker.uniter.operation runhook.go:116 skipped "zookeeper-relation-departed" hook (missing)
2015-10-02 16:31:51 INFO juju.worker.uniter.operation executor.go:108 committing operation "run relation-departed (8; zookeeper/1) hook"
2015-10-02 16:31:51 INFO juju.worker.uniter.operation executor.go:68 running operation run relation-broken (10) hook
2015-10-02 16:31:51 INFO juju.worker.uniter.operation executor.go:108 preparing operation "run relation-broken (10) hook"
2015-10-02 16:31:51 INFO juju.worker.uniter.operation executor.go:108 executing operation "run relation-broken (10) hook"
2015-10-02 16:31:51 DEBUG juju.worker.uniter modes.go:31 [AGENT-STATUS] executing: running master-relation-broken hook
2015-10-02 16:31:52 INFO master-relation-broken Traceback (most recent call last):
2015-10-02 16:31:52 INFO master-relation-broken File "/var/lib/juju/agents/unit-hbase-master-0/charm/hooks/master-relation-broken", line 17, in <module>
2015-10-02 16:31:52 INFO master-relation-broken utils.run_as("ubuntu", spark_home+'/'+'stop-all.sh')
2015-10-02 16:31:52 INFO master-relation-broken TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
2015-10-02 16:31:52 INFO juju.worker.uniter.context context.go:530 handling reboot
2015-10-02 16:31:52 ERROR juju.worker.uniter.operation runhook.go:107 hook "master-relation-broken" failed: exit status 1

It looks like the value of spark_home is being used without checking if it is empty or None. I searched for a set of “spark_home” but was unable to find anywhere this value is set. I am not the expert on this code so perhaps it is set somewhere that did not turn up in my searches.

# status
As Cory pointed out the status is incorrect and misleading to users of this charm. I printed out the status history for the hbase-master unit on the system that ran the tests:
$ juju status-history hbase-master/0
TIME TYPE STATUS MESSAGE
02 Oct 2015 15:56:22Z agent executing running hadoop-plugin-relation-changed hook
02 Oct 2015 15:56:25Z workload maintenance Setting up Apache hbase
02 Oct 2015 15:56:59Z workload active Ready
02 Oct 2015 15:57:07Z workload maintenance Updating configuration
02 Oct 2015 15:57:17Z workload active Ready
02 Oct 2015 15:57:17Z workload active Ready
02 Oct 2015 15:57:25Z agent idle
02 Oct 2015 15:57:58Z agent executing running commands
02 Oct 2015 15:58:56Z agent idle
02 Oct 2015 15:59:50Z agent executing running update-status hook
02 Oct 2015 15:59:53Z agent idle
02 Oct 2015 16:04:50Z agent executing running update-status hook
02 Oct 2015 16:04:53Z agent idle
02 Oct 2015 16:09:50Z agent executing running update-status hook
02 Oct 2015 16:09:53Z agent idle
02 Oct 2015 16:14:50Z agent executing running update-status hook
02 Oct 2015 16:14:53Z agent idle
02 Oct 2015 16:19:50Z agent executing running update-status hook
02 Oct 2015 16:19:53Z agent idle
02 Oct 2015 16:19:53Z agent idle

I think we would like to fix the status messages to be correct about what relations are needed as not to confuse the users of this charm.

After speaking with Cory about this charm, I am going to set this bug to “In Progress” while we get these issues fixed up. Please put it back in Fix committed to get another review. I create a merge proposal lp:~mbruzek/charms/trusty/apache-hbase/icon-code-fix to fix the icon and guard against the problem I found in the broken relation.

Thanks again for the effort here!