I want to add Oozie failover for my HA cluster. When I try to add one more instance on the 2nd Namenode using Cloudera Manager Services -> Oozie -> Instances -> Add, the page that comes up has all the options disabled to add Oozie server. What can be the reason for this?
HA for HDFS and MR work well.
There's no out-of-box solution available for Oozie in CDH4. You'll need to set it up manually (relying, for instance, on VIPs, custom failover mechanism, and an underlying DB HA) if you seek to implement it. The design document at https://issues.apache.org/jira/browse/OOZIE-615 illustrates a supported setup for Oozie service arriving in future, but it should give you a good idea on what needs to be performed generally.
CM (as of C5 beta1) currently does not configure this for you auto-magically.
Just to clarify, I was following the steps for Configuring Oozie Failover ( hot/cold ) . And I am currently not able to add a role instance to my second Namenode (as required by Step 2 ) in addition to one instance already running on another Namenode.
I guess the rest bespoke code you described relates to Step 6 (i.e. Use either a Virtual IP Address or Load Balancer to direct traffic to the hot server)