- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to specify multiple fencing methods in dfs.ha.fencing.methods
- Labels:
-
Apache Hadoop
Created ‎03-15-2016 06:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is new question based on answers provided at https://community.hortonworks.com/questions/23046/question-on-hdfs-automatic-failover.html
Question - If I need to define multiple fencing methods in dfs.ha.fencing.methods (hdfs-site.xml), how should I do that? Is that even possible? I tried putting comma separated values, semi colon separated, colon separated but nothing worked(I got parsing error in ZKFC logs)
Please suggest.
Created ‎03-16-2016 03:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nevermind! I have figured out the problem.
Many Thanks to @Hajime and @Sagar Shimpi for helping me here.
To add multiple fencing methods we need to run below command from Ambari Server
/var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin set <ambari-host> <cluster-name> hdfs-site dfs.ha.fencing.methods "sshfence\\nshell(/bin/true)"
I think this is a bug with Ambari, I will make sure to file a Ambari BUG for this today.
Created ‎03-15-2016 06:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
More info - according to this link, value of dfs.ha.fencing.methods shows 2 fencing methods, each one is on new line. I believe we cannot enter it using ambari UI. Not sure if that link has valid and verified information.
Created ‎03-16-2016 03:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to above link, it seems it accepts carriage-return-separated list.
Created ‎03-16-2016 03:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @Hajime - It was a real hint for solving this issue
Created ‎03-16-2016 03:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nevermind! I have figured out the problem.
Many Thanks to @Hajime and @Sagar Shimpi for helping me here.
To add multiple fencing methods we need to run below command from Ambari Server
/var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin set <ambari-host> <cluster-name> hdfs-site dfs.ha.fencing.methods "sshfence\\nshell(/bin/true)"
I think this is a bug with Ambari, I will make sure to file a Ambari BUG for this today.
