Skip to content

Commit

Permalink
Merge pull request #591 from jonnytpuppet/1.7.x_rel_prep_ci_fixes
Browse files Browse the repository at this point in the history
1.7.x rel prep ci fixes
  • Loading branch information
DavidS committed Dec 4, 2015
2 parents c9a79d5 + d3d44ae commit ca8efac
Show file tree
Hide file tree
Showing 25 changed files with 672 additions and 66 deletions.
2 changes: 1 addition & 1 deletion manifests/linux/debian.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
}

if($::operatingsystemrelease =~ /^6\./ and $enable == true
if($::operatingsystemrelease =~ /^6\./ and $enable == true and $::iptables_persistent_version
and versioncmp($::iptables_persistent_version, '0.5.0') < 0) {
# This fixes a bug in the iptables-persistent LSB headers in 6.x, without it
# we lose idempotency
Expand Down
94 changes: 49 additions & 45 deletions spec/acceptance/firewall_clusterip_spec.rb
Original file line number Diff line number Diff line change
@@ -1,45 +1,49 @@
require 'spec_helper_acceptance'

describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do

before(:all) do
shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush')
shell('ip6tables --flush; ip6tables -t nat --flush; ip6tables -t mangle --flush')
end

# SLES doesn't have the CLUSTERIP module
if default['platform'] !~ /sles/
describe 'clusterip' do
context 'cluster ipv4 test' do
it 'applies' do
pending("MODULES-2124 should be resolved for clusterip RHEL7 support") if default['platform'] =~ /el-7/
pp = <<-EOS
class { '::firewall': }
firewall {
'830 - clusterip test':
chain => 'FORWARD',
jump => 'CLUSTERIP',
destination => '1.1.1.1',
iniface => 'eth0',
clusterip_new => true,
clusterip_hashmode => "sourceip",
clusterip_clustermac => "01:00:5E:00:00:00",
clusterip_total_nodes => "2",
clusterip_local_node => "1",
clusterip_hash_init => "1337",
}
EOS

apply_manifest(pp, :catch_failures => true)
end

it 'should contain the rule' do
pending("MODULES-2124 should be resolved for clusterip RHEL7 support") if default['platform'] =~ /el-7/
shell('iptables-save') do |r|
expect(r.stdout).to match(/-A FORWARD -d (1.1.1.1\/32|1.1.1.1) -i eth0 -p tcp -m comment --comment "830 - clusterip test" -j CLUSTERIP --new --hashmode sourceip --clustermac 01:00:5E:00:00:00 --total-nodes 2 --local-node 1 --hash-init 1337/)
end
end
end
end
end
end

# These tests have been commented out, as there are suspicions that the clusterIP ipt module is causing system reboots.


# require 'spec_helper_acceptance'

# describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do

# before(:all) do
# shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush')
# shell('ip6tables --flush; ip6tables -t nat --flush; ip6tables -t mangle --flush')
# end

# # SLES doesn't have the CLUSTERIP module
# if default['platform'] !~ /sles/
# describe 'clusterip' do
# context 'cluster ipv4 test' do
# it 'applies' do
# pending("MODULES-2124 should be resolved for clusterip RHEL7 support") if default['platform'] =~ /el-7/
# pp = <<-EOS
# class { '::firewall': }
# firewall {
# '830 - clusterip test':
# chain => 'FORWARD',
# jump => 'CLUSTERIP',
# destination => '1.1.1.1',
# iniface => 'eth0',
# clusterip_new => true,
# clusterip_hashmode => "sourceip",
# clusterip_clustermac => "01:00:5E:00:00:00",
# clusterip_total_nodes => "2",
# clusterip_local_node => "1",
# clusterip_hash_init => "1337",
# }
# EOS

# apply_manifest(pp, :catch_failures => true)
# end

# it 'should contain the rule' do
# pending("MODULES-2124 should be resolved for clusterip RHEL7 support") if default['platform'] =~ /el-7/
# shell('iptables-save') do |r|
# expect(r.stdout).to match(/-A FORWARD -d (1.1.1.1\/32|1.1.1.1) -i eth0 -p tcp -m comment --comment "830 - clusterip test" -j CLUSTERIP --new --hashmode sourceip --clustermac 01:00:5E:00:00:00 --total-nodes 2 --local-node 1 --hash-init 1337/)
# end
# end
# end
# end
# end
# end
28 changes: 28 additions & 0 deletions spec/acceptance/nodesets/new/aio/redhat-6-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
HOSTS:
redhat-6-x86_64-agent:
roles:
- agent
- default
platform: el-6-x86_64
template: redhat-6-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
type: aio
ssh:
timeout: 600
28 changes: 28 additions & 0 deletions spec/acceptance/nodesets/new/aio/redhat-7-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
HOSTS:
redhat-7-x86_64-agent:
roles:
- agent
- default
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
type: aio
ssh:
timeout: 600
28 changes: 28 additions & 0 deletions spec/acceptance/nodesets/new/aio/ubuntu-1404-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
HOSTS:
ubuntu-1404-agent:
roles:
- agent
- default
platform: ubuntu-14.04-amd64
template: Delivery/Quality Assurance/Templates/vCloud/ubuntu-1404-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
type: aio
ssh:
timeout: 600
27 changes: 27 additions & 0 deletions spec/acceptance/nodesets/new/pe/centos-5-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
HOSTS:
centos-5-x86_64-agent:
roles:
- agent
- default
platform: el-5-x86_64
template: Delivery/Quality Assurance/Templates/vCloud/centos-5-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
ssh:
timeout: 600
27 changes: 27 additions & 0 deletions spec/acceptance/nodesets/new/pe/centos-6-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
HOSTS:
centos-6-x86_64-agent:
roles:
- agent
- default
platform: el-6-x86_64
template: Delivery/Quality Assurance/Templates/vCloud/centos-6-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
ssh:
timeout: 600
27 changes: 27 additions & 0 deletions spec/acceptance/nodesets/new/pe/centos-7-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
HOSTS:
centos-7-x86_64-agent:
roles:
- agent
- default
platform: el-7-x86_64
template: centos-7-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
ssh:
timeout: 600
27 changes: 27 additions & 0 deletions spec/acceptance/nodesets/new/pe/debian-6-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
HOSTS:
debian-6-amd64-agent:
roles:
- agent
- default
platform: debian-6-amd64
template: debian-6-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
ssh:
timeout: 600
27 changes: 27 additions & 0 deletions spec/acceptance/nodesets/new/pe/debian-7-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
HOSTS:
debian-7-amd64-agent:
roles:
- agent
- default
platform: debian-7-amd64
template: debian-7-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
ssh:
timeout: 600
27 changes: 27 additions & 0 deletions spec/acceptance/nodesets/new/pe/oracle-6-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
HOSTS:
oracle-6-x86_64-agent:
roles:
- agent
- default
platform: el-6-x86_64
template: oracle-6-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
ssh:
timeout: 600
27 changes: 27 additions & 0 deletions spec/acceptance/nodesets/new/pe/oracle-7-64mda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
HOSTS:
oracle-7-x86_64-agent:
roles:
- agent
- default
platform: el-7-x86_64
template: oracle-7-x86_64
hypervisor: vcloud
redhat-7-x86_64-master:
roles:
- master
- dashboard
- database
- agent
platform: el-7-x86_64
template: redhat-7-x86_64
hypervisor: vcloud
CONFIG:
nfs_server: none
consoleport: 443
datastore: instance0
folder: Delivery/Quality Assurance/Enterprise/Dynamic
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
pooling_api: http://vcloud.delivery.puppetlabs.net/
ssh:
timeout: 600
Loading

0 comments on commit ca8efac

Please sign in to comment.