cloudera-labs / cloudera.cluster

An Ansible collection for lifecycle and management of Cloudera CDP Private Cloud resources on bare metal, IaaS, and PaaS.
Apache License 2.0
32 stars 46 forks source link

Cloudera API failing to import cluster template #92

Closed ovolmar closed 9 months ago

ovolmar commented 1 year ago

msg": "Cluster template import failed. Result message: Cannot deserialize instance of java.lang.String out of START_ARRAY token\n at [Source: (org.apache.cxf.transport.http.AbstractHTTPDestination$1); line: 1, column: 681] (through reference chain: com.cloudera.api.model.ApiClusterTemplate[\"instantiator\"]->com.cloudera.api.model.ApiClusterTemplateInstantiator[\"variables\"]->java.util.ArrayList[0]->com.cloudera.api.model.ApiClusterTemplateVariable[\"value\"])\n"

helmikhalifa commented 1 year ago

Hi @ovolmar did you find a solution please? I am facing the same problem : TASK [cloudera.cluster.cluster : Fail because of unsuccessful cluster template import] *** fatal: [ip]: FAILED! => {"changed": false, "msg": "Cluster template import failed. Result message: Cannot deserialize instance of java.lang.String out of START_ARRAY token\n at [Source: (org.apache.cxf.transport.http.AbstractHTTPDestination$1); line: 1, column: 1361] (through reference chain: com.cloudera.api.model.ApiClusterTemplate[\"instantiator\"]->com.cloudera.api.model.ApiClusterTemplateInstantiator[\"variables\"]->java.util.ArrayList[12]->com.cloudera.api.model.ApiClusterTemplateVariable[\"value\"])\n"}

HirossxD commented 1 year ago

I had the same problem, the issue was in the definition.yml when setting multiple disks in the dfs_data_dir_list. You cannot use the array/list format like:

 DATANODE:
          dfs_data_dir_list:
            - /dfs/disk1
            - /dfs/disk2
            - /dfs/disk3

I have used the comma separated paths in one line instead, it worked afterwards. for example:

 DATANODE:
          dfs_data_dir_list: /dfs/dn1,/dfs/dn2,/dfs/dn3,/dfs/dn4

The error mesage itself Cannot deserialize instance of java.lang.String out of START_ARRAY tells you that CM cannot read/parse the array of paths, it is all being imported in the first input field of dfs.data.data.dir config, which does not accept array. hope that helped :)

helmikhalifa commented 1 year ago

@HirossxD thanks yes it is the solution I found too :)