You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2015/03/26 18:04:45 UTC
ambari git commit: AMBARI-10222: Ambari Windows deployment is broken
(jluniya)
Repository: ambari
Updated Branches:
refs/heads/trunk 8c5756519 -> 465c20ec2
AMBARI-10222: Ambari Windows deployment is broken (jluniya)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/465c20ec
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/465c20ec
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/465c20ec
Branch: refs/heads/trunk
Commit: 465c20ec21928e803394456e7d472c87982f2f9d
Parents: 8c57565
Author: Jayush Luniya <jl...@hortonworks.com>
Authored: Thu Mar 26 10:04:40 2015 -0700
Committer: Jayush Luniya <jl...@hortonworks.com>
Committed: Thu Mar 26 10:04:40 2015 -0700
----------------------------------------------------------------------
ambari-agent/src/main/python/ambari_agent/Facter.py | 6 ++++--
ambari-web/app/models/service_config.js | 5 ++++-
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/465c20ec/ambari-agent/src/main/python/ambari_agent/Facter.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/Facter.py b/ambari-agent/src/main/python/ambari_agent/Facter.py
index fcadee5..7497772 100644
--- a/ambari-agent/src/main/python/ambari_agent/Facter.py
+++ b/ambari-agent/src/main/python/ambari_agent/Facter.py
@@ -25,8 +25,6 @@ import platform
import re
import shlex
import socket
-import fcntl
-import struct
import multiprocessing
import subprocess
from ambari_commons.shell import shellRunner
@@ -359,6 +357,8 @@ class FacterLinux(Facter):
# Return netmask
def getNetmask(self):
+ import fcntl
+ import struct
primary_ip = self.getIpAddress().strip()
interface_pattern="(\w+)(?:.*Link encap:)"
if OSCheck.is_redhat7():
@@ -371,6 +371,8 @@ class FacterLinux(Facter):
# Return IP by interface name
def get_ip_address_by_ifname(self, ifname):
+ import fcntl
+ import struct
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.fileno(),
http://git-wip-us.apache.org/repos/asf/ambari/blob/465c20ec/ambari-web/app/models/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js
index d861688..9cbf09d 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -342,7 +342,10 @@ App.ServiceConfigProperty = Em.Object.extend({
this.set('value', slaveComponentHostsInDB.findProperty('componentName', 'DATANODE').hosts.mapProperty('hostName'));
break;
case 'nfsgateway_hosts':
- this.set('value', slaveComponentHostsInDB.findProperty('componentName', 'NFS_GATEWAY').hosts.mapProperty('hostName'));
+ var gwyHost = slaveComponentHostsInDB.findProperty('componentName', 'NFS_GATEWAY');
+ if(gwyHost) {
+ this.set('value', gwyHost.hosts.mapProperty('hostName'));
+ }
break;
case 'hs_host':
this.set('value', masterComponentHostsInDB.filterProperty('component', 'HISTORYSERVER').mapProperty('hostName'));