Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Initialize automatic failover znode HDFS Namenode Failover Controller fails

Highlighted

Initialize automatic failover znode HDFS Namenode Failover Controller fails

Explorer

Hi,

 

I am trying out CM API to create a Hadoop Cluster with HDFS HA enabled.

calling the function enable_nn_ha() with all the arguments doesn't initialize the zookeeper to create /hadoop-ha/nameservice1 node in zookeeper. Has anyone faced this issue? or have any workaround

 

Thanks in Advance

Sebin

4 REPLIES 4

Re: Initialize automatic failover znode HDFS Namenode Failover Controller fails

Master Guru
Can you paste your full Python API call here? Do you leave the argument forceInitZNode at its default of True?

Re: Initialize automatic failover znode HDFS Namenode Failover Controller fails

Master Guru
Also, what version of CM are you using, and is ZK dependency being passed in/set correctly on HDFS service?

Re: Initialize automatic failover znode HDFS Namenode Failover Controller fails

Explorer

CM Version: 5.3.4

ZK dependency being passed in/set correctly on HDFS service? : YES

================

 

Here are the steps I did.

 

1. Create 2 Namenode roles and set 

2. Create 3 Journal node roles

3. Create 2 failover controller node roles

 

4.Set the below configurations via api

dfs_federation_namenode_nameservice='nameservice1'

autofailover_enabled=true

 

5. Enable NN HA using the below code

n1, n2 = namenodes
cmd = hdfs_service.enable_nn_ha(n1.name, n2.hostRef.hostId, 'nameservice1', jns, zk_service_name='Zookeeper')
cmd.wait()

 

where Zookeeper is the name of my Zookeeper service.

 

After this command.

1. 2 namenodes are started and they are in HA

2. 3 Journal Nodes are started

3. 2 Failover controllers failed to start.

 

Now, to bring up the Failover Controller, I went into the Failover controller instance page

1. Actions -> Initialize Automatic Failover ZNode

2. Started both fail over controller roles and they started.

 

Now, that I understood, clicking the Initialize Automatic Failover controller ZNode solved the problem, I checked for a REST API in the docs, but I could not find one.

 

Question: 

1. Is this a bug?

2. If there is not bug, Is there an API to initialize automatic failover controller znode

3. Can I manually create the required znodes in zookeeper(Specifically, is it supported)?

 

 

 

Re: Initialize automatic failover znode HDFS Namenode Failover Controller fails

Contributor

There looks to be an API call to do this: hdfsInitializeAutoFailover

 

My question is whether this has been addressed in Cloudera Director 2.1.  I do not see anything specific in the latest aws.ha.reference.conf.