* Refactoring
* Fix issue that causes a new image store to be created at every start of ucloud-api. * VM Migration API call now takes hostname instead of host key. * StorageHandler Classes are introduced. They transparently handles things related to importing of image, make vm out of image, resize vm image, delete vm image etc. * Loggers added to __init__.py of every ucloud component's subpackage. * Non-Trivial Timeout Events are no longer logged. * Fix issue that prevents removal of stopped VMs (i.e VMs that are successfully migrated). * Improved unit handling added. e.g MB, Mb, mB, mb are all Mega Bytes. * VM migration is now possible on IPv6 host. * Destination VM (receiving side of migration of a vm) now correctly expects incoming data on free ephemeral port. * Traceback is no longer output to screen, instead it goes to log file. * All sanity checks are put into a single file. These checks are run by ucloud.py before running any of ucloud component.
This commit is contained in:
parent
6fa77bce4d
commit
cc0ca68498
26 changed files with 1101 additions and 294 deletions
47
ucloud.py
47
ucloud.py
|
|
@ -3,6 +3,7 @@ import multiprocessing as mp
|
|||
import logging
|
||||
|
||||
from os.path import join as join_path
|
||||
from sanity_checks import check
|
||||
|
||||
if __name__ == "__main__":
|
||||
arg_parser = argparse.ArgumentParser(prog='ucloud',
|
||||
|
|
@ -21,30 +22,36 @@ if __name__ == "__main__":
|
|||
format="%(name)s %(asctime)s: %(levelname)s - %(message)s",
|
||||
datefmt="%d-%b-%y %H:%M:%S",
|
||||
)
|
||||
try:
|
||||
check()
|
||||
|
||||
if args.component == 'api':
|
||||
from api.main import main
|
||||
if args.component == 'api':
|
||||
from api.main import main
|
||||
|
||||
main()
|
||||
elif args.component == 'host':
|
||||
from host.main import main
|
||||
main()
|
||||
elif args.component == 'host':
|
||||
from host.main import main
|
||||
|
||||
hostname = args.component_args
|
||||
mp.set_start_method('spawn')
|
||||
main(*hostname)
|
||||
elif args.component == 'scheduler':
|
||||
from scheduler.main import main
|
||||
hostname = args.component_args
|
||||
mp.set_start_method('spawn')
|
||||
main(*hostname)
|
||||
elif args.component == 'scheduler':
|
||||
from scheduler.main import main
|
||||
|
||||
main()
|
||||
elif args.component == 'filescanner':
|
||||
from filescanner.main import main
|
||||
main()
|
||||
elif args.component == 'filescanner':
|
||||
from filescanner.main import main
|
||||
|
||||
main()
|
||||
elif args.component == 'imagescanner':
|
||||
from imagescanner.main import main
|
||||
main()
|
||||
elif args.component == 'imagescanner':
|
||||
from imagescanner.main import main
|
||||
|
||||
main()
|
||||
elif args.component == 'metadata':
|
||||
from metadata.main import main
|
||||
main()
|
||||
elif args.component == 'metadata':
|
||||
from metadata.main import main
|
||||
|
||||
main()
|
||||
main()
|
||||
|
||||
except Exception as e:
|
||||
logging.exception(e)
|
||||
print(e)
|
||||
Loading…
Add table
Add a link
Reference in a new issue