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

Support of cold HDD volumes in salt-cloud #38999

Closed
rsuarezsoto opened this issue Jan 27, 2017 · 5 comments
Closed

Support of cold HDD volumes in salt-cloud #38999

rsuarezsoto opened this issue Jan 27, 2017 · 5 comments
Labels
Feature new functionality including changes to functionality and code refactors, etc. RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. stale
Milestone

Comments

@rsuarezsoto
Copy link

Hi,

are cold HDD volumes supported in salt-cloud? I've tried to use them with a section like this in one of my map file's machine definitions:

      volumes:
        - { size: 50, device: /dev/xvdf, type: sc1 }

But, while the VM is created, there is an error when the call to the AWS API that should create the volume is done:

[INFO    ] Create and attach volumes to node cache01
[DEBUG   ] {'Action': 'CreateVolume', 'AvailabilityZone': 'eu-west-1a', 'VolumeType': 'sc1', 'Size': 50}
[DEBUG   ] Using AWS endpoint: ec2.eu-west-1.amazonaws.com
[DEBUG   ] AWS Request: https://ec2.eu-west-1.amazonaws.com/?Action=CreateVolume&AvailabilityZone=eu-west-1a&Size=50&Version=2014-10-01&VolumeType=sc1
[INFO    ] Starting new HTTPS connection (1): ec2.eu-west-1.amazonaws.com
[DEBUG   ] Setting read timeout to None
[DEBUG   ] "GET /?Action=CreateVolume&AvailabilityZone=eu-west-1a&Size=50&Version=2014-10-01&VolumeType=sc1 HTTP/1.1" 400 None
[DEBUG   ] AWS Response Status Code: 400
[ERROR   ] There was a query error: encode() argument 1 must be string, not None
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/cloud/cli.py", line 348, in run
    ret = mapper.run_map(dmap)
  File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 2231, in run_map
    profile, local_master=local_master
  File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1288, in create
    output = self.clouds[func](vm_)
  File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line 2642, in create
    call='action'
  File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line 2771, in create_attach_volumes
    created_volume = create_volume(volume_dict, call='function', wait_to_finish=wait_to_finish)
  File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/ec2.py", line 3918, in create_volume
    sigver='4')
  File "/usr/lib/python2.7/dist-packages/salt/utils/aws.py", line 463, in query
    result.text.encode(result.encoding)
TypeError: encode() argument 1 must be string, not None

I've trimmed the error to the part I believe is more important, but feel free to ask for more if needed. If I change 'sc1' to 'gp2', everything works as expected.

Thanks in advance!

Versions Report

Salt Version:
Salt: 2016.11.1

Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 1.5
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 0.9.1
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: 1.2.3
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.6 (default, Oct 26 2016, 20:30:19)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.0.1
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5

System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-105-generic
system: Linux
version: Ubuntu 14.04 trusty

@gtmanfred gtmanfred added Feature new functionality including changes to functionality and code refactors, etc. RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. TEAM RIoT labels Jan 27, 2017
@gtmanfred gtmanfred added this to the Approved milestone Jan 27, 2017
@gtmanfred
Copy link
Contributor

Thanks for the request. We also need to handle that encoding problem.

Thanks,
Daniel

@h0jeZvgoxFepBQ2C
Copy link

Confirmed, have the same problem. Any ETA of this extension?

@gtmanfred
Copy link
Contributor

gtmanfred commented Feb 22, 2017

The error catching now returns correctly. #39228

Currently this does not have anyone working on it, and it is pretty far down the list of other things we need.

If you wanted to take a shot at adding it, we would greatly appreciate the pull request.

Thanks,
Daniel

@rsuarezsoto
Copy link
Author

This issue can be closed: the minimum size for a cold storage volume is 500GB, and that's why it failed when I tried to create one with only 50GB. I tried again using the right size and it worked perfectly.

As a suggestion, a note in the docs reminding of this would be useful for the next one that tries and fails like me.

@stale
Copy link

stale bot commented Oct 6, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Oct 6, 2018
@stale stale bot closed this as completed Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. stale
Projects
None yet
Development

No branches or pull requests

3 participants