I'm trying to set up Hbase in juju using the following charm: https://jujucharms.com/u/bigdata-dev/apache-hbase/trusty/19 I receive an error when I try to add a relation between the hadoop-plugin and hbase-master.

Output from juju status:

hbase-master:
charm: cs:~bigdata-dev/trusty/apache-hbase-19
exposed: false
service-status:
  current: blocked
  message: Waiting for relation to apache-hadoop-plugin and apache-zookeeper
  since: 28 Feb 2016 05:01:52-08:00
relations:
  hadoop-plugin:
  - plugin
units:
  apache-hbase/0:
    workload-status:
      current: blocked
      message: Waiting for relation to apache-hadoop-plugin and apache-zookeeper
      since: 28 Feb 2016 05:01:52-08:00
    agent-status:
      current: idle
      since: 28 Feb 2016 05:46:55-08:00
      version: 1.25.3.1
    agent-state: started
    agent-version: 1.25.3.1
    machine: "6"
    public-address: 10.0.3.35
    subordinates:
      plugin/0:
        workload-status:
          current: error
          message: 'hook failed: "install"'
          since: 28 Feb 2016 05:23:41-08:00
        agent-status:
          current: idle
          since: 28 Feb 2016 05:23:41-08:00
          version: 1.25.3.1
        agent-state: error
        agent-state-info: 'hook failed: "install"'
        agent-version: 1.25.3.1
        upgrading-from: cs:trusty/apache-hadoop-plugin-10
        public-address: 10.0.3.35

Checking the logs for the plugin/0:

    Creating user hdfs in primary group hadoop and secondary groups []
INFO install Traceback (most recent call last):
INFO install   File "/var/lib/juju/agents/unit-plugin-/charm/hooks/install", line 17, in <module>
INFO install     common.manage()
INFO install   File "/var/lib/juju/agents/unit-plugin-/charm/hooks/common.py", line 123, in manage
INFO install     manager.manage()
INFO install   File "/var/lib/juju/agents/unit-plugin-0/charm/.venv/lib/python2.7/site-packages/charmhelpers/core/charmframework/base.py", line 115, in manage
INFO install     self.run_callbacks()
INFO install   File "/var/lib/juju/agents/unit-plugin-0/charm/.venv/lib/python2.7/site-packages/charmhelpers/core/charmframework/base.py", line 159, in run_callbacks
INFO install     self.fire_event('callbacks', component)
2016-02-28 13:23:41 INFO install   File "/var/lib/juju/agents/unit-plugin-0/charm/.venv/lib/python2.7/site-packages/charmhelpers/core/charmframework/base.py", line 189, in fire_event
INFO install     callback()
INFO install   File "/var/lib/juju/agents/unit-plugin-0/charm/.venv/lib/python2.7/site-packages/jujubigdata/handlers.py", line 101, in install
INFO install     self.dist_config.add_users()
INFO install   File "/var/lib/juju/agents/unit-plugin-0/charm/.venv/lib/python2.7/site-packages/jujubigdata/utils.py", line 149, in add_users
INFO install     host.adduser(username, primary_group=primary_grp, secondary_groups=secondary_grps)
INFO install TypeError: adduser() got an unexpected keyword argument 'primary_group'
ERROR juju.worker.uniter.operation runhook.go:107 hook "install" failed: exit status 1

The code where it fails:

def add_users(self):
    for group in self.groups:
        host.add_group(group)
    for username, details in self.users.items():
        primary_grp = None
        secondary_grps = None
        groups = details.get('groups', [])
        if groups:
            primary_grp = groups[0]
            secondary_grps = groups[1:]
        hookenv.log('Creating user {0} in primary group {1} and secondary groups {2}'
                    .format(username, primary_grp, secondary_grps))
        host.adduser(username, primary_group=primary_grp, secondary_groups=secondary_grps)

Any idea how I can get this working?

share|improve this question
up vote 1 down vote accepted

Fixed by changing

host.adduser(username, primary_group=primary_grp, secondary_groups=secondary_grps)

to

host.adduser(username, group=primary_grp, groups=secondary_grps)

and then retry the service with

juju resolved --retry servicename
share|improve this answer
1  
The bigdata team is fixing this charm, in the future though, mixing the bigdata-dev charms with the released charms might result in breakage. If you have a specific need to do this I'd reach out to the team and see how they can help you: bigdata@lists.ubuntu.com – Jorge Castro Mar 8 '16 at 16:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.