diff --git a/examples/multi.pp b/examples/multi.pp index a915aea8..4bc24911 100644 --- a/examples/multi.pp +++ b/examples/multi.pp @@ -32,6 +32,16 @@ $swift_local_net_ip = $ipaddress_eth0 Exec { logoutput => true } +stage { 'openstack_ppa':} + +Stage['openstack_ppa'] -> Stage['main'] + +class { 'apt': + stage => 'openstack_ppa', +} +class { 'swift::repo::trunk': + stage => 'openstack_ppa', +} # # specifies that nodes with the cert names of # swift_storage_1,2, and 3 will be assigned the diff --git a/manifests/proxy.pp b/manifests/proxy.pp index 070cbbe8..d0f353f6 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -96,37 +96,6 @@ class swift::proxy( require => Package['swift-proxy'], } - if($::operatingsystem == 'Ubuntu') { - # TODO - this needs to be updated once the init file is not broken - file { '/etc/init/swift-proxy.conf': - mode => '0644', - owner => 'root', - group => 'root', - content => ' -# swift-proxy - SWIFT Proxy Server -# This is temporarily managed by Puppet -# until 917893 is fixed -# The swift proxy server. - -description "SWIFT Proxy Server" -author "Marc Cluet " - -start on runlevel [2345] -stop on runlevel [016] - -pre-start script - if [ -f "/etc/swift/proxy-server.conf" ]; then - exec /usr/bin/swift-init proxy-server start - else - exit 1 - fi -end script - -post-stop exec /usr/bin/swift-init proxy-server stop', - before => Service['swift-proxy'], - } - } - service { 'swift-proxy': name => $::swift::params::proxy_service_name, ensure => running, diff --git a/manifests/repo/trunk.pp b/manifests/repo/trunk.pp index fce3da19..a1047256 100644 --- a/manifests/repo/trunk.pp +++ b/manifests/repo/trunk.pp @@ -2,5 +2,5 @@ # sets up the swift trunk ppa # class swift::repo::trunk { - apt::ppa { 'ppa:swift-core/trunk': } + apt::ppa { 'ppa:openstack-ubuntu-testing/openstack-trunk-testing': } } diff --git a/manifests/storage/generic.pp b/manifests/storage/generic.pp index 85359cb1..9421c604 100644 --- a/manifests/storage/generic.pp +++ b/manifests/storage/generic.pp @@ -29,6 +29,8 @@ define swift::storage::generic( validate_re($name, '^object|container|account$') package { "swift-${name}": + # this is a way to dynamically build the variables to lookup + # sorry its so ugly :( name => inline_template("<%= scope.lookupvar('::swift::params::${name}_package_name') %>"), ensure => $package_ensure, } @@ -45,14 +47,7 @@ define swift::storage::generic( enable => true, hasstatus => true, provider => $service_provider, - } - - # TODO - this should be fixed in the upstream - # packages so that this code can be removed. - # 931893 - if($::operatingsystem == 'Ubuntu') { - # I have to fix broken init scripts on Ubuntu - swift::storage::generic::upstart { $name: } + subscribe => Package["swift-${name}"], } } diff --git a/manifests/storage/generic/upstart.pp b/manifests/storage/generic/upstart.pp deleted file mode 100644 index 3d21568a..00000000 --- a/manifests/storage/generic/upstart.pp +++ /dev/null @@ -1,10 +0,0 @@ -# TODO this should be removed when the upstart packages are fixed. -define swift::storage::generic::upstart() { - file { "/etc/init/swift-${name}.conf": - mode => '0644', - owner => 'root', - group => 'root', - source => "puppet:///modules/swift/swift-${name}.conf.upstart", - before => Service["swift-${name}"], - } -} diff --git a/spec/classes/swift_proxy_spec.rb b/spec/classes/swift_proxy_spec.rb index 8b6f53ed..1f75bcba 100644 --- a/spec/classes/swift_proxy_spec.rb +++ b/spec/classes/swift_proxy_spec.rb @@ -113,9 +113,6 @@ describe 'swift::proxy' do (content.split("\n") & expected_lines).should =~ expected_lines end end - # TODO this resource should just be here temporarily until packaging - # is fixed - it { should contain_file('/etc/init/swift-proxy.conf') } describe 'when using tempauth' do diff --git a/spec/classes/swift_xfs_spec.rb b/spec/classes/swift_xfs_spec.rb new file mode 100644 index 00000000..5873fa61 --- /dev/null +++ b/spec/classes/swift_xfs_spec.rb @@ -0,0 +1,6 @@ +require 'spec_helper' +describe 'swift::xfs' do + ['xfsprogs', 'parted'].each do |present_package| + it { should contain_package(present_package).with_ensure('present') } + end +end