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 2018/02/19 13:56:00 UTC

[jira] [Created] (AMBARI-23021) ServiceInfo/credential_store_supported applied to maintenance_state

Doroszlai, Attila created AMBARI-23021:
------------------------------------------

             Summary: ServiceInfo/credential_store_supported applied to maintenance_state
                 Key: AMBARI-23021
                 URL: https://issues.apache.org/jira/browse/AMBARI-23021
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.5.0
            Reporter: Doroszlai, Attila


Try to update {{credential_store_supported}} property of a service:

{noformat}
$ curl -X PUT -d @- "http://$AMBARI_SERVER:8080/api/v1/clusters/TEST/services/HDFS" <<EOF
{ "ServiceInfo": { "credential_store_supported": "true" } }
EOF
HTTP/1.1 400 Bad Request
...
  "message" : "java.lang.IllegalArgumentException: No enum constant org.apache.ambari.server.state.MaintenanceState.true"
{noformat}

Expected response:

{{IllegalArgumentException: Invalid arguments, cannot update credential_store_supported as it is set only via service definition.}}

The response code is the same as expected due to a coincidence.

The problem is setting the wrong property:

{noformat}
 414     o = properties.get(SERVICE_CREDENTIAL_STORE_SUPPORTED_PROPERTY_ID);
 415     if (null != o) {
 416       svcRequest.setMaintenanceState(o.toString());
 417     }
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)