Amazon Import exceeded wait attempts

57 views
Skip to first unread message

Morgan Andrew Davis

unread,
Jan 8, 2019, 11:58:44 AM1/8/19
to Packer
Hey, might anyone be able to help me with something? I am currently working on something for work using packer. I am attempting a series of steps with packer, the last of which is an import with the amazon import post processor. The issue I would like to ask about is the issue of timing out with the error: ResourceNotReady: exceeded wait attempts. I have tried to debug this myself and have come across the advice to set the AWS_MAX_ATTEMPTS and AWS_POLL_DELAY_SECONDS to values higher than the default. I have done so, or at least I have as far as I can tell, with adding the following section to my json file: 
       "variables": {
"AWS_MAX_ATTEMPTS": "1000",
"AWS_POLL_DELAY_SECONDS" :"10"
}
Even after adding this though it still continues to fail. Does anyone have any advice on how I can proceed? Have I just screwed up the variables section or is there anything else I can try. I'll attach a copy of my file here minus the access and secret keys since I don't think I need to be sharing that. Thank you to anyone who can help.
examplepacker.json

Rickard von Essen

unread,
Jan 8, 2019, 12:41:01 PM1/8/19
to packe...@googlegroups.com
Those are environment variables so try something like 

AWS_MAX_ATTEMPTS=100 packer build... 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/c14e06a8-4afd-45f5-8386-763c80ee69f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Morgan Andrew Davis

unread,
Jan 8, 2019, 1:04:27 PM1/8/19
to Packer
You mean something like packer build -var "AWS_MAX_ATTEMPTS=100" whatever.json? Try specifying it in the command rather than the json file?

Megan Marsh

unread,
Jan 8, 2019, 1:17:06 PM1/8/19
to packe...@googlegroups.com
No, like `export "AWS_MAX_ATTEMPTS=100"; packer build whatever.json`

Morgan Andrew Davis

unread,
Jan 8, 2019, 1:19:22 PM1/8/19
to Packer
I see. I'll give that a try then. Thank you for your time.

Megan Marsh

unread,
Jan 8, 2019, 1:21:53 PM1/8/19
to packe...@googlegroups.com
no problem; I can understand the confusion. We should probably allow this option to also be set as a config var.

Morgan Andrew Davis

unread,
Jan 8, 2019, 4:04:23 PM1/8/19
to Packer
Ok. Trying your suggestion got me a different error. Now it fails with: ResourceNotReady: failed waiting for successful resource state. I'm currently trying to debug this, but haven't found anything useful yet. Any suggestions? If anyone wants to see anything else to help with this, please ask and i'll upload it. Thank you for your time and help.


On Tuesday, January 8, 2019 at 1:17:06 PM UTC-5, Megan Marsh wrote:

Rickard von Essen

unread,
Jan 8, 2019, 4:11:11 PM1/8/19
to packe...@googlegroups.com

Morgan Andrew Davis

unread,
Jan 8, 2019, 4:28:06 PM1/8/19
to Packer
I attached a file with the screenshots. It wouldn't let me paste my screenshot directly.
import task screenshots.docx

Rickard von Essen

unread,
Jan 9, 2019, 1:35:42 AM1/9/19
to packe...@googlegroups.com
Please just paste the output here. 

Morgan Andrew Davis

unread,
Jan 9, 2019, 9:17:49 AM1/9/19
to Packer
Here you go: 
{
    "ImportImageTasks": [
        {
            "ImportTaskId": "import-ami-074a54dfc5c82fe0b",
            "SnapshotDetails": [
                {
                    "DiskImageSize": 936299520.0,
                    "Format": "VMDK",
                    "Status": "completed",
                    "UserBucket": {
                        "S3Bucket": "packertestbucket",
                        "S3Key": "packer-import-1546886093.ova"
                    }
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: No valid partitions. Not a valid volume."
        },
        {
            "ImportTaskId": "import-ami-0cc9eb025ee4a6515",
            "SnapshotDetails": [
                {
                    "DiskImageSize": 936372224.0,
                    "Format": "VMDK",
                    "Status": "completed",
                    "UserBucket": {
                        "S3Bucket": "packertestbucket",
                        "S3Key": "packer-import-1546971001.ova"
                    }
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: No valid partitions. Not a valid volume."
        },
        {
            "ImportTaskId": "import-ami-0b3d3e95dabdd9e41",
            "SnapshotDetails": [
                {
                    "DiskImageSize": 936361472.0,
                    "Format": "VMDK",
                    "Status": "completed",
                    "UserBucket": {
                        "S3Bucket": "packertestbucket",
                        "S3Key": "packer-import-1546973150.ova"
                    }
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: No valid partitions. Not a valid volume."
        },
        {
            "ImportTaskId": "import-ami-05e66c30a95aaca21",
            "SnapshotDetails": [
                {
                    "DiskImageSize": 936373248.0,
                    "Format": "VMDK",
                    "Status": "completed",
                    "UserBucket": {
                        "S3Bucket": "packertestbucket",
                        "S3Key": "packer-import-1546958990.ova"
                    }
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: No valid partitions. Not a valid volume."
        },
        {
            "Architecture": "x86_64",
            "ImageId": "ami-03b4a24b7daba0c7d",
            "ImportTaskId": "import-ami-06d5d385f8b4bf5ec",
            "LicenseType": "BYOL",
            "Platform": "Linux",
            "SnapshotDetails": [
                {
                    "DeviceName": "/dev/sda1",
                    "DiskImageSize": 451916288.0,
                    "Format": "VMDK",
                    "SnapshotId": "snap-0584503f5ea7c05f7",
                    "Status": "completed",
                    "UserBucket": {
                        "S3Bucket": "packertestbucket",
                        "S3Key": "packer-import-1546546072.ova"
                    }
                }
            ],
            "Status": "completed"
        },
        {
            "ImportTaskId": "import-ami-0957f17924d4098f4",
            "SnapshotDetails": [
                {
                    "DiskImageSize": 936302080.0,
                    "Format": "VMDK",
                    "Status": "completed",
                    "UserBucket": {
                        "S3Bucket": "packertestbucket",
                        "S3Key": "packer-import-1546892178.ova"
                    }
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: No valid partitions. Not a valid volume."
        },
        {
            "ImportTaskId": "import-ami-0a7df57de9f541a0b",
            "SnapshotDetails": [
                {
                    "DiskImageSize": 936304640.0,
                    "Format": "VMDK",
                    "Status": "completed",
                    "UserBucket": {
                        "S3Bucket": "packertestbucket",
                        "S3Key": "packer-import-1546877036.ova"
                    }
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: No valid partitions. Not a valid volume."
        }
    ]
}
There are multiple there, some are from successful imports in the past.
Reply all
Reply to author
Forward
0 new messages