Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The copied image does not have name if error occurs #491

Open
hc-github-team-packer opened this issue Jul 5, 2024 · 0 comments
Open

The copied image does not have name if error occurs #491

hc-github-team-packer opened this issue Jul 5, 2024 · 0 comments

Comments

@hc-github-team-packer
Copy link

This issue was originally opened by @EugenKon in hashicorp/packer#13100 and has been migrated to this repository. The original issue description is below.


Overview of the Issue

image

The copied image does not have name if this error occurs: hashicorp/packer#13099
The image is not tagged also.

Reproduction Steps

See config at the linked issue.

Expected behaviour

The name and Tags should be assigned as possible as image was created. Otherwise it is not clear what this image is. It could be created a lot of images with empty names and this is ambiguous.

Here image is ready and must be named/tagged:
image

Actual behaviour

But it is tagged a far later:
image

Relevant log messages

==> amazon-ebs.nomad_ami: Stopping the source instance...
    amazon-ebs.nomad_ami: Stopping instance
==> amazon-ebs.nomad_ami: Waiting for the instance to stop...
==> amazon-ebs.nomad_ami: Creating AMI -nomad-20240704171233 from instance i-0e4XX
    amazon-ebs.nomad_ami: AMI: ami-06365XX
==> amazon-ebs.nomad_ami: Waiting for AMI to become ready...
==> amazon-ebs.nomad_ami: Copying/Encrypting AMI (ami-063658XX) to other regions...
    amazon-ebs.nomad_ami: Copying to: ca-central-1
    amazon-ebs.nomad_ami: Copying to: us-east-1
    amazon-ebs.nomad_ami: Copying to: us-east-2
    amazon-ebs.nomad_ami: Copying to: us-west-1
    amazon-ebs.nomad_ami: Waiting for all copies to complete...
==> amazon-ebs.nomad_ami: Skipping Enable AMI deprecation...
==> amazon-ebs.nomad_ami: Adding tags to AMI (ami-0383XX)...
==> amazon-ebs.nomad_ami: Tagging snapshot: snap-00015eXXX
==> amazon-ebs.nomad_ami: Creating AMI tags
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
    amazon-ebs.nomad_ami: Adding tag: "OS_Version": "Ubuntu"
    amazon-ebs.nomad_ami: Adding tag: "Release": "24.04 LTS"
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_ID": "ami-0aff18eXX"
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_Name": "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-20240701.1"
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
==> amazon-ebs.nomad_ami: Creating snapshot tags
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
==> amazon-ebs.nomad_ami: Adding tags to AMI (ami-06dc8XX)...
==> amazon-ebs.nomad_ami: Tagging snapshot: snap-06481XX
==> amazon-ebs.nomad_ami: Creating AMI tags
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_ID": "ami-0aff18XX"
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_Name": "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-20240701.1"
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
    amazon-ebs.nomad_ami: Adding tag: "OS_Version": "Ubuntu"
    amazon-ebs.nomad_ami: Adding tag: "Release": "24.04 LTS"
==> amazon-ebs.nomad_ami: Creating snapshot tags
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
==> amazon-ebs.nomad_ami: Adding tags to AMI (ami-0636XX)...
==> amazon-ebs.nomad_ami: Tagging snapshot: snap-00d7XX
==> amazon-ebs.nomad_ami: Creating AMI tags
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
    amazon-ebs.nomad_ami: Adding tag: "OS_Version": "Ubuntu"
    amazon-ebs.nomad_ami: Adding tag: "Release": "24.04 LTS"
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_ID": "ami-0aff18XX"
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_Name": "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-20240701.1"
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
==> amazon-ebs.nomad_ami: Creating snapshot tags
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
==> amazon-ebs.nomad_ami: Adding tags to AMI (ami-03fbXXX)...
==> amazon-ebs.nomad_ami: Tagging snapshot: snap-0838XX
==> amazon-ebs.nomad_ami: Creating AMI tags
    amazon-ebs.nomad_ami: Adding tag: "OS_Version": "Ubuntu"
    amazon-ebs.nomad_ami: Adding tag: "Release": "24.04 LTS"
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_ID": "ami-0aff18eXX"
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_Name": "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-20240701.1"
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
==> amazon-ebs.nomad_ami: Creating snapshot tags
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
==> amazon-ebs.nomad_ami: Adding tags to AMI (ami-03fcXX)...
==> amazon-ebs.nomad_ami: Tagging snapshot: snap-06077XX
==> amazon-ebs.nomad_ami: Creating AMI tags
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
    amazon-ebs.nomad_ami: Adding tag: "OS_Version": "Ubuntu"
    amazon-ebs.nomad_ami: Adding tag: "Release": "24.04 LTS"
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_ID": "ami-0aff1XX"
    amazon-ebs.nomad_ami: Adding tag: "Base_AMI_Name": "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-20240701.1"
==> amazon-ebs.nomad_ami: Creating snapshot tags
    amazon-ebs.nomad_ami: Adding tag: "Description": "Base image for EC2 instances on Nomad cluster"
    amazon-ebs.nomad_ami: Adding tag: "Name": "-nomad"
==> amazon-ebs.nomad_ami: Terminating the source AWS instance...
==> amazon-ebs.nomad_ami: Cleaning up any extra volumes...
==> amazon-ebs.nomad_ami: No volumes to clean up, skipping
==> amazon-ebs.nomad_ami: Deleting temporary security group...
==> amazon-ebs.nomad_ami: Deleting temporary keypair...
Build 'amazon-ebs.nomad_ami' finished after 11 minutes 26 seconds.

==> Wait completed after 11 minutes 26 seconds

==> Builds finished. The artifacts of successful builds are:
--> amazon-ebs.nomad_ami: AMIs were created:
ca-central-1: ami-06dc8XX
us-east-1: ami-03fb6XX
us-east-2: ami-03fcdXX
us-west-1: ami-0383a2XX
us-west-2: ami-06365XX

Packer version

v1.9.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant