Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on json unmarshalling to go struct (MessageResource.message_list.details of type map[string]interface {}) #204

Closed
kruftik opened this issue Nov 27, 2020 · 4 comments

Comments

@kruftik
Copy link

kruftik commented Nov 27, 2020

Nutanix Cluster Information

Nutanix Prism Central 5.17.0.3

Terraform Version

Terraform v0.13.5
+ provider registry.terraform.io/terraform-providers/nutanix v1.1.0

Initializing provider plugins...
- Using previously-installed terraform-providers/nutanix v1.1.0

Terraform has been successfully initialized!

Affected Resource(s)

It seems that the issue affects any Nutanix resource since it occurs on read phase of terraform plan / terraform apply commands. The cluster and subnet resources are 100% affected.

Terraform Configuration Files

data "nutanix_cluster" "cluster" {
  cluster_id = var.nutanix_cluster_uuid
}

Debug Output

can be provided upon request

Expected Behavior

terraform successfully fetch the actual cloud state of the resources

Actual Behavior

The following error occurs: Error: json: cannot unmarshal string into Go struct field MessageResource.message_list.details of type map[string]interface {}

Steps to Reproduce

run a command that causes terraform to request current state of the cloud resources (terraform apply / terraform plan)

@kruftik kruftik closed this as completed Nov 27, 2020
@kruftik kruftik reopened this Nov 27, 2020
@yannickstruyf3
Copy link
Collaborator

Hi @kruftik,

Is the data source for nutanix_cluster always failing (in 100 percent of the runs)?
Are you testing with a local user (admin?) or with an AD/LDAP user?

@kruftik
Copy link
Author

kruftik commented Nov 27, 2020

Hi @yannickstruyf3,

Is the data source for nutanix_cluster always failing (in 100 percent of the runs)?

no. definitely, the errors happens not at each and every request to the API, I'd say it fails on 60% of the tries or so

Are you testing with a local user (admin?) or with an AD/LDAP user?

the account used is an AD-based one

@yannickstruyf3
Copy link
Collaborator

@kruftik Thanks for the fast reply!

For testing purposes, would it be possible to check if you have the same behaviour with a local (non-ad) account?
I would also recommend to create a Nutanix support ticket to validate the API failures on Prism Central side.

@kruftik
Copy link
Author

kruftik commented Nov 30, 2020

@yannickstruyf3,

we tried to reproduce the issue using local nutanix account and didn't succeed.

moreover, we've identified the root cause of the problem - some of AD-controllers were not reachable from the Nutanix infrastructure. As soon as all the controllers became reachable, the problem has gone.

thanks a lot for a tip!

@kruftik kruftik closed this as completed Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants