terraform-provider-redfish icon indicating copy to clipboard operation
terraform-provider-redfish copied to clipboard

data - redfish_dell_idrac_attributes - "unexpected end of JSON input"

Open robbycuenot opened this issue 1 year ago • 2 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform Redfish Provider Version

Terraform Cloud Workspace Version 1.7.0 Redfish Provider Version 1.1.0

Server(s) details and firmware version

Dell R930 (D8KQRD2)

iDRAC 8 BIOS Version 2.13.0 Firmware Version 2.85.85.85

Affected Resource(s)

data "redfish_dell_idrac_attributes"

Terraform Configuration Files

terraform {
  required_providers {
    redfish = {
      source = "dell/redfish"
      version = "1.1.0"
    }
  }
}

provider "redfish" {
    user = var.idrac_username
    password = var.idrac_password
}

data "redfish_dell_idrac_attributes" "idrac" {
  redfish_server {
    endpoint      = var.r930_idrac_endpoint
    ssl_insecure = true
  }
}

data "redfish_bios" "bios" {
  redfish_server {
    endpoint      = var.r930_idrac_endpoint
    ssl_insecure = true
  }
}

variable "idrac_username" {
  type = string
  sensitive = true
}

variable "idrac_password" {
  type = string
  sensitive = true
}

variable "r930_idrac_endpoint" {
  type = string
  sensitive = true
}

Debug Output

https://gist.github.com/robbycuenot/b1db72eb7a2e2d167498abe2ab140fe7

Panic Output

None

Expected Behavior

The data block should have been read and added to the state, as the BIOS attributes did.

Actual Behavior

After ~10 seconds, an unexpected EOF is received and the iDRAC attributes are not imported to the state

Steps to Reproduce

  1. terraform apply

Important Factoids

Running on terraform cloud, using a local linux agent with the official TFC container from here: https://hub.docker.com/r/hashicorp/tfc-agent/tags

Other resources work correctly, such as creating user accounts or retrieving BIOS attributes.

It is possible that this is a timeout issue, as the iDRACs tend to have slow response times.

References

robbycuenot avatar Jan 26 '24 15:01 robbycuenot

@robbycuenot, thank you for submitting this issue. Just so you know, the redfish provider does not officially support iDRAC8 yet, however, we will take a look internally. It could be due to the API response from iDRAC8. Could you please confirm whether you are receiving this error when using the provider with iDRAC9 as well?

anupamaloke avatar Jan 29 '24 14:01 anupamaloke

@anupamaloke I don't have an iDRAC 9 machine to test on unfortunately

robbycuenot avatar Jan 29 '24 16:01 robbycuenot

@robbycuenot We are not able to reproduce in iDrac9. Hence closing this issue. However we will explore ways for giving more clear error message.

gokul-srivathsan avatar Jun 04 '24 13:06 gokul-srivathsan