You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Balázs Bence Sári (JIRA)" <ji...@apache.org> on 2017/06/14 10:08:00 UTC

[jira] [Created] (AMBARI-21242) Improve error message for Blueprints deployment with incorrect credential type

Balázs Bence Sári created AMBARI-21242:
------------------------------------------

             Summary: Improve error message for Blueprints deployment with incorrect credential type
                 Key: AMBARI-21242
                 URL: https://issues.apache.org/jira/browse/AMBARI-21242
             Project: Ambari
          Issue Type: Bug
    Affects Versions: 2.2.0
            Reporter: Balázs Bence Sári
            Assignee: Balázs Bence Sári
             Fix For: 3.0.0


During a Blueprints deployment of a Kerberized cluster, if the credential type is specified incorrectly (using an invalid or unknown type), the Blueprints deployment code currently throws the following error message back to the user:

{code}
Invalid Cluster Creation Template: org.apache.ambari.server.topology.InvalidTopologyTemplateException: credential.type is invalid
{code}

[~arpit] found this issue while attempting to deploy a Kerberized cluster with Blueprints.  The Blueprint wiki incorrectly mentions one of the types as "PERSISTENT", when the correct value is actually "PERSISTED", per the enumerated type being checked in the validation code:

From org.apache.ambari.server.controller.internal.ProvisionClusterRequest#parseCredentials:

{code}
CredentialStoreType type = Enums.getIfPresent(CredentialStoreType.class, typeString.toUpperCase()).orNull();
        if (type == null) {
          throw new InvalidTopologyTemplateException("credential.type is invalid.");
        }
{code}

The enumerated type is actually:

{code}
public enum CredentialStoreType {
  PERSISTED,
  TEMPORARY
}
{code}


The Blueprints validation code should be updated to make the error message contain the valid set of types that can be set by the user, based on the values in the enumerated type above.

The Wiki will need to be updated to show the correct types, but it would be good to make this error message more descriptive, in order to help users determine why a Cluster Creation Template deployment is failing.  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)