aws / aws-parallelcluster

AWS ParallelCluster is an AWS supported Open Source cluster management tool to deploy and manage HPC clusters in the AWS cloud.
https://github.com/aws/aws-parallelcluster
Apache License 2.0
830 stars 312 forks source link

CUSTOM_AMI_NAME_PREFIX feature does not work with "pcluster createami" #1550

Closed rmarable closed 4 years ago

rmarable commented 4 years ago

Environment:

Bug description and how to reproduce:

The ParallelCluster createami" feature does not seem to support CUSTOM_AMI_NAME_PREFIX:

$ pcluster createami --ami-id [**************] --os centos7 -ap "ParallelClusterAmi-" -c pcluster-ami.config
Building AWS ParallelCluster AMI. This could take a while...

No custom AMI created
Unexpected error of type AttributeError: 'NoneType' object has no attribute 'get_param_value'
Traceback (most recent call last):
  File "/Users/rodneymarable/.pyenv/versions/3.7.4/envs/compbio-ami/lib/python3.7/site-packages/pcluster/cli.py", line 439, in main
    args.func(args)
  File "/Users/rodneymarable/.pyenv/versions/3.7.4/envs/compbio-ami/lib/python3.7/site-packages/pcluster/cli.py", line 81, in create_ami
    pcluster.create_ami(args)
  File "/Users/rodneymarable/.pyenv/versions/3.7.4/envs/compbio-ami/lib/python3.7/site-packages/pcluster/commands.py", line 831, in create_ami
    pcluster_config = PclusterConfig(config_file=args.config_file, fail_on_file_absence=True)
  File "/Users/rodneymarable/.pyenv/versions/3.7.4/envs/compbio-ami/lib/python3.7/site-packages/pcluster/config/pcluster_config.py", line 64, in __init__
    self._init_config_parser(config_file, fail_on_file_absence)
  File "/Users/rodneymarable/.pyenv/versions/3.7.4/envs/compbio-ami/lib/python3.7/site-packages/pcluster/config/pcluster_config.py", line 109, in _init_config_parser
    self.error(error_message)
  File "/Users/rodneymarable/.pyenv/versions/3.7.4/envs/compbio-ami/lib/python3.7/site-packages/pcluster/config/pcluster_config.py", line 446, in error
    if self.fail_on_error:
  File "/Users/rodneymarable/.pyenv/versions/3.7.4/envs/compbio-ami/lib/python3.7/site-packages/pcluster/config/pcluster_config.py", line 225, in fail_on_error
    self._fail_on_error = self.get_section("global").get_param_value("sanity_check")
AttributeError: 'NoneType' object has no attribute 'get_param_value'

More robust error handling to troubleshoot would also be appreciated: https://github.com/aws/aws-parallelcluster/issues/1549

lukeseawalker commented 4 years ago

Duplicate of https://github.com/aws/aws-parallelcluster/issues/1549

lukeseawalker commented 4 years ago

If you can post your config file we could see what's wrong in there and unblock you from running the command.

Thanks

rmarable commented 4 years ago

Hi Luca,

The config file I tried to use is attached. Please let me know if you have any other questions.

adam-pcluster.config.txt

lukeseawalker commented 4 years ago

Try to remove the -c parameter and use the --vpc-id and --subnet-id instead.

no-response[bot] commented 4 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.