Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-23021

ServiceInfo: credential_store_supported attempts to overwrite maintenance_state

    XMLWordPrintableJSON

Details

    Description

      Try to update credential_store_supported property of a service:

      $ 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"
      

      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:

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

      Attachments

        Issue Links

          Activity

            People

              adoroszlai Attila Doroszlai
              adoroszlai Attila Doroszlai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h