Packer: Access Denied on osc-bsu builder at VM stopping step

Created on 4 Aug 2020  ยท  8Comments  ยท  Source: hashicorp/packer

Hello,

Overview of the Issue

when I build an image with osc-bsu (Outscale) builder, I experience an Access Denied after the "Waiting for the vm to stop..."

Apparently, this is due to the absence of an x-amz-date header in the ReadVms API call.

Reproduction Steps

1) Build an image with osc-bsu builder.
2) Get AccessDenied

Packer version

Packer v1.6.1

Simplified Packer Buildfile

{
"builders": [
{
"omi_name": "Windows",
"access_key": "{{user ak}}",
"region": "{{user region}}",
"secret_key": "{{user sk}}",
"source_omi": "ami-abe953fa",
"ssh_interface": "public_ip",
"ssh_username": "outscale",
"type": "osc-bsu",
"vm_type": "tinav4.c2r4p1",
"force_deregister": true
}
],
"variables": {
"region": "eu-west-2",
"ak": "...",
"sk": "..."
}
}

Operating system and Environment details

Linux 3.10.0-1062.4.1.el7.x86_64 #1 SMP Fri Oct 18 17:15:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Log Fragments and crash.log files

2020/08/04 13:02:12 packer-builder-osc-bsu plugin: [DEBUG] Request
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: POST /oapi/latest/ReadImages HTTP/1.1
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: Host: api.dv-west-1.outscale.com
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: Content-Type: application/json
2020/08/04 13:02:12 packer-builder-osc-bsu plugin:
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: {"Filters":{"AccountAliases":["self"],"ImageNames":["Windows"]}}
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: [DEBUG] Response
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: HTTP/1.1 401 Unauthorized
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: Content-Length: 148
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: Connection: keep-alive
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: Content-Type: application/json
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: Date: Tue, 04 Aug 2020 13:02:12 GMT
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: Server: nginx
2020/08/04 13:02:12 packer-builder-osc-bsu plugin:
2020/08/04 13:02:12 packer-builder-osc-bsu plugin: {"Errors":[{"Code":"1","Details":"User unidentified","Type":"AccessDenied"}],"ResponseContext":{"RequestId":"a2323eca-482e-4c8b-a826-57b190a763c0"}}
2020/08/04 13:02:12 ui error: ESC[1;31m==> osc-bsu: Error describing OMI: error, status code 401, reason: {
==> osc-bsu: "Errors": [
==> osc-bsu: {
==> osc-bsu: "Code": "1",
==> osc-bsu: "Details": "User unidentified",
==> osc-bsu: "Type": "AccessDenied"
==> osc-bsu: }
==> osc-bsu: ],
==> osc-bsu: "ResponseContext": {
==> osc-bsu: "RequestId": "a2323eca-482e-4c8b-a826-57b190a763c0"
==> osc-bsu: }
==> osc-bsu: }ESC[0m

bug buildeoutscale community-supported plugin

Most helpful comment

Ping @marinsalinas. FYI @aubustou is part of Outscale's R&D team.

All 8 comments

Ping @marinsalinas. FYI @aubustou is part of Outscale's R&D team.

same happening for me as soon as I have an tags block in the osc-bsu builder. force_deregister makes it break aswell.

Is there any news on this? :-)

@le-garff-yoann Here's a Linux build with that feature fixed. It should arrive soon on official Packer releases.
https://osu.eu-west-2.outscale.com/omi-packer/linux_amd64-forcederegister.zip

@Hakujou Thank you for the info ;)

@Hakujou can you link to the PR related to your fix? I can't find it.

@SwampDragons, @marinsalinas is the one who did the fix, he did not submitted the PR yet as he's working on other things (migrating to new Outscale Go SDK, for instance).
It should arrive soon.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wduncanfraser picture wduncanfraser  ยท  3Comments

Nikoos picture Nikoos  ยท  3Comments

sourav82 picture sourav82  ยท  3Comments

znerd picture znerd  ยท  3Comments

mushon4 picture mushon4  ยท  3Comments