Packer: Packer 1.1.0 Amazon EBS builder fails in aws-cn

Created on 12 Oct 2017  ยท  20Comments  ยท  Source: hashicorp/packer

Hi,
the packer 1.1.0 EBS builder fails with the following error in AWS China

Error launching source instance: UnsupportedOperation: Specifying tags during instance launch is not supported in this region.

I've an ongoing case with AWS China, but atm it seems that this region does not support tag-on-creation so a solution might need to revert the packer stage that tags instances from before 1.1.0 or a downgrade to 1.0.4.

@mwhooker Do you intend to support AWS China?
@tuxinaut for reference.

Cheers, Mark

buildeamazon

Most helpful comment

We'll see about adding support for this

All 20 comments

hmmm, interesting problem. Thanks for the report.

I would definitely like to support aws china, but from the announcement post

This new feature is available now in all regions except AWS GovCloud (US) and China (Beijing). You can start using it today from the AWS Management Console, AWS Command Line Interface (CLI), AWS Tools for Windows PowerShell, or the AWS APIs.

We are planning to add support for additional EC2 resource types over time; stay tuned for more information!

it seems like it should be coming in the future. I don't like the idea of special casing a whole bunch of code to support an edge case, when it's possible to just use packer 1.0.4

Let's not worry about it unless there's a reason packer 1.0.0 won't work for this

I ran into the same issue since I am using AWS GovCloud, and there can be some pretty long delays in receiving updated feature sets for that region... I would not count on it just fixing itself in the near future (at least not for all regions). Since this is a recent change, is there no way to make it optional or gracefully fail if it is not supported?

and there can be some pretty long delays in receiving updated feature sets for that region... I would not count on it just fixing itself in the near future (at least not for all regions).

that's a good point, and something to keep an eye on.

Since this is a recent change, is there no way to make it optional or gracefully fail if it is not supported?

Unfortunately this would be a pretty large change, and not one we'd be excited to support. We'd like to be able to continue to advance the product, but prior versions of packer are always available at releases.hashicorp.com/packer/

If there's a bug or a new feature that's preventing you from using an old version of packer, I'd be curious to hear about it.

I'm mostly concerned about how sustainable this will be down the line. Right now 1.0.4 is only a couple of months old... but what about 6 months from now? Over time, how much will the online documentation start to differ from what can be done in 1.0.4? It would be unfortunate to deny this toolset to those serving in government.

My problem is, as a Mac user, how to downgrade to 1.0.4? Homebrew is not supporting this feature anymore! @ofosos


New update.

Problem solved.

With @mwhooker 's info, found https://releases.hashicorp.com/packer/1.0.4/.

Put it under /usr/local/bin.

@xuyuji9000 said:

..., how to downgrade to 1.0.4? Homebrew is not supporting this feature anymore!

  1. install an older version of the brew package by directly referring to the older .rb definition:
    brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/97de1fc6877aaf0797767e57db8db7ca90545723/Formula/packer.rb

To get the above link, I browse-by-gitref-date: https://github.com/Homebrew/homebrew-core/blob/master@%7B2017-09-12%2018:30:00%7D/Formula/packer.rb, and then hit the 'raw' button to get the above raw link.

  1. Then switch among installed versions:
# brew switch packer 0.12.3
Cleaning /usr/local/Cellar/packer/0.12.3
Cleaning /usr/local/Cellar/packer/1.0.4
Cleaning /usr/local/Cellar/packer/1.1.1
2 links created for /usr/local/Cellar/packer/0.12.3

@mwhooker

Unfortunately this would be a pretty large change, and not one we'd be excited to support. We'd like to be able to continue to advance the product, but prior versions of packer are always available at releases.hashicorp.com/packer/

This is a common issue with govcloud vs commercial. Handling the differences between regions is part of supporting AWS. 2 cents.

Just getting into running Packer on GovCloud, and ran into this issue right away. Is this still just waiting for AWS to add support for, and the solution is for me to run v1.0.4 of Packer? (really?)

We'll see about adding support for this

I found this PR in terraform to add support https://github.com/hashicorp/terraform/pull/14055 which gives some ideas. unfortunately this seems a bit easier for them than it is for packer, but the path is illuminated

Running into this issue as well - I agree with @mgresko's comment "Handling the differences between regions is part of supporting AWS. 2 cents." Would love to see this prioritized.

Running into with this issue as well in govcloud. Would love to see this taken care of.

just a word of support for the devs: GovCloud isn't just "another region", it's actually a whole different "partition". There are a bunch of nuances Packer/Terraform need to take into account when working with GovCloud over the regular corporate partitions we have access to. It'll probably take longer to implement this than would normally take for a new region in the regular partition.

We use a lot of GovCloud and want to look forward to use Packer as a way to help our customers build cross cloud images. This support would greatly influence that.

+1 for GovCloud support

I think it will be hard to support govcloud and aws-cn unless someone with access to these steps up and help us support Packer for these regions. For someone without access to these regions to develop support for something you can't test is very hard and time consuming.

@rickard-von-essen I can understand that argument in general, though no one is really asking for support that is overly unique/specific to those regions... they are still running the regular AWS APIs, just older versions of them.
So I guess I see this more as holding off on tightly coupling Packer to API features that are new, and instead trying to maintain some backwards compatibility with older API versions for a longer period. When things get pushed/updated in GovCloud can vary, but it isn't uncommon to see a good 18+ month lag.

That being said, to the best of my knowledge, anyone that is a U.S. Person can sign-up for access to the GovCloud region ( https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/getting-started-sign-up.html ). If anyone has the expertise to help with support efforts, that would be great! Unfortunately I can only offer testing and debugging support. I'm from the ops side of things, so actively contributing to the code is a bit beyond me :)

@ddsdevon is spot on. There are also many of us who do have access and would be happy to help with testing, but the challenges here are with managing API versioning and differences across AWS partitions (within the Packer codebase).

Our team can certainly test code. We're ramping up on new efforts, so time is short right now, but we're expanding. If that is the case, we might be able to submit some code (else Packer sort of has the brakes on for us).

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