ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Levas" <rle...@hortonworks.com>
Subject Re: Review Request 41238: Kerberos: all ambari server host ops are broken
Date Fri, 11 Dec 2015 11:29:49 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41238/
-----------------------------------------------------------

(Updated Dec. 11, 2015, 6:29 a.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Mahadev Konar, Myroslav Papirkovskyy,
Nate Cole, and Sumit Mohanty.


Bugs: AMBARI-14327
    https://issues.apache.org/jira/browse/AMBARI-14327


Repository: ambari


Description
-------

1) Test Kerberos Client dialog shows an "n/a" entry and when you click on it, throws a JS
error. See attached. The n/a appears to represent the command run on the Ambari Server itself.
2) All Ambari server ops throw JS error. On other places in the wizard, it shows "Ambari Server
Host" but that throws JS.
3) same for regen keytabs. basically all over the place 
 
See attached.

```
{
  "Requests" : {
    "aborted_task_count" : 0,
    "cluster_name" : "MyCluster",
    "completed_task_count" : 10,
    "create_time" : 1449759400223,
    "end_time" : 1449759448232,
    "exclusive" : false,
    "failed_task_count" : 0,
    "id" : 17,
    "inputs" : "{}",
    "operation_level" : "CLUSTER",
    "progress_percent" : 100.0,
    "queued_task_count" : 0,
    "request_context" : "Kerberos Service Check",
    "request_schedule" : null,
    "request_status" : "COMPLETED",
    "resource_filters" : [
      {
        "service_name" : "KERBEROS"
      }
    ],
    "start_time" : 1449759400313,
    "task_count" : 10,
    "timed_out_task_count" : 0,
    "type" : "COMMAND"
  },
  "stages" : [
    { },
    { },
    { },
    { },
    { },
    { },
    { },
    { },
    { },
    { }
  ],
  "tasks" : [
    {
      "Tasks" : {
        "command" : "EXECUTE",
        "command_detail" : "Preparing Operations",
        "host_name" : null,
        "id" : 153,
        "request_id" : 17,
        "role" : "AMBARI_SERVER_ACTION",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "EXECUTE",
        "command_detail" : "Create Principals",
        "host_name" : null,
        "id" : 154,
        "request_id" : 17,
        "role" : "AMBARI_SERVER_ACTION",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "EXECUTE",
        "command_detail" : "Create Keytabs",
        "host_name" : null,
        "id" : 155,
        "request_id" : 17,
        "role" : "AMBARI_SERVER_ACTION",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "CUSTOM_COMMAND",
        "command_detail" : "SET_KEYTAB KERBEROS/KERBEROS_CLIENT",
        "host_name" : "c6402.ambari.apache.org",
        "id" : 156,
        "request_id" : 17,
        "role" : "KERBEROS_CLIENT",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "EXECUTE",
        "command_detail" : "Finalize Operations",
        "host_name" : null,
        "id" : 157,
        "request_id" : 17,
        "role" : "AMBARI_SERVER_ACTION",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "SERVICE_CHECK",
        "command_detail" : "SERVICE_CHECK KERBEROS",
        "host_name" : "c6402.ambari.apache.org",
        "id" : 158,
        "request_id" : 17,
        "role" : "KERBEROS_SERVICE_CHECK",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "EXECUTE",
        "command_detail" : "Preparing Operations",
        "host_name" : null,
        "id" : 159,
        "request_id" : 17,
        "role" : "AMBARI_SERVER_ACTION",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "EXECUTE",
        "command_detail" : "Destroy Principals",
        "host_name" : null,
        "id" : 160,
        "request_id" : 17,
        "role" : "AMBARI_SERVER_ACTION",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "CUSTOM_COMMAND",
        "command_detail" : "REMOVE_KEYTAB KERBEROS/KERBEROS_CLIENT",
        "host_name" : "c6402.ambari.apache.org",
        "id" : 161,
        "request_id" : 17,
        "role" : "KERBEROS_CLIENT",
        "status" : "COMPLETED"
      }
    },
    {
      "Tasks" : {
        "command" : "EXECUTE",
        "command_detail" : "Finalize Operations",
        "host_name" : null,
        "id" : 162,
        "request_id" : 17,
        "role" : "AMBARI_SERVER_ACTION",
        "status" : "COMPLETED"
      }
    }
  ]
}
```

# Solution
On the backend, convert `null` host name values to the FQDN of the Ambari server before returning
response.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
72977d5 

Diff: https://reviews.apache.org/r/41238/diff/


Testing (updated)
-------

Manually tested

# Local test results:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 59:09.415s
[INFO] Finished at: Thu Dec 10 22:55:23 EST 2015
[INFO] Final Memory: 68M/1663M
[INFO] ------------------------------------------------------------------------

# Jenkins test results: 

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:47 h
[INFO] Finished at: 2015-12-11T11:17:28+00:00
[INFO] Final Memory: 107M/665M
[INFO] ------------------------------------------------------------------------


Thanks,

Robert Levas


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message