diff --git a/.gitignore b/.gitignore index 0772847..7a40b40 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .vagrant venv +.vscode .idea .DS_* *.pyc diff --git a/conf/requirements.txt b/conf/requirements.txt index e01113b..acfaaed 100644 --- a/conf/requirements.txt +++ b/conf/requirements.txt @@ -1,6 +1,5 @@ Django==1.8.11 websockify==0.8.0 gunicorn==19.3.0 -libvirt-python==1.3.2 -#http://github.com/retspen/retspen.github.io/raw/master/libxml2-python-2.9.1.tar.gz -http://git.gnome.org/browse/libxml2/snapshot/libxml2-2.9.1.tar.gz#egg=libxml2-python&subdirectory=python +libvirt-python==3.10 +libxml2-python3==2.9.5 diff --git a/console/templates/console-base.html b/console/templates/console-base.html index 10ef4a3..08aaf27 100644 --- a/console/templates/console-base.html +++ b/console/templates/console-base.html @@ -121,6 +121,9 @@ function log_info(msg) { log_message(msg,'info'); } + {% if console_error %} + log_error('{{ console_error|escapejs }}'); + {% endif %} {% block foot %}{% endblock %} diff --git a/console/views.py b/console/views.py index 4651c87..6828e1c 100644 --- a/console/views.py +++ b/console/views.py @@ -16,6 +16,7 @@ def console(request): :param request: :return: """ + console_error = None if request.method == 'GET': token = request.GET.get('token', '') @@ -49,7 +50,8 @@ def console(request): elif console_type == 'spice': response = render(request, 'console-spice.html', locals()) else: - response = "Console type %s no support" % console_type + console_error = "Console type: %s no support" % console_type + response = render(request, 'console-vnc.html', locals()) response.set_cookie('token', token) return response diff --git a/dev/libvirt-bootstrap.sh b/dev/libvirt-bootstrap.sh index e129177..66eb6de 100644 --- a/dev/libvirt-bootstrap.sh +++ b/dev/libvirt-bootstrap.sh @@ -375,7 +375,7 @@ __check_end_of_life_versions # install_centos() { if [ $DISTRO_MAJOR_VERSION -ge 6 ]; then - yum -y install qemu-kvm libvirt bridge-utils python-libguestfs supervisor || return 1 + yum -y install qemu-kvm libvirt bridge-utils python-libguestfs supervisor cyrus-sasl-md5 || return 1 fi return 0 } @@ -401,6 +401,13 @@ install_centos_post() { echoerror "/etc/libvirt/qemu.conf not found. Exiting..." exit 1 fi + if [ -f /etc/sasl2/libvirt.conf ]; then + sed -i 's/: gssapi/: digest-md5/g' /etc/sasl2/libvirt.conf + sed -i 's/#sasldb_path/sasldb_path/g' /etc/sasl2/libvirt.conf + else + echoerror "/etc/sasl2/libvirt.conf not found. Exiting..." + exit 1 + fi if [ $DISTRO_MAJOR_VERSION -lt 7 ]; then if [ -f /etc/supervisord.conf ]; then curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd > /usr/local/bin/gstfsd diff --git a/storages/templates/create_stg_block.html b/storages/templates/create_stg_block.html index 24dd2fd..fdb5a6e 100644 --- a/storages/templates/create_stg_block.html +++ b/storages/templates/create_stg_block.html @@ -66,7 +66,7 @@
- +
@@ -217,7 +217,7 @@
- +
@@ -235,4 +235,4 @@ -{% endif %} \ No newline at end of file +{% endif %} diff --git a/webvirtcloud/settings.py.template b/webvirtcloud/settings.py.template index c78ec8c..d6d3131 100644 --- a/webvirtcloud/settings.py.template +++ b/webvirtcloud/settings.py.template @@ -8,9 +8,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = '' -DEBUG = True - -TEMPLATE_DEBUG = DEBUG +DEBUG = True ALLOWED_HOSTS = ['*'] @@ -45,7 +43,7 @@ MIDDLEWARE_CLASSES = ( ) AUTHENTICATION_BACKENDS = ( - #'django.contrib.auth.backends.RemoteUserBackend', + 'django.contrib.auth.backends.ModelBackend', #'accounts.backends.MyRemoteUserBackend', ) diff --git a/webvirtcloud/wsgi.py b/webvirtcloud/wsgi.py index a9bf44c..35ceb9b 100644 --- a/webvirtcloud/wsgi.py +++ b/webvirtcloud/wsgi.py @@ -7,10 +7,7 @@ For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ -execfile('/srv/webvirtcloud/venv/bin/activate_this.py', dict(__file__='/srv/webvirtcloud/venv/bin/activate_this.py')) - -import os, sys -sys.path.append('/srv/webvirtcloud') +import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings") from django.core.wsgi import get_wsgi_application diff --git a/webvirtcloud/wsgi_custom.py b/webvirtcloud/wsgi_custom.py new file mode 100644 index 0000000..a9bf44c --- /dev/null +++ b/webvirtcloud/wsgi_custom.py @@ -0,0 +1,17 @@ +""" +WSGI config for webvirtcloud project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ +""" + +execfile('/srv/webvirtcloud/venv/bin/activate_this.py', dict(__file__='/srv/webvirtcloud/venv/bin/activate_this.py')) + +import os, sys +sys.path.append('/srv/webvirtcloud') +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings") + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application()