You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Doroszlai, Attila (JIRA)" <ji...@apache.org> on 2017/11/29 08:20:00 UTC
[jira] [Created] (AMBARI-22539) Cannot add host with host_name in
request body
Doroszlai, Attila created AMBARI-22539:
------------------------------------------
Summary: Cannot add host with host_name in request body
Key: AMBARI-22539
URL: https://issues.apache.org/jira/browse/AMBARI-22539
Project: Ambari
Issue Type: Bug
Components: ambari-server
Affects Versions: 2.6.0
Reporter: Doroszlai, Attila
Assignee: Doroszlai, Attila
Priority: Critical
STR:
# Create cluster via blueprints
# Add a new node to one of the host groups specifying {{host_name}} in the request body according to the "multiple hosts" [example in wiki|https://cwiki.apache.org/confluence/display/AMBARI/Blueprints#Blueprints-AddHostRequest]
Expected result: host is added
Actual result: request is rejected with "Must specify either host_name or host_count" error
{noformat}
$ curl -X POST -d '[ { "blueprint": "blue", "host_group": "node", "host_name": "c6402.ambari.apache.org" } ]' http://c6401.ambari.apache.org:8080/api/v1/clusters/TEST/hosts
HTTP/1.1 400 Bad Request
{noformat}
Similar request with host name under {{Hosts/host_name}} is accepted:
{noformat}
$ curl -X POST -d '[ { "blueprint": "blue", "host_group": "node", "Hosts": { "host_name": "c6403.ambari.apache.org" } } ]' http://c6401.ambari.apache.org:8080/api/v1/clusters/TEST/hosts
HTTP/1.1 202 Accepted
{noformat}
Also, request with host name specified path is accepted:
{noformat}
$ curl -X POST -d '[ { "blueprint": "blue", "host_group": "node" } ]' http://c6401.ambari.apache.org:8080/api/v1/clusters/TEST/hosts/c6404.ambari.apache.org
HTTP/1.1 202 Accepted
{noformat}
All three requests work fine in Ambari 2.5.2.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)