Bug 34819 - ec2-tools - add support for other storage options (IOPS, instance store)
ec2-tools - add support for other storage options (IOPS, instance store)
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: Framework
unspecified
Other Linux
: P5 enhancement (vote)
: ---
Assigned To: Philipp Hahn
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-13 10:33 CEST by Daniel Orrego
Modified: 2023-03-25 06:45 CET (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
ec2/lib.py with support for iops (4.90 KB, patch)
2014-05-13 10:33 CEST, Daniel Orrego
Details | Diff
ec2/lib.py with support for iops and ephemeral volumes (6.22 KB, patch)
2014-05-16 18:05 CEST, Daniel Orrego
Details | Diff
ec2/lib.py with support for iops and ephemeral volumes (6.11 KB, patch)
2014-05-26 12:45 CEST, Daniel Orrego
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Orrego univentionstaff 2014-05-13 10:33:36 CEST
Created attachment 5910 [details]
ec2/lib.py with support for iops

Some tests may need higher I/O performance.

Classic AWS instances support up to 100 I/O operations per second (by default), VPC instances start from 600, which is still low.

Changing the volume_type to io1 allows you to specify an IOPS value (the instance should be launched as EBS optimized) (NOTE: it will be more costly!).

I have been doing tests with some changes to the ec2/lib.py (see attachment).
IOPS values you specify in the configuration file, e.g:
---
ec2_volume_type: io1
ec2_instance_ebsOptimized: True
ec2_partition_size: 100
ec2_volume_iops: 3000
---

Please see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html
Comment 1 Daniel Orrego univentionstaff 2014-05-16 18:05:00 CEST
Created attachment 5914 [details]
ec2/lib.py with support for iops and ephemeral volumes

Each instance type has some "local" block devices available called 'instance store volumes' (for m3. types, they are usually SSD disks).

The attached patch assumes the chosen instance type has two of such disks available, and add them to the block device mapping.

It expects a new parameter in the configuration file:
---
ec2_instance_store: 2
---

NOTE: There are some differences with EBS volumes:
* Instance store volumes are ephemeral, they can't be transfered to other instances and data will be lost after each reboot!
* There is no need to pay for extra I/O performance, they are included in the price of the instance
* you should initialize the disks if you want optimum performance (using dd, or RAID, see docs)

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2014-05-18 13:31:22 CEST
Note for the attached patch: do not decrease the timeout from 1200 to 600. Sometimes AWS takes ages to provide an instance.
Comment 3 Daniel Orrego univentionstaff 2014-05-19 18:19:11 CEST
(In reply to Sönke Schwardt-Krummrich from comment #2)
> Note for the attached patch: do not decrease the timeout from 1200 to 600.
> Sometimes AWS takes ages to provide an instance.

Yeah, sorry, that was supposed to be temporary. Ignore that please, the idea is only to suggest the changes in the block-device mapper
Comment 4 Daniel Orrego univentionstaff 2014-05-26 12:45:05 CEST
Created attachment 5924 [details]
ec2/lib.py with support for iops and ephemeral volumes

FIX: Support both actions simultaneously: adding ephimeral volumes (sdb, sdc) and growing the size of the root volume (sda1)
Comment 5 Philipp Hahn univentionstaff 2015-07-22 14:24:09 CEST
Needed for Issue #2106.

r62307 | Bug #34819 test: Support additional EC2 disks
 Added support for ephemeral disks

IOPS and type don't seem to be supported by "python-boto_2.3.0-1.3.201206122310"


Example: How to use the disks for swap:

API='http://169.254.169.254/latest'
wget -q -O- "$API/meta-data/block-device-mapping/" |
while read name
do
  case "$name" in
  ephemeral*)
    dev="/dev/$(wget -q -O- "$API/meta-data/block-device-mapping/$name")"
    [ -b "$dev" ] || continue
    mkswap -f -L "$name" "$dev" && swapon "$dev"
    ;;
  esac
done
Comment 6 Philipp Hahn univentionstaff 2015-07-23 16:56:37 CEST
(In reply to Philipp Hahn from comment #5)
> IOPS and type don't seem to be supported by
> "python-boto_2.3.0-1.3.201206122310"

EBS optimized <http://docs.pythonboto.org/en/latest/releasenotes/v2.9.3.html>
IOPs <http://docs.pythonboto.org/en/latest/releasenotes/v2.6.0.html>

# <https://packages.debian.org/source/wheezy-backports/python-boto>
# repo_admin.py -F -p python-boto -r 3.0-0-0 -s internal
# b30-scope internal

Package: python-boto
Version: 2.25.0-1~bpo70+1.12.201507231427
Branch: ucs_3.0-0
Scope: internal

r62380 | Bug #34819 test: Support EC2 disk parameters
 Added optional support to ucs-ec2-tools
 Required the python-boto >= 2.9.3 !

PS: Jenkins is still UCS-3.2-6, so python-boto was built for 3.0 !
Comment 7 Stefan Gohmann univentionstaff 2016-10-12 07:48:13 CEST
For this bug is no separate QA needed.