Migrate sanity_check.py into the respective daemons
This commit is contained in:
parent
f9dbdc730a
commit
9517e73233
4 changed files with 22 additions and 35 deletions
|
|
@ -71,8 +71,17 @@ def maintenance(host):
|
|||
if _vm:
|
||||
running_vms.remove(_vm)
|
||||
|
||||
def check():
|
||||
if env_vars.get('STORAGE_BACKEND') == 'filesystem' and not isdir(env_vars.get('VM_DIR')):
|
||||
print("You have set STORAGE_BACKEND to filesystem. So, the vm directory mentioned"
|
||||
" in .env file must exists. But, it don't.")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
||||
def main(hostname):
|
||||
check()
|
||||
|
||||
heartbeat_updating_process = mp.Process(target=update_heartbeat, args=(hostname,))
|
||||
|
||||
host_pool = HostPool(etcd_client, env_vars.get('HOST_PREFIX'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue