Remove patched upstart scripts
I was using older versions of the Ubuntu packages that shipped with broken upstart scripts. I am removing these patches now that I am using packages that work. Also updates the spec tests to account for the changes.
This commit is contained in:
@@ -96,37 +96,6 @@ class swift::proxy(
|
|||||||
require => Package['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':
|
service { 'swift-proxy':
|
||||||
name => $::swift::params::proxy_service_name,
|
name => $::swift::params::proxy_service_name,
|
||||||
ensure => running,
|
ensure => running,
|
||||||
|
@@ -29,6 +29,8 @@ define swift::storage::generic(
|
|||||||
validate_re($name, '^object|container|account$')
|
validate_re($name, '^object|container|account$')
|
||||||
|
|
||||||
package { "swift-${name}":
|
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') %>"),
|
name => inline_template("<%= scope.lookupvar('::swift::params::${name}_package_name') %>"),
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
}
|
}
|
||||||
@@ -47,12 +49,4 @@ define swift::storage::generic(
|
|||||||
provider => $service_provider,
|
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: }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -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}"],
|
|
||||||
}
|
|
||||||
}
|
|
@@ -113,9 +113,6 @@ describe 'swift::proxy' do
|
|||||||
(content.split("\n") & expected_lines).should =~ expected_lines
|
(content.split("\n") & expected_lines).should =~ expected_lines
|
||||||
end
|
end
|
||||||
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
|
describe 'when using tempauth' do
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user