Permalink
Browse files

make NN listen on all interfaces

  • Loading branch information...
1 parent be53a05 commit ac0c472707e1f48ccbf416f1c1eb2e189b6bd8e9 @kwmonroe kwmonroe committed Apr 28, 2016
Showing with 9 additions and 0 deletions.
  1. +9 −0 reactive/namenode.py
View
@@ -3,6 +3,7 @@
from charmhelpers.core import hookenv, host
from jujubigdata import utils
import subprocess
+from path import Path
@when('puppet.available')
@@ -22,6 +23,14 @@ def install_namenode():
kv_hostname = hookenv.local_unit().replace('/', '-')
utils.update_kv_host(kv_ip, kv_hostname)
+ # make our namenode listen on all interfaces
+ hdfs_site = Path('/etc/hadoop/conf/hdfs-site.xml')
+ with utils.xmlpropmap_edit_in_place(hdfs_site) as props:
+ props['dfs.namenode.rpc-bind-host'] = '0.0.0.0'
+ props['dfs.namenode.servicerpc-bind-host'] = '0.0.0.0'
+ props['dfs.namenode.http-bind-host'] = '0.0.0.0'
+ props['dfs.namenode.https-bind-host'] = '0.0.0.0'
+
set_state('apache-bigtop-namenode.installed')
hookenv.status_set('maintenance', 'namenode installed')

0 comments on commit ac0c472

Please sign in to comment.