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

createami fails with error "must contain the parameter size or snapshotId" #2523

Closed
siddheshsalunke opened this issue Mar 12, 2021 · 4 comments
Labels

Comments

@siddheshsalunke
Copy link

siddheshsalunke commented Mar 12, 2021

Background Info:

  • AWS ParallelCluster version [e.g. 2.9.0]: 2.10.2

  • Block of Config file:

[cluster pc2102]
base_os                      = alinux2
ebs_settings                 = apps

[ebs apps]
shared_dir                   = /apps
ebs_snapshot_id              = snap-XX

Bug description and how to reproduce:
pcluster createami command returns with exit code 1. Inside packer logs, we see the error as below:

custom-alinux2: Adding tag: "Name": "Packer Builder ami-XX
custom-alinux2: Adding tag: "parallelcluster_version": "aws-parallelcluster-2.10.2"
==> custom-alinux2: Error launching source instance: MissingParameter: The request must contain the parameter size or snapshotId
==> custom-alinux2:     status code: 400, request id: e551fc84-92da-4845-8904-7d35d62a02da

Config File pasted below:

[aws]
aws_region_name = us-east-1

[global]
update_check = true
sanity_check = false
cluster_template = DEVA

[cluster DEVA]
vpc_settings                 = vpc-config
key_name                     = keypair
ec2_iam_role                 = HPCAdministratorAccess
placement_group              = DYNAMIC
placement                    = compute
compute_instance_type        = m5.xlarge
master_instance_type         = m5.large
initial_queue_size           = 1
max_queue_size               = 50
scheduler                    = sge
#cluster_type                 = spot
cluster_type                 = ondemand
#spot_price                   = 1.00

custom_ami                      = ami-XX


scaling_settings             = custom
base_os                      = alinux2
ebs_settings                 = apps
master_root_volume_size      = 100
compute_root_volume_size     = 100

[vpc vpc-config]

vpc_id                       = vpc-XX
#AZ us-east-1c
master_subnet_id            = subnet-XX
#Az us-east-1a 

use_public_ips               = false
vpc_security_group_id        = sg-XX

[scaling custom]
scaledown_idletime = 60

[ebs apps]
shared_dir                   = /apps
ebs_snapshot_id              = snap-XX

Command used to create ami:

pcluster createami --ami-id ami-XX --os alinux2

@siddheshsalunke siddheshsalunke changed the title creatami fails with error "must contain the parameter size or snapshotId" createami fails with error "must contain the parameter size or snapshotId" Mar 12, 2021
@yuleiwan
Copy link
Contributor

Hi @siddheshsalunke,

Thanks for reaching out, I'd suggest to check the OS of base ami, is the OS of base ami ami-XX in your case same as the value of --os option you specified? If it's not the case, could you provide more information about your base AMI like Root Device Name? If you don't mind, please provide ami-id as well for further investigation.

Thank you

@siddheshsalunke
Copy link
Author

Hi @yuleiwan,

Yes, The base ami is same as mentioned in the --os.

For root device, I have these details:
Filesystem Type Size
/dev/xvda1 xfs 65G
Also the AMI-ID : ami-0d8f82acad91540ee

Please let me know, if you need more details.

@yuleiwan
Copy link
Contributor

Hi @siddheshsalunke,

Could you use command aws ec2 describe-images --image-ids ami-0d8f82acad91540ee --region {your_region} to retrieve the DeviceName info? The failure MissingParameter: The request must contain the parameter size or snapshotId is caused by mismatching the root volume device name between base ami and packer process. In packer process, the root volume device name is set as /dev/xvda for alinux2, if your root volume device name of base ami is not /dev/xvda, build will fail.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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

No branches or pull requests

2 participants