Skip to content

Commit

Permalink
Add support for NVMe devices in EC2 (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvymazal authored and rshade committed Apr 11, 2017
1 parent 27cc02d commit 49ffe46
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ ephemeral_lvm Cookbook CHANGELOG

This file is used to list changes made in each version of the ephemeral_lvm cookbook.

v3.0.1
------
- Fixed detection for NVMe ephemeral devices in EC2

v3.0.0
------
- locks to [lvm](https://github.com/chef-cookbooks/lvm) >= 4.0, Issues: ([#60][], [#62][]), PR: [#61][]
Expand Down Expand Up @@ -143,4 +147,4 @@ v1.0.0
[@felka]: https://github.com/felka
[@freimer]: https://github.com/freimer
[@juliandunn]: https://github.com/juliandunn
[@kingpong]: https://github.com/kingpong
[@kingpong]: https://github.com/kingpong
3 changes: 3 additions & 0 deletions libraries/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def self.get_ephemeral_devices(cloud, node)
# Removes nil elements from the ephemeral_devices array if any.
ephemeral_devices.compact!

# Add all NVMe devices
ephemeral_devices.concat Dir.glob('/dev/nvme*n*')

This comment has been minimized.

Copy link
@ispringer

ispringer Oct 28, 2017

I don't think this is the right place for this logic, because it is only executed if node[cloud].keys.any? { |key| key.match(/^block_device_mapping_ephemeral\d+$/) } is true, which will often not be the case for e.g. i3 instances.


# Servers running on Xen hypervisor require the block device to be in /dev/xvdX instead of /dev/sdX
if node.attribute?('virtualization') && node['virtualization']['system'] == 'xen'
Chef::Log.info "Mapping for devices: #{ephemeral_devices.inspect}"
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
license 'Apache 2.0'
description 'Configures available ephemeral devices on a cloud server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '3.0.0'
version '3.0.1'
issues_url 'https://github.com/rightscale-cookbooks/ephemeral_lvm/issues' if respond_to?(:issues_url)
source_url 'https://github.com/rightscale-cookbooks/ephemeral_lvm' if respond_to?(:source_url)
chef_version '>= 12.0' if respond_to?(:chef_version)
Expand Down

0 comments on commit 49ffe46

Please sign in to comment.