hashicorp / hashicorp/packer-plugin-oracle

packer fail to launch oracle oci instance

Open
#117 1 comment 2 reactions 0 assignees View on GitHub
bug stage/needs-investigation stage/waiting-reply stale
Dominant language
Go
Stars
14
Forks
16
PR merge metrics
No merged PRs in 30d

Description

#### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) 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

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

#### Overview of the Issue

A paragraph or two about the issue you're experiencing.

#### Reproduction Steps

Steps to reproduce this issue

### Packer version

From `packer version`

### Simplified Packer Template

If the file is longer than a few dozen lines, please include the URL to the
[gist](https://gist.github.com/) of the log or use the [Github detailed
format](https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d)
instead of posting it directly in the issue.

### Operating system and Environment details

OS, Architecture, and any other information you can provide about the
environment.

### Log Fragments and crash.log files

Include appropriate log fragments. If the log is longer than a few dozen lines,
please include the URL to the [gist](https://gist.github.com/) of the log or
use the [Github detailed format](https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d) instead of posting it directly in the issue.

Set the env var `PACKER_LOG=1` for maximum log detail.

I get Problem creating instance: Error returned by Compute Service. Http Status Code: 400. Error Code: CannotParseRequest. Opc request id: 2160e4884da84496111b0aabfcf3029d/E572F4F6442A7FA9334017C75DE8E25D/0C9F438D8FC64774E1559F3CC645E537. Message: Incorrectly formatted request. Please refer to our documentation for help.

the full error log is
` Problem creating instance: Error returned by Compute Service. Http Status Code: 400. Error Code: CannotParseRequest. Opc request id: 2160e4884da84496111b0aabfcf3029d/E572F4F6442A7FA9334017C75DE8E25D/0C9F438D8FC64774E1559F3CC645E537. Message: Incorrectly formatted request. Please refer to our documentation for help.
==> oracle-oci.safebreach-management: Operation Name: LaunchInstance
==> oracle-oci.safebreach-management: Timestamp: 2024-05-26 14:11:53 +0000 GMT
==> oracle-oci.safebreach-management: Client Version: Oracle-GoSDK/65.4.0
==> oracle-oci.safebreach-management: Request Endpoint: POST https://iaas.us-ashburn-1.oraclecloud.com/20160918/instances
==> oracle-oci.safebreach-management: Troubleshooting Tips: See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_400__400_cannotparserequest for more information about resolving this error.
==> oracle-oci.safebreach-management: Also see https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/LaunchInstance for details on this operation's requirements.
==> oracle-oci.safebreach-management: To get more info on the failing request, you can set OCI_GO_SDK_DEBUG env var to info or higher level to log the request/response details.
==> oracle-oci.safebreach-management: If you are unable to resolve this Compute issue, please contact Oracle support and provide them this full error message.
Build 'oracle-oci.safebreach-management' errored after 1 second 54 milliseconds: Problem creating instance: Error returned by Compute Service. Http Status Code: 400. Error Code: CannotParseRequest. Opc request id: 2160e4884da84496111b0aabfcf3029d/E572F4F6442A7FA9334017C75DE8E25D/0C9F438D8FC64774E1559F3CC645E537. Message: Incorrectly formatted request. Please refer to our documentation for help.
Operation Name: LaunchInstance
Timestamp: 2024-05-26 14:11:53 +0000 GMT
Client Version: Oracle-GoSDK/65.4.0
Request Endpoint: POST https://iaas.us-ashburn-1.oraclecloud.com/20160918/instances
Troubleshooting Tips: See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_400__400_cannotparserequest for more information about resolving this error.
Also see https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/LaunchInstance for details on this operation's requirements.
To get more info on the failing request, you can set OCI_GO_SDK_DEBUG env var to info or higher level to log the request/response details.
If you are unable to resolve this Compute issue, please contact Oracle support and provide them this full error message.

==> Wait completed after 1 second 54 milliseconds

==> Some builds didn't complete successfully and had errors:
--> oracle-oci.safebreach-management: Problem creating instance: Error returned by Compute Service. Http Status Code: 400. Error Code: CannotParseRequest. Opc request id: 2160e4884da84496111b0aabfcf3029d/E572F4F6442A7FA9334017C75DE8E25D/0C9F438D8FC64774E1559F3CC645E537. Message: Incorrectly formatted request. Please refer to our documentation for help.
Operation Name: LaunchInstance
Timestamp: 2024-05-26 14:11:53 +0000 GMT
Client Version: Oracle-GoSDK/65.4.0
Request Endpoint: POST https://iaas.us-ashburn-1.oraclecloud.com/20160918/instances
Troubleshooting Tips: See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_400__400_cannotparserequest for more information about resolving this error.
Also see https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/LaunchInstance for details on this operation's requirements.
To get more info on the failing request, you can set OCI_GO_SDK_DEBUG env var to info or higher level to log the request/response details.
If you are unable to resolve this Compute issue, please contact Oracle support and provide them this full error message.

==> Builds finished but no artifacts were created.
2024/05/26 14:11:54 waiting for all plugin processes to complete...
2024/05/26 14:11:54 /home/safebreach/.packer.d/plugins/github.com/hashicorp/oracle/packer-plugin-oracle_v1.1.0_x5.0_linux_amd64: plugin process exited`

the hcl file is

`packer {
required_plugins {
oracle = {
version = ">= 1.1.0"
source = "github.com/hashicorp/oracle"
}
chef = {
version = ">= 1.0.0"
source = "github.com/hashicorp/chef"
}
}
}

source "oracle-oci" "my-vm" {
image_name = "${var.image_name}-${var.build_number}"
availability_domain = "${var.availability_domain}"
compartment_ocid = "${var.compartment_ocid}"
tenancy_ocid = "${var.tenancy_ocid}"
fingerprint = "${var.fingerprint}"
user_ocid = "${var.user_ocid}"
base_image_ocid = var.base_image_ocid
image_name = "ExampleImage"
shape = "VM.Standard1.1"
ssh_username = "ubuntu"
subnet_ocid = "${var.subnet_ocid}"
}

build {
sources = ["source.oracle-oci.my-vm"]
}`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.