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 <marc.cluet@ubuntu.com>" - -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/storage/generic.pp b/manifests/storage/generic.pp index 85359cb1..4cae863a 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, } @@ -47,12 +49,4 @@ define swift::storage::generic( 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: } - } - } 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