diff --git a/scripts/ucloud b/scripts/ucloud index 5e8bce6..3ddbb5a 100755 --- a/scripts/ucloud +++ b/scripts/ucloud @@ -47,7 +47,7 @@ if __name__ == '__main__': arg_parser.print_help() else: # Setting up root logger - logger = logging.getLogger(__name__) + logger = logging.getLogger('ucloud') syslog_handler = SysLogHandler(address='/dev/log') syslog_handler.setLevel(logging.DEBUG) diff --git a/ucloud/imagescanner/main.py b/ucloud/imagescanner/main.py index 0d2fbf2..e215c88 100755 --- a/ucloud/imagescanner/main.py +++ b/ucloud/imagescanner/main.py @@ -1,9 +1,7 @@ import json import os import subprocess as sp -import sys -from os.path import isdir from os.path import join as join_path from ucloud.settings import settings from ucloud.shared import shared @@ -21,19 +19,6 @@ def qemu_img_type(path): qemu_img_info = json.loads(qemu_img_info.decode("utf-8")) return qemu_img_info["format"] -def check(): - """ check whether settings are sane, refuse to start if they aren't """ - if settings['storage']['storage_backend'] == 'filesystem' and not isdir(settings['storage']['image_dir']): - sys.exit("You have set STORAGE_BACKEND to filesystem, but " - "{} does not exist. Refusing to start".format(settings['storage']['image_dir']) - ) - - try: - sp.check_output(['which', 'qemu-img']) - except Exception: - print("qemu-img missing") - sys.exit(1) - def main(): # We want to get images entries that requests images to be created