Create console.log ahead of time. This ensures that the user running nova-compute maintains read privileges.

This commit is contained in:
Soren Hansen
2010-08-27 20:17:30 +02:00
parent 75eaa1b8f8
commit 58e1886113

View File

@@ -23,7 +23,7 @@ A connection to a hypervisor (e.g. KVM) through libvirt.
import json
import logging
import os.path
import os
import shutil
from twisted.internet import defer
@@ -218,6 +218,8 @@ class LibvirtConnection(object):
f.write(libvirt_xml)
f.close()
os.close(os.open(basepath('console.log'), os.O_CREAT | os.O_WRONLY, 0660))
user = manager.AuthManager().get_user(data['user_id'])
project = manager.AuthManager().get_project(data['project_id'])
if not os.path.exists(basepath('disk')):