mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
remove old master process fix
This commit is contained in:
parent
d643db9154
commit
d1dee6d4e3
@ -25,7 +25,6 @@ class TestDaemon(object):
|
||||
'''
|
||||
Set up the master and minion daemons, and run related cases
|
||||
'''
|
||||
|
||||
def __enter__(self):
|
||||
'''
|
||||
Start a master and minion
|
||||
@ -82,25 +81,11 @@ class TestDaemon(object):
|
||||
Kill the minion and master processes
|
||||
'''
|
||||
self.minion_process.terminate()
|
||||
self.stop_master_processes()
|
||||
self.master_process.terminate()
|
||||
self.syndic_process.terminate()
|
||||
self.smaster_process.terminate()
|
||||
|
||||
|
||||
def stop_master_processes(self):
|
||||
try:
|
||||
with open(self.master_opts['pidfile']) as pidfile:
|
||||
for pid in pidfile.readlines():
|
||||
if len(pid.strip()):
|
||||
try:
|
||||
os.kill(int(pid.strip()), signal.SIGTERM)
|
||||
except OSError:
|
||||
pass
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
|
||||
class ModuleCase(TestCase):
|
||||
'''
|
||||
Execute a module function
|
||||
|
Loading…
Reference in New Issue
Block a user