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

Salt-cloud can't resize root volume with public ami images #41894

Closed
SitWatchCloudRise opened this issue Jun 22, 2017 · 2 comments · Fixed by #43907
Closed

Salt-cloud can't resize root volume with public ami images #41894

SitWatchCloudRise opened this issue Jun 22, 2017 · 2 comments · Fixed by #43907
Labels
info-needed waiting for more info
Milestone

Comments

@SitWatchCloudRise
Copy link

SitWatchCloudRise commented Jun 22, 2017

Description of Issue/Question

I am having a very werid problem, which drives me nuts.

I have been happily using salt-cloud to provision ec2 instance for some time until I recently want to use the Amazon ami image.
The error I am having is that:

> # salt-cloud -p profile_name instance-name
> [ERROR   ] There was a profile error: list index out of range

If provisioning the instance via python, error is displayed as below:

>     result = cloud.profile(profilename, names=[args.instance_name[0],])
>   File "/usr/lib/python2.7/site-packages/salt/cloud/__init__.py", line 352, in profile
>     mapper.run_profile(profile, names, vm_overrides=vm_overrides)
>   File "/usr/lib/python2.7/site-packages/salt/cloud/__init__.py", line 1461, in run_profile
>     ret[name] = self.create(vm_)
>   File "/usr/lib/python2.7/site-packages/salt/cloud/__init__.py", line 1291, in create
>     output = self.clouds[func](vm_)
>   File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/ec2.py", line 2511, in create
>     data, vm_ = request_instance(vm_, location)
>   File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/ec2.py", line 1885, in request_instance
>     if ex_blockdevicemappings and 'Ebs.VolumeType' not in ex_blockdevicemappings[dev_index]:
> IndexError: list index out of range

the only change of the profile, which cause the error, is just the ami ID!

Setup

salt provider:

xxx-ec2:
  driver: ec2
  id: xxxxxx
  key: xxxxxx

  private_key: /etc/salt/ec2_key.pem
  keyname: default
  location: eu-west-1

  subnetid: subnet-xxxxx
  securitygroupid:
    - sg-xxxxx
  ssh_interface: private_ips
  minion:
    master: xx.xx.xx.xx
    grains:
      cloud: aws

salt profile:

profile_name:
  provider: xxx-ec2
  image: ami-7d50491b
  size: t2.micro
  ssh_username: ec2-user
  block_device_mappings:
    - DeviceName: /dev/sda1
      Ebs.VolumeSize: 100
      Ebs.VolumeType: standard
  del_root_vol_on_destroy: True

Steps to Reproduce Issue

salt-cloud -p profile_name new-instance-name

Versions Report

# salt --versions
Salt Version:
           Salt: 2016.11.5

Dependency Versions:
           cffi: Not Installed
       cherrypy: unknown
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.21.1
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: 3.4.3
         pygit2: Not Installed
         Python: 2.7.5 (default, Nov 20 2015, 02:00:19)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.3.1
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 3.2.5

System Versions:
           dist: centos 7.2.1511 Core
        machine: x86_64
        release: 3.10.0-327.10.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.2.1511 Core
@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 22, 2017

@DR3EVR8u8c can you point me to the ami image where this is working in? I am seeing the error each time no matter the ami i use, which leads me to believe the config might be incorrect that I'm using.

@Ch3LL Ch3LL added the info-needed waiting for more info label Jun 22, 2017
@Ch3LL Ch3LL added this to the Blocked milestone Jun 22, 2017
@SitWatchCloudRise
Copy link
Author

Hi @Ch3LL ,
the ami is working in Ireland, the area is eu-west-1.

one thing I forgot to mention earlier, the ami which is working good is a custom image created by myself. Thanks and regards,

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

Successfully merging a pull request may close this issue.

2 participants