Skip to content

Commit

Permalink
Lvm 4 0 (#61)
Browse files Browse the repository at this point in the history
* Added attribute for wipe_attributes to pass along to the lvm_volump_group resource

* Allow gem deps to vary within major version

This fixes this error, which was solved in newer versions of Ridley:
    An error occurred while reading the Berksfile:
      uninitialized constant Ridley::Mixin::ParamsValidate::ValidationFailed

https://travis-ci.org/rightscale-cookbooks/ephemeral_lvm/builds/125138768

* according to chai gce changed metadata
ephemeral drives have type "LOCAL-SSD" now

"gce": {
    "attached_disks": {
      "disks": [
        {
          "deviceName": "persistent-disk-0",
          "index": 0,
          "mode": "READ_WRITE",
          "type": "PERSISTENT"
        },
        {
          "deviceName": "local-ssd-0",
          "index": 1,
          "mode": "READ_WRITE",
          "type": "LOCAL-SSD"
        }
      ]
    },

* updated metadata and changeling

* updating to lvm-3.0

* additional try for wipefs as new version supports -f flag

* fix deprecation warning, using allow instead of should_receive

* chef 12 migration

* updating travis

* updating net-persistent-http

* fixing versions

* updating from skeleton for tests

* adding gitignore

* updating for cookstyle

* removing berksfile.lock

* adding .travis_install.sh

* removing centos7.0

* removing apt

* updating ruby-version

* updating rakefile and travis

* pinning Berksfile.lock

* updating readme to chef12

* using pipmychangelog

* fixes #57

* updating lvm to 4.0.5

* updating changelog

* reverting to 3.1.0, since 4.0.x has breaking changes

* updating to lvm 4.0.5, closes #60

Signed-off-by: Richard Shade <[email protected]>

* updating to >=4.0, closes #62

* updating changelog

* fixing gce tests, closes #58

* fixing for cookstyle
  • Loading branch information
rshade committed Jan 26, 2017
1 parent cad6e3f commit 27cc02d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ suites:
# loopback devices "/dev/loop0" and "/dev/loop1"
#
- name: gce
run_list: ["recipe[fake::gce]", "recipe[ephemeral_lvm]"]
run_list: ["recipe[fake]","recipe[fake::gce]", "recipe[ephemeral_lvm]"]
attributes:
cloud:
provider: gce
Expand All @@ -65,11 +65,11 @@ suites:
index: 0
mode: READ_WRITE
type: EPHEMERAL
- deviceName: ephemeral-disk-0
- deviceName: local-ssd-0
index: 1
mode: READ_WRITE
type: EPHEMERAL
- deviceName: ephemeral-disk-1
- deviceName: local-ssd-1
index: 2
mode: READ_WRITE
type: EPHEMERAL
8 changes: 4 additions & 4 deletions Berksfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ DEPENDENCIES
path: test/cookbooks/fake

GRAPH
ephemeral_lvm (2.1.0)
lvm (~> 3.1.0)
ephemeral_lvm (3.0.0)
lvm (>= 4.0.0)
now (>= 0.0.0)
fake (0.1.0)
lvm (3.1.0)
fake (0.1.1)
lvm (4.0.5)
now (1.0.0)
9 changes: 8 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.0
------
- locks to [lvm](https://github.com/chef-cookbooks/lvm) >= 4.0, Issues: ([#60][], [#62][]), PR: [#61][]

v2.1.0
------
- [lvm-3.1.0](https://github.com/chef-cookbooks/lvm/releases/tag/v3.1.0)
Expand Down Expand Up @@ -130,10 +134,13 @@ v1.0.0
[#48]: https://github.com/rightscale-cookbooks/ephemeral_lvm/issues/48
[#50]: https://github.com/rightscale-cookbooks/ephemeral_lvm/issues/50
[#54]: https://github.com/rightscale-cookbooks/ephemeral_lvm/issues/54
[#60]: https://github.com/rightscale-cookbooks/ephemeral_lvm/issues/60
[#61]: https://github.com/rightscale-cookbooks/ephemeral_lvm/issues/61
[#62]: https://github.com/rightscale-cookbooks/ephemeral_lvm/issues/62
[@areznikov-kabam]: https://github.com/areznikov-kabam
[@autrejacoupa]: https://github.com/autrejacoupa
[@drywheat]: https://github.com/drywheat
[@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
4 changes: 2 additions & 2 deletions 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 '2.1.0'
version '3.0.0'
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 All @@ -15,7 +15,7 @@
supports 'debian'

depends 'now'
depends 'lvm', '~> 3.1.0'
depends 'lvm', '>= 4.0'

recipe 'ephemeral_lvm::default', 'Sets up ephemeral devices on a cloud server'

Expand Down
2 changes: 1 addition & 1 deletion test/cookbooks/fake/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
license 'Apache 2.0'
description 'A fake cookbook to prepare the test environment for ephemeral_lvm'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
version '0.1.1'
9 changes: 6 additions & 3 deletions test/cookbooks/fake/recipes/gce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@
# Include the fake::default recipe which sets up the loopback
# devices used in the test.
#
Chef::Log.info 'including fake recipe'
include_recipe 'fake'

# Setup the links for ephemeral devices for google by id
#
node['fake']['devices'].each do |device|
match = device.match(%{\/dev\/loop(\d+)})
match = device.match(%r{\/dev\/loop(\d+)})
next if match.nil?
device_index = match[1]
link "/dev/disk/by-id/google-ephemeral-disk-#{device_index}" do
Chef::Log.info "adding in device: #{device}"
link "/dev/disk/by-id/google-local-ssd-#{device_index}" do
to device
end
action :nothing
end.run_action(:create)
end

0 comments on commit 27cc02d

Please sign in to comment.