Fix TSO lock file check when running the script
Correctly check if TSO is already started by testing the PID file presence.
This commit is contained in:
parent
33bb370d61
commit
daaa24c45e
@ -166,7 +166,7 @@ Host *
|
|||||||
}
|
}
|
||||||
ensure_resource ('exec','start-tso-script', {
|
ensure_resource ('exec','start-tso-script', {
|
||||||
'command' => '/etc/init.d/disable-tso start',
|
'command' => '/etc/init.d/disable-tso start',
|
||||||
'unless' => '/usr/bin/test -f /tmp/disable-tso-lock',
|
'unless' => '/usr/bin/test -f /var/run/disable-tso.pid',
|
||||||
'onlyif' => '/usr/bin/test -f /etc/init.d/disable-tso'
|
'onlyif' => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ class cloud::network::l3(
|
|||||||
}
|
}
|
||||||
ensure_resource ('exec','start-tso-script', {
|
ensure_resource ('exec','start-tso-script', {
|
||||||
'command' => '/etc/init.d/disable-tso start',
|
'command' => '/etc/init.d/disable-tso start',
|
||||||
'unless' => '/usr/bin/test -f /tmp/disable-tso-lock',
|
'unless' => '/usr/bin/test -f /var/run/disable-tso.pid',
|
||||||
'onlyif' => '/usr/bin/test -f /etc/init.d/disable-tso'
|
'onlyif' => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ describe 'cloud::compute::hypervisor' do
|
|||||||
it 'start TSO script' do
|
it 'start TSO script' do
|
||||||
should contain_exec('start-tso-script').with(
|
should contain_exec('start-tso-script').with(
|
||||||
:command => '/etc/init.d/disable-tso start',
|
:command => '/etc/init.d/disable-tso start',
|
||||||
:unless => '/usr/bin/test -f /tmp/disable-tso-lock',
|
:unless => '/usr/bin/test -f /var/run/disable-tso.pid',
|
||||||
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -302,7 +302,7 @@ describe 'cloud::compute::hypervisor' do
|
|||||||
it 'start TSO script' do
|
it 'start TSO script' do
|
||||||
should contain_exec('start-tso-script').with(
|
should contain_exec('start-tso-script').with(
|
||||||
:command => '/etc/init.d/disable-tso start',
|
:command => '/etc/init.d/disable-tso start',
|
||||||
:unless => '/usr/bin/test -f /tmp/disable-tso-lock',
|
:unless => '/usr/bin/test -f /var/run/disable-tso.pid',
|
||||||
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -105,7 +105,7 @@ describe 'cloud::network::l3' do
|
|||||||
it 'start TSO script' do
|
it 'start TSO script' do
|
||||||
should contain_exec('start-tso-script').with(
|
should contain_exec('start-tso-script').with(
|
||||||
:command => '/etc/init.d/disable-tso start',
|
:command => '/etc/init.d/disable-tso start',
|
||||||
:unless => '/usr/bin/test -f /tmp/disable-tso-lock',
|
:unless => '/usr/bin/test -f /var/run/disable-tso.pid',
|
||||||
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -126,7 +126,7 @@ describe 'cloud::network::l3' do
|
|||||||
it 'start TSO script' do
|
it 'start TSO script' do
|
||||||
should contain_exec('start-tso-script').with(
|
should contain_exec('start-tso-script').with(
|
||||||
:command => '/etc/init.d/disable-tso start',
|
:command => '/etc/init.d/disable-tso start',
|
||||||
:unless => '/usr/bin/test -f /tmp/disable-tso-lock',
|
:unless => '/usr/bin/test -f /var/run/disable-tso.pid',
|
||||||
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
:onlyif => '/usr/bin/test -f /etc/init.d/disable-tso'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user