Packer: Atlas postprocessor problem when using whole set of Amazon region

Created on 19 Jul 2017  ยท  10Comments  ยท  Source: hashicorp/packer

Hi,

I using packer:1.0.2 container and I have some problem with the atlas processor.
If I build images in maximum 9 region then it totally works fine. Example set:

        "ap-northeast-2",
        "eu-central-1",
        "us-east-1",
        "sa-east-1",
        "us-west-1",
        "us-west-2",
        "us-east-2",
        "ca-central-1",
        "eu-west-2",
        "ap-south-1"

But If I using the whole set of amazon regions or at least 10 region then I get an error. Example set:

        "ap-southeast-1",
        "ap-southeast-2",
        "eu-central-1",
        "ap-northeast-1",
        "ap-northeast-2",
        "us-east-1",
        "sa-east-1",
        "us-west-1",
        "us-west-2",
        "us-east-2",
        "ca-central-1",
        "eu-west-2",
        "ap-south-1"

I realy dont think that this is related to the number of the region but this is very strange and maybe you have some thoughts on this.

  • Packer version: hashicorp/packer:1.0.2 docker container
  • Host platform: Amazon
  • Post processor:
"post-processors": [
    {
      "type": "atlas",
      "artifact": "mycompany/{{ user `atlas_artifact` }}",
      "token": "{{user `atlas_token`}}",
      "artifact_type": "{{ user `atlas_artifact_type` }}.image",
      "metadata": {
        "created_at": "{{timestamp}}",
        "created": "{{ isotime \"2006-01-02 15:04:05 -0700\" }}",
        "git_rev": "{{user `git_rev`}}",
        "git_branch": "{{user `git_branch`}}",
        "git_tag": "{{user `git_tag`}}",
        "os_user": "{{user `os_user` }}"
      }
    }
  ]
  • Example metadata:
ami_id = ami-173648d7,ami-174648d7,ami-173548d7,ami-173748d7,ami-173848d7,ami-173948d7,ami-173448d7,ami-113648d7,ami-123648d7,ami-133648d7
region = ap-northeast-2,ap-south-1,ca-central-1,eu-west-1,eu-west-2,sa-east-1,us-east-1,us-east-2,us-west-1,us-west-2
created = 2017-07-18 20:13:44 +0000
git_rev = 
git_tag = 
os_user = osuser
created_at = 1500408824
git_branch = 
hdp_repoid = 
image_name = imagename-secondname--1707182213
prometheus = true
hdp_baseurl = 
hdp_version = 
orchestrator = salt
ambari_gpgkey = 
ambari_baseurl = 
ambari_version = 
hdputil_repoid = 
hdputil_baseurl = 
hdputil_version = 
region.eu-west-1 = ami-173648d7
region.eu-west-2 = ami-174648d7
region.sa-east-1 = ami-173548d7
region.us-east-1 = ami-173748d7
region.us-east-2 = ami-173848d7
region.us-west-1 = ami-173948d7
region.us-west-2 = ami-173448d7
region.ap-south-1 = ami-113648d7
region.ca-central-1 = ami-123648d7
region.ap-northeast-2 = ami-133648d7
  • Debug log output:
==> aws-centos7: Running post-processor: atlas
2017/07/19 08:10:20 packer: 2017/07/19 08:10:20 [INFO] request: GET /api/v1/artifacts/mycompany/mytool
2017/07/19 08:10:20 packer: 2017/07/19 08:10:20 [DEBUG] request: appending token (xyz*** (masked))
2017/07/19 08:10:20 packer: 2017/07/19 08:10:20 [DEBUG] raw request: &http.Request{Method:"GET", URL:(*url.URL)(0xc420052180), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{"User-Agent":[]string{"AtlasGo/1.0 (+https://github.com/hashicorp/atlas-go; go1.8.3)"}, "X-Atlas-Token":[]string{"******"}}, Body:io.ReadCloser(nil), GetBody:(func() (io.ReadCloser, error))(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"atlas.hashicorp.com", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"", RequestURI:"", TLS:(*tls.ConnectionState)(nil), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:context.Context(nil)}
2017/07/19 08:10:21 packer: 2017/07/19 08:10:21 [INFO] response: 200 (200 OK)
2017/07/19 08:10:21 packer: 2017/07/19 08:10:21 [DEBUG] response: {"username":"mycompany","name":"mytool","tag":"mycompany/mytool"}
    aws-centos7 (atlas): Uploading artifact (0 bytes)
2017/07/19 08:10:21 ui:     aws-centos7 (atlas): Uploading artifact (0 bytes)
2017/07/19 08:10:21 packer: 2017/07/19 08:10:21 [INFO] uploading artifact: mycompany/mytool (amazon.image)
2017/07/19 08:10:21 packer: 2017/07/19 08:10:21 [INFO] request: POST /api/v1/artifacts/mycompany/mytool/amazon.image
2017/07/19 08:10:21 packer: 2017/07/19 08:10:21 [DEBUG] request: appending token (xyz*** (masked))
2017/07/19 08:10:21 packer: 2017/07/19 08:10:21 [DEBUG] raw request: &http.Request{Method:"POST", URL:(*url.URL)(0xc420053100), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{"Content-Type":[]string{"application/json"}, "User-Agent":[]string{"AtlasGo/1.0 (+https://github.com/hashicorp/atlas-go; go1.8.3)"}, "X-Atlas-Token":[]string{"*****"}}, Body:ioutil.nopCloser{Reader:(*bytes.Reader)(0xc420365ce0)}, GetBody:(func() (io.ReadCloser, error))(0x6be300), ContentLength:1111, TransferEncoding:[]string(nil), Close:false, Host:"atlas.hashicorp.com", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"", RequestURI:"", TLS:(*tls.ConnectionState)(nil), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:context.Context(nil)}
2017/07/19 08:10:22 packer: 2017/07/19 08:10:22 [INFO] response: 500 (500 Internal Server Error)
2017/07/19 08:10:22 packer: 2017/07/19 08:10:22 [DEBUG] response: {"status":"500","error":"Internal Server Error"}
2017/07/19 08:10:22 [INFO] (telemetry) ending atlas
2017/07/19 08:10:22 [INFO] (telemetry) found error: Error uploading (0 bytes): client: 500 Internal Server Error
2017/07/19 08:10:22 Deleting original artifact for build 'aws-centos7'

bug

Most helpful comment

@doktoric We've identified the issue, which is server side. We'll update once we have a solution

All 10 comments

Interesting. The 500 makes me think this might be an upstream issue but I'm going to have to investigate further before I can say for sure.

Hi @SwampDragons any update on this one ?

@SwampDragons any update?

@doktoric We've identified the issue, which is server side. We'll update once we have a solution

@doktoric sorry for the delayed response -- I was on vacation.

@SwampDragons or @mwhooker what is the status on this issue?

@SwampDragons @mwhooker any update?

I know you're anxious to see this fixed, but I promise we'll update once the solution has been implemented on the Atlas side.

Closing since Atlas is deprecated.

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