You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/08/05 19:04:23 UTC
git commit: AMBARI-2802: Security Wizard: FE work to add support for
NameNode HA. (jaimin)
Updated Branches:
refs/heads/trunk 31157a88b -> 91ce30a1b
AMBARI-2802: Security Wizard: FE work to add support for NameNode HA. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/91ce30a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/91ce30a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/91ce30a1
Branch: refs/heads/trunk
Commit: 91ce30a1b9435be2e853c113dba9c961425691d0
Parents: 31157a8
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Mon Aug 5 10:03:39 2013 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Mon Aug 5 10:03:56 2013 -0700
----------------------------------------------------------------------
.../app/assets/data/alerts/HDP2/alerts.json | 656 +++++++++++++++++++
.../app/assets/data/clusters/HDP2/cluster.json | 54 ++
.../app/assets/data/hosts/HDP2/hosts.json | 282 ++++++++
ambari-web/app/config.js | 3 +-
.../controllers/global/cluster_controller.js | 10 +-
.../app/controllers/global/update_controller.js | 3 +-
.../app/controllers/main/admin/security.js | 27 +-
.../security/add/addSecurity_controller.js | 11 +-
.../main/admin/security/add/step2.js | 75 ++-
ambari-web/app/data/HDP2/secure_configs.js | 5 +-
ambari-web/app/data/HDP2/secure_mapping.js | 24 +
ambari-web/app/data/HDP2/secure_properties.js | 54 ++
ambari-web/app/routes/add_security.js | 10 +
ambari-web/app/routes/main.js | 1 +
ambari-web/app/utils/db.js | 13 +
15 files changed, 1190 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/assets/data/alerts/HDP2/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/alerts/HDP2/alerts.json b/ambari-web/app/assets/data/alerts/HDP2/alerts.json
new file mode 100644
index 0000000..cefd8af
--- /dev/null
+++ b/ambari-web/app/assets/data/alerts/HDP2/alerts.json
@@ -0,0 +1,656 @@
+{
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/host_components?fields=HostRoles/nagios_alerts&HostRoles/component_name=NAGIOS_SERVER",
+ "items" : [
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/NAGIOS_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "NAGIOS_SERVER",
+ "host_name" : "dev01.hortonworks.com",
+ "nagios_alerts" : {
+ "alerts" : [
+ {
+ "service_description" : "Check ambari-agent process",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: Ambari agent is running [PID:15240]",
+ "last_hard_state_change" : "1375291083",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308183",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308183",
+ "service_type" : "AMBARI"
+ },
+ {
+ "service_description" : "DataNode process down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.016 second response time on port 50075",
+ "last_hard_state_change" : "1375296186",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308426",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375294732",
+ "is_flapping" : "0",
+ "last_check" : "1375308426",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "DataNode storage full",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: Capacity:[52844687359], Remaining Capacity:[45285249024], percent_full:[14.305010991256]",
+ "last_hard_state_change" : "1375291089",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308189",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308189",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "Ganglia Collector [gmond] process down alert for HBase Master",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.002 second response time on port 8663",
+ "last_hard_state_change" : "1375291092",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308426",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308426",
+ "service_type" : "GANGLIA"
+ },
+ {
+ "service_description" : "Ganglia Collector [gmond] process down alert for History Server 2",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.001 second response time on port 8666",
+ "last_hard_state_change" : "1375291095",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308420",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308420",
+ "service_type" : "GANGLIA"
+ },
+ {
+ "service_description" : "Ganglia Collector [gmond] process down alert for JobTracker",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "4",
+ "current_state" : "2",
+ "plugin_output" : "Connection refused",
+ "last_hard_state_change" : "1375291143",
+ "last_hard_state" : "2",
+ "last_time_ok" : "0",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375308423",
+ "is_flapping" : "0",
+ "last_check" : "1375308423",
+ "service_type" : "GANGLIA"
+ },
+ {
+ "service_description" : "Ganglia Collector [gmond] process down alert for NameNode",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.006 second response time on port 8661",
+ "last_hard_state_change" : "1375291101",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308426",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308426",
+ "service_type" : "GANGLIA"
+ },
+ {
+ "service_description" : "Ganglia Collector [gmond] process down alert for Node Manager",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.002 second response time on port 8660",
+ "last_hard_state_change" : "1375291104",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308416",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308416",
+ "service_type" : "GANGLIA"
+ },
+ {
+ "service_description" : "Ganglia Collector [gmond] process down alert for Resource Manager",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.002 second response time on port 8664",
+ "last_hard_state_change" : "1375291107",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308426",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308426",
+ "service_type" : "GANGLIA"
+ },
+ {
+ "service_description" : "Ganglia Collector [gmond] process down alert for slaves",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.005 second response time on port 8660",
+ "last_hard_state_change" : "1375291110",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308420",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308420",
+ "service_type" : "GANGLIA"
+ },
+ {
+ "service_description" : "Ganglia [gmetad] process down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.018 second response time on port 8651",
+ "last_hard_state_change" : "1375291113",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308423",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308423",
+ "service_type" : "GANGLIA"
+ },
+ {
+ "service_description" : "Percent RegionServers down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "3",
+ "current_state" : "2",
+ "plugin_output" : "CRITICAL: total:<1>, affected:<1>",
+ "last_hard_state_change" : "1375298856",
+ "last_hard_state" : "2",
+ "last_time_ok" : "1375298796",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375308426",
+ "is_flapping" : "0",
+ "last_check" : "1375308426",
+ "service_type" : "HBASE"
+ },
+ {
+ "service_description" : "HBase Master CPU utilization",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "1 CPU, load 22.0% < 200% : OK",
+ "last_hard_state_change" : "1375291118",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308218",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308218",
+ "service_type" : "HBASE"
+ },
+ {
+ "service_description" : "HBase Master Web UI down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "3",
+ "current_state" : "1",
+ "plugin_output" : "WARNING: HBase Master web UI not accessible : http://dev01.hortonworks.com:60010/master-status",
+ "last_hard_state_change" : "1375299171",
+ "last_hard_state" : "1",
+ "last_time_ok" : "1375298991",
+ "last_time_warning" : "1375308411",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308411",
+ "service_type" : "HBASE"
+ },
+ {
+ "service_description" : "HBase Master process down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "4",
+ "current_state" : "2",
+ "plugin_output" : "Connection refused",
+ "last_hard_state_change" : "1375299104",
+ "last_hard_state" : "2",
+ "last_time_ok" : "1375299029",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375308404",
+ "is_flapping" : "0",
+ "last_check" : "1375308404",
+ "service_type" : "HBASE"
+ },
+ {
+ "service_description" : "Corrupt/Missing blocks",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: corrupt_blocks:<>, missing_blocks:<>, total_blocks:<>",
+ "last_hard_state_change" : "1375291127",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308407",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308407",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "HDFS capacity utilization",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: DFSUsedGB:<0.2>, DFSTotalGB:<42.4>",
+ "last_hard_state_change" : "1375291130",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375307930",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375307930",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "NameNode RPC latency",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: RpcQueueTime_avg_time:<0> Secs, RpcProcessingTime_avg_time:<0> Secs",
+ "last_hard_state_change" : "1375291133",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308233",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308233",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "Percent DataNodes down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: total:<1>, affected:<0>",
+ "last_hard_state_change" : "1375296206",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308416",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375294782",
+ "is_flapping" : "0",
+ "last_check" : "1375308416",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "Percent DataNodes storage full",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: total:<1>, affected:<0>",
+ "last_hard_state_change" : "1375291139",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308419",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308419",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "Hive Metastore status check",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: Hive metaserver status OK",
+ "last_hard_state_change" : "1375291472",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308422",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375290048",
+ "is_flapping" : "0",
+ "last_check" : "1375308422",
+ "service_type" : "HIVE"
+ },
+ {
+ "service_description" : "History Server 2 CPU utilization",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "1 CPU, load 18.0% < 200% : OK",
+ "last_hard_state_change" : "1375291145",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308245",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308245",
+ "service_type" : "UNKNOWN"
+ },
+ {
+ "service_description" : "History Server 2 RPC latency",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: RpcQueueTime_avg_time:<0> Secs, RpcProcessingTime_avg_time:<0> Secs",
+ "last_hard_state_change" : "1375291148",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308248",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308248",
+ "service_type" : "UNKNOWN"
+ },
+ {
+ "service_description" : "History Server 2 Web UI down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: Successfully accessed historyserver2 Web UI",
+ "last_hard_state_change" : "1375291511",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308371",
+ "last_time_warning" : "1375295397",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308371",
+ "service_type" : "UNKNOWN"
+ },
+ {
+ "service_description" : "Percent TaskTrackers down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: total:<0>, affected:<0>",
+ "last_hard_state_change" : "1375291153",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308403",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308403",
+ "service_type" : "MAPREDUCE"
+ },
+ {
+ "service_description" : "Nagios status log staleness",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "NAGIOS OK: 2 processes, status log updated 5 seconds ago",
+ "last_hard_state_change" : "1375291156",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308256",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308256",
+ "service_type" : "NAGIOS"
+ },
+ {
+ "service_description" : "NameNode Web UI down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: Successfully accessed namenode Web UI",
+ "last_hard_state_change" : "1375296199",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308379",
+ "last_time_warning" : "1375294745",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308379",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "NameNode edit logs directory status",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: All Namenode directories are active",
+ "last_hard_state_change" : "1375296202",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308412",
+ "last_time_warning" : "1375294778",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308412",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "NameNode host CPU utilization",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "1 CPU, load 26.0% < 200% : OK",
+ "last_hard_state_change" : "1375291165",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308265",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308265",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "NameNode process down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.000 second response time on port 8020",
+ "last_hard_state_change" : "1375296208",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308418",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375294784",
+ "is_flapping" : "0",
+ "last_check" : "1375308418",
+ "service_type" : "HDFS"
+ },
+ {
+ "service_description" : "Node Manager process down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.001 second response time on port 8042",
+ "last_hard_state_change" : "1375296571",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308391",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375295117",
+ "is_flapping" : "0",
+ "last_check" : "1375308391",
+ "service_type" : "UNKNOWN"
+ },
+ {
+ "service_description" : "Oozie Server status check",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: Oozie server status [System mode: NORMAL]",
+ "last_hard_state_change" : "1375291534",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308394",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375295660",
+ "is_flapping" : "0",
+ "last_check" : "1375308394",
+ "service_type" : "OOZIE"
+ },
+ {
+ "service_description" : "RegionServer process down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "3",
+ "current_state" : "2",
+ "plugin_output" : "Connection refused",
+ "last_hard_state_change" : "1375298857",
+ "last_hard_state" : "2",
+ "last_time_ok" : "1375297343",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375308397",
+ "is_flapping" : "0",
+ "last_check" : "1375308397",
+ "service_type" : "HBASE"
+ },
+ {
+ "service_description" : "Resource Manager CPU utilization",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "1 CPU, load 24.0% < 200% : OK",
+ "last_hard_state_change" : "1375291180",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308281",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308281",
+ "service_type" : "UNKNOWN"
+ },
+ {
+ "service_description" : "Resource Manager RPC latency",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: RpcQueueTime_avg_time:<0> Secs, RpcProcessingTime_avg_time:<0> Secs",
+ "last_hard_state_change" : "1375291183",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308283",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308283",
+ "service_type" : "UNKNOWN"
+ },
+ {
+ "service_description" : "Resource Manager Web UI down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: Successfully accessed resorcemanager Web UI",
+ "last_hard_state_change" : "1375296526",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308406",
+ "last_time_warning" : "1375295072",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "0",
+ "is_flapping" : "0",
+ "last_check" : "1375308406",
+ "service_type" : "UNKNOWN"
+ },
+ {
+ "service_description" : "WebHCat Server status check",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "",
+ "last_hard_state_change" : "1375291969",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308409",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375290515",
+ "is_flapping" : "",
+ "last_check" : "",
+ "service_type" : "WEBHCAT"
+ },
+ {
+ "service_description" : "Percent ZooKeeper Servers down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "OK: total:<1>, affected:<0>",
+ "last_hard_state_change" : "1375291461",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308411",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375290037",
+ "is_flapping" : "0",
+ "last_check" : "1375308411",
+ "service_type" : "ZOOKEEPER"
+ },
+ {
+ "service_description" : "ZooKeeper Server process down",
+ "host_name" : "dev01.hortonworks.com",
+ "current_attempt" : "1",
+ "current_state" : "0",
+ "plugin_output" : "TCP OK - 0.001 second response time on port 2181",
+ "last_hard_state_change" : "1375291434",
+ "last_hard_state" : "0",
+ "last_time_ok" : "1375308415",
+ "last_time_warning" : "0",
+ "last_time_unknown" : "0",
+ "last_time_critical" : "1375289980",
+ "is_flapping" : "0",
+ "last_check" : "1375308415",
+ "service_type" : "ZOOKEEPER"
+ }
+ ],
+ "hostcounts" : {
+ "up_hosts" : "1",
+ "down_hosts" : "0"
+ },
+ "servicestates" : {
+ "PUPPET" : "0",
+ "HIVE-METASTORE" : "0",
+ "HDFS" : "0",
+ "OOZIE" : "0",
+ "WEBHCAT" : "0",
+ "ZOOKEEPER" : "0"
+ }
+ }
+ },
+ "host" : {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com"
+ }
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/assets/data/clusters/HDP2/cluster.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/clusters/HDP2/cluster.json b/ambari-web/app/assets/data/clusters/HDP2/cluster.json
new file mode 100644
index 0000000..510a596
--- /dev/null
+++ b/ambari-web/app/assets/data/clusters/HDP2/cluster.json
@@ -0,0 +1,54 @@
+{
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1?fields=Clusters",
+ "Clusters" : {
+ "cluster_id" : 2,
+ "cluster_name" : "c1",
+ "version" : "HDP-2.0.3",
+ "desired_configs" : {
+ "capacity-scheduler" : {
+ "user" : "admin",
+ "tag" : "version1"
+ },
+ "core-site" : {
+ "user" : "admin",
+ "tag" : "version1375294713268"
+ },
+ "global" : {
+ "user" : "admin",
+ "tag" : "version1"
+ },
+ "hbase-site" : {
+ "user" : "admin",
+ "tag" : "version1"
+ },
+ "hdfs-site" : {
+ "user" : "admin",
+ "tag" : "version1"
+ },
+ "hive-site" : {
+ "user" : "admin",
+ "tag" : "version1"
+ },
+ "mapred-queue-acls" : {
+ "user" : "admin",
+ "tag" : "version1"
+ },
+ "mapred-site" : {
+ "user" : "admin",
+ "tag" : "version1"
+ },
+ "oozie-site" : {
+ "user" : "admin",
+ "tag" : "version1"
+ },
+ "webhcat-site" : {
+ "user" : "admin",
+ "tag" : "version1"
+ },
+ "yarn-site" : {
+ "user" : "admin",
+ "tag" : "version1"
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/assets/data/hosts/HDP2/hosts.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/hosts/HDP2/hosts.json b/ambari-web/app/assets/data/hosts/HDP2/hosts.json
new file mode 100644
index 0000000..e1b1966
--- /dev/null
+++ b/ambari-web/app/assets/data/hosts/HDP2/hosts.json
@@ -0,0 +1,282 @@
+{
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts?fields=Hosts/host_name,Hosts/public_host_name,Hosts/disk_info,Hosts/cpu_count,Hosts/total_mem,Hosts/host_status,Hosts/last_heartbeat_time,Hosts/os_arch,Hosts/os_type,Hosts/ip,host_components,metrics/disk,metrics/load/load_one",
+ "items" : [
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com",
+ "Hosts" : {
+ "cluster_name" : "c1",
+ "cpu_count" : 1,
+ "disk_info" : [
+ {
+ "available" : "46389672",
+ "used" : "4692332",
+ "percent" : "10%",
+ "size" : "51606140",
+ "type" : "ext4",
+ "mountpoint" : "/"
+ },
+ {
+ "available" : "1027192",
+ "used" : "272",
+ "percent" : "1%",
+ "size" : "1027464",
+ "type" : "tmpfs",
+ "mountpoint" : "/dev/shm"
+ },
+ {
+ "available" : "409107",
+ "used" : "61137",
+ "percent" : "14%",
+ "size" : "495844",
+ "type" : "ext4",
+ "mountpoint" : "/boot"
+ },
+ {
+ "available" : "44459296",
+ "used" : "184796",
+ "percent" : "1%",
+ "size" : "47033288",
+ "type" : "ext4",
+ "mountpoint" : "/home"
+ },
+ {
+ "available" : "29882200",
+ "used" : "457830724",
+ "percent" : "94%",
+ "size" : "487712924",
+ "type" : "vboxsf",
+ "mountpoint" : "/media/sf_ambari"
+ }
+ ],
+ "host_name" : "dev01.hortonworks.com",
+ "host_status" : "HEALTHY",
+ "ip" : "10.0.2.15",
+ "last_heartbeat_time" : 1375309885919,
+ "os_arch" : "x86_64",
+ "os_type" : "centos6",
+ "public_host_name" : "dev01.hortonworks.com",
+ "total_mem" : 2055208
+ },
+ "metrics" : {
+ "disk" : {
+ "disk_free" : 91.23,
+ "disk_total" : 101.515
+ },
+ "load" : {
+ "load_one" : 1.51880555556
+ }
+ },
+ "host_components" : [
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/DATANODE",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "DATANODE",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/GANGLIA_MONITOR",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "GANGLIA_MONITOR",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/GANGLIA_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "GANGLIA_SERVER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HBASE_CLIENT",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HBASE_CLIENT",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HBASE_MASTER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HBASE_MASTER",
+ "ha_status" : "passive",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HBASE_REGIONSERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HBASE_REGIONSERVER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HCAT",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HCAT",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HDFS_CLIENT",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HDFS_CLIENT",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HISTORYSERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HISTORYSERVER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HIVE_CLIENT",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HIVE_CLIENT",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HIVE_METASTORE",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HIVE_METASTORE",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/HIVE_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HIVE_SERVER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/MAPREDUCE2_CLIENT",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "MAPREDUCE2_CLIENT",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/MYSQL_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "MYSQL_SERVER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/NAGIOS_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "NAGIOS_SERVER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/NAMENODE",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "NAMENODE",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/NODEMANAGER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "NODEMANAGER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/OOZIE_CLIENT",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "OOZIE_CLIENT",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/OOZIE_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "OOZIE_SERVER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/PIG",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "PIG",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/RESOURCEMANAGER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "RESOURCEMANAGER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/SECONDARY_NAMENODE",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "SECONDARY_NAMENODE",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/WEBHCAT_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "WEBHCAT_SERVER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/YARN_CLIENT",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "YARN_CLIENT",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/ZOOKEEPER_CLIENT",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "ZOOKEEPER_CLIENT",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ },
+ {
+ "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/ZOOKEEPER_SERVER",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "ZOOKEEPER_SERVER",
+ "host_name" : "dev01.hortonworks.com"
+ }
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 602c29e..6cdc5e4 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -23,10 +23,11 @@ App.testModeDelayForActions = 10000;
App.skipBootstrap = false;
App.alwaysGoToInstaller = false;
App.testEnableSecurity = true; // By default enable security is tested; turning it false tests disable security
+App.testHadoop2Stack = true;
+App.testNameNodeHA = true;
App.apiPrefix = '/api/v1';
App.defaultStackVersion = 'HDP-1.3.0';
App.defaultLocalStackVersion = 'HDPLocal-1.3.0';
-App.testHadoop2Stack = true;
App.defaultJavaHome = '/usr/jdk/jdk1.6.0_31';
App.timeout = 180000; // default AJAX timeout
App.maxRetries = 3; // max number of retries for certain AJAX calls
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index 1e53538..4c63bfd 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -197,7 +197,8 @@ App.ClusterController = Em.Controller.extend({
*/
loadAlerts:function (callback) {
if (this.get('isNagiosInstalled')) {
- var dataUrl = this.getUrl('/data/alerts/alerts.json', '/host_components?fields=HostRoles/nagios_alerts&HostRoles/component_name=NAGIOS_SERVER');
+ var testUrl = App.testHadoop2Stack ? '/data/alerts/HDP2/alerts.json':'/data/alerts/alerts.json';
+ var dataUrl = this.getUrl(testUrl, '/host_components?fields=HostRoles/nagios_alerts&HostRoles/component_name=NAGIOS_SERVER');
var self = this;
var ajaxOptions = {
dataType:"json",
@@ -284,9 +285,9 @@ App.ClusterController = Em.Controller.extend({
if(this.get('isLoaded')) { // do not load data repeatedly
return;
}
-
var clusterUrl = this.getUrl('/data/clusters/cluster.json', '?fields=Clusters');
- var hostsUrl = this.getUrl('/data/hosts/hosts.json', '/hosts?fields=Hosts/host_name,Hosts/public_host_name,Hosts/disk_info,Hosts/cpu_count,Hosts/total_mem,Hosts/host_status,Hosts/last_heartbeat_time,Hosts/os_arch,Hosts/os_type,Hosts/ip,host_components,metrics/disk,metrics/load/load_one');
+ var testHostUrl = App.testHadoop2Stack ? '/data/hosts/HDP2/hosts.json':'/data/hosts/hosts.json';
+ var hostsUrl = this.getUrl(testHostUrl, '/hosts?fields=Hosts/host_name,Hosts/public_host_name,Hosts/disk_info,Hosts/cpu_count,Hosts/total_mem,Hosts/host_status,Hosts/last_heartbeat_time,Hosts/os_arch,Hosts/os_type,Hosts/ip,host_components,metrics/disk,metrics/load/load_one');
var usersUrl = App.testMode ? '/data/users/users.json' : App.apiPrefix + '/users/?fields=*';
var racksUrl = "/data/racks/racks.json";
var dataSetUrl = "/data/mirroring/all_datasets.json";
@@ -364,7 +365,8 @@ App.ClusterController = Em.Controller.extend({
}.property('cluster'),
updateClusterData: function () {
- var clusterUrl = this.getUrl('/data/clusters/cluster.json', '?fields=Clusters');
+ var testUrl = App.testHadoop2Stack ? '/data/clusters/HDP2/cluster.json':'/data/clusters/cluster.json';
+ var clusterUrl = this.getUrl(testUrl, '?fields=Clusters');
App.HttpClient.get(clusterUrl, App.clusterMapper, {
complete:function(){}
});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/controllers/global/update_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index 6bdfe3f..8f6e7b0 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -45,7 +45,8 @@ App.UpdateController = Em.Controller.extend({
updateHost:function(callback) {
var self = this;
- var hostsUrl = this.getUrl('/data/hosts/hosts.json', '/hosts?fields=Hosts/host_name,Hosts/public_host_name,Hosts/disk_info,Hosts/cpu_count,Hosts/total_mem,Hosts/host_status,Hosts/last_heartbeat_time,Hosts/os_arch,Hosts/os_type,Hosts/ip,host_components,metrics/disk,metrics/load/load_one');
+ var testUrl = App.testHadoop2Stack ? '/data/hosts/HDP2/hosts.json':'/data/hosts/hosts.json';
+ var hostsUrl = this.getUrl(testUrl, '/hosts?fields=Hosts/host_name,Hosts/public_host_name,Hosts/disk_info,Hosts/cpu_count,Hosts/total_mem,Hosts/host_status,Hosts/last_heartbeat_time,Hosts/os_arch,Hosts/os_type,Hosts/ip,host_components,metrics/disk,metrics/load/load_one');
App.HttpClient.get(hostsUrl, App.hostsMapper, {
complete: callback
});
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/controllers/main/admin/security.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security.js b/ambari-web/app/controllers/main/admin/security.js
index d3c04d8..a34282c 100644
--- a/ambari-web/app/controllers/main/admin/security.js
+++ b/ambari-web/app/controllers/main/admin/security.js
@@ -23,7 +23,7 @@ App.MainAdminSecurityController = Em.Controller.extend({
securityEnabled: false,
dataIsLoaded: false,
serviceUsers: [],
- tag: null,
+ tag: {},
getAddSecurityWizardStatus: function () {
return App.db.getSecurityWizardStatus();
},
@@ -96,8 +96,9 @@ App.MainAdminSecurityController = Em.Controller.extend({
getSecurityStatusFromServerSuccessCallback: function (data) {
var configs = data.Clusters.desired_configs;
- if ('global' in configs) {
- this.set('tag', configs['global'].tag);
+ if ('global' in configs && 'core-site' in configs) {
+ this.set('tag.global', configs['global'].tag);
+ this.set('tag.core-site', configs['core-site'].tag);
this.getServiceConfigsFromServer();
}
else {
@@ -106,12 +107,14 @@ App.MainAdminSecurityController = Em.Controller.extend({
},
getServiceConfigsFromServer: function () {
+ var urlParams = [];
+ urlParams.push('(type=global&tag=' + this.get('tag.global') + ')');
+ urlParams.push('(type=core-site&tag=' + this.get('tag.core-site') + ')');
App.ajax.send({
- name: 'admin.service_config',
+ name: 'admin.security.all_configurations',
sender: this,
data: {
- siteName: 'global',
- tagName: this.get('tag')
+ urlParams: urlParams.join('|')
},
success: 'getServiceConfigsFromServerSuccessCallback',
error: 'errorCallback'
@@ -120,17 +123,27 @@ App.MainAdminSecurityController = Em.Controller.extend({
getServiceConfigsFromServerSuccessCallback: function (data) {
console.log("TRACE: In success function for the GET getServiceConfigsFromServer call");
- var configs = data.items.findProperty('tag', this.get('tag')).properties;
+ var configs = data.items.findProperty('tag', this.get('tag.global')).properties;
if (configs && (configs['security_enabled'] === 'true' || configs['security_enabled'] === true)) {
this.set('securityEnabled', true);
}
else {
this.set('securityEnabled', false);
+ var coreConfigs = data.items.findProperty('tag', this.get('tag.core-site')).properties;
+ this.setNnHaStatus(coreConfigs);
}
this.loadUsers(configs);
this.set('dataIsLoaded', true);
},
+ setNnHaStatus: function(coreConfigs) {
+ if(coreConfigs && coreConfigs['dfs.nameservices'] && coreConfigs['dfs.ha.namenodes.mycluster']) {
+ App.db.setIsNameNodeHa('true');
+ } else {
+ App.db.setIsNameNodeHa('false');
+ }
+ },
+
loadUsers: function (configs) {
var serviceUsers = this.get('serviceUsers');
serviceUsers.pushObject({
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/controllers/main/admin/security/add/addSecurity_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/add/addSecurity_controller.js b/ambari-web/app/controllers/main/admin/security/add/addSecurity_controller.js
index 7ce7072..b8c8128 100644
--- a/ambari-web/app/controllers/main/admin/security/add/addSecurity_controller.js
+++ b/ambari-web/app/controllers/main/admin/security/add/addSecurity_controller.js
@@ -26,6 +26,7 @@ App.AddSecurityController = App.WizardController.extend({
content: Em.Object.create({
services: [],
+ isNnHa: 'false',
serviceConfigProperties: null,
controllerName: 'addSecurityController'
}),
@@ -46,6 +47,7 @@ App.AddSecurityController = App.WizardController.extend({
this.loadServiceConfigs();
case '1':
this.loadServices();
+ this.loadNnHastatus();
}
},
@@ -62,9 +64,9 @@ App.AddSecurityController = App.WizardController.extend({
this.clearServices();
var secureServices;
if(App.get('isHadoop2Stack')) {
- secureServices = require('data/HDP2/secure_configs');
+ secureServices = $.extend(true, [], require('data/HDP2/secure_configs'));
} else {
- secureServices = require('data/secure_configs');
+ secureServices = $.extend(true, [], require('data/secure_configs'));
}
var installedServices = this.get('installedServices');
@@ -79,6 +81,11 @@ App.AddSecurityController = App.WizardController.extend({
},
+ loadNnHastatus: function() {
+ var isNnHa = App.db.getIsNameNodeHa();
+ this.set('content.isNnHa', isNnHa);
+ },
+
saveServiceConfigProperties: function (stepController) {
var serviceConfigProperties = [];
stepController.get('stepConfigs').forEach(function (_content) {
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/controllers/main/admin/security/add/step2.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/add/step2.js b/ambari-web/app/controllers/main/admin/security/add/step2.js
index 2738d54..d70e1fe 100644
--- a/ambari-web/app/controllers/main/admin/security/add/step2.js
+++ b/ambari-web/app/controllers/main/admin/security/add/step2.js
@@ -47,6 +47,7 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
this.addUserPrincipals(this.get('content.services'));
this.addMasterHostToGlobals(this.get('content.services'));
this.addSlaveHostToGlobals(this.get('content.services'));
+ this.changeCategoryOnHa(this.get('content.services'));
this.renderServiceConfigs(this.get('content.services'));
var storedServices = this.get('content.serviceConfigProperties');
if (storedServices) {
@@ -119,10 +120,10 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
* @param configName
* @param componentName
*/
- setHostsToConfig: function(service, configName, componentName){
- if(service){
+ setHostsToConfig: function (service, configName, componentName) {
+ if (service) {
var hosts = service.configs.findProperty('name', configName);
- if(hosts){
+ if (hosts) {
hosts.defaultValue = App.Service.find(service.serviceName)
.get('hostComponents')
.filterProperty('componentName', componentName)
@@ -131,7 +132,7 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
}
},
- loadUsers: function() {
+ loadUsers: function () {
var securityUsers = App.router.get('mainAdminSecurityController').get('serviceUsers');
if (!securityUsers || securityUsers.length < 1) { // Page could be refreshed in middle
if (App.testMode) {
@@ -145,10 +146,10 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
securityUsers = App.router.get('mainAdminSecurityController').get('serviceUsers');
}
}
- this.set('securityUsers',securityUsers);
+ this.set('securityUsers', securityUsers);
},
- addUserPrincipals: function(serviceConfigs) {
+ addUserPrincipals: function (serviceConfigs) {
var securityUsers = this.get('securityUsers');
var smokeUser = securityUsers.findProperty('name', 'smokeuser');
var hdfsUser = securityUsers.findProperty('name', 'hdfs_user');
@@ -159,20 +160,20 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
var hbaseUserPrincipal = generalService.configs.findProperty('name', 'hbase_principal_name');
var hbaseUserKeytab = generalService.configs.findProperty('name', 'hbase_user_keytab');
var hbaseService = serviceConfigs.findProperty('serviceName', 'HBASE');
- if(smokeUser && smokeUserPrincipal) {
+ if (smokeUser && smokeUserPrincipal) {
smokeUserPrincipal.defaultValue = smokeUser.value;
}
- if(hdfsUser && hdfsUserPrincipal) {
+ if (hdfsUser && hdfsUserPrincipal) {
hdfsUserPrincipal.defaultValue = hdfsUser.value;
}
- if(hbaseService && hbaseUser && hbaseUserPrincipal) {
+ if (hbaseService && hbaseUser && hbaseUserPrincipal) {
hbaseUserPrincipal.defaultValue = hbaseUser.value;
hbaseUserPrincipal.isVisible = true;
hbaseUserKeytab.isVisible = true;
}
},
- addSlaveHostToGlobals: function(serviceConfigs){
+ addSlaveHostToGlobals: function (serviceConfigs) {
var hdfsService = serviceConfigs.findProperty('serviceName', 'HDFS');
var mapReduceService = serviceConfigs.findProperty('serviceName', 'MAPREDUCE');
var yarnService = serviceConfigs.findProperty('serviceName', 'YARN');
@@ -197,7 +198,7 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
if (oozieService) {
var oozieServerHost = oozieService.configs.findProperty('name', 'oozie_servername');
var oozieServerPrincipal = oozieService.configs.findProperty('name', 'oozie_principal_name');
- var oozieSpnegoPrincipal = oozieService.configs.findProperty('name', 'oozie_http_principal_name');
+ var oozieSpnegoPrincipal = oozieService.configs.findProperty('name', 'oozie_http_principal_name');
if (oozieServerHost && oozieServerPrincipal && oozieSpnegoPrincipal) {
oozieServerHost.defaultValue = App.Service.find('OOZIE').get('hostComponents').findProperty('componentName', 'OOZIE_SERVER').get('host.hostName');
oozieServerPrincipal.defaultValue = 'oozie/' + oozieServerHost.defaultValue;
@@ -210,16 +211,16 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
hiveServerHost.defaultValue = App.Service.find('HIVE').get('hostComponents').findProperty('componentName', 'HIVE_SERVER').get('host.hostName');
}
}
- if(webHcatService) {
- var webHcatHost = webHcatService.configs.findProperty('name', 'webhcatserver_host');
- var webHcatSpnegoPrincipal = webHcatService.configs.findProperty('name', 'webHCat_http_principal_name');
- if(webHcatHost && webHcatSpnegoPrincipal) {
- webHcatHost.defaultValue = App.Service.find('WEBHCAT').get('hostComponents').findProperty('componentName', 'WEBHCAT_SERVER').get('host.hostName');
+ if (webHcatService) {
+ var webHcatHost = webHcatService.configs.findProperty('name', 'webhcatserver_host');
+ var webHcatSpnegoPrincipal = webHcatService.configs.findProperty('name', 'webHCat_http_principal_name');
+ if (webHcatHost && webHcatSpnegoPrincipal) {
+ webHcatHost.defaultValue = App.Service.find('WEBHCAT').get('hostComponents').findProperty('componentName', 'WEBHCAT_SERVER').get('host.hostName');
webHcatSpnegoPrincipal.defaultValue = 'HTTP/' + webHcatHost.defaultValue;
}
}
- if(nagiosService) {
+ if (nagiosService) {
var nagiosServerHost = nagiosService.configs.findProperty('name', 'nagios_server');
var nagiosServerPrincipal = nagiosService.configs.findProperty('name', 'nagios_principal_name');
if (nagiosServerHost && nagiosServerPrincipal) {
@@ -227,7 +228,7 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
nagiosServerPrincipal.defaultValue = 'nagios/' + nagiosServerHost.defaultValue;
}
}
- if(hdfsService){
+ if (hdfsService) {
var namenodeHost = hdfsService.configs.findProperty('name', 'namenode_host');
var sNamenodeHost = hdfsService.configs.findProperty('name', 'snamenode_host');
if (namenodeHost && sNamenodeHost) {
@@ -235,19 +236,19 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
sNamenodeHost.defaultValue = App.Service.find('HDFS').get('hostComponents').findProperty('componentName', 'SECONDARY_NAMENODE').get('host.hostName');
}
}
- if(mapReduceService){
+ if (mapReduceService) {
var jobTrackerHost = mapReduceService.configs.findProperty('name', 'jobtracker_host');
if (jobTrackerHost) {
jobTrackerHost.defaultValue = App.Service.find('MAPREDUCE').get('hostComponents').findProperty('componentName', 'JOBTRACKER').get('host.hostName');
}
}
- if(mapReduce2Service){
+ if (mapReduce2Service) {
var jobHistoryServerHost = mapReduce2Service.configs.findProperty('name', 'jobhistoryserver_host');
if (jobHistoryServerHost) {
jobHistoryServerHost.defaultValue = App.Service.find('MAPREDUCE2').get('hostComponents').findProperty('componentName', 'HISTORYSERVER').get('host.hostName');
}
}
- if(yarnService){
+ if (yarnService) {
var resourceManagerHost = yarnService.configs.findProperty('name', 'resourcemanager_host');
if (resourceManagerHost) {
resourceManagerHost.defaultValue = App.Service.find('YARN').get('hostComponents').findProperty('componentName', 'RESOURCEMANAGER').get('host.hostName');
@@ -257,6 +258,38 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
this.setHostsToConfig(zooKeeperService, 'zookeeperserver_hosts', 'ZOOKEEPER_SERVER');
},
+ changeCategoryOnHa: function (serviceConfigs) {
+ var hdfsService = serviceConfigs.findProperty('serviceName', 'HDFS');
+ if (hdfsService) {
+ var secureProperties = require('data/HDP2/secure_properties').configProperties;
+ var configCategories = hdfsService.configCategories;
+ var dfsHttpPrincipal = secureProperties.findProperty('name', 'hadoop_http_principal_name');
+ var dfsHttpKeytab = secureProperties.findProperty('name', 'hadoop_http_keytab');
+ if ((App.testMode && App.testNameNodeHA) || (this.get('content.isNnHa') === 'true')) {
+ if (dfsHttpPrincipal && dfsHttpKeytab) {
+ dfsHttpPrincipal.category = 'NameNode';
+ dfsHttpKeytab.category = 'NameNode';
+ } else {
+ dfsHttpPrincipal.category = 'General';
+ dfsHttpKeytab.category = 'General';
+ }
+ var generalCategory = configCategories.findProperty('name','General');
+ var snCategory = configCategories.findProperty('name','SNameNode');
+ if(generalCategory) {
+ configCategories.removeObject(generalCategory);
+ }
+ if(snCategory) {
+ configCategories.removeObject(snCategory);
+ }
+ } else {
+ var jnCategory = configCategories.findProperty('name','JournalNode');
+ if(jnCategory) {
+ configCategories.removeObject(jnCategory);
+ }
+ }
+ }
+ },
+
/**
* submit and move to step3
*/
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/data/HDP2/secure_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/secure_configs.js b/ambari-web/app/data/HDP2/secure_configs.js
index 3dce830..9612882 100644
--- a/ambari-web/app/data/HDP2/secure_configs.js
+++ b/ambari-web/app/data/HDP2/secure_configs.js
@@ -39,9 +39,10 @@ module.exports = [
displayName: 'HDFS',
filename: 'hdfs-site',
configCategories: [
- App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'}),
+ App.ServiceConfigCategory.create({ name: 'General', displayName: 'General', exclude:'HA'}),
App.ServiceConfigCategory.create({ name: 'NameNode', displayName: 'NameNode'}),
- App.ServiceConfigCategory.create({ name: 'SNameNode', displayName: 'Secondary NameNode'}),
+ App.ServiceConfigCategory.create({ name: 'SNameNode', displayName: 'Secondary NameNode',exclude:'HA'}),
+ App.ServiceConfigCategory.create({ name: 'JournalNode', displayName: 'JournalNode',exclude:'non-HA'}),
App.ServiceConfigCategory.create({ name: 'DataNode', displayName: 'DataNode'})
],
sites: ['core-site', 'hdfs-site'],
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/data/HDP2/secure_mapping.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/secure_mapping.js b/ambari-web/app/data/HDP2/secure_mapping.js
index 6ce1f3c..681d447 100644
--- a/ambari-web/app/data/HDP2/secure_mapping.js
+++ b/ambari-web/app/data/HDP2/secure_mapping.js
@@ -122,6 +122,30 @@ module.exports = [
"serviceName": "HDFS"
},
{
+ "name": "dfs.journalnode.kerberos.principal",
+ "templateName": ["journalnode_principal_name"],
+ "foreignKey": null,
+ "value": "<templateName[0]>",
+ "filename": "hdfs-site.xml",
+ "serviceName": "HDFS"
+ },
+ {
+ "name": "dfs.journalnode.kerberos.internal.spnego.principal",
+ "templateName": ["journalnode_http_principal_name"],
+ "foreignKey": null,
+ "value": "<templateName[0]>",
+ "filename": "hdfs-site.xml",
+ "serviceName": "HDFS"
+ },
+ {
+ "name": "dfs.journalnode.keytab.file",
+ "templateName": ["journalnode_keytab"],
+ "foreignKey": null,
+ "value": "<templateName[0]>",
+ "filename": "hdfs-site.xml",
+ "serviceName": "HDFS"
+ },
+ {
"name": "dfs.datanode.address",
"templateName": ["dfs_datanode_address"],
"foreignKey": null,
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/data/HDP2/secure_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/secure_properties.js b/ambari-web/app/data/HDP2/secure_properties.js
index c2583ce..a6cc9dc 100644
--- a/ambari-web/app/data/HDP2/secure_properties.js
+++ b/ambari-web/app/data/HDP2/secure_properties.js
@@ -248,6 +248,60 @@ module.exports =
},
{
"id": "puppet var",
+ "name": "journalnode_hosts",
+ "displayName": "JournalNode hosts",
+ "value": "",
+ "defaultValue": "localhost",
+ "description": "The hosts that have been assigned to run JournalNodes",
+ "displayType": "masterHosts",
+ "isOverridable": false,
+ "isVisible": true,
+ "serviceName": "HDFS",
+ "category": "JournalNode"
+ },
+ {
+ "id": "puppet var",
+ "name": "journalnode_principal_name",
+ "displayName": "Principal name",
+ "value": "",
+ "defaultValue": "jn/_HOST",
+ "description": "Principal name for JournalNode. _HOST will get automatically replaced with actual hostname at every instance of JournalNode",
+ "displayType": "principal",
+ "isVisible": true,
+ "isOverridable": false,
+ "serviceName": "HDFS",
+ "category": "JournalNode",
+ "component": "JOURNALNODE"
+ },
+ {
+ "id": "puppet var",
+ "name": "journalnode_http_principal_name",
+ "displayName": "Web principal name",
+ "value": "",
+ "defaultValue": "HTTP/_HOST",
+ "description": "Principal name for spnego access for JournalNode. _HOST will get automatically replaced with actual hostname at instance of JournalNode",
+ "displayType": "principal",
+ "isVisible": false,
+ "isOverridable": false,
+ "serviceName": "HDFS",
+ "category": "JournalNode"
+ },
+ {
+ "id": "puppet var",
+ "name": "journalnode_keytab",
+ "displayName": "Path to Keytab file",
+ "value": "",
+ "defaultValue": "/etc/security/keytabs/jn.service.keytab",
+ "description": "Path to JournalNode keytab file",
+ "displayType": "directory",
+ "isVisible": true,
+ "isOverridable": false,
+ "serviceName": "HDFS",
+ "category": "JournalNode",
+ "component": "JOURNALNODE"
+ },
+ {
+ "id": "puppet var",
"name": "datanode_hosts", //not in the schema. For UI purpose
"displayName": "DataNode hosts",
"value": "",
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/routes/add_security.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_security.js b/ambari-web/app/routes/add_security.js
index dc57706..2ad8c8f 100644
--- a/ambari-web/app/routes/add_security.js
+++ b/ambari-web/app/routes/add_security.js
@@ -125,6 +125,10 @@ module.exports = Em.Route.extend({
})
},
+ unroutePath: function () {
+ return false;
+ },
+
next: function (router) {
var addSecurityController = router.get('addSecurityController');
addSecurityController.get('content').set('serviceConfigProperties', null);
@@ -155,6 +159,9 @@ module.exports = Em.Route.extend({
controller.connectOutlet('mainAdminSecurityAddStep2', controller.get('content'));
})
},
+ unroutePath: function () {
+ return false;
+ },
back: Em.Router.transitionTo('step1'),
next: function (router) {
var addSecurityController = router.get('addSecurityController');
@@ -186,6 +193,9 @@ module.exports = Em.Route.extend({
controller.connectOutlet('mainAdminSecurityAddStep3', controller.get('content'));
})
},
+ unroutePath: function () {
+ return false;
+ },
back: Em.Router.transitionTo('step2'),
next: function (router) {
App.db.setSecurityDeployStages(undefined);
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 309e7d6..50835a5 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -671,6 +671,7 @@ module.exports = Em.Route.extend({
controller.setAddSecurityWizardStatus(currentClusterStatus.localdb.status);
App.db.setSecureConfigProperties(currentClusterStatus.localdb.secureConfigProperties);
App.db.setWizardCurrentStep('AddSecurity', currentClusterStatus.localdb.currentStep);
+ App.db.setIsNameNodeHa(currentClusterStatus.localdb.haStatus);
App.db.setDisableSecurityStatus(currentClusterStatus.localdb.disableSecurityStatus);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/91ce30a1/ambari-web/app/utils/db.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js
index bad2c35..2061918 100644
--- a/ambari-web/app/utils/db.js
+++ b/ambari-web/app/utils/db.js
@@ -341,6 +341,14 @@ App.db.setSecureConfigProperties = function (secureConfigs) {
localStorage.setObject('ambari', App.db.data);
};
+App.db.setIsNameNodeHa = function (haStatus) {
+ App.db.data = localStorage.getObject('ambari');
+ if (!App.db.data.AddSecurity) {
+ App.db.data.AddSecurity = {};
+ }
+ App.db.data.AddSecurity.haStatus = haStatus;
+ localStorage.setObject('ambari', App.db.data);
+};
/*
* getter methods
@@ -545,6 +553,11 @@ App.db.getSecureConfigProperties = function () {
return App.db.data.AddSecurity.secureConfigProperties;
};
+App.db.getIsNameNodeHa = function (haStatus) {
+ App.db.data = localStorage.getObject('ambari');
+ return App.db.data.AddSecurity.haStatus;
+};
+
App.db.getStacks = function () {
App.db.data = localStorage.getObject('ambari');
return App.db.data.app.stacksVersions;