Skip to content

Commit

Permalink
v2.3.1
Browse files Browse the repository at this point in the history
* Fixes #91 - nfs-config.service needs managed to apply fixed port configuration on
  Ubuntu 16.04 and CentOS 7.2
  • Loading branch information
atomic-penguin committed Dec 9, 2016
1 parent 40ae2b3 commit 946daad
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .kitchen.yml
Expand Up @@ -6,6 +6,9 @@ provisioner:
require_chef_omnibus: latest

platforms:
- name: ubuntu-16.04
run_list:
- recipe[apt]
- name: ubuntu-14.04
run_list:
- recipe[apt]
Expand All @@ -14,9 +17,6 @@ platforms:
- recipe[apt]
- name: centos-7.2
- name: centos-7.1
- name: centos-7.0
driver:
box: opscode-centos-7.0
- name: centos-6.7
- name: centos-5.11
- name: debian-7.9
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,9 @@
v2.3.1
------

* Fixes #91 - nfs-config.service needs managed to apply fixed port configuration on
Ubuntu 16.04 and CentOS 7.2

v2.3.0
------

Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Expand Up @@ -134,6 +134,7 @@
if Chef::VersionConstraint.new('>= 15.04').include?(node['platform_version'])
default['nfs']['service']['lock'] = 'rpc-statd'
default['nfs']['service']['idmap'] = 'nfs-idmapd'
default['nfs']['client-services'] = %w(portmap lock nfs-config.service)
end
end
end
2 changes: 1 addition & 1 deletion metadata.rb
Expand Up @@ -4,7 +4,7 @@
description 'Installs and configures NFS, and NFS exports'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
name 'nfs'
version '2.3.0'
version '2.3.1'
source_url 'https://github.com/atomic-penguin/cookbook-nfs' if respond_to?(:source_url)
issues_url 'https://github.com/atomic-penguin/cookbook-nfs/issues' if respond_to?(:issues_url)

Expand Down
15 changes: 11 additions & 4 deletions test/integration/helpers/serverspec/shared/services/mountd.rb
Expand Up @@ -19,12 +19,19 @@
name = 'nfs-mountd' if host_inventory[:platform_version].to_f >= 7.0
elsif os[:family] == 'amazon'
check_enabled = false
elsif %w(debian ubuntu).include?(os[:family])
name = 'nfs-kernel-server'
elsif os[:family] == 'suse'
name = 'nfsserver'
else
if host_inventory[:platform] == 'ubuntu' &&
host_inventory[:platform_version].to_i >= 15
# Static ports on Ubuntu 16.04 do not appear to work
check_running = false
name = 'nfs-mountd'
else
name = 'nfs-kernel-server'
end
end

name = 'nfsserver' if os[:family] == 'suse'

describe service(name) do
it { should be_enabled } if check_enabled
it { should be_running } if check_running
Expand Down
16 changes: 11 additions & 5 deletions test/integration/helpers/serverspec/shared/services/statd.rb
@@ -1,6 +1,6 @@
shared_examples 'ports::statd' do
context 'statd' do
describe port(32765) do
describe port(32_765) do
it { should be_listening.with('tcp') }
end
end
Expand Down Expand Up @@ -30,12 +30,18 @@
end
elsif os[:family] == 'amazon'
name = 'nfslock'
elsif os[:family] == 'suse'
name = 'nfsserver'
elsif os[:family] == 'debian'
name = 'nfs-common'
elsif os[:family] == 'ubuntu'
if host_inventory[:platform_version].to_i >= 15
name = 'rpc-statd'
else
name = 'statd'
end
end

name = 'nfs-common' if host_inventory[:platform] == 'debian'
name = 'statd' if host_inventory[:platform] == 'ubuntu'
name = 'nfsserver' if host_inventory[:platform] == 'suse'

describe service(name) do
it { should be_enabled } if check_enabled
it { should be_running } if check_running
Expand Down

0 comments on commit 946daad

Please sign in to comment.