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

Incorrect error returned by the ressource outscale_flexible_gpu #500

Open
julienpirot-numspot opened this issue Jan 21, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@julienpirot-numspot
Copy link


name: Bug report
about: For the ressource outscale_flexible_gpu the error returned lacks informations
labels: bug, new, error, gpu


Hi there,

We discovered that when creating a "outscale_flexible_gpu", if an error occurs, the response from the api is hidden by Terraform. The api gives a detailed answer with errors code and explanation. Terraform only says 400 Bad Request without any details.

Terraform Version & Outscale Provider Version

Terraform => 10.0.3
Outscale provider => 1.0.1

Terraform Configuration Files

Here is an example of the code terraform used to generate an error

terraform {
  required_providers {
    outscale = {
      source  = "outscale/outscale"
      version = "1.0.1"
    }
  }
}

provider "outscale" {
  access_key_id = ""
  secret_key_id = ""
}

resource "outscale_flexible_gpu" "openshift_node_gpu" {
  model_name            = "nvidia-p6"
  generation            = "v5"
  subregion_name = "cloudgouv-eu-west-1a"
  delete_on_vm_deletion = true
}
...

Debug Output

Here is the Output of Terraform with the environment variable TF_LOG=DEBUG:

2025-01-21T10:53:17.985Z [INFO]  backend/local: apply calling Apply
2025-01-21T10:53:17.985Z [DEBUG] Building and walking apply graph for NormalMode plan
2025-01-21T10:53:17.986Z [DEBUG] Resource state not found for node "outscale_flexible_gpu.openshift_node_gpu2", instance outscale_flexible_gpu.openshift_node_gpu2
2025-01-21T10:53:17.986Z [DEBUG] ProviderTransformer: "outscale_flexible_gpu.openshift_node_gpu2" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/outscale/outscale"]
2025-01-21T10:53:17.986Z [DEBUG] ProviderTransformer: "outscale_flexible_gpu.openshift_node_gpu (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/outscale/outscale"]
2025-01-21T10:53:17.986Z [DEBUG] ProviderTransformer: "outscale_flexible_gpu.openshift_node_gpu2 (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/outscale/outscale"]
2025-01-21T10:53:17.986Z [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/outscale/outscale\"]" references: []
2025-01-21T10:53:17.986Z [DEBUG] ReferenceTransformer: "outscale_flexible_gpu.openshift_node_gpu (expand)" references: []
2025-01-21T10:53:17.986Z [DEBUG] ReferenceTransformer: "outscale_flexible_gpu.openshift_node_gpu2 (expand)" references: []
2025-01-21T10:53:17.986Z [DEBUG] ReferenceTransformer: "outscale_flexible_gpu.openshift_node_gpu2" references: []
2025-01-21T10:53:17.987Z [DEBUG] Starting graph walk: walkApply
2025-01-21T10:53:17.987Z [DEBUG] created provider logger: level=debug
2025-01-21T10:53:17.987Z [INFO]  provider: configuring client automatic mTLS
2025-01-21T10:53:17.992Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/outscale/outscale/1.0.1/linux_amd64/terraform-provider-outscale_v1.0.1 args=[".terraform/providers/registry.terraform.io/outscale/outscale/1.0.1/linux_amd64/terraform-provider-outscale_v1.0.1"]
2025-01-21T10:53:17.993Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/outscale/outscale/1.0.1/linux_amd64/terraform-provider-outscale_v1.0.1 pid=77780
2025-01-21T10:53:17.993Z [DEBUG] provider: waiting for RPC address: plugin=.terraform/providers/registry.terraform.io/outscale/outscale/1.0.1/linux_amd64/terraform-provider-outscale_v1.0.1
2025-01-21T10:53:18.005Z [INFO]  provider.terraform-provider-outscale_v1.0.1: configuring server automatic mTLS: timestamp=2025-01-21T10:53:18.005Z
2025-01-21T10:53:18.037Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: 2025/01/21 10:53:18 [ERROR] Error parsing provider name "registry.terraform.io/providers/outscale/outscale/": Invalid provider source string: The "source" attribute must be in the format "[hostname/][namespace/]name"
2025-01-21T10:53:18.038Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: plugin address: address=/tmp/plugin1455994773 network=unix timestamp=2025-01-21T10:53:18.037Z
2025-01-21T10:53:18.038Z [DEBUG] provider: using plugin: version=5
outscale_flexible_gpu.openshift_node_gpu2: Creating...
2025-01-21T10:53:18.060Z [INFO]  Starting apply for outscale_flexible_gpu.openshift_node_gpu2
2025-01-21T10:53:18.060Z [DEBUG] outscale_flexible_gpu.openshift_node_gpu2: applying the planned Create change
2025-01-21T10:53:18.060Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: 2025/01/21 10:53:18 [DEBUG] Waiting for state to become: [success]
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: 2025/01/21 10:53:18 
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: POST /api/v1/CreateFlexibleGpu HTTP/1.1
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Host: api.cloudgouv-eu-west-1.outscale.com
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: User-Agent: terraform-provider-outscale/1.0.1
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Content-Length: 109
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Accept: application/json
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Content-Type: application/json
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Accept-Encoding: gzip
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: {"DeleteOnVmDeletion":true,"Generation":"v5","ModelName":"nvidia-p6","SubregionName":"cloudgouv-eu-west-1a"}
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: 2025/01/21 10:53:18 [DEBUG] Outscale API Request Details:
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: ---[ REQUEST ]---------------------------------------
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: POST /api/v1/CreateFlexibleGpu HTTP/1.1
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Host: api.cloudgouv-eu-west-1.outscale.com
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: User-Agent: terraform-provider-outscale/1.0.1
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Content-Length: 109
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Accept: application/json
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Authorization: AWS4-HMAC-SHA256 Credential=XXXXXX/20250121/cloudgouv-eu-west-1/oapi/aws4_request, SignedHeaders=accept;content-type;host;x-amz-date, Signature=3dcee862ea121be7c68cfa29c99193d0fd8d5b5eeafc9870616203e3608f07af
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Content-Type: application/json
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: X-Amz-Date: 20250121T105318Z
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Accept-Encoding: gzip
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: {
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:  "DeleteOnVmDeletion": true,
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:  "Generation": "v5",
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:  "ModelName": "nvidia-p6",
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:  "SubregionName": "cloudgouv-eu-west-1a"
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: }
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1
2025-01-21T10:53:18.061Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: -----------------------------------------------------
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: 2025/01/21 10:53:20 [DEBUG] Outscale API Response Details:
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: ---[ RESPONSE ]--------------------------------------
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: HTTP/1.1 400 Bad Request
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Connection: close
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Content-Length: 143
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Access-Control-Allow-Origin: *
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Content-Type: application/json
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Date: Tue, 21 Jan 2025 10:53:20 GMT
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Server: api-gw/0
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: {
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:  "Errors": [
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:   {
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:    "Type": "InsufficientCapacity",
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:    "Details": "",
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:    "Code": "10001"
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:   }
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:  ],
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:  "ResponseContext": {
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:   "RequestId": "50767586-6d01-4500-8d91-5b11777e06b0"
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1:  }
2025-01-21T10:53:20.342Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: }
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: -----------------------------------------------------
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: 2025/01/21 10:53:20 
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: HTTP/1.1 400 Bad Request
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Connection: close
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Content-Length: 143
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Access-Control-Allow-Origin: *
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Content-Type: application/json
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Date: Tue, 21 Jan 2025 10:53:20 GMT
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: Server: api-gw/0
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1
2025-01-21T10:53:20.343Z [DEBUG] provider.terraform-provider-outscale_v1.0.1: {"Errors":[{"Type":"InsufficientCapacity","Details":"","Code":"10001"}],"ResponseContext":{"RequestId":"50767586-6d01-4500-8d91-5b11777e06b0"}}
2025-01-21T10:53:20.343Z [ERROR] provider.terraform-provider-outscale_v1.0.1: Response contains error diagnostic: tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_summary="400 Bad Request" tf_resource_type=outscale_flexible_gpu diagnostic_detail="" diagnostic_severity=ERROR tf_proto_version=5.4 tf_provider_addr=registry.terraform.io/providers/outscale/outscale/ @module=sdk.proto tf_req_id=3ed7fc60-b749-d83a-e4e4-066c393b6ed7 timestamp=2025-01-21T10:53:20.343Z
2025-01-21T10:53:20.354Z [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2025-01-21T10:53:20.354Z [ERROR] vertex "outscale_flexible_gpu.openshift_node_gpu2" error: 400 Bad Request
╷
│ Error: 400 Bad Request
│ 
│   with outscale_flexible_gpu.openshift_node_gpu2,
│   on main.tf line 22, in resource "outscale_flexible_gpu" "openshift_node_gpu2":
│   22: resource "outscale_flexible_gpu" "openshift_node_gpu2" {
│ 
╵
2025-01-21T10:53:20.360Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-01-21T10:53:20.363Z [INFO]  provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/outscale/outscale/1.0.1/linux_amd64/terraform-provider-outscale_v1.0.1 id=77780
2025-01-21T10:53:20.363Z [DEBUG] provider: plugin exited
@julienpirot-numspot julienpirot-numspot added the bug Something isn't working label Jan 21, 2025
@outscale-toa
Copy link
Member

Hi @julienpirot-numspot,

Thanks for reaching us, we are looking at your issue

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants